- 在这个例子中,展示了如何应用差异检测的算子来检测打印质量
- This example shows how to employ the new extensions of HALCON’s variation model operators
- to perform customary print quality tests.
*在这个例子中,差异模板用一张参考图像建立 - In this example the variation model is built upon a single reference image.
*本示例主要有3个步骤
*1.用形状匹配让目标图像与参考图像对齐
*2.定义差异图像,平滑图像轮廓
*3.创建差异图像 - The example consists of three steps:
-
- align the print objects similar to the reference image using a shape-based model
-
- define the variation image by smoothing the object’s contours
-
- create the variation model
*打印条码是否ok,取决于与参考图像的面积或者差异
- create the variation model
- Whether a print is labelled as OK or not, depends upon the size (area) of the difference to the reference image
*关闭窗体
dev_close_window ()
*读取图像
read_image (Image, ‘pen/pen-01’)