Abnormal positioning method of abnormal photo for machine vision
Through the collaborative work of the light source controller and the host computer, recording and comparing abnormal information, the problem of positioning photo abnormalities in machine vision detection is solved, and the efficiency and accuracy of abnormal cause recognition are improved.
Patent Information
- Application Number
- CN202510502160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-12
AI Technical Summary
In machine vision detection, it is difficult to quickly locate the abnormal causes when the photos taken are abnormal, including missed pictures and ambiguous brightness problems.
The abnormal information is recorded through the light source controller, sent to the upper computer and saved, and the upper computer compares the predetermined control process and the actual process to locate the source of the abnormality.
It realizes the rapid and accurate identification and positioning of abnormal causes in abnormal situations, and improves detection efficiency.
Smart Images

Figure CN120471839A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision, and in particular to a method for locating abnormality in abnormal photos used in machine vision. Background Art
[0002] When using machine vision inspection, the capture speed can be very high, requiring multiple photos to be taken in a short period of time. Furthermore, the host computer, light source controller, light source, and camera all need to communicate during the capture process. Therefore, image capture anomalies can occur due to various reasons, including missing images and uneven brightness. When an anomaly occurs, it is necessary to identify the cause. Summary of the Invention
[0003] The main purpose of the present invention is to provide a method for locating anomalies in abnormal photos for machine vision, which is used to locate anomalies when anomalies occur during the detection process.
[0004] To achieve the above objectives, the present invention adopts a technical solution: a method for locating abnormalities in abnormal photos for machine vision, which specifically includes the following steps:
[0005] Step 1: The light source controller receives abnormal information and records it;
[0006] Step 2: The controller sends the abnormal information to the host computer;
[0007] Step 3: The host computer saves the received abnormal information to the corresponding information file;
[0008] Step 4: When an error in the number of pictures or brightness information is identified, the host computer compares the abnormal information in the information file with the predetermined control flow to locate the source of the abnormality.
[0009] Preferably, step 4 specifically includes the following steps:
[0010] Step 41. If the image brightness does not meet the requirements, the host computer compares the actual PLC triggering steps and the actual light source channels that are lit, based on the steps of the actual PLC triggering and the light source channels that are lit, with the set PLC triggering steps and the set light source channels that need to be lit, to obtain the cause of the abnormality.
[0011] Preferably, the step 4 further includes step 42: if the number of log information and pictures exceeds the normal value, the light source controller records the actual IO trigger signal and lighting channel and uploads it to the host computer, and the host computer compares the actual trigger signal and lighting channel with the required trigger signal and lighting channel to obtain the cause of the abnormality;
[0012] Preferably, the step four also includes step 43. If it is found that a picture is missed, the light source controller uploads the actual camera working information and data interaction information to the host computer, and compares the actual camera working information and data interaction information with the required camera working information and data interaction information to obtain the cause of the abnormality.
[0013] Compared with the prior art, the present invention has the following beneficial effects:
[0014] When an abnormality occurs in an image, the present invention uploads the data during the working process to the host computer and compares it with the working data set in the host computer. The cause of the abnormality can be known through the comparison. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the abnormality locating method according to the present invention. DETAILED DESCRIPTION
[0016] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.
[0017] A method for locating anomalies in abnormal photos for machine vision includes the following steps:
[0018] Step 1: The light source controller receives abnormal information and records it;
[0019] Step 2: The controller sends the abnormal information to the host computer;
[0020] Step 3: The host computer saves the received abnormal information to the corresponding information file;
[0021] Step 4: When the visual algorithm identifies an error in the image or brightness information, the host computer compares the contents of the information file (PLC trigger process, light source controller lighting process, IO trigger process, and camera interaction process) to locate the source of the error.
[0022] Step 4 specifically includes the following steps:
[0023] Step 41: If step a is set to light up light sources 1, 3, and 5, and step b is set to light up light sources 2, 4, and 5 according to visual requirements, but the resulting image has problems, the light source controller records the steps actually triggered by the PLC and the light source channels actually lit. The host computer compares the steps actually triggered by the PLC and the light source channels actually lit with the steps set to be triggered by the PLC and the light source channels set to be lit, and the specific location of the abnormality can be located;
[0024] Step 42: If the abnormality is caused by IO trigger disorder, since the IO trigger may be caused by a level jump or an abnormality on the control end, the light source controller becomes an uncertain light source when controlling the picture shooting, resulting in abnormal pictures. Generally, there will be more log information than normal and the number of pictures will be more than normal. The light source controller records the actual trigger signal and lighting channel and uploads them to the host computer. The host computer compares the actual trigger signal and lighting channel with the required trigger signal and lighting channel.
[0025] Step 43: When triggered by PLC or IO, the light source controller is required to trigger the shooting. However, if there is an abnormal interaction between the light source controller and the camera, an error instruction is sent, and the camera determines that there is no trigger, resulting in missed shots. The light source controller records the process of its interaction with the camera to find the cause of the missed shots. When there is a possibility that the light source controller sends an error message causing missed shots, or the camera needs to reply to the abnormal shooting information, it is also interacted with the light source controller through the data stream. The light source controller can record the camera problem and the communication problem, and upload the record to the host computer at the same time. The host computer records the problem through the network port communication and saves the data in the corresponding camera log file, PLC interaction log file, and IO trigger interaction log file. By recording the time and sequence, the error cause of the specific image abnormality can be located.
[0026] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions merely illustrate the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for locating abnormality in abnormal photos for machine vision, characterized in that: The specific steps include: Step 1: The light source controller receives abnormal information and records it; Step 2: The controller sends the abnormal information to the host computer; Step 3: The host computer saves the received abnormal information to the corresponding information file; Step 4: When an error in the number of pictures or brightness information is identified, the host computer compares the abnormal information in the information file with the predetermined control flow to locate the source of the abnormality.
2. The method for locating anomalies in abnormal photos for machine vision according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 41. If the image brightness does not meet the requirements, the host computer compares the actual PLC triggering steps and the actual light source channels that are lit, based on the steps of the actual PLC triggering and the light source channels that are lit, with the set PLC triggering steps and the set light source channels that need to be lit, to obtain the cause of the abnormality.
3. The method for locating anomaly in abnormal photos for machine vision according to claim 2, characterized in that: The step four also includes step 42. If the number of log information and pictures is more than the normal value, the light source controller records the actual IO trigger signal and lighting channel and uploads it to the host computer. The host computer compares the actual trigger signal and lighting channel with the required trigger signal and lighting channel to obtain the cause of the abnormality.
4. The method for locating anomalies in abnormal photos for machine vision according to claim 3, characterized in that: The step four also includes step 43. If it is found that a picture is missed, the light source controller uploads the actual camera working information and data interaction information to the host computer, and compares the actual camera working information and data interaction information with the required camera working information and data interaction information to obtain the cause of the abnormality.