Graphics Reference
In-Depth Information
Threshold
=
min(Ave
,
Ave
)
( 8 )
1
2
3.2
Erosion
b is the structural element, that is the template of erosion. f is the set of images. The
formula of erosion is as the following:
{
}
ˆ
f
b
=
x
(
b
)
f
( 9 )
x
The formula shows the erosion means that any element in set x can be the center of
template b (note that b is still included in f).
3.3
Target Extraction
The target extraction algorithm calculates the number of pixels in each white area and
sorts in descending order. Only the top N areas' pixels remain the same and pixels
in other areas are set to zero. The algorithm is described as the following:
(1) The searching window's size Size and N (the number of areas which are re-
served) are given. The setting mark image
flag ( nHeight
and nWidth are respectively the length and the width of the original image), queue
que and counting array
[
nHeight
][
nWidth
]
area
[
1000
]
. All the pixels in the mark image and counting
area are initialized to zero.
(2) The binarization image is scanned line by line until the first pixel (the gray val-
ue of which is not zero). If this pixel's corresponding point in the mark image is 0,
this corresponding point's gray value would be set to n ( n is the area numbering
from 1 to 1000) and its coordinate is put into the rear of que .
(3) In the binarization image, the coordinate in the head node of the queue que is
used as the center point of searching window. The pixels, in the searching window,
are find, the gray value of which is not zero and its corresponding point, in the mark
image, is unmarked. Those pixels' coordinate are put in the rear of que separately
and its corresponding point's gray value, in the mark image, is set to n .
(4) Repeating step (3) until que is empty;
(5) Executing Step (2) (3) (4), until completion of image scanning;
(6) Counting the number of pixels in each area and putting the number in
]
[
1000
]
array
area
[
1000
area
[ n
]
holds the number of pixels in the area n ).
(
area in descending order. Only reserving the top N areas
and setting pixels, in the other areas, to zero.
[
1000
]
(7) Sorting
Search WWH ::




Custom Search