Changeset 26322
- Timestamp:
- Dec 2, 2009, 12:07:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/psModules/src/imcombine/pmSubtractionVisual.c
r26321 r26322 30 30 31 31 //variables to determine when things are plotted 32 static bool plotConvKernels = true;33 static bool plotStamps = true;34 static bool plotLeastSquares = true;35 static bool plotImage = true;32 static bool plotConvKernels = false; 33 static bool plotStamps = false; 34 static bool plotLeastSquares = false; 35 static bool plotImage = false; 36 36 37 37 // variables to store plotting window indices … … 276 276 float NXf = sqrt(stamps->num); 277 277 NX = (int) NXf == NXf ? NXf : NXf + 1.0; 278 278 279 279 float NYf = stamps->num / NX; 280 280 NY = (int) NYf == NY ? NYf : NYf + 1.0; … … 291 291 differenceImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 292 292 convolutionImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 293 293 294 294 psImageInit (sourceImage, 0.0); 295 295 psImageInit (targetImage, 0.0); … … 313 313 // insert the (target) kernel into the (target) image: 314 314 for (int y = -footprint; y <= footprint; y++) { 315 for (int x = -footprint; x <= footprint; x++) {316 targetImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x];317 }315 for (int x = -footprint; x <= footprint; x++) { 316 targetImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x]; 317 } 318 318 } 319 319 320 320 // insert the (source) kernel into the (source) image: 321 321 for (int y = -footprint; y <= footprint; y++) { 322 for (int x = -footprint; x <= footprint; x++) {323 sourceImage->data.F32[y + NYpix][x + NXpix] = source->kernel[y][x];324 }325 } 326 322 for (int x = -footprint; x <= footprint; x++) { 323 sourceImage->data.F32[y + NYpix][x + NXpix] = source->kernel[y][x]; 324 } 325 } 326 327 327 // insert the (convolution) kernel into the (convolution) image: 328 328 for (int y = -footprint; y <= footprint; y++) { 329 for (int x = -footprint; x <= footprint; x++) {330 convolutionImage->data.F32[y + NYpix][x + NXpix] = -convolution->kernel[y][x];331 }332 } 333 329 for (int x = -footprint; x <= footprint; x++) { 330 convolutionImage->data.F32[y + NYpix][x + NXpix] = -convolution->kernel[y][x]; 331 } 332 } 333 334 334 // insert the (difference) kernel into the (difference) image: 335 335 for (int y = -footprint; y <= footprint; y++) { 336 for (int x = -footprint; x <= footprint; x++) {337 differenceImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x] - background - source->kernel[y][x] * norm;338 }336 for (int x = -footprint; x <= footprint; x++) { 337 differenceImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x] - background - source->kernel[y][x] * norm; 338 } 339 339 } 340 340 341 341 // insert the (residual) kernel into the (residual) image: 342 342 for (int y = -footprint; y <= footprint; y++) { 343 for (int x = -footprint; x <= footprint; x++) {344 residualImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x] - background - source->kernel[y][x] * norm + convolution->kernel[y][x];345 }343 for (int x = -footprint; x <= footprint; x++) { 344 residualImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x] - background - source->kernel[y][x] * norm + convolution->kernel[y][x]; 345 } 346 346 } 347 347 return true; … … 400 400 for (int i = 0; i < kernels->num; i++) { 401 401 x->data.F32[i] = i; 402 y->data.F32[i] = p_pmSubtractionSolutionCoeff(kernels, polyValues, i, false);402 y->data.F32[i] = p_pmSubtractionSolutionCoeff(kernels, polyValues, i, false); 403 403 graphdata.ymin = PS_MIN(graphdata.ymin, y->data.F32[i]); 404 404 graphdata.ymax = PS_MAX(graphdata.ymax, y->data.F32[i]);
Note:
See TracChangeset
for help on using the changeset viewer.
