Hi all,

I am writing a code to check whether the background of a binary image is black 
or not. If the background is white, colors of the binary image are inverted 
(i.e. the color of the background should be always black)

I have done this so far:

ImageProcessor imp = clustering_result.getProcessor();
                  
                  if(Prefs.blackBackground==false){
                  imp.invert();
                  
                  clusteredImage=imp.getBufferedImage();
                  }
                  
                  else {
                  clusteredImage=imp.getBufferedImage();

                  }
                 

But it does not work! Any help please?

Regards,
Safaa
_______________________________________________
ImageJ-devel mailing list
ImageJ-devel@imagej.net
http://imagej.net/mailman/listinfo/imagej-devel

Reply via email to