I am trying to increase the contrast of an image by some factor x
So far I am able to read in an image, and get its processor like this
ImagePlus im = new ImagePlus(imagePathHere);
ImageProcessor ip = im.getProcessor();
I am aware of ContrastEnhancer.java and ContrastAdjuster.java but I am not sure how they would be used.
Ultimately, I would want something like this
ImagePlus imc = increaseContrast(im, 0.5)
Thank you!
This seems to work:
where i < 100;
When you call
you will get an image with increased contrast.