|
Algorithm 2 ROI Classification. |
Input: A symbolic image with ROIs labeled by sequential integers. Output: The category of each ROI in the map. Begin:
-
1:
Detect the maximum integer in the symbolic image: ;
-
2:
Perform Canny edge detector to the image, then search the pixel coordinates on the edge of each ROI:
-
3:
for i = 1 to
do
-
4:
for
= 0 to 90 do
-
5:
Calculate the coordinate of the edge pixels in the rotated Cartesian coordinate system: ;
-
6:
Calculate the two-dimensional spans of the ROI: , ;
-
7:
Initialize as a distributed ROI under ;
-
8:
Calculate the side-lengths of the MBR: , ;
-
9:
if
then
-
10:
is a point ROI under ;
-
11:
if
then
-
12:
is a quasi-point ROI under ;
-
13:
end if
-
14:
end if
-
15:
end for
-
16:
Traverse all and classify according to (16).
-
17:
end for
|