smallest_rectangle1(Region, Row1, Column1, Row2, Column2)
width:=Column2-Column1
height:=Row2-Row1
for Index := 0 to width by 1
gen_rectangle1(Rectangle, Row1, Column1+Index, Row2, Column1+Index)
intersection(Region, Rectangle, RegionIntersection)
region_features(RegionIntersection, 'area', Value )
VertProjection[Index]:=Value
endfor
for Index := 0 to height by 1
gen_rectangle1(Rectangle, Row1+Index, Column1, Row1+Index, Column2)
intersection(Region, Rectangle, RegionIntersection)
region_features(RegionIntersection, 'area', Value)
HorProjection[Index]:=Value
endfor
HorProjection 水平投影像素個數
VertProjection 垂直投影像素個數
width:=Column2-Column1
height:=Row2-Row1
for Index := 0 to width by 1
gen_rectangle1(Rectangle, Row1, Column1+Index, Row2, Column1+Index)
intersection(Region, Rectangle, RegionIntersection)
region_features(RegionIntersection, 'area', Value )
VertProjection[Index]:=Value
endfor
for Index := 0 to height by 1
gen_rectangle1(Rectangle, Row1+Index, Column1, Row1+Index, Column2)
intersection(Region, Rectangle, RegionIntersection)
region_features(RegionIntersection, 'area', Value)
HorProjection[Index]:=Value
endfor
HorProjection 水平投影像素個數
VertProjection 垂直投影像素個數