Categories
halftoning

Thresholding with a Pattern

Last time, I used the Cumulative Distribution Function of an image’s intensity to make a black and white image. This time, I’ll use a different pattern as the basis for halftoning the image.  For example, I’ll use the following pattern of circles on a regular grid:

This time, instead of finding a threshold from the image’s CDF, we’ll use the CDF of the pattern. Mathematically, with image I and pattern Q, we’ll get the threshold t = F_Q^{-1}(1-\bar{I}) and then create the black and white image B = (P>t):

That’s no good. The threshold is applied to the entire image, with no respect for the local brightness. To fix that, we can break the image up into lots of little sections, and do local thresholding in each of those. The following images are: locally thresholded using the pattern, globally on the image, and locally using the image itself.

Much better! The local thresholding is more responsive to the local brightness, but there are discontinuities at the edges of the partitions. We’ll see about improving those soon.

For fun, here’s a few more patterned images. Neither the pattern nor the partitions need to be regular shapes. It’s interesting if the pattern reflects the underlying image, but a random distribution of dots works fine, too. So many possibilities!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.