|
Part 2: Math, Math, Math
by James Antonakos
Start ý Blob
Analysis ý Edge DetectionýBehind the Mask
ý A Helping Hand from Fourier ý Please
Sir, May I Have Some More? ý Sources and
PDF
BLOB ANALYSIS
A group of pixels organized into a structure
is commonly called a blob. For example, the pixels making up each
cell in an image of red blood cells can be thought of as blobs.
What do you want to know about a blob?
There is a short list of questions.
1. Where are the edges?
2. Where is the center?
3.
How many pixels does it contain?
4. What is the average pixel
intensity?
5. What is the blobýs orientation
(angle)?
|
|
| Figure 1ýTo
find the center of this blob of 26 pixels, use a technique based
in calculus. |
Figure 1 shows a sample blob located
between rows four through 11 and columns six through 13. By borrowing
a technique from calculus, you can easily determine the center of
the blobýs mass. The technique involves counting the number of pixels
in each row and column and multiplying the pixel counts by the respective
row or column numbers, as indicated in Tables 1 and 2. The sum of
all the row products is divided by the total number of pixels in the
blob to find the center row.
|
Row
|
Pixels per
row
|
Product
|
|
4
|
0
|
0
|
|
5
|
3
|
15
|
|
6
|
5
|
30
|
|
7
|
6
|
42
|
|
8
|
6
|
48
|
|
9
|
4
|
36
|
|
10
|
2
|
20
|
|
11
|
0
|
0
|
|
Total
|
191
|
|
Table 1ýHere
you can see the row calculations for the blob of pixels. The
center row equals 191 divided by 26, which equals 7.3.
|
|
Column
|
Pixels per
column
|
Product
|
|
6
|
0
|
0
|
|
7
|
3
|
21
|
|
8
|
5
|
40
|
|
9
|
6
|
54
|
|
10
|
6
|
60
|
|
11
|
4
|
44
|
|
12
|
2
|
24
|
|
13
|
0
|
0
|
|
Total
|
243
|
|
Table 2ýAfter completing the
row calculations, you may compute the column total for the
blob of pixels. The center column equals 243 divided by 26,
which equals 9.3.
|
The same method is used to find the center
column. Figure 2 indicates where the center of the blob is located.
You may think, "Hey James, thatýs not the center," but I
encourage you to make up your own example and try the method. Youýll
see that it really works.
|
|
| Figure 2ýThe center of the
blob is located at row 7.3 and column 9.3. |
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |