原理:
XLD是亚像素轮廓,XLD轮廓模板匹配,是直接利用灰度变化明显的地方,进行XLD轮廓提取,生成XLD轮廓模板,然后使用该模板,在目标图像中进行搜索匹配。
算子:
create_shape_model_xld()创建XLD亚像素轮廓模板
find_shape_model() 搜索模板
*关闭窗口
dev_close_window ()
*打开窗口
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
*读取图像
read_image (Image, 'printer_chip/printer_chip_01')
*画矩形区域
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
*生成矩形区域
gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2)
*最小外接矩形
smallest_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)
*生成最小外接矩形
gen_rectangle2_contour_xld (Rectangle1, Row, Column, Phi, Length1, Length2)
*创建XLD轮廓模板
create_shape_model_xld (Rectangle1, 'auto', -0.