5/2/2024 0 Comments Imagej threshold selection gui![]() The threshold was determined on the basis of the histogram of pixel intensities as illustrated in Figure 2. Each contiguous region of the picture darker than a fixed threshold was taken to be an object of interest. Image analysis: Individual objects were identified by a thresholding procedure. In addition to Figure 2 itself cited above, there is a short description from the paper: A., 1977, Automatic Measurement of Sister Chromatid Exchange Frequency, Journal of Histochemistry and Cytochemistry 25 (7), pp. The algorithm (very simple) was originally “described” by Zack, G. However, I’m not familiar with how split is used after it’s been returned. If my pseudocode is correct, I believe line 144 is a bug in the ImageJ implementation. # determine which direction the triangle faces # determine best min and max indices based on largest separation # find max and min histogram values and indices (NB: could be multiple maxima and minima) We can modify the code above to get: double newDistance = height - ((double)(histogram-histogram) / (double)(histogram-histogram)) įor completeness, I’ll also post my pseudocode of the Triangle algorithm: # INPUT: histogram (i.e. One can account for the case where there is “no zero frequency bin” by subtracting off the histogram minimum during your normalization (i.e. I figured I’d answer this hanging question for any future readers. ![]() This is an old thread, but it happens to be the most useful information about the Triangle Algorithm around. I will try to wrap my head around it does for histograms without a zero frequency bin (that’s never addressed in the references) The brightness value bo where the distance between h and the line is maximal is the threshold value, that is, = bo”įor (int i = min + 1 i splitDistance) Nx = histogram // -min // histogram Īnd “The distance d between the line and the histogram h is computed for all lowest value bmin = (p=0)% in the image nx is just the max frequency as the other point has freq=0 Which (as far as I can see) corresponds to these lines… // describe line by nx * x + ny * y - d = 0 “A line is constructed between the maximum of the histogram at brightness bmax and the lowest value bmin = (p=0)% in the image.” Where ImageJ computes at each bin the following values for distance: newDistance = 0.067267 Can anyone explain me where my assumptions are wrong?įor sake of an example, we can use this very short histogram: The current implementation says it was modified from the same links on those posts (“modified from Johannes Schindelin plugin”) but those are now all dead. Googling about the topic I found the original ImageJ post asking for this algorithm and announcing its first implementation. However, this does not match what I get from ImageJ. Or via trigonometric ratios d = sin (0.7854) * h Then both cathetus of the shorter triangles have length d which can be computed as: h² = d² + d² d = sqrt (h² /2) Since the height and width the histogram, the cathetus of the large triangle, are normalized to 1, β is always 45 degrees and therefore so is α. The way I envision this being computed is with smaller right triangles inside this large triangle, where their hypotenuse h is parallel to the y axis and we try to maximize the length of the cathetus d. The objective is to find the histogram bin with the greatest distance between its top and the hypotenuse of the triangle, in a line perpendicular to the hypotenuse.įor sake of simplicity, let us ignore the 0.2 fixed offset mentioned on the paper and ImageJ’s extra step to guess on what side of the histogram is the high peak. ![]() My understanding of the references is that the histogram is enclosed in a right triangle between the maximum peak and the end of the histogram bins. I’ve also seen it described on Fundamentals of Image Processing and Microscope Image Processing. The description is just this figure and its caption: I just can’t match the computations performed by ImageJ with what’s on the references. I’ve been trying to wrap my head around ImageJ’s implementation of the triangle algorithm but not doing very well at it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |