Automatic fool-proof existence detection method and system based on industrial camera
By using an automated error-proof inspection method based on industrial cameras, the problems of multi-scenario compatibility and low accuracy in judging minute parts in existing technologies are solved, achieving the effects of simplified installation and improved inspection accuracy.
Patent Information
- Application Number
- CN202511787556.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-02-27
AI Technical Summary
Existing error-proofing detection methods have low compatibility across various scenarios and low accuracy in judging minute parts.
An automated error-proof inspection method based on industrial cameras is adopted. The inspection equipment is installed in a preset standard installation method, the image acquisition template is configured and the position of the parts is marked, the inspection image is calibrated using a template matching algorithm, and the presence or absence of the parts is determined by combining a deep learning model.
It simplifies the installation process, adapts to the testing needs of workpieces of different sizes and shapes, and improves the accuracy and efficiency of testing results.
Smart Images

Figure CN121582227A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial fool-proof detection, and in particular to an automatic fool-proof presence / absence detection method and system based on an industrial camera. BACKGROUND
[0002] With the continuous development of industrial production automation and intelligentization, quality control and workpiece management in the production process are becoming increasingly important. In order to improve production efficiency, ensure product quality and reduce error rate in manual operation, workpiece fool-proof technology has gradually become an indispensable part of industrial production. Fool-proof technology, usually refers to a series of hardware and software means designed and implemented to ensure that workpieces can automatically avoid common human errors during operation, thereby improving the automation level and work stability of the production line. The standardized design of fool-proof technology refers to the establishment of unified and standardized standards and processes to ensure the reusability and compatibility of the fool-proof system in different production scenarios. This standardized solution not only improves quality control in the production process, but also simplifies equipment maintenance and upgrade processes, while also reducing the cost and risk of custom development for enterprises. Currently, in the standardized design method of fool-proof technology, there are problems of scene generalization and complexity. For scene generalization, the standardized design is destined to be limited for automated industrial production, so it cannot be compatible with all scenarios. The current solution can only be used for planar detection projects. For complexity, in order to improve multi-workpiece compatibility, it is difficult to make complex judgments for subtle component changes, such as single component size measurement. It can be seen that the standardized design method of fool-proof detection in the prior art has low compatibility for multiple scenarios and low judgment accuracy for subtle components. SUMMARY
[0003] The present application provides an automatic fool-proof presence / absence detection method and system based on an industrial camera to solve the problem of low compatibility for multiple scenarios and low judgment accuracy for subtle components in the standardized design method of fool-proof detection in the prior art.
[0004] To achieve the above-mentioned purpose, the present application realizes through the following technical solutions: In a first aspect, the present application provides an automatic fool-proof presence / absence detection method based on an industrial camera, comprising: installing a detection device according to a preset standard installation method; configuring a picture taking template and marking the position of the component to be detected; collecting a detection image based on the detection device, generating a template matching algorithm through an algorithm platform, and calibrating the detection image through the template matching algorithm; obtaining the detection position in the detection image, and judging the presence / absence of the component through a preset detection algorithm and post-processing logic.
[0005] Optionally, the detection equipment is installed according to a preset standard installation mode, comprising: The N cameras and the camera light source are fixed by the fixing support, and the distance between the N cameras is set to meet that the N cameras can cover the entire surface of the workpiece to be detected.
[0006] Optionally, the detection equipment acquires a detection image, comprising: The workpiece outer contour is labeled by a MASK label file, a template MASK picture is generated by using an internal tool, and the template MASK picture is input into a specified path for subsequent extraction.
[0007] Optionally, the detection image is calibrated by a template matching algorithm, comprising: The detection image is matrix-transformed to the template MASK picture in a matrix transformation manner of the template, and finally the detection image is rotationally transformed into an angle and a pose consistent with the template MASK picture.
[0008] Optionally, the detection position in the detection image is acquired, and the presence or absence of the part is determined by a preset detection algorithm and post-processing logic, comprising: The feature points at the specified position are obtained by intercepting the calibrated detection image by a fixed ROI label file, then a deep learning model inference is performed according to the corresponding categories of the feature points, so as to obtain the inference categories of the corresponding feature points, then the inference categories are compared with the actual correct categories of the feature points, and the feature point detection results are obtained by analogy.
[0009] Optionally, the N cameras are N industrial cameras with adjustable field of view size and angle.
[0010] Optionally, the method further comprises: After all the feature points are detected, the user interaction interface displays all the feature point detection results and a historical detection content statistical list.
[0011] In a second aspect, the application further provides an automatic foolproof presence / absence detection device based on an industrial camera, comprising: An installation module configured to install the detection equipment according to a preset standard installation mode; A configuration module configured to configure a picture acquisition template and label the position of the part to be detected; A calibration module configured to acquire a detection image by the detection equipment, generate a template matching algorithm by an algorithm platform, and calibrate the detection image by the template matching algorithm; A detection module configured to acquire a detection position in the detection image and determine the presence or absence of the part by a preset detection algorithm and post-processing logic.
[0012] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.
[0013] Advantages: The industrial camera-based automatic foolproof presence / absence detection method provided by the present application first installs a detection device according to a preset standard installation mode; then configures a picture taking template and labels the positions of the parts to be detected; acquires a detection image based on the detection device, generates a template matching algorithm through an algorithm platform, and calibrates the detection image through the template matching algorithm; acquires the positions to be detected in the detection image, and then judges the presence / absence of the parts through a preset detection algorithm and post-processing logic. In this way, standardized hardware design can simplify the installation process and quickly put into use. The size and angle of the camera field of view in the detection device can be adjusted to adapt to the detection requirements of workpieces of different sizes and shapes. During the detection process, the software configuration is simple, and the user only needs to simply set the template and label the positions, reducing the operation complexity. The template matching is performed through a deep learning algorithm to ensure the accuracy and efficiency of the detection result. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 A flowchart of an industrial camera-based automatic foolproof presence / absence detection method according to a preferred embodiment of the present application. DETAILED DESCRIPTION
[0015] The technical solutions of the present application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0016] Unless otherwise defined, the technical terms or scientific terms used in the present application shall have the meanings commonly understood by those skilled in the art. The terms "first", "second", and similar terms used in the present application do not represent any order, number, or importance, but are only used to distinguish different components. Similarly, the terms "one" or "a" and similar terms do not represent a quantity limitation, but represent the existence of at least one. The terms "connected" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right", and the like only represent relative positional relationships, which change accordingly when the absolute positions of the described objects change.
[0017] Please refer to Figure 1The application provides an industrial camera-based automatic fool-proof presence / absence detection method, which comprises the following steps: The detection equipment is installed according to a preset standard installation mode. A photographing template is configured, and the positions of the parts to be detected are marked. The detection equipment collects a detection image, generates a template matching algorithm through an algorithm platform, and calibrates the detection image through the template matching algorithm. The positions to be detected in the detection image are obtained, and a preset detection algorithm is used to determine whether the parts are present or absent.
[0018] In this step, the bottom layer is an algorithm model trained based on YOLOV8, then the ROI position is cut and channel converted, and the model is used for inference to obtain the recognition result of the picture, and the result is returned. The parameters are judged, for example, a target is recognized, the position information is compared with the position information of the fixed point during labeling, if the difference between the recognized target position and the labeled fixed point position is less than a set threshold, it is passed, otherwise it is not passed.
[0019] The above-mentioned industrial camera-based automatic fool-proof presence / absence detection method adopts a standardized hardware design, can simplify the installation process, and quickly put into use. The size and angle of the camera field of view in the detection equipment can be adjusted to adapt to the detection requirements of workpieces of different sizes and shapes. In the detection process, the software configuration is simple, and the user only needs to simply set the template and mark the position, reducing the operation complexity. The deep learning algorithm is used for template matching to ensure the accuracy and efficiency of the detection result.
[0020] Optionally, the detection equipment is installed according to a preset standard installation mode, which comprises the following steps: The N cameras and the camera light source are fixed by the fixing support, and the distance between the N cameras is set to satisfy that the N cameras can cover the entire surface of the workpiece to be detected.
[0021] In an example, the N cameras are N industrial cameras with adjustable field of view size and angle, and the N cameras can be set to 4 cameras, which are only examples and are not limited, and in other feasible embodiments, the remaining number of cameras can be set to achieve the purpose of full coverage of different workpiece sizes and styles.
[0022] Specifically, the four cameras and the camera light source can be combined through a single fixed support, the working distance of the cameras can be set, and the fixed field of view overlap area under the condition of the same working distance among the four cameras can be set, so as to ensure that the imaging quality under different workpiece conditions remains basically consistent, and only the lighting scheme needs to be fine-tuned, thereby ensuring that the equipment is easy to install and use. During installation, the industrial cameras can cover the entire surface of the workpiece to be detected by adjusting the field of view size and angle. The user only needs to move the workpiece to be detected under the camera field of view, ensure that the workpiece is completely within the shooting range, and then start the image acquisition process.
[0023] Optionally, based on the detection equipment collecting the detection image, comprising: The workpiece outer contour is labeled through the MASK label file, a template MASK picture is generated by using an internal tool, and the template MASK picture is input into a specified path for subsequent extraction.
[0024] In the optional embodiment, the template mask picture can be generated by a tool after image labeling. Further, the template mask picture is placed in the specified path because the software extraction configuration file path has a specified path standard. Therefore, the template mask picture is placed in the specified path, can be quickly extracted in the subsequent steps, and the overall detection efficiency is improved.
[0025] Optionally, the detection image is calibrated through a template matching algorithm, comprising: The detection image is matrix transformed to the template MASK picture through matrix transformation of the template, and finally the detection image is rotationally transformed to the same angle and pose as the template MASK picture.
[0026] In an embodiment, the bottom layer of the template matching algorithm can use the matchTemplate operator of opencv.
[0027] Optionally, the detection position in the detection image is obtained, and whether the part exists or not is determined through a preset detection algorithm, comprising: The feature points of the specified position are obtained by intercepting the calibrated detection image through the fixed ROI label file, then the corresponding category of the feature points is inferred according to a deep learning model, so as to obtain the inference category of the corresponding feature points, and then the inference category is compared with the actual correct category of the feature points, and the detection results of all feature points are obtained in this way.
[0028] It is worth mentioning that the fixed ROI annotation file can be obtained by annotating the template picture by the staff, and the fixed ROI annotation file and the MASK annotation file are different types of annotation files. In the implementation, when the comparison logic is performed, the matrix in the image is trained by a deep learning algorithm, and an algorithm learning step is performed to automatically extract feature points in the image, and finally an inference category of the trained feature points is obtained. Then, the correct feature point category actually detected in the detection image is compared with the feature point category obtained by training to obtain a detection result of the feature points. In this way, the feature point recognition can be quickly performed.
[0029] After all the feature points are detected, the user interaction interface displays all the feature point detection results and a historical detection content statistical list. Special statistical display can also be made according to customer customization requirements, so that the user can intuitively master the detection situation and can be flexibly adjusted according to the user's requirements.
[0030] The application also provides an automatic foolproof presence / absence detection device based on an industrial camera, comprising: The installation module is configured to install the detection device according to a preset standard installation mode. The configuration module is configured to configure a picture taking template and mark the position of the part to be detected. The calibration module is configured to collect a detection image based on the detection device, generate a template matching algorithm through an algorithm platform, and calibrate the detection image through the template matching algorithm. The detection module is configured to obtain the position to be detected in the detection image and determine the presence / absence of the part through a preset detection algorithm and post-processing logic.
[0031] The automatic foolproof presence / absence detection device based on the industrial camera can realize each embodiment of the above-mentioned automatic foolproof presence / absence detection method based on the industrial camera, and achieve the same beneficial effects, which will not be repeated here.
[0032] The application also provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize the steps of the above-mentioned method. The computer device can realize each embodiment of the above-mentioned automatic foolproof presence / absence detection method based on the industrial camera, and achieve the same beneficial effects, which will not be repeated here.
[0033] The automatic foolproof presence / absence detection system based on the industrial camera can realize each embodiment of the above-mentioned automatic foolproof presence / absence detection method based on the industrial camera, and achieve the same beneficial effects, which will not be repeated here.
[0034] The preferred embodiments of the present application have been described above in detail. It should be understood that modifications and variations to the present application can be affected by those skilled in the art without departing from the scope of the application. Accordingly, it is intended that all possible modifications and alterations be included within the scope of the present application as defined by the following claims.
Claims
1. An automated error-proof detection method based on an industrial camera, characterized in that, include: Install the testing equipment according to the preset standard installation method; Configure the image acquisition template and mark the location of the parts to be inspected; Based on the detection equipment, the detection images are acquired, a template matching algorithm is generated through the algorithm platform, and the detection images are calibrated through the template matching algorithm. The system acquires the location to be detected in the image and uses a preset detection algorithm to determine whether the component is present.
2. The automated error-proof detection method based on an industrial camera according to claim 1, characterized in that, The installation of the testing equipment according to the preset standard installation method includes: N cameras and camera light sources are fixed by a fixed bracket. The distance between the N cameras is set to ensure that the N cameras can cover the entire surface of the workpiece to be inspected.
3. The automated error-proof detection method based on an industrial camera according to claim 1, characterized in that, The acquisition of detection images based on the detection device includes: The outer contour of the workpiece is marked using a MASK annotation file. An internal tool is used to generate a template MASK image, which is then input into a specified path for subsequent extraction.
4. The automated error-proof detection method based on an industrial camera according to claim 1, characterized in that, The calibration of the detected image using a template matching algorithm includes: By using matrix transformation of the template, the detection image is transformed into a template MASK image, ultimately achieving a rotation transformation of the detection image to match the angle and pose of the template MASK image.
5. The automated error-proof detection method based on an industrial camera according to claim 1, characterized in that, The step of acquiring the location to be detected in the detection image and determining the presence or absence of a component using a preset detection algorithm includes: Feature points at specified locations are extracted from the calibrated detection image by fixing the ROI annotation file. Then, deep learning model inference is performed based on the category corresponding to the feature points to obtain the inferred category of the corresponding feature points. The inferred category is then compared with the actual correct category of the feature point, and so on to obtain the detection results of all feature points.
6. The automated error-proof detection method based on an industrial camera according to claim 2, characterized in that, The N cameras are N industrial cameras whose field of view and angle are adjustable.
7. The automated error-proof detection method based on an industrial camera according to claim 5, characterized in that, The method further includes: After all feature points have been detected, the user interface will display all feature point detection results and a list of historical detection statistics.
8. An automated error-proof detection device based on an industrial camera, characterized in that, include: The installation module is used to install the testing equipment according to a preset standard installation method. The configuration module is used to configure the image acquisition template and mark the location of the parts to be inspected; The calibration module is used to acquire detection images based on the detection device, generate a template matching algorithm through the algorithm platform, and calibrate the detection images through the template matching algorithm. The detection module is used to acquire the location to be detected in the detection image and determine the presence or absence of the component through a preset detection algorithm and post-processing logic.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.