This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

Boundaries in gray scale images

From Mathematics Is A Science

Jump to: navigation, search

The idea of Boundary in a binary image is very straightforward.

Sometimes objects in gray scale images look just like ones in binary images but often they have no well defined boundary. (BTW, no well defined boundary – no well defined size!)

Black circle.JPG Black circle blurred.JPG Black circle blurred 0 4.JPG Black circle blurred 0 64.JPG Black circle blurred 0 252.JPG

For example, this is a binary image of a circle and that is the same image blurred. There is clearly just one object here and it looks like circle. But what’s its size? It could be a small spot in the middle, or large circle, or it could be the whole image (why not?). If there are several objects like that, we can’t filter them based on larger/smaller comparison. As a result, we can’t even count them properly because without measuring we can't tell noise from what's important.

But wait a minute, of course, Pixcavator counts objects! How?

The user sets a lower bound on sizes of objects he considers important. Anything smaller is noise. Recall the definition of an object. It is very simple:

An object is either a dark region surrounded by lighter area or a light region surrounded by a darker area.

For example, in the above image we have many-many circular objects. Too many, in fact, because we know that there is only one! So, the objects that we’ve found aren’t actual objects but “potential” objects. At this point we need to select just one. How?

We use the bound chosen by the user! We exclude all potential objects that are smaller than this bound. Good, but even now we still have multiple objects. What do we do? We just take the smallest!

This is the way the ambiguity is resolved in Pixcavator. To experiment with the concepts, download the free Pixcavator Student Edition.

Black circle blurred8.jpg Black circle blurred4.jpg Black circle blurred4arrow.jpg

Roughly, once the bound is set, the object is allowed to grow until its size is over the bound.

Suppose the bound is 100. Then what we present as the output is objects larger than 100 BUT as close as possible to 100. If the gray level changes very gradually, the objects’ sizes end up almost exactly equal 100.

The second slider is for contrast and it operates in the exact same way: the object is allowed to grow until its contrast is over the bound. The logic is the same as before: a priori, if object A has a higher contrast than object B, A is at least as important as B.

Related: Nested boundaries.

See also Objects in gray scale images.