Changeset 12742 for trunk/psModules/src/imcombine/pmImageCombine.c
- Timestamp:
- Apr 4, 2007, 12:42:48 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmImageCombine.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmImageCombine.c
r11115 r12742 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2007-0 1-16 23:51:51$10 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2007-04-04 22:42:48 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 375 375 image, this routine determines the size of the input image which maps to that 376 376 image, and returns the result in a psRegion struct. 377 377 378 378 XXX: Basically, this routine is only guaranteed to work if the transform is 379 379 linear. 380 380 381 381 XXX: Shouldn't this functionality be part of psImageTransform()? 382 382 *****************************************************************************/ … … 491 491 pmRejectPixels(images, errors, inToOut, outToIn, rejThreshold, 492 492 gradLimit) 493 493 494 494 XXX: Optimization: we don't need to transform the entire mask image. 495 495 XXX: The inToOut and outToIn transforms are confusing. Verify that what … … 591 591 // in other images. 592 592 // 593 594 psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, 595 transformedImage, NULL, NULL, 596 0, 0.0, 0.0, 0, 0, 0.0); 597 593 598 for (psS32 p = 0 ; p < pixelList->n ; p++) { 594 599 inCoords->x = 0.5 + (psF32) (pixelList->data[p]).x; 595 600 inCoords->y = 0.5 + (psF32) (pixelList->data[p]).y; 596 601 psPlaneTransformApply(outCoords, myInToOut, inCoords); 597 psF32 maskVal = (psF32) psImagePixelInterpolate(transformedImage, outCoords->x, outCoords->y, 598 NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR); 602 double maskVal; 603 if (!psImageInterpolate(&maskVal, NULL, NULL, outCoords->x, outCoords->y, interp)) { 604 psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); 605 psFree(interp); 606 psFree(maskImage); 607 psFree(maskImageF32); 608 psFree(transformedImage); 609 psFree(inCoords); 610 psFree(outCoords); 611 psFree(rejects); 612 return NULL; 613 } 599 614 if (maskVal > rejThreshold) { 600 615 … … 656 671 } 657 672 673 psFree(interp); 658 674 psFree(maskImage); 659 675 psFree(maskImageF32);
Note:
See TracChangeset
for help on using the changeset viewer.
