[ImageJ-bugs] [Bug 938] New: Bug in the Intermodes algorithm of threshold

bugzilla at fiji.sc bugzilla at fiji.sc
Fri Oct 3 09:59:56 CDT 2014


http://fiji.sc/bugzilla/show_bug.cgi?id=938

            Bug ID: 938
           Summary: Bug in the Intermodes algorithm of threshold
           Product: Fiji
           Version: unspecified
          Hardware: PC
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P4
         Component: Plugins
          Assignee: imagej-bugs at imagej.net
          Reporter: gadea.mata at unirioja.es
                CC: gadea.mata at unirioja.es

Dear all,

We're looking for what is the best threshold algorithm for our images. We've
seen that if we use the function "Auto Threshold" to obtain the differents
threshold values for each algortithm, the Intermodes algorithm returns a
different threshold value, that if we use the function "Threshold..." choosing
the Intermodes method.

We've studied the code of both algorithms, and we think that the algorithm
developed in the plugin "Threshold..." has a bug. We've studied the code
available at http://imagej.nih.gov/ij/source/ij/process/AutoThresholder.java,
and we think that the problem arises in Line 199 of such a code. The loop in
Line 199 concerns the computation of the new values of the histogram. For each
step of the loop, the new value of the histogram is calculated using the values
of the updated histogram instead of using the values of the original histogram. 

However, the Intermodes algorithm in the plugin "Auto Thresholder" is correct.

We attached you a minimal macro that reproduces this bug:

run("Neuron (1.6M, 5 channels)");
run("Split Channels");
//close all channels minus channel 2
selectWindow("C5-Rat_Hippocampal_Neuron.tif");
close();
selectWindow("C4-Rat_Hippocampal_Neuron.tif");
close();
selectWindow("C3-Rat_Hippocampal_Neuron.tif");
close();
selectWindow("C2-Rat_Hippocampal_Neuron.tif");
selectWindow("C1-Rat_Hippocampal_Neuron.tif");
close();
selectWindow("C2-Rat_Hippocampal_Neuron.tif");
//AUTO THRESHOLD
run("Auto Threshold", "method=[Try all] white show");
//the threshold value of Intermodes method: 525
close();
selectWindow("C2-Rat_Hippocampal_Neuron.tif");
//THRESHOLD
setAutoThreshold("Intermodes dark");
//run("Threshold...");
setThreshold(1713, 6238); //here, the threshold value is 1713
run("Convert to Mask");
run("Close");

Best regards,

--Gadea Mata Martínez
gadea.mata at unirioja.es
Department of Mathematics and Computer Science
University of La Rioja
Logroño, La Rioja (Spain)

Information about your version of Java:

  os.arch => x86
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) Client VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to:
C:\Users\gamata\PROGRA~1\Fiji.app/java/win32/jdk1.6.0_24//jre
  imagej.dir => C:\Users\gamata\PROGRA~1\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140925235708)
Fiji: http://fiji.sc/update/ (last check:20141002110637)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20141003/48b9d6c0/attachment.html>


More information about the Imagej-bugs mailing list