lines_color,lines_gauss
lines_color:提取有颜色的线的轮廓及宽度;
lines_gauss:提取较弯曲或灰度的线的轮廓及宽度。
为了显示轮廓及线宽,通常要用:
get_contour_attrib_xld (Line, ‘width_right’, WidthR)
get_contour_attrib_xld (Line, ‘width_left’, WidthL)
EdgeRR := Row + cos(Angle) * WidthR
EdgeRC := Col + sin(Angle) * WidthR
EdgeLR := Row - cos(Angle) * WidthL
EdgeLC := Col - sin(Angle) * WidthL
gen_contour_polygon_xld (EdgeR, EdgeRR, EdgeRC)
gen_contour_polygon_xld (EdgeL, EdgeLR, EdgeLC)
或者:
get_contour_xld (Line, Row, Col)
get_contour_attrib_xld (Line, ‘angle’, Angle)
get_contour_attrib_xld (Line, ‘width_left’, WidthL)
get_contour_attrib_xld (Line, ‘width_right’, WidthR)
RowR := Row + cos(Angle) * WidthR * sqrt(0.75)
ColR := Col + sin(Angle) * WidthR * sqrt(0.75)
RowL := Row - cos(Angle) * WidthL * sqrt(0.75)
ColL := Col - sin(Angle) * WidthL * sqrt(0.75)
disp_polygon (WindowID, RowL, ColL)
disp_polygon (WindowID, RowR, ColR)
类似于下面这样: