Coutours 属于XLD结构
a) 图 边缘覆盖在原始图像上
b)缩放 a)中的 矩形区域,凸显控制点
c)轮廓可以分割成线。圆。椭圆等,可以得出它们的 角度 中心 半径等
Basic Concept
create XLD contours
最常用的方法是 用Extract Edges Or Lines方法,结果将转化为XLD
Process XLD Contours
典型的情况 如 a)所示,只作用于指定的区域
许多时候 ROI选择过大 如图 b) ,这个时候要把 轮廓进行分割,只选择平行的部分 如图 c)
另外的原因,处理轮廓是因为包换了不希望得到的噪声,比如低对比度。
Perform Fitting
通过 fitting 操作,(a line, a rectangle, or a circular or elliptic arc,)来逼近(a line, a rectangle, or a circular or elliptic arc)。
Extract Features
From both raw contours and processed contour parts features can be determined. Some of these consider
the contour as a linear object. Others treat a contour as the outer boundary of an object. Obviously,
the center of gravity makes sense only for a closed object, whereas the curvature is a feature of a linear
object.
例子 提取公路
***************************************************************
* 1.lines_gauss 结果图a)所示 得到许多不想要的 小片段
* 2.select_contours_xld(Lines,LongContours,'contour_length',15,1000,0,0) 选择[15,1000]轮廓长度 这样就消除了小的轮廓
* 3.union_collinear_contours_xld (LongContours, UnionContours, 30, 2, 9, 0.7, 'attr_keep') 把共线的轮廓连接在一起。结果 如图b)
*
********************************************************
read_image(Image,'mreut4_3')
get_image_size(Image,Width,Height)
dev_close_window()
dev_open_window(0,0,Width,Height,'black',WindowID)
lines_gauss(Image,Lines,1.5,2,8,'light','true','bar-shaped','true')
select_contours_xld(Lines,LongContours,'contour_length',15,1000,0,0)
union_collinear_contours_xld (LongContours, UnionContours, 30, 2, 9, 0.7, \
'attr_keep')
Extended Concept