Enhance Contrast not idempotent? (was: Re: 8-bit to RGB changes data?)
Posted by
Michael Schmid on
Apr 13, 2016; 1:28pm
URL: http://imagej.273.s1.nabble.com/8-bit-to-RGB-changes-data-tp5016110p5016117.html
Hi Ed,
sorry, I cannot reproduce this. Running 'Enhance contrast' repeatedly
always results in the same setting of the display range. Try this macro:
for (i=0; i<5; i++) {
run("Enhance Contrast...", "saturated=0.1");
getMinAndMax(min, max);
print("Display range is "+min+" to "+max);
}
The 'Auto' button of the B&C panel is not idempotent: when pressing it
more than once, the display range is narrowed (a very nice feature!)
Also, 'Enhance Contrast' is not idempotent when you select the checkbox
to equalize the histogram (this modifies the image data).
Michael
________________________________________________________________
Michael Schmid email:
[hidden email]
On 2016-04-12 22:08, Ed Siefker wrote:
> Thanks, running 'setMinAndMax(0, 255)' before the conversion seems to work.
>
> This brings me to another question. Why isn't 'Enhance Contrast' idempotent?
> Repeated application of Enhance Contrast with the same parameters
> e.g. run("Enhance Contrast...", "saturated=0.1");
> results in repeated changing of the image.
>
> Given a histogram, isn't there exactly one value above which 0.1% of values are
> found?
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html