|
> Under the "Image" menu there is the "Adjust" submenu from
> which you can choose "Brightness/Contrast". From the
> Brightness/Contrast window you can click the "Auto" button.
>
> Okay, say within a plugin I've just created an image. Before I
> display this image I want to perform this auto-brightness/contrast.
> adjustment Is there an easy way to do this?
Here is one way
new ContrastEnhancer().stretchHistogram(ip, 0.5);
where ip is an ImageProcessor. Or display the image and run the
Process>Enhance Contrast command using
IJ.run("Enhance Contrast", "saturated=0.5");
In a macro, use
run("Enhance Contrast", "saturated=0.5");
-wayne
|