Basics of Appearance Inspection

Principles and Optimal Settings for Visual/Stain Inspections

进行外观检查以检查零件和产品表面的异物,划痕和缺陷。通常,以下检查内容属于外观检查的范围。

  • 食品容器上的异物:异物检查
  • Dirt on cloth: Dirt inspection
  • 金属/树脂部件上的划痕:刮擦检查
  • 凿,毛刺发生在树脂/橡胶molding: Defect inspection
  • 检查LED不点亮:缺陷检查

Conventionally, appearance inspection was performed visually. In recent years, however, image processing systems have been introduced along with factory automation (FA). This section introduces the basic principles of appearance inspection.

Principles behind the stain inspection tool

Segment

The machine vision system detects changes in intensity data from a CCD image sensor as stains or edges. However, it takes an enormous amount of time to process every pixel, and noise may affect inspection results. Therefore, the machine vision system uses the average intensity of a small area consisting of several pixels. In the CV-X Series, this small area is called a “segment”, and the average intensity of these segments is compared to detect stains.

将区段(4像素x 4像素)的平均强度与周围区域的平均强度进行比较。在上述示例中的红色段中检测到污渍。

污渍检测工具算法(节段的比较与计算方法)

本节介绍了在CV-X系列上配备的污渍检测工具的算法。

Detection principle (When the detection direction is specified as X)
  1. The stain inspection tool measures the average intensity of specified areas (segments) and shifts them by 1/4 the area of a segment size.
  2. 它决定了4个段的最大和最小强度之间的差异,包括标准段(①95在下图中)。差异被认为是标准段的污点水平。
  3. When the stain level exceeds the present threshold, the standard segment is counted as a stain. The number of times the preset threshold is exceeded in a measured area is called the “Stain Area”. The process repeats to constantly shift the standard segment within the measured area.

In the subsequent processes, steps (1) to (3) are repeated while the target segment is shifted by the travel range within the area.

当x和y方向被指定为检测方向时

使用标准段作为参考计算x和y方向上的16个段的最大和最小强度之间的差异。

通过在X方向上比较16个段,可以通过比较16个段来检测更小和更微妙的强度变化(污渍)。

污渍检查工具后面的原理摘要

The stain inspection tool is a tool that detects change points of density as scratches and dirt compared to the surrounding every small unit of several pixels called "segment". By processing for each segment, it is possible to realize high speed while reducing the influence of noise, and by comparing with surrounding segments from multiple candidates, "small scratches" and "thin stains" etc. which were difficult to detect conventionally It can now be detected.

Optimal settings for the stain inspection tool

最佳段大小

本节介绍如何适当地设置污渍检查工具。通过调整段大小,可以优化检测灵敏度和处理时间。

右侧的图形显示了根据段大小的污点水平和处理时间的变化(具有keyence的CV-X系列)。

When the segment size is almost the same as the target size, the stain level is at maximum. This means that the detection sensitivity and processing time can be optimized by adjusting the segment size to the actual target size.

最佳段大小= Stain size (mm) × No. of pixels in the Y direction / Field of view in the Y direction (mm)

Ex.) When the stain size is 2 mm2 and field of view is 120 mm2, and a 240,000-pixel camera is used (480 pixels in the Y direction),
2×480÷120 =段大小8

Segment shift / Gap adjustment according to the image

污渍检测工具参数,段移位和间隙调整,确定强度比较的段变速量。可以通过调整这些参数来检测具有不同特征的小缺陷和微妙的污渍。

In order to detect small flaws, it is necessary to finely compare segment intensities by setting both Segment shift and Gap adjustment to small values. On the other hand, in order to detect subtle stains, it is necessary to broadly compare segment intensities by setting both parameters to large values. In this way, the appropriate settings, which correspond to the type of flaw or stain, lead to stable detection.

Summary of optimum setting for Stain mode

Adjustment of the optimum segment size and travel range/comparison interval setting allows optimum inspection of targets. You can ensure optimum settings by adjusting the segment size to be the same as the size of the stains/flaws; and determine the travel range and comparison interval based on the size and shade level of the stains/flaws.

循环工件染色检查

多种圆形工件,例如PET瓶,轴承或O形圈需要圆形区域进行视觉检查。

当CV-X系列搜索一个圆形区域,the program is performing polar coordinate conversion. In order to detect stains, it converts a circular window (inspection segments) into rectangles and compares the segments’ intensities in both circular and radial directions.

Useful pre-processing filters for the stain inspection tool

减法过滤器:应忽略打印时检测污渍

如果在没有任何参考的情况下测量强度变化,则不可能区分污渍和适当的印刷。随后被检测为污渍的更具对比度的印刷作为缺陷。

在预处理中,注册适当的图像,然后与带有减去滤波器的当前图像进行比较。然后,将滤波图像的平均强度达到256级。这使得能够对具有复杂印刷的工件进行染色。

Real-time subtraction filter

实时减法过滤器通过使用扩展和缩小滤波器将原始图像与图像区分区区分原始图像来提取小缺陷。使用此过滤器,您既不需要指定检查区域,也没有调整目标的位移(适用于复杂形状)。您可以通过添加一个简单的设置调整来检查具有复杂形状的目标。

Principle of the real-time subtraction filter

Summary of Visual/Stain Inspection

注意以下3个点以获得污渍检测工具的最佳用途:

  • Adjust the segment size to the stain size
  • Set segment shift / gap adjustment according to the stain size or intensity
  • Use pre-processing filters according to the workpiece conditions

但是,清晰的图像绝对是为了充分利用机器视觉系统的特征很重要。

The next topic is the principle and applications of dimension measurement (edge detection). Edge detection can be used for various applications such as position, width, pitch, and angle measurements. Let's look at the algorithm and applications of edge mode.

1-888-keyence.

1-888-keyence.

回到顶部
Baidu