- Timestamp:
- Dec 3, 2009, 12:20:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionVisual.c
r26318 r26332 263 263 static psImage *targetImage = NULL; 264 264 static psImage *residualImage = NULL; 265 static psImage *fresidualImage = NULL; 265 266 static psImage *differenceImage = NULL; 266 267 static psImage *convolutionImage = NULL; … … 289 290 targetImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 290 291 residualImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 292 fresidualImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 291 293 differenceImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); 292 294 convolutionImage = psImageAlloc (NXpix, NYpix, PS_TYPE_F32); … … 295 297 psImageInit (targetImage, 0.0); 296 298 psImageInit (residualImage, 0.0); 299 psImageInit (fresidualImage, 0.0); 297 300 psImageInit (differenceImage, 0.0); 298 301 psImageInit (convolutionImage, 0.0); … … 343 346 for (int x = -footprint; x <= footprint; x++) { 344 347 residualImage->data.F32[y + NYpix][x + NXpix] = target->kernel[y][x] - background - source->kernel[y][x] * norm + convolution->kernel[y][x]; 348 } 349 } 350 351 // insert the (fresidual) kernel into the (fresidual) image: 352 for (int y = -footprint; y <= footprint; y++) { 353 for (int x = -footprint; x <= footprint; x++) { 354 fresidualImage->data.F32[y + NYpix][x + NXpix] = residualImage->data.F32[y + NYpix][x + NXpix] / target->kernel[y][x]; 345 355 } 346 356 } … … 358 368 pmVisualScaleImage(kapa1, convolutionImage, "Convolution Stamps", 2, true); 359 369 370 // pmVisualScaleImage(kapa2, fresidualImage, "Frac Residual Stamps", 2, true); 371 pmVisualScaleImage(kapa2, residualImage, "Residual Stamps", 1, true); 360 372 pmVisualScaleImage(kapa2, differenceImage, "Difference Stamps", 0, true); 361 pmVisualScaleImage(kapa2, residualImage, "Residual Stamps", 1, true);362 373 pmVisualAskUser(NULL); 363 374 … … 367 378 psFree(differenceImage); 368 379 psFree(residualImage); 380 psFree(fresidualImage); 369 381 370 382 targetImage = NULL; … … 373 385 differenceImage = NULL; 374 386 residualImage = NULL; 387 fresidualImage = NULL; 375 388 376 389 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
