Image binarization (5) : A harder example

The problem with binarization is that except in the most trivial cases, e.g. clear high-contrast objects, such as black text on a white background, or the example of the plane spotters cards, it can be a challenging process. What happens in the simple case of an image that has three main components? A simple algorithm that works well on bimodal images, such as Otsu, will not work as well.

Take for instance this more complex scene.


This scene suffers from a lack of contrast, but we will deal with that in another post. The first question of course is to ask what the purpose of the thresholding is? There is no one definitive feature in the image. But let’s imagine we want to create a B&W image to print a T-shirt with using one colour  (not so unrealistic because people do do this). What’s the best binarization algorithm to use? Otsu? Here is the associated histogram:


Kind-of bimodal, but not exactly… more tiered towards three peaks. But, if one had to definitively split the image into two components there is a place where that can occur… and it will likely be somewhere in the trough between the far left peak, and the larger multi-peak. Binarizing with Otsu produces a threshold value of 117, and produces a reasonable image.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s