08-07-2010 03:09 PM - edited 08-07-2010 03:13 PM
Hi,
Im doing a project at college, ESPI. What i'm trying to do is subtract two arrays but when I subtract them instead of getting negative values say, 10-11=-1, I get 255. Has anybody got any ideas on how to solve this? Also how do I make it so values that go below 0 will just stay 0.
Colmsxv
08-08-2010 05:03 PM
If you subtract images from each other, they should be limited at the extreme values without wrapping. This means all negative numbers should be rounded to zero.
If you convert the images to arrays, then subtracting images will wrap the values. -1 wraps to 255, -2 wraps to 254, etc.
If you want to have negative values, convert your images to I16 before subtracting.
There is also an option to do absolute subtraction, where the absolute value of the difference is retained. -1 becomes 1, -2 becomes 2, etc.
Bruce
08-26-2010 11:30 AM
Thanks Bruce, that worked!
Colmsxv