Login  Register

Antwort: Re: Antwort: Re: How to call "Contrast Enhancer" from Java plugin

Posted by Joachim Wesner on Sep 08, 2009; 9:06pm
URL: http://imagej.273.s1.nabble.com/How-to-call-Contrast-Enhancer-from-Java-plugin-tp3691264p3691268.html

Hi Wayne,

YES, I agree, this is the best compromise. The asymmetry seems to only come
up with higher % values and my special data files with few outliers.

I was a bit puzzled, because I assumed that both cases of contrast
enhancement actually use the very same algorithm (or even class/method
initially) and that the value of 0.5%
might be somehow encoded in the "Auto" code (did not yet really analyze the
source).

Thanks

Joachim Wesner



                                                                           
             Rasband Wayne                                                
             <[hidden email]>                                                
             Gesendet von:                                              An
             ImageJ Interest            [hidden email]                
             Group                                                   Kopie
             <[hidden email].                                            
             GOV>                                                    Thema
                                        Re: Antwort: Re: How to call      
                                        "Contrast Enhancer" from Java      
             08.09.2009 22:13           plugin                            
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




> Hi Wayne,
>
> thanks for the hint, I now understand the difference between IJ.run
> and
> IJ.runPlugIn!
>
> However, this seems to reveal some bug in the contrast enhancer:
>
> If you look in the sourecode of the "B&C" window, you see that the
> "Auto"
> button that I would like to use has it´s own built-in contrast enhan
> cer
> which seems to work fine. HOWEVER, it records
>
>      run("Enhance Contrast", "saturated=0.5");
>
> instead! What I find with my data that there seems to be a bug in
> the true
> ContrastEnhancer, the result is NOT the same and depends strongly on
> the %
> value given, for 0.1 there is practically no
> effect, while 0.5 percent leads to a strongly asymmetrical  clipping
> of
> much more than 0.5%!

A saturation value of 0.35 seems to produce results closest to what
you get when clicking on "Auto" in the "B&C" window, so I changed the
value that gets recorded from 0.5 to 0.35.

-wayne


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________