Compute modal gray value in KNIME/ImageJ2

While looking for a solution to compute the largest overlap between segmented objects of two or more segmented images, in this topic on the KNIME forum:

… I was considering measuring the modal gray value (i.e. the most frequent intensity value) in the index image of the reference segmentation; but to my surprise, neither the Image Segment Features node nor the Feature Calculator (beta) node has ‘mode’ or similar in their choice of features.

While the modal gray value is one of the measurement choices in ImageJ 1.x’ Set Measurements… command, this feature apparently isn’t available in ImageJ2 yet. As a workaround, we can determine the maximum of the histogram, as discussed here:

Is there any other (possibly easier) way to get the modal gray value for an object or ROI in ImageJ2 and/or KNIME?

EDIT: there was no issue for it yet, so I filed one:

1 Like

Do you mean simpler than one pass through the image (or its histogram)? I doubt it.
But even so, what value would you expect when there is multimodal distribution? The smallest/largest mode?

1 Like