A template snapshot-based industrial visual inspection parameter configuration and engineering template management method
By generating snapshots of detection parameters and binding them to engineering templates, the problems of inconsistent and complex parameter configurations in industrial vision inspection are solved, achieving efficient and standardized management of detection parameters and reducing the cost of troubleshooting configuration errors and anomalies.
Patent Information
- Application Number
- CN202611140318.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-11-06
AI Technical Summary
The lack of standardized template management for parameter configuration in existing industrial vision inspection leads to low configuration efficiency, inconsistent inspection results, and the separation of inspection parameters from area configuration increases complexity and error probability. The lack of version management capabilities for parameter snapshots results in high costs for anomaly troubleshooting and recovery.
By generating snapshots of detection parameters and binding them to engineering templates, standardized configuration and version management are achieved. Combined with centralized configuration of sensitivity sliders and tolerance parameters, the operation process is simplified and historical version management of parameter snapshots is provided.
It significantly improves the efficiency and standardization of test parameter configuration, reduces inconsistencies in test results between batches, simplifies the configuration process, and reduces the cost of modification, troubleshooting, and recovery.
Smart Images

Figure CN123048052A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection technology, specifically to a method, system, terminal device, and computer-readable storage medium for configuring industrial visual inspection parameters and managing engineering templates based on template snapshots. Background Technology
[0002] In the field application of industrial vision defect detection, the rationality and consistency of the detection parameter configuration directly affect the accuracy and reliability of the detection results. Existing industrial vision inspection software typically adopts a direct parameter input method, requiring operators to manually set parameters such as detection sensitivity, defect threshold, detection area location, and tolerance range each time a detection task is performed. This configuration method has the following technical drawbacks: First, the lack of a standardized template management mechanism for parameter configuration means that operators need to repeatedly configure the same testing parameters for different batches of the same product model. Manual input can easily lead to errors in numerical data entry, resulting in inconsistent testing standards for the same product across different batches. Especially in two- or three-shift production lines, differences in subjective understanding of the same product parameters among different operators further amplify the instability of the testing results. Second, the detection parameters and detection area configurations are managed separately. Operators need to switch repeatedly between multiple independent interface modules to associate the detection area configuration with the corresponding detection parameters, which increases the complexity of configuration and the probability of errors. Third, existing technologies lack version management capabilities for parameter snapshots. When operators modify the detection parameters, they cannot easily revert to the previous valid configuration state. If the modified parameters cause abnormal detection results, the cost of troubleshooting and recovery is high. Summary of the Invention
[0003] The present invention aims to solve the problems of low configuration efficiency and poor detection consistency caused by the lack of standardized templates for configuring industrial vision inspection parameters in the prior art, as well as the problem of high configuration complexity caused by the separate management of detection parameters and detection area configuration. To address the aforementioned technical problems, the present invention employs the following technical solution: in response to a template creation command, generating an initial detection parameter snapshot based on a default parameter baseline configuration; in response to a template loading command, reading the detection parameter snapshot of a specified engineering template from storage and writing it back to the configuration interface; dynamically adjusting the detection parameters using a sensitivity slider and a parameter input box; determining the detection area on the image to be inspected and associating the parameters with the current engineering template; and in response to a save command, persisting the detection parameter set along with the associated detection area configuration as an updated template parameter snapshot. This invention achieves standardized creation and versioned reuse of inspection rules by binding inspection parameters to engineering templates in the form of immutable snapshots. Parameter snapshots freeze the current configuration state upon creation or saving, and subsequent loading directly reads the snapshot content, avoiding the errors and inefficiencies of manual configuration item by item. The sensitivity slider provides an intuitive means of parameter adjustment, allowing operators to continuously adjust between strict and lenient inspection requirements to match the inspection needs of different product surfaces. Tolerance zone parameters are arranged row by row according to inspection items, with upper tolerance, lower tolerance, nominal value, and outlier detection rules all edited in one place, eliminating the need for operators to switch between multiple pages. In terms of beneficial effects, this invention can significantly improve the efficiency and standardization of industrial vision inspection parameter configuration, and significantly reduce the problem of inconsistent inspection results between batches caused by manual configuration errors. The version management mechanism of template parameter snapshots makes the historical state of the configuration traceable and reversible, effectively reducing the troubleshooting and recovery costs caused by parameter modifications. The combination of graded adjustment of the sensitivity slider and centralized configuration of tolerance parameters enables operators to intuitively and quickly complete the fine-tuning of inspection rules. Attached Figure Description Figure 1 This is an overall flowchart of the detection parameter configuration and engineering template management method based on template snapshots in this embodiment of the invention.
[0004] Figure 2 This is a detailed flowchart of the decision-making process for adjusting detection parameters and saving templates in an embodiment of the present invention. The meanings of the markings in the diagram are as follows: 101 - Response template creation command, generates an initial detection parameter snapshot based on default parameters; 102 - Respond to the template loading command, read the parameter snapshot and write it back to the configuration interface; 103 - Adjust the detection parameters using the sensitivity slider and parameter input box; 104 - Determine the detection region on the image to be inspected and associate it with the current template; 105 - In response to the save command, persist the parameter set as an updated snapshot of the template parameters; 201-Detection parameter adjustment: Sensitivity slider dynamic adjustment; 202-Centralized configuration of tolerance parameters: Upper tolerance, lower tolerance, and nominal value can be edited line by line; 203 - Detection Area Editing: Rectangular / Polygonal / Circular Selection Box; 204 - A node that determines whether a mask needs to be enabled; 205 - Configure mask parameters and associate mask files; 206 - Save the current configuration as a snapshot of the template parameters; 207 - Node for determining whether to save as a new template or overwrite the current template; 208 - Create a snapshot copy of the parameters and write the new template identifier; 209 - Overwrite the current template parameter snapshot; 210 - Last modified timestamp of the updated template. Detailed Implementation The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. Reference Figure 1 The present invention provides a method for configuring industrial visual inspection parameters and managing engineering templates based on template snapshots, which includes the following steps. Step 101, as follows Figure 1 As shown in label 101, in response to the template creation command, an initial detection parameter snapshot is generated based on the default parameter baseline configuration. In a specific embodiment, the operator clicks the "New Project Template" button on the project configuration interface. The front-end application pops up a new project template window, which includes at least a template name input box, a baseline configuration drop-down selection, a detection type selection, and an image resolution selection. After the operator fills in the template name and selects the baseline configuration, they click "Confirm." The system generates an initial detection parameter snapshot based on the default parameter baseline configuration. This snapshot includes at least one detection item name and its associated sensitivity level and nominal value. The sensitivity level of the initial detection parameter snapshot is set to "Medium" by default, and the nominal value is automatically generated according to the corresponding reference value based on the detection item type. The detection parameter snapshot is persistently stored using a structured record format, and the snapshot identifier is associated with the project template identifier. Step 102, as follows Figure 1 As shown in mark 102, in response to the template loading command, the system reads a snapshot of the detection parameters for the specified project template from the template parameter snapshot storage and writes the parameter values from the snapshot back to the configuration interface of the current task console. Operators view the template list in the project configuration interface; each record in the template list contains at least the template name and update date. When an operator clicks the "Load" button next to the corresponding template, a confirmation window pops up, displaying the file path and loading method selection. After confirming the load, the system reads the parameter snapshot associated with the specified template from storage and writes the parameter values, such as sensitivity level, defect threshold, detection item name, and nominal value, back to the configuration interface of the current console field by field. The detection parameters of the current project are overwritten by the parameter snapshot of the new template. The configuration interface also displays the modification time of the parameter so that operators can determine if the parameter has expired. Step 103, as follows Figure 1 Mark 103 and Figure 2As shown in mark 201, the sensitivity level in the detection parameter snapshot is dynamically adjusted via the sensitivity slider in the configuration interface, and the detection item name, upper tolerance, lower tolerance, and nominal value in the detection parameter snapshot are edited via the parameter input box. In a specific embodiment, the sensitivity adjustment area includes a slidable slider control. The slider's adjustment range is divided into five levels, from lenient to strict. When the operator drags the slider, the sensitivity level value is simultaneously displayed next to the slider. Moving the slider to the right gradually increases the sensitivity, suitable for products with high surface quality requirements; moving it to the left decreases the sensitivity, suitable for products that allow for certain surface defects. Below, an edge contrast threshold input box, a minimum defect area input box, and a filter strength drop-down selection option are provided, with filter strength including three levels: weak, medium, and strong. Step 104, as follows Figure 1 Mark 104 and Figure 2 As shown in reference numeral 203, in response to a detection area editing command, the position coordinates and geometry of at least one detection area are determined on the image to be inspected, and the parameters of the detection area are associated with the current engineering template. In a specific embodiment, the operator opens the image to be inspected in the image viewing interface and selects the detection area selection tool. The selection tool supports three modes: rectangular selection, polygonal selection, and circular selection. When the operator selects rectangular selection, a rectangular selection parameter window pops up, containing input boxes for the starting point X coordinate, the starting point Y coordinate, the width, and the height, with values processed in pixels. The operator can also enter a region label to identify the function of the detection area. After confirmation, the position coordinates and geometry parameters of the detection area are associated with the parameter snapshot of the current engineering template. In another embodiment, such as Figure 2 As shown in markings 204 and 205, operators can also configure masks for the detection area. After selecting the corresponding detection area in the detection area drop-down box, the name, rectangle coordinates, number of polygon vertices, and circle radius of each area can be viewed through the Edit Mask Area window. When it is necessary to mask invalid parts of the image, the Enable Mask option can be checked and a mask type can be selected for use in conjunction with an existing mask file. Step 105, as follows Figure 1 Mark 105 and Figure 2As indicated by marker 206, in response to the save command, the set of detection parameters corresponding to the current engineering template, along with the associated detection area configuration, is persisted as an updated template parameter snapshot. In a specific embodiment, after the operator clicks the "Save Current Configuration" button, the system displays a save confirmation window, indicating that this save will overwrite the detection parameters, mask settings, and tolerance settings in the active template. After the operator confirms, the system serializes the sensitivity level, defect threshold, tolerance parameters, and associated detection area configuration parameters in the current console into a structured template parameter snapshot, writes it back to storage, and updates the last modification timestamp of the template. Step 106, as follows Figure 2 As shown in marks 207 and 208, in response to the "Save As New Template" command, a copy is created based on the snapshot of the detection parameters of the current project template, and a new template identifier and template name are written to it, forming an independent new template parameter snapshot. This function is suitable for scenarios where operators want to derive new configurations based on existing templates without having to recreate them from the default configuration. Step 107, as follows Figure 2 As shown in marks 207 and 209, in response to the undo command, the snapshot of the detection parameters of the current project template is rolled back to the state at the time of the last save. The system performs the rollback operation based on the historical version record of the parameter snapshot. After the rollback is completed, the configuration of the current project template is restored to the parameter set at the time of the last save. In another alternative embodiment, such as Figure 2 As shown in mark 202, the system also supports filling in the upper and lower tolerances line by line according to the inspection items in the tolerance zone parameter configuration interface. The nominal value, unit, and judgment rule are arranged in the same line, and the restrictions of size and appearance can be checked in a centralized manner. After the operator fills in the tolerance parameters, he / she clicks the "Apply Tolerance" button. The system performs format validation on the input parameters. After the validation is passed, the tolerance parameters are associated with the corresponding inspection items and written into the parameter snapshot of the current project template. The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for configuring industrial visual inspection parameters and managing engineering templates based on template snapshots, characterized in that, include: In response to the template creation command, an initial detection parameter snapshot is generated based on the default parameter baseline configuration. The initial detection parameter snapshot includes at least one detection item name and its associated sensitivity level and nominal value. In response to the template loading command, a snapshot of the detection parameters of the specified project template is read from the template parameter snapshot storage, and the parameter values in the snapshot are written back to the configuration interface of the current task console. The sensitivity level in the detection parameter snapshot can be dynamically adjusted using the sensitivity slider in the configuration interface, and the detection item name, upper tolerance, lower tolerance, and nominal value in the detection parameter snapshot can be edited using the parameter input box. In response to a detection area editing command, the position coordinates and geometry of at least one detection area are determined on the image to be inspected, and the parameters of the detection area are associated with the current engineering template; In response to the save command, the set of detection parameters corresponding to the current project template and the associated detection area configuration are persisted as an updated template parameter snapshot.
2. The method according to claim 1, characterized in that, The configuration interface also includes a detection mode selection item and a defect threshold input item. The detection mode selection item includes at least a continuous acquisition mode and a single trigger mode.
3. The method according to claim 1, characterized in that, The location coordinates of the detection area include the coordinates of the upper left corner and the width and height values. The geometry of the detection area includes at least one of rectangle, polygon and circle.
4. The method according to claim 1, characterized in that, Also includes: In response to the "Save As New Template" command, a copy is created based on the current project template's detection parameter snapshot, and a new template identifier and template name are written to it, forming an independent new template parameter snapshot.
5. The method according to claim 1, characterized in that, Also includes: In response to the undo command, the snapshot of the detection parameters of the current project template is rolled back to the state at the time of the last save. The rollback operation is performed based on the historical version record of the parameter snapshot.
6. A template snapshot-based industrial visual inspection parameter configuration and engineering template management system, characterized in that, include: The template creation module is used to generate an initial detection parameter snapshot based on the default parameter baseline configuration in response to the template creation command; The template loading module is used to respond to template loading instructions, read the detection parameter snapshot of the specified project template from the template parameter snapshot storage, and write the parameter values in the detection parameter snapshot back to the configuration interface of the current task console; The parameter adjustment module is used to dynamically adjust the sensitivity level through the sensitivity slider in the configuration interface, and to edit the detection item name, upper tolerance, lower tolerance and nominal value through the parameter input box; The detection region editing module is used to determine the position coordinates and geometry of at least one detection region on the image to be inspected in response to the detection region editing command, and associate the parameters of the detection region with the current engineering template; The template saving module is used to persist the set of detection parameters corresponding to the current project template and the associated detection area configuration as an updated template parameter snapshot in response to the save command.
7. The system according to claim 6, characterized in that, It also includes a template copy module, which, in response to the "Save As New Template" command, creates a copy based on the detection parameter snapshot of the current project template and writes a new template identifier and template name to form an independent new template parameter snapshot.
8. The system according to claim 6, characterized in that, It also includes a version rollback module, which, in response to an undo command, rolls back the snapshot of the current project template's detection parameters to the state at the time of the last save.
9. A terminal device, characterized in that, The industrial visual inspection parameter configuration and engineering template management system based on template snapshots, as described in any one of claims 6 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.
