Image Processing Reference
Fig. 12.7 The effect of applying different sized median filters
When SB and Mick finally arrived at this sub-block they were pretty content with
themselves. They knew that once the input image could be converted into a binary
image where the objects of interest were isolated from all other objects, then the
goal was close. First, of course, they had to combine the object pixels (the white
pixels) into the groups of connected object pixels—the labeling process.
“Mick, I can't find anything about labeling in the topic.”
“It's called BLOB extraction in there,” Mick replied while gesturing at the topic.
“Of course it is”, SB said in an ironic tone. He found the section and started to
read. “Should we use 4-connectivity or 8-connectivity?”
“After we have median filtered the binary image, the objects are quite smooth.”
“Meaning that the connectivity will not make a big difference, hence use 4-
“It's faster, and as I just said, it won't make a big difference.”
“I see.” SB quickly implemented the BLOB extraction algorithm and now had
a number of labeled BLOBs. Two things now remained, finding the BLOBs repre-
senting the feet and finding the center point of each foot. To this end some features
needed to be extracted from each BLOB.
While filtering the noise they had realized that the size of a BLOB is an excellent
feature when classifying BLOBs as feet or noise. So they ignored BLOBs that were
too small and too big, and now only the feet remained. In the topic, Eq. 7.2 showed
how to calculate the center of the BLOB (foot). When SB saw the equations, how-
ever, he became pale. He hated when an equation contained a Greek letter. “Why
can't they just use ordinary letters?”, he was asking himself, when he suddenly got
an idea (anything to avoid using Greek letters).
“Mick, the position of the feet, is that critical?”
“What do you mean?”
“Does it matter if it's a few pixels off?”
“No, not really.”
“Then why don't we use the center of the bounding box instead of the center of