I have a a set of 24bit images with bright reflective spots washing out the underlying detail. While I'm interested in tone mapping algorithms, since these bright spots are purely noise I would like to threshold them out and render the rest. The histogram of the image looks like:


and is slightly bimodal in the tail where the overexposed pixels form a slight bulge. Sometimes this bulge is larger or smaller, but it's never dominate and the tail of valid pixels is fairly long.

Is there an efficient approach to identify the boundary of a bimodal distribution (even in this challenging case)? I recall an algorithm that iterates to identify a midpoint between two unbalanced "chunks" of a distribution but cannot recall its name. Ideally, the algorithm would find a theshold of about 3500 so that the very bright pixels are thresholded off.


What you are looking for called Otsu Method / Otsu Thresholding.
It solves an optimization problem to set the optimal threshold between two modal distribution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.