外观检查的基础

可视/污渍检查的原则和最佳设置

Appearance inspections are performed to check foreign matter, scratches, and defects on the surface of parts and products. In general, the following inspection contents fall under the scope of appearance inspections.

  • Foreign matter on food containers: Foreign matter inspection
  • 布料上的污垢:污垢检查
  • Scratches on metal/resin parts: Scratch inspection
  • 树脂/橡胶成型期间发生的切削和毛刺:缺陷检查
  • Checking for LEDs not lit: Defect inspection

通常,目视进行外观检查。然而,近年来,已经引入了图像处理系统以及工厂自动化(FA)。本节介绍了外观检查的基本原则。

污渍检查工具后面的原则

部分

机器视觉系统检测来自CCD图像传感器的强度数据的变化作为污渍或边缘。然而,处理每个像素需要大量时间,并且噪声可能会影响检查结果。因此,机器视觉系统使用由几个像素组成的小区域的平均强度。在CV-X系列中,该小区域称为“段”,并将这些段的平均强度进行比较以检测污渍。

The average intensity of a segment (4 pixels x 4 pixels) is compared with that of the surrounding area. Stains are detected in the red segment in the example above.

Algorithm of the stain inspection tool (Comparison and calculation methods of segments)

This section explains the algorithm of the stain inspection tool equipped on the CV-X Series.

检测原理(当检测方向被指定为x)
  1. 污渍检测工具测量指定区域(段)的平均强度,并将它们转移1/4段大小的区域。
  2. It determines the difference between maximum and minimum intensities of 4 segments, including a standard segment (① 95 in the figure below). The difference is considered the stain level of a standard segment.
  3. 当污渍水平超过当前阈值时,标准段计为染色。预设阈值超过测量区域的次数称为“污渍区域”。该过程重复以在测量区域内不断地移位标准段。

在随后的过程中,重复步骤(1)至(3),而目标段由该区域内的行驶范围移位。

When X and Y directions are specified as the detection direction

The difference between the maximum and minimum intensity of 16 segments in both the X and Y directions are calculated using the standard segment as a reference.

It is possible to detect smaller and more subtle intensity changes (stains) by comparing 16 segments in total, not just 4 segments in the X direction.

总结原理染色检查tool

污渍检测工具是一种工具,其检测与围绕称为“段”的几个像素的每个小单位的围绕的划痕和污垢的变化点。通过对每个段的处理,可以实现高速,同时降低噪声的影响,并且通过与来自多个候选的周围区段进行比较,“小划痕”和“薄污渍”等难以检测它现在可以被检测到。

污渍检测工具的最佳设置

Optimal segment size

This section explains how to set the stain inspection tool appropriately. It is possible to optimize the detection sensitivity and processing time by adjusting the segment size.

The graph on the right shows changes in the stain level and processing time according to the segment size (with KEYENCE’s CV-X Series).

当段大小与目标大小相同时,污点水平最大。这意味着可以通过将段大小调整为实际目标大小来优化检测灵敏度和处理时间。

最佳段大小=在Y方向(mm)中的Y方向/视野中的y染色尺寸(mm)×数量(mm)

EX。)当污渍尺寸为2 mm2并且视野为120 mm2时,使用240,000像素的相机(y方向480像素),
2 × 480 ÷ 120 = Segment size 8

根据图像进行段移位/间隙调整

The stain inspection tool parameters, Segment shift and Gap adjustment, determine the amount of segment shift for intensity comparison. Small flaws and subtle stains, which have different features, can be detected by adjusting these parameters.

为了检测小缺陷,必须通过将段移位和间隙调整设置为小值来精细比较分段强度。另一方面,为了检测微妙的污渍,有必要通过将参数设置为大值来广泛地比较段强度。以这种方式,适当的设置,其对应于缺陷或污渍类型,导致稳定检测。

污渍模式最佳设置概述

调整最佳段大小和旅行范围/比较间隔设置允许最佳检查目标。您可以通过调整段大小与污渍/缺陷的大小相同,确保最佳设置;并根据污渍/缺陷的尺寸和阴影水平确定旅行范围和比较间隔。

Stain Inspection on Circular Workpieces

Many kinds of circular workpieces, such as PET bottles, bearings or O-rings require a circular area for visual inspection.

当CV-X系列正在搜索圆形区域时,该程序正在执行极性坐标转换。为了检测污渍,它将圆形窗口(检查段)转换成矩形并比较圆形和径向方向上的区段强度。

用于污渍检测工具的有用预处理过滤器

Subtraction filter: When printing should be ignored to detect only a stain

If only intensity changes are measured without any reference, it is impossible to distinguish between stains and proper printing. Printing with more contrast than a stain is subsequently detected as a flaw.

In pre-processing, a proper image is registered and then compared with the current image with the subtraction filter. Then, the average intensity of the filtered image is compared in 256 levels. This enables stain inspection of workpieces with complicated printing.

实时减法过滤器

The real-time subtraction filter extracts only small defects by differentiating the original image from an image using the Expansion and Shrink filters. With this filter, you neither have to specify the inspection area nor adjust for the displacement of the target (good for complicated shapes). You can inspect targets with complicated shapes by adding one simple setting adjustment.

实时减法滤波器的原理

视觉/污渍检查摘要

Note the following 3 points for optimal use of the stain inspection tool:

  • 将分段大小调整为污渍尺寸
  • 根据污渍尺寸或强度设置段移位/间隙调整
  • 根据工件条件使用预处理过滤器

However, clear images are definitely important to take full advantage of the machine vision system's features.

下一个主题是尺寸测量(边缘检测)的原理和应用。边缘检测可用于各种应用,例如位置,宽度,间距和角度测量。让我们来看看边缘模式的算法和应用。

1-888-KEYENCE

1-888-KEYENCE

Back to top