3/10/2024 0 Comments Threshold imagej fiji![]() The value of 525 is just the min value of the image-1. The Intermodes threshold method 'fails' in the 16bit image because the histogram is not bimodal. Not sure why, but hope to update this soon. I am looking into this in more detail and because I found some unexpected behaviour if one chooses to set the threshold but not to convert to mask. I think in 16bit this is implemented as a mapped histogram with 256 bins, so you would expect some difference. However what you get from the drop box when you use Edit>Adjust>Threshold and then select the Intermodes from the drop list, this is a different adaptation of the algorithms above that Wayne added. 525).įurthermore, in both cases, the Log window says that a proper Intermodes threshold was not found after 10000 iterations, so the value, so you should take that result with caution, it is a guessed value, not a converged one. The command Edit>Adjust>Auto Threshold both in ImageJ1 (if you downloaded the Auto Threshold plugin from my site) and in Fiji (already there by default) actually return the same value for the Intermodes method with the macro you posted (i.e. Gadea: Could you please confirm that the ImageJ 1.x code produces the correct result, and the Fiji Auto_Threshold code an incorrect one? If so, I will fix the bug in the two affected libraries. Since it was ported from Fiji's Auto_Threshold, it also suffers from this bug. Right?Īs an aside: there is a third implementation, recently ported from Fiji's Auto_Thresold, in the ImageJ OPS library: So I conclude that the ImageJ 1.x result is correct, while the Fiji Auto_Threshold result is incorrect. However, seeing as how the minimum data value of the entire "Neuron" sample image is 526, the value 525 seems obviously wrong to me. It was not clear to me from your bug report which algorithm you believe to be correct, and which incorrect. The Fiji Auto_Threshold implementation returns 525. The ImageJ 1.x implementation returns 1713 when "Dark background" is checked. The ImageJ 1.x implementation is in a class called AutoThresholder:Īnd the "Auto Threshold" implementation, which is part of Fiji, can be found at: Thanks for the report, and macro to reproduce! Information about the version of each plugin: ![]() Imagej.dir => C:\Users\gamata\PROGRA~1\Fiji.app JAVA_HOME is set to: C:\Users\gamata\PROGRA~1\Fiji.app/java/win32/jdk1.6.0_24//jre Information relevant to JAVA_HOME related problems: Java.vm.name => Java HotSpot(TM) Client VM Gadea Mata of Mathematics and Computer Science SetThreshold(1713, 6238) //here, the threshold value is 1713 the threshold value of Intermodes method: 525 Run("Auto Threshold", "method= white show") SelectWindow("C1-Rat_Hippocampal_Neuron.tif") ![]() ![]() SelectWindow("C2-Rat_Hippocampal_Neuron.tif") SelectWindow("C3-Rat_Hippocampal_Neuron.tif") SelectWindow("C4-Rat_Hippocampal_Neuron.tif") SelectWindow("C5-Rat_Hippocampal_Neuron.tif") We attached you a minimal macro that reproduces this bug: However, the Intermodes algorithm in the plugin "Auto Thresholder" is correct. 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. The loop in Line 199 concerns the computation of the new values of the histogram. We've studied the code available at, and we think that the problem arises in Line 199 of such a code. We've studied the code of both algorithms, and we think that the algorithm developed in the plugin "Threshold." has a bug. 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're looking for what is the best threshold algorithm for our images.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |