A method for testing the working state of a visual sensor

By using built-in or peripheral light sources in the vision sensor, using color targets and cameras to collect images for automated data comparison, the problems of low testing efficiency and low accuracy in the prior art are solved, and efficient and accurate visual sensor status testing is achieved.

CN112446929BActive Publication Date: 2025-08-26EASY THINKING HANGZHOU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910818470.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-30
Publication Date
2025-08-26
Estimated Expiration
2039-08-30

AI Technical Summary

Technical Problem

The working state test of existing vision sensors is inefficient, has low accuracy and is harmful to the health of testers, and mainly relies on manual observation and naked eye judgment.

Method used

By using built-in or peripheral light sources in the vision sensor, the color target and camera to collect images, the processor performs grayscale calculations, and automatically compares the test data to judge the light source and camera status, achieving efficient and accurate testing without human monitoring.

Benefits of technology

It realizes efficient and accurate testing of the working status of the visual sensor, reduces manual intervention, improves testing efficiency and accuracy, and reduces the health risks to testers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112446929B_ABST
    Figure CN112446929B_ABST
Patent Text Reader

Abstract

The present invention provides a method for testing the working status of a visual sensor. The visual sensor has a light source, and the testing steps are as follows: the light source can project any two or three colors of three primary colors; the color of a color target is the same as the color of the light projected by the light source; a target image captured by a camera is marked as a target image I; or the color targets are of multiple different colors, the camera has two or more targets, and the target image captured by the camera is marked as a target image II; a processor processes the received target image I to determine whether the color of the light projected by the light source is the same as a preset color; or the processor processes the received target image II to determine whether the working camera is a preset camera; the entire testing process does not require a tester to monitor the sensor status, and only requires operating a host computer to perform data information comparison, so the testing process is simple, efficient, and highly accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application field of vision sensors, and in particular to a method for testing the working state of a vision sensor. Background Art

[0002] Vision sensors, used to capture the raw images required by the entire machine vision system, consist of one or more cameras, sometimes also equipped with laser projectors, light sources, and other auxiliary equipment. For example, in automotive gluing inspection, existing gluing inspection sensors utilize multiple cameras and a matching light source. During the inspection process, the rubber strip is illuminated by light sources of different colors, and multiple cameras capture images of the strip from different angles, enabling comprehensive inspection.

[0003] For the above-mentioned glue detection sensor, the current glue detection process is mainly divided into two steps: the teaching process and the measurement process. The teaching process is the process of using relevant prior information to test the switching of light source color and camera switching. This process derives the camera and light source color that should be used at each moment of glue strip detection, and saves the best teaching information as guidance information; the measurement process is the process of using the taught guidance information to perform real-time detection of the glue strip; for the newly configured visual sensor, before formal detection, it is necessary to verify its working process, that is, whether the lighting color of the light source and the information collected by the camera are consistent with the guidance information obtained by teaching; in addition, for the visual sensor that has been used, due to the influence of external environment or light source, camera aging and other factors, its working status needs to be tested regularly to ensure that the working status of the visual sensor meets the requirements.

[0004] Currently, the method for verifying the working status of visual sensors is manual observation testing. The tester sends a single instruction to the sensor through a host computer, and then observes whether the sensor status is consistent with the status of the issued instruction. This method has the following disadvantages: low test efficiency, and the time cost of testing the entire working path is high; observing the brightness of the light source or image quality with the naked eye has large errors and is prone to misjudgment; visual sensors often use strong light sources or lasers, and long-term naked eye testing can cause eye fatigue or damage. Summary of the Invention

[0005] In order to solve the above problems, the present invention provides a method for testing the working status of a visual sensor. During the entire testing process, there is no need for the tester to monitor the sensor status. Only the host computer needs to be operated to compare data information. The testing process is simple, efficient and highly accurate.

[0006] To this end, the technical solutions of the present invention are as follows:

[0007] A method for testing the working status of a visual sensor, wherein the visual sensor is provided with a built-in or external light source;

[0008] The test steps are as follows:

[0009] 1) According to the preset process, the light source illuminates the color target, the visual sensor camera captures the target image, and transmits it to the processor;

[0010] The light source can project any two or three colors of the three primary colors; the color of the color target is the same as the color of the light projected by the light source; the target image captured by the camera contains all colors of the color target and is marked as target image I;

[0011] Alternatively, the color targets are of multiple different colors, the cameras are two or more, and the target images captured by the cameras are marked as target images II;

[0012] 2) The processor processes the received target image I and calculates the average grayscale of each color area; then, based on the color corresponding to the area with the maximum average grayscale on the color target, determines whether the color of the light projected by the light source is the same as the preset color;

[0013] Alternatively, the processor processes the received target image II to obtain the average grayscale of a specific area; based on whether the difference between the average grayscale value of the specific area and the standard data exceeds a preset range, it determines whether the working camera is a preset camera; the position of the specific area corresponds to the same color in the color target.

[0014] A method for testing the working status of a visual sensor, wherein the visual sensor is provided with a built-in or external light source;

[0015] The test steps are as follows:

[0016] 1) According to a preset process, a light source illuminates a color target, and a camera of a visual sensor captures a target image II and transmits it to a processor; the light source is white;

[0017] There are two or more cameras, the number of colors contained in the color target is equal to the number of cameras, and the color of the color target is black, white or gray;

[0018] 2) The processor processes the received target image II and calculates the average grayscale of a specific area; based on whether the difference between the average grayscale value and the standard data exceeds a preset range, it determines whether the working camera is a preset camera; the position of the specific area corresponds to the same color in the color target.

[0019] Furthermore, the preset process is: changing the light source color according to the actual state during detection.

[0020] Furthermore, the preset process is: changing the working camera according to the state during actual detection.

[0021] Furthermore, the grayscale values ​​of different colors in the color target used to obtain the target image II differ by at least 10 on the target image.

[0022] Furthermore, it is also possible to determine whether the brightness of the light source meets the standard based on whether the difference between the maximum average grayscale in the target image I and the corresponding grayscale value obtained during the teaching process exceeds a preset range.

[0023] Furthermore, the preset color in step 2) is the color of light projected by the light source at a certain moment according to the taught working procedure.

[0024] Furthermore, the standard data in step 2) is the average grayscale value of the target image II in a specific area acquired by the visual sensor through a preset camera at a certain moment according to the taught working procedure.

[0025] This method uses specially designed targets and is based on the principle that the grayscale value of the target area with the same color reflecting the same color light is the largest. By analyzing target image I and target image II, the working status of the visual sensor is effectively tested. The entire test process does not require the tester to monitor the sensor status, but only needs to operate the host computer to compare data information. The entire test process is simple, efficient, and has high test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of the distribution of three cameras in the visual sensor in Example 1;

[0027] Figure 2 Schematic diagram of the color distribution of target 1 in Example 1;

[0028] Figure 3 This is a schematic diagram of the color distribution of target II in Example 1;

[0029] Figure 4 Schematic diagram of the distribution of four cameras in the visual sensor in Example 2;

[0030] Figure 5 Schematic diagram of the color distribution of target 1 in Example 2;

[0031] Figure 6 Schematic diagram of the color distribution of target II in Example 2. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Example 1

[0034] A method for testing the working status of a glue coating detection visual sensor, such as Figure 1As shown, the glue coating inspection visual sensor includes three evenly spaced cameras and a built-in light source that projects three primary colors (red, green, and blue);

[0035] The test steps are as follows:

[0036] According to the actual detection state, the light source color is changed, and the light source illuminates the color target I (such as Figure 2 As shown), the color of the color target corresponds to the color of the light source; the camera of the visual sensor collects the target image and transmits it to the processor;

[0037] The light source projects red, green, and blue light according to a preset process; the target image captured by each camera contains all the colors of the color target, and the image captured by the camera is marked as target image I;

[0038] The processor processes the received target image I and calculates the average grayscale of each color area. Based on the color corresponding to the area with the maximum average grayscale on the color target, the processor determines whether the color of the light projected by the light source is the same as the preset color. The preset color is the color of the light projected by the light source at a certain moment according to the taught working procedure.

[0039] Based on whether the difference between the maximum average grayscale in the target image I and the corresponding grayscale value obtained during the teaching process exceeds the preset range, it is judged whether the brightness of the light source meets the standard.

[0040] like Figure 3 As shown, color target II is red, green, and blue. The working camera is changed according to the actual detection state. The corresponding camera is turned on at each moment, and the target image captured by the camera is marked as target image II. Each camera can capture multiple color areas of color target II, or only capture the same color area.

[0041] The processor processes the received target image II to obtain the average grayscale of a specific area; based on whether the difference between the average grayscale value of the specific area and the standard data exceeds a preset range, it is determined whether the working camera is a preset camera; the position of the specific area corresponds to the same color in the color target; the specific area can be an area of ​​10×10 pixels;

[0042] The standard data is the average grayscale value of the target image II in a specific area acquired by the visual sensor through a preset camera at a certain moment according to the taught working procedure.

[0043] It should be clear that when the glue detection visual sensor only judges the working status of the camera, the white light source can be used to illuminate the target II throughout the process. Figure 3 The colors of the corresponding areas in target II are black, white, and gray respectively;

[0044] The working camera is changed according to the actual state during detection, and the camera collects the target image II and transmits it to the processor;

[0045] The processor processes the received target image II and calculates the average grayscale of the specific area; based on whether the difference between the average grayscale value and the standard data exceeds the preset range, it determines whether the working camera is the preset camera; the position of the specific area corresponds to the same color in the color target.

[0046] The standard data is the average grayscale value of the target image II in a specific area acquired by the visual sensor through a preset camera at a certain moment according to the taught working procedure.

[0047] Example 2

[0048] A method for testing the working status of a visual sensor. This embodiment takes a four-camera visual sensor as an example. Figure 4 As shown, the visual sensor includes four cameras and an external light source that projects three primary colors (red, green, and blue);

[0049] In this embodiment, the color setting of target 1 is as follows: Figure 5 As shown, the color of the color target corresponds to the color of the light source, and the image captured by the camera is the target image I;

[0050] Follow the principle that the grayscale values ​​of different colors in the color target used in target image II should differ by at least 10, such as Figure 6 As shown, color target II is red, green, blue, and purple, which is consistent with the number of cameras. Each camera collects target images with different color areas. The target images collected by the cameras are marked as target images II.

[0051] The test steps are the same as those in Example 1 and will not be repeated here.

[0052] The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. The foregoing descriptions are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been chosen and described in order to explain the specific principles of the invention and their practical application, thereby enabling others skilled in the art to make and utilize the various exemplary embodiments of the invention and various alternatives and modifications thereof. The scope of the invention is intended to be defined by the appended claims and their equivalents.

Claims

1. A method for testing the working status of a visual sensor, wherein the visual sensor has a built-in or external light source; It is characterized by: The test steps are as follows: 1) Change the light source color or working camera according to the actual detection status; The light source illuminates the color target, and the camera of the visual sensor captures the target image and transmits it to the processor; The light source can project any two or three colors of the three primary colors; the color of the color target is the same as the color of the light projected by the light source; the target image captured by the camera contains all colors of the color target and is marked as target image I; Alternatively, the color target is a plurality of different colors, the number of colors is the same as the number of cameras, there are two or more cameras, and the target image captured by the camera is marked as target image II; the grayscale value of each different color in the color target on the target image differs by at least 10; 2) The processor processes the received target image I and calculates the average grayscale of each color region; then, based on the color corresponding to the region with the maximum average grayscale on the color target, determines whether the color of the light projected by the light source is the same as a preset color; the preset color is the color of the light projected by the light source at a certain moment according to a taught working procedure; Alternatively, the processor processes the received target image II to obtain an average grayscale of a specific area; Whether the working camera is a preset camera is determined based on whether the difference between the average grayscale value of a specific area and the standard data exceeds a preset range; the position of the specific area corresponds to the same color within the color target; the standard data is the average grayscale value of the target image II in the specific area obtained by the visual sensor through the preset camera at a certain moment according to the taught working procedure.

2. The method for testing the working state of a visual sensor according to claim 1, wherein: It is also possible to determine whether the brightness of the light source meets the standard based on whether the difference between the maximum average grayscale in the target image I and the corresponding grayscale value obtained during the teaching process exceeds a preset range.

3. A method for testing the working status of a visual sensor, wherein the visual sensor has a built-in or external light source; It is characterized by: The test steps are as follows: 1) The working camera is changed according to the actual detection state, the light source illuminates the color target, the camera of the visual sensor collects the target image II, and transmits it to the processor; the light source is white; There are two or more cameras, the number of colors contained in the color target is equal to the number of cameras, and the color of the color target is black, white or gray; the grayscale value of each different color in the color target on the target image differs by at least 10; 2) The processor processes the received target image II and calculates the average grayscale of a specific area; Whether the working camera is a preset camera is determined based on whether the difference between the average grayscale value and the standard data exceeds a preset range; the position of the specific area corresponds to the same color in the color target; the standard data is the average grayscale value of the target image II in the specific area obtained by the visual sensor through the preset camera at a certain moment according to the taught working procedure.

Citation Information

Patent Citations

  • Image sensor transmission function testing device

    CN108195565A