|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Mean image subtractionI have created a mean image out of all the images in a series. Now i would like to subtract the mean image from the actual original image. I do it something like this
int origSize = targetImage.getWidth() * targetImage.getHeight(); int subSize = meanImage.getWidth() * meanImage.getHeight(); for (int x = 0; x < meanImage.getWidth(); x++) { for(int y = 0; y < meanImage.getHeight(); y++) { int subPix = meanImage.get(x, y); int origPix = targetImage.get(x, y); double newPix = origPix - subPix; targetImage.set(x, y, (int) Math.round(newPix)); } } I don't see the proper effect on the canvas when i apply this? its completely blacked out. Any ideas? |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |