An industrial vision inspection modular control method and related equipment
Through modular and visual industrial vision detection methods, the problem of traditional system debugging is solved and the problem of relying on professional knowledge is realized, efficient and flexible inspection process management is achieved, and the efficiency and inspection quality of the production line are improved.
Patent Information
- Application Number
- CN202411121360.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-08-15
AI Technical Summary
Traditional industrial vision detection systems consume time during debugging, rely on professional knowledge and are prone to errors, resulting in low production efficiency and inconsistent detection results.
Modular and visual industrial vision detection methods are adopted, and through the detection module library and visual inspection process box, operators are allowed to simply drag and drop operations to add and adjust the detection module. The system automatically processes the module position and preprocessing, displays the detection results in real time, and provides a parameter adjustment interface.
It improves the flexibility and ease of use of the inspection system, reduces labor costs, improves the overall efficiency and inspection accuracy of the production line, and can quickly respond to changes in detection requirements without downtime.
Smart Images

Figure CN119107290B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial vision technology, and particularly to an industrial vision inspection modular control method and related equipment. Background Art
[0002] With the continuous improvement of industrial automation, product quality inspection plays an increasingly important role in the production process. Traditional manual inspection methods are difficult to meet the requirements of modern industrial production for efficiency and accuracy. Against this background, industrial vision inspection technology has emerged. It realizes rapid and accurate measurement of product appearance and size through precise sampling by a vision camera and combined with advanced image processing technology.
[0003] Currently, the vision inspection system in industrial equipment usually adopts the following implementation method: First, install the vision camera at a specified position on the production line. During the product production and operation stage, professional operators debug and run the image processing program on-site. The operators write and modify the image processing algorithm on a computer according to production requirements and product characteristics. These algorithms usually include functional modules such as image preprocessing, feature extraction, and size measurement. During the debugging process, the operators need to repeatedly modify parameters and test the program effect until the detection result meets the production requirements.
[0004] With the increase in product types and the rapid switching of production lines, some limitations of the related vision inspection system have emerged in practical applications. Since the inspection requirements for each product may vary, the operators need to frequently debug and modify the program on-site. This debugging process often takes a long time and sometimes even takes several hours or days to complete a system optimization. In addition, since program debugging requires professional knowledge, front-line operators are difficult to complete independently and often rely on the support of technical personnel. This not only increases the labor cost but also may cause the production line to stagnate, affecting the overall production efficiency. At the same time, frequent on-site debugging also increases the risk of program errors, which may affect the accuracy and consistency of the detection results. In summary, the debugging efficiency of the related vision inspection system is low. Summary of the Invention
[0005] This application provides an industrial vision inspection modular control method and related equipment for improving the debugging efficiency.
[0006] In a first aspect, the present application provides an industrial vision detection modular control method, including: collecting a product image of a product and displaying the product image in a product sampling area; in response to a selection and drag operation on a current detection module, copying the current detection module from a detection module library to a detection process box, where the current detection module is any detection module in the detection module library; after the current detection module is copied to the detection process box, displaying a detection area and a detection target of the current detection module in the product sampling area; in response to an execution instruction, sequentially executing detection programs corresponding to the detection modules according to the arrangement order of the detection modules in the detection process box to detect the product image; when the detection program is executed, displaying a detection result value of the implemented detection module in a data reading column.
[0007] By adopting the above technical solution, by collecting the product image and displaying it in the product sampling area, an intuitive visual reference is provided for subsequent detection. The design of the detection module library enables various detection methods to be modularized, greatly increasing the flexibility of the system. Operators can add the required detection modules to the detection process box through simple selection and drag operations. This intuitive operation method reduces the threshold for using the system. The arrangement order of the modules in the detection process box determines the execution order of the detection programs. This visual process design makes the entire detection process clearer and easier to understand. When the detection program is executed, the data reading column displays the detection result value in real time, facilitating the operator to promptly grasp the detection situation. In short, through this modular and visual design, the flexibility and usability of the detection system are greatly improved, and the detection efficiency is significantly enhanced. Operators do not need to frequently perform complex program debugging. They can quickly establish and adjust the detection system through simple drag operations, which not only saves time but also reduces the requirements for the operator's professional knowledge, thereby reducing labor costs and improving the overall efficiency of the production line.
[0008] In some embodiments in combination with some embodiments of the first aspect, after the step of detecting a product image by sequentially executing the detection programs corresponding to the detection modules in the order of arrangement of the detection modules in the detection process box in response to the execution of an instruction, the method further includes: when the detection program is executed, in response to the selection and drag operation of adding a detection module, copying the current detection module from the detection module library to the detection process box, and the added detection module is any detection module in the detection module library; determining whether the position of the added detection module in the detection process box is before the detection module that is currently being executed; if it is before the detection module that is currently being executed, then during the execution of the detection module that is currently being executed, preprocessing of the added detection module is performed in parallel; after the detection program of the detection module that is currently being executed is completed, determining whether the preprocessing of the added detection module is ready; if the preprocessing of the added detection module is ready, then interrupt the detection order specified by the detection process box, execute the detection program corresponding to the added detection module, and detect the product image; after the detection program corresponding to the added detection module is completed, resume the detection order specified by the detection process box; if the preprocessing of the added detection module is not ready, then execute the detection programs corresponding to the subsequent detection modules to detect the product image, and the subsequent detection module is the next detection module of the detection module that is currently being executed in the detection process box; if it is after the detection module that is currently being executed, update the arrangement order of the detection modules in the detection process box; after the detection program of the detection module that is currently being executed is completed, sequentially execute the detection programs corresponding to the detection modules according to the updated arrangement order to detect the product image.
[0009] By adopting the above technical solutions, it is allowed to dynamically add detection modules during the execution of the detection program, which greatly improves the flexibility of the system. By judging the position of the newly added detection module, the system can intelligently decide how to process this newly added module. For the new module added before the currently executing module, the system performs preprocessing in parallel, and this parallel processing mechanism improves the overall detection efficiency. The system dynamically adjusts the execution order according to the preprocessing status of the newly added module to ensure the continuity and efficiency of the detection process. For the new module added after the currently executing module, the system updates the arrangement order and executes it at an appropriate time to ensure the integrity of the detection process. In short, it enables the detection system to adapt to changes in detection requirements in real time without stopping the entire detection process for adjustment. This not only improves the flexibility of the system but also greatly reduces the downtime caused by changes in requirements, thus significantly enhancing the overall efficiency and adaptability of the production line.
[0010] In some embodiments in combination with some embodiments of the first aspect, after the step of detecting the product image by sequentially executing the detection programs corresponding to the detection modules in the order of arrangement of the detection modules in the detection process box in response to the execution of an instruction, the method further includes: when the detection program is being executed, in response to the selection and drag operation of reducing a detection module, removing the reducing detection module from the detection process box, where the reducing detection module is any detection module in the detection process box; determining whether the position of the reducing detection module in the detection process box is before the detection module that is currently performing detection, the detection module itself that is currently performing detection, or after the detection module that is currently performing detection; if it is before the detection module that is currently performing detection, removing the reducing detection module from the detection process box and removing the detection result value of the reducing detection module in the data reading column; if it is the detection module itself that is currently performing detection, determining whether the preprocessing of the subsequent detection module is ready, where the subsequent detection module is the next detection module in the detection process box after the detection module that is currently performing detection; if the preprocessing of the subsequent detection module is ready, interrupting the detection order specified by the detection process box and executing the detection program corresponding to the subsequent detection module to detect the product image; if the preprocessing of the subsequent detection module is not ready, waiting until the preprocessing of the subsequent detection module is ready, interrupting the detection order specified by the detection process box and executing the detection program corresponding to the subsequent detection module to detect the product image; if it is after the detection module that is currently performing detection, updating the arrangement order of the detection modules in the detection process box; after the detection program of the detection module that is currently performing detection is executed, sequentially executing the detection programs corresponding to the detection modules according to the updated arrangement order to detect the product image.
[0011] By adopting the above technical solution, it is allowed to dynamically remove detection modules during the execution of the detection program, further enhancing the flexibility of the system. The system will adopt different processing strategies according to the position of the removed module to ensure the continuity of the detection process. For removing a module before the currently executing module, the system will immediately update the detection process and data display to avoid unnecessary resource waste. When removing the currently executing module, the system will intelligently determine the preparation status of the subsequent module and promptly switch to the next ready module to minimize the interruption time. For removing a module after the currently executing module, the system will update the arrangement order to ensure the correctness of subsequent detections. In short, it can quickly respond to changes in detection requirements and make adjustments without stopping the entire detection process. This not only improves the flexibility and efficiency of the system, but also can minimize the time loss caused by adjustments while ensuring the detection quality, thus significantly enhancing the overall efficiency and adaptability of the production line.
[0012] In some embodiments in combination with some embodiments of the first aspect, after the step of displaying the detection result value of the implementation detection module in the data reading column when detecting the program execution, the method further includes: marking a suspicious result in the data reading column, where the suspicious result is a result whose detection result value is inconsistent with a preset rule; in response to an in-depth inspection instruction for the suspicious result, displaying an original product image related to the result in the product sampling area, and marking the corresponding detection area and detection target; displaying a parameter adjustment interface of the corresponding detection module; in response to a parameter adjustment instruction, suspending the detection program of the detection module that is currently performing detection, and re-executing the detection program of the corresponding detection module with new parameters; and simultaneously displaying the suspicious result and the result of the re-detection in the data reading column.
[0013] By adopting the above technical solution, the detection result can be displayed in real time in the data reading column, providing intuitive data feedback. By comparing with the preset rule, the system can automatically mark the suspicious result, which greatly improves the efficiency of anomaly detection. The operator can conduct an in-depth inspection of the suspicious result, and the system will display the original product image and mark the relevant area, which helps to quickly locate the problem. The system provides a parameter adjustment interface for the detection module, allowing the operator to make immediate adjustments according to the actual situation. After the parameter adjustment, the system will suspend the current detection, re-execute the detection with new parameters, and simultaneously display the original result and the new result for easy comparison and analysis. In short, the operator can quickly identify and handle abnormal situations based on the real-time feedback without stopping the entire detection process. This not only improves the detection accuracy but also significantly enhances the system's response speed and flexibility, thereby effectively reducing misjudgment and missed judgment and improving the overall detection quality and efficiency.
[0014] In some embodiments in combination with some embodiments of the first aspect, after the step of copying the current detection module from the detection module library to the detection process box in response to the selection and drag operation of the current detection module, where the current detection module is any detection module in the detection module library, the method further includes: generating an optimization suggestion for the detection process box based on a preset association rule of the detection module; and in response to the user's confirmation instruction, adjusting the detection module in the detection process box according to the optimization suggestion.
[0015] By adopting the above technical solution, based on the preset association rule of the detection module, the system can automatically generate an optimization suggestion for the detection process box. The user can quickly adjust the arrangement of the detection modules in the detection process box according to the suggestion generated by the system. This can not only help novice users quickly construct a reasonable detection process but also provide an optimization reference for experienced operators, thereby significantly improving the overall performance and reliability of the detection system. At the same time, this mechanism also reduces the possibility of human error and further improves the detection accuracy and efficiency.
[0016] In some embodiments in combination with some embodiments of the first aspect, after the steps of collecting a product image of a product and displaying the product image in a product sampling area, the method further includes: obtaining the arrangement order of detection modules from a database according to the product type of the product; and adjusting the detection modules in the detection process box according to the arrangement order in response to a confirmation instruction of a user.
[0017] By adopting the above technical solution, the system can automatically obtain the corresponding arrangement order of detection modules from the database according to the product type. The user can quickly adjust the detection process box according to the arrangement order recommended by the system, saving a large amount of manual configuration time. Through this intelligent detection process customization mechanism, the system can quickly adapt to the detection requirements of different products. The configuration time of the detection system is reduced. For a production line that needs to frequently switch product types, this mechanism can greatly improve production efficiency, reduce quality problems caused by configuration errors, and thus improve the overall production quality and efficiency.
[0018] In some embodiments in combination with some embodiments of the first aspect, after the step of copying the current detection module from the detection module library to the detection process box in response to a selection and drag operation on the current detection module, where the current detection module is any detection module in the detection module library, the method further includes: detecting whether the current detection module is the latest version; and if not, displaying a prompt message to prompt the user to update the outdated one.
[0019] By adopting the above technical solution, the system can automatically detect whether the currently used detection module is the latest version. For a module that is not the latest version, the system will display a prompt message to remind the user to update. The module is always set to the template modified last time to avoid the problem of mistakenly thinking that a modification has been made but actually not. This can ensure that each change is accurately recorded and applied, reducing errors caused by misunderstanding or forgetting.
[0020] In a second aspect, the present application provides an industrial vision detection modular control system. The industrial vision detection modular control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the industrial vision detection modular control system to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0021] In a third aspect, the present application provides a computer program product containing instructions, which when running on an industrial vision detection modular control system, enables the industrial vision detection modular control system to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0022] Fourthly, the present application provides a computer-readable storage medium, including instructions, which, when running on an industrial vision inspection modular control system, cause the industrial vision inspection modular control system to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] 1. By collecting product images and displaying them in the product sampling area, it provides an intuitive visual reference for subsequent inspections. The design of the inspection module library enables various inspection methods to be modularly processed, greatly increasing the flexibility of the system. Operators can add the required inspection modules to the inspection process box through simple selection and dragging operations. This intuitive operation method reduces the threshold for using the system. The arrangement order of the modules in the inspection process box determines the execution order of the inspection program. This visual process design makes the entire inspection process clearer and easier to understand. When the inspection program is executed, the data reading column displays the inspection result values in real time, facilitating operators to promptly grasp the inspection situation. In short, through this modular and visual design, the flexibility and usability of the inspection system are greatly improved, and the inspection efficiency is significantly enhanced. Operators do not need to frequently perform complex program debugging. They can quickly establish and adjust the inspection system with simple dragging operations, which not only saves time but also reduces the requirements for operators' professional knowledge, thereby reducing labor costs and improving the overall efficiency of the production line.
[0025] 2. It allows for dynamically adding inspection modules during the execution of the inspection program, which greatly improves the flexibility of the system. By judging the position of the newly added inspection module, the system can intelligently decide how to handle this newly added module. For a new module added before the currently executing module, the system will perform preprocessing in parallel. This parallel processing mechanism improves the overall inspection efficiency. The system will dynamically adjust the execution order according to the preprocessing status of the newly added module to ensure the continuity and efficiency of the inspection process. For a new module added after the currently executing module, the system will update the arrangement order and execute it at an appropriate time to ensure the integrity of the inspection process. In short, it enables the inspection system to adapt to changes in inspection requirements in real time without stopping the entire inspection process for adjustment. This not only improves the flexibility of the system but also greatly reduces the downtime caused by changes in requirements, thereby significantly enhancing the overall efficiency and adaptability of the production line.
[0026] 3. It can display the detection results in real time in the data reading column, providing intuitive data feedback. By comparing with the preset rules, the system can automatically mark suspicious results, which greatly improves the efficiency of anomaly detection. The operator can conduct in-depth inspections on the suspicious results. The system will display the original product image and mark the relevant areas, which helps to quickly locate the problem. The system provides an interface for adjusting the parameters of the detection module, allowing the operator to make immediate adjustments according to the actual situation. After the parameter adjustment, the system will pause the current detection, re-execute the detection with the new parameters, and simultaneously display the original results and the new results for convenient comparison and analysis. In short, the operator can quickly identify and handle abnormal situations based on real-time feedback without stopping the entire detection process. This not only improves the detection accuracy but also significantly enhances the system's response speed and flexibility, thus effectively reducing misjudgments and missed detections and improving the overall detection quality and efficiency. Description of the Drawings
[0027] Figure 1 is a flowchart of an industrial vision inspection modular control method in an embodiment of the present application;
[0028] Figure 2 is another flowchart of an industrial vision inspection modular control method in an embodiment of the present application;
[0029] Figure 3 is another flowchart of an industrial vision inspection modular control method in an embodiment of the present application;
[0030] Figure 4 is another flowchart of an industrial vision inspection modular control method in an embodiment of the present application;
[0031] Figure 5 is an exemplary hardware structure diagram of an industrial vision inspection modular control system in an embodiment of the present application. Detailed Embodiments
[0032] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above", "", and "this" are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more of the listed items.
[0033] Hereinafter, the terms "first" and "second" are for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0034] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an industrial vision inspection modular control method in an embodiment of the present application;
[0035] S101. Collect the product image of the product and display the product image in the product sampling area;
[0036] Among them, the product image represents the visual representation of the product to be detected, usually a digital picture obtained through devices such as cameras or scanners. The product sampling area refers to the area on the user interface specifically used to display the product image, for showing the actual appearance of the product to be detected.
[0037] In some embodiments, it is necessary to use an appropriate image acquisition device (such as an industrial camera) to photograph or scan the product to be detected to obtain a high-quality digital image.
[0038] It should be noted that displaying the product image in the product sampling area allows the operator or quality inspector to visually observe the appearance of the product and quickly set the inspection process.
[0039] It should be noted that in some implementations, after step S101, it further includes:
[0040] S1011. According to the product type of the product, obtain the arrangement order of the detection modules from the database;
[0041] Among them, the product type represents the classification or type of the product to be detected, used to distinguish products with different characteristics.
[0042] In some embodiments, the system first needs to determine the type of the current product, which may involve reading the product identifier or user input. Then, the system will connect to a pre-configured database that stores the arrangement order of detection modules corresponding to different product types. The system will construct a query, using the product type as the keyword, to retrieve the corresponding detection module arrangement information from the database. If the query does not return results, the system should have a corresponding error handling mechanism, which may use the default arrangement or remind the user to configure manually.
[0043] S1012. In response to the user's confirmation instruction, adjust the detection modules in the detection process box according to the arrangement order.
[0044] It can be seen that the system can automatically obtain the corresponding arrangement order of the detection modules from the database according to the product type. The user can quickly adjust the detection process box according to the arrangement order recommended by the system, saving a large amount of manual configuration time. Through this intelligent detection process customization mechanism, the system can quickly adapt to the detection requirements of different products, reducing the configuration time of the detection system. For a production line that needs to frequently switch product types, this mechanism can greatly improve production efficiency, reduce quality problems caused by configuration errors, and thus improve the overall production quality and efficiency.
[0045] S102. In response to the selection and drag operation of the current detection module, copy the current detection module from the detection module library to the detection process box, where the current detection module is any detection module in the detection module library;
[0046] Among them, the detection module refers to a software unit that performs a specific detection function, such as an appearance detection module, a hole size detection module, a position detection module, etc. The detection module library represents a collection that stores various predefined detection modules. The detection process box refers to the area on the user interface used to organize and display the detection process.
[0047] It should be noted that this step is usually executed when setting up the detection process, allowing users to customize the detection order and content. For example, the user first browses the available detection modules in the detection module library and then selects the required modules. Then, the user drags the selected module to the appropriate position in the detection process box through mouse or touch operations. The system will respond to this operation, create a copy of the module in the detection process box, while keeping the module in the original detection module library unchanged. This process can be repeated multiple times to build a complete detection process.
[0048] For example, in some embodiments, the appearance detection module can detect whether there are defects in the product appearance, and the size detection module can detect the sizes of some hole positions set on the product.
[0049] It should be noted that the detection program has become mature in industrial applications. The innovation of this method lies in modularizing and visualizing it. Specifically, the standard detection process is functionally deconstructed, and each detection link is divided into independent functional modules. These functional modules are presented through an intuitive graphical interface, realizing the visualization of the detection process.
[0050] In some embodiments, after step S102, it further includes:
[0051] S1021. Generate optimization suggestions for the detection process box based on the association rules of the preset detection modules;
[0052] The association rule refers to a set of rules that describe the dependency relationship and optimization strategy between detection modules.
[0053] In some embodiments, the system first needs to load the current detection process box structure and the preset detection module association rules. Then, the system analyzes the configuration and connection relationships of each module in the current process and matches them with the association rules. During the matching process, the system may identify potential optimization opportunities, such as redundant modules, unreasonable execution orders, uneven resource utilization, etc. Based on these findings, the system generates a series of optimization suggestions, which may include module reordering, combining similar functions, adjusting parameter configurations, etc. The system also needs to consider the feasibility and potential impacts of the suggestions to ensure that the generated suggestions do not damage the overall function of the detection process. Finally, the system outputs these suggestions in a structured form, which may include information such as suggestion descriptions, expected effects, and implementation difficulties.
[0054] S1022. In response to the user's confirmation instruction, adjust the detection modules in the detection process box according to the optimization suggestions.
[0055] The confirmation instruction represents an operation signal indicating that the user agrees to execute the optimization suggestions.
[0056] It can be seen that based on the preset detection module association rules, the system can automatically generate optimization suggestions for the detection process box. Users can quickly adjust the arrangement of the detection modules in the detection process box according to the suggestions generated by the system. This can not only help novice users quickly construct a reasonable detection process but also provide optimization references for experienced operators, thus significantly improving the overall performance and reliability of the detection system. At the same time, this mechanism also reduces the possibility of human errors and further improves the accuracy and efficiency of detection.
[0057] S103. After the current detection module is copied to the detection process box, display the detection area and detection target of the current detection module in the product sampling area;
[0058] Among them, the detection area refers to the range or position in the product image where specific detection needs to be performed. The detection target refers to the specific object or feature that needs to be identified or measured within the detection area.
[0059] In some embodiments, after a detection module is copied into the detection process box, the system automatically analyzes the attributes and parameters of the module. Then, on the product image displayed in the product sampling area, the system marks the area to be detected by the module with specific graphics (such as rectangular frames, arrows, or highlighted areas). At the same time, the system also indicates the detection target of the module in an appropriate way (such as text annotations, icons, etc.). In this way, the detection personnel can clearly see the position and detection content of each detection module on the product.
[0060] For example, in some embodiments, when the hole size detection module is dragged in, the position of the holes to be detected on the product and the size of the holes will be displayed in the product sampling area;
[0061] It should be noted that the detection program in the detection module can be adjusted. The debugging personnel need to adjust the detection area and detection targets according to the actual requirements of the product. For example, for the detection area adjustment: it can be enlarged, reduced, moved or customized in shape; for the detection target modification: new targets can be added, the target type can be changed, and existing targets can be deleted; for the parameter setting: specific values (such as aperture, allowable error) can be input through the configuration panel, and parameters (such as detection sensitivity) can be quickly adjusted using the slider.
[0062] In some embodiments, the detection area and detection targets can be displayed in multiple ways: Optionally, semi-transparent rectangles of different colors are used to cover the product image to represent the detection area; text is added beside the rectangle to describe the detection targets; the user is allowed to precisely define the detection area by dragging to adjust the size and position of the rectangle. Optionally, an animation effect is used to highlight the detection area, such as a flashing or fading effect; icons are used to represent the detection targets, such as a ruler icon for size detection and a color palette icon for color detection; a zoom function is provided for the user to view details. It can be understood that other ways can also be adopted to implement the display of the detection area and detection targets, which are not limited here.
[0063] In some embodiments, after step S103, it further includes:
[0064] S1031. Detect whether the current detection module is the latest version;
[0065] Specifically, the system first needs to obtain the version information of the current detection module, which may involve reading the module's metadata, configuration file or specific version identifier. Then, the system needs to communicate with a predefined version information source, which may be a remote server, local database or configuration file. The system will compare the current version with the information of the latest available version, which may include the version number, release date or specific version identifier. During the comparison process, the system needs to consider the format and comparison rules of the version number. If it is found that the current version is lower than the latest version, the system should record this information, including version differences, possible update content, etc.
[0066] S1032. If not, display a prompt message to remind the user to update the outdated module.
[0067] Among them, the prompt message refers to the text or graphical interface element that conveys specific information or suggestions to the user. Being outdated means that the version of the currently used detection module lags behind the latest available version.
[0068] It can be seen that the system can automatically detect whether the currently used detection module is the latest version. For modules that are not the latest version, the system will display a prompt message to remind the user to update. The module is always set to the template modified last time to avoid the problem that it is mistakenly thought that a modification has been made but actually not. This can ensure that each change is accurately recorded and applied, reducing errors caused by misunderstanding or forgetting.
[0069] S104. In response to the execution instruction, in accordance with the arrangement order of the detection modules in the detection process box, sequentially execute the detection programs corresponding to the detection modules to detect the product image.
[0070] The arrangement order of the detection modules represents the sequence of each detection module in the detection process box. The detection program refers to the computer program corresponding to each detection module and performing specific detection tasks.
[0071] S105. When the detection program is executed, display the detection result value of the implemented detection module in the data reading column.
[0072] The data reading column refers to the dedicated area on the user interface for displaying the detection results. The detection result value represents the specific data obtained after each detection module is executed, such as dimensions, angles, the number of defects, etc.
[0073] In some embodiments, the detection results may include quantitative data (such as specific dimension values), qualitative results (such as pass / fail judgments), or more complex data sets (such as a list of defect locations). These results will be presented in an easy-to-understand format, which may include numbers, text descriptions, color coding (such as green for pass and red for fail), etc.
[0074] It can be seen that by collecting the product image and displaying it in the product sampling area, an intuitive visual reference is provided for subsequent detection. The design of the detection module library modularizes various detection methods, greatly increasing the flexibility of the system. The operator can add the required detection modules to the detection process box through simple selection and drag-and-drop operations, and this intuitive operation method reduces the threshold for using the system. The arrangement order of the modules in the detection process box determines the execution order of the detection programs, and this visual process design makes the entire detection process clearer and easier to understand. When the detection program is executed, the data reading column displays the detection result value in real time, facilitating the operator to promptly grasp the detection situation. In short, through this modular and visual design, the flexibility and usability of the detection system are greatly improved, and the detection efficiency is significantly enhanced. The operator does not need to frequently perform complex program debugging, and can quickly establish and adjust the detection system through simple drag-and-drop operations, which not only saves time, but also reduces the requirements for the operator's professional knowledge, thereby reducing labor costs and improving the overall efficiency of the production line.
[0075] During actual use, when a debugger discovers that there may be a problem with the program of a certain detection module, they must wait for the entire detection process to complete before making modifications. This is especially time-consuming for complex detection programs.
[0076] Modifying the detection module in the detection process box during the execution of the detection program mainly involves three situations: adding, deleting, and modifying modules. The handling methods for each situation are different, and the solutions are described one by one below:
[0077] Adding a new detection module:
[0078] However, during actual use; after step S104, it further includes:
[0079] Reference Figure 2 , Figure 2 is another process schematic diagram of the industrial vision detection modular control method in the embodiment of the present application;
[0080] S201. When the detection program is executed, in response to the selection and dragging operation of adding a detection module, copy the current detection module from the detection module library to the detection process box, and the added detection module is any detection module in the detection module library;
[0081] Among them, the execution of the detection program refers to the process in which the system is performing product detection according to the preset detection process. Adding a detection module means adding a new detection function unit to the existing detection process.
[0082] This step is usually carried out when the detection program has already started execution, but the user discovers that additional detection items need to be added.
[0083] S202. Determine whether the position of the added detection module in the detection process box is before the detection module that is currently performing detection;
[0084] Among them, the detection module that is currently performing detection refers to the module corresponding to the current detection operation.
[0085] It should be noted that the detection module is a visual representation of the detection program, rather than a physical product. They are essentially a graphical display of the program code that performs specific detection tasks, converting complex detection algorithms into an intuitive graphical interface, providing a visual operation interface for easy debugging and management. The detection module usually appears as a draggable and configurable graphical control.
[0086] It is necessary to determine the position of the module currently performing the detection in the detection process. Then, the system will compare the relative positions of the newly added module and the currently executing module in the detection process box. If the position of the newly added module is before the currently executing module, it means that according to the ideal detection order, this newly added module should have been executed. If the position of the newly added module is after the currently executing module, it means that this newly added module will be executed in future detection steps.
[0087] If it is before the detection module that is currently performing the detection, execute step S203;
[0088] If it is after the detection module that is currently performing the detection, execute step S208;
[0089] S203. If it is before the detection module that is currently performing the detection, during the execution of the detection module that is currently performing the detection, preprocess the added detection module in parallel;
[0090] Among them, performing in parallel means a processing method of executing two or more tasks simultaneously. Preprocessing refers to the necessary initialization and preparation work for the detection module before the formal execution of the detection.
[0091] Preprocessing may include loading necessary algorithm libraries, initializing parameters, preparing data structures, etc.
[0092] Continuing with the above example, in some embodiments, the detection area and detection target of the added detection module will also be displayed in the product sampling area;
[0093] It should be noted that at this time, the detection area and detection target of the detection module that is currently performing the detection and the detection area and detection target of the added detection module will have different presentation forms. For example, this difference may be reflected in aspects such as color, transparency, or border style. For example, the currently executing module may be represented by a solid border and saturated color, while the newly added module may use a dashed border and semi-transparent color. This differential display helps the operator quickly identify the current active detection task and potential newly added tasks, thus better understanding and managing the entire detection process.
[0094] Continuing with the above example, in some embodiments, the debugger can modify the debug program of the detection module. The specific implementation method can refer to step S103 and will not be elaborated here.
[0095] It should be noted that all the above processes can be regarded as preprocessing.
[0096] S204. After the detection program of the detection module that is currently performing the detection is executed, determine whether the preprocessing of the added detection module is ready;
[0097] Specifically, the system will first confirm that the current detection module has completed all the scheduled detection tasks. Then, the system will check the preprocessing status of the newly added detection module. This checking process may include verifying whether all necessary resources have been loaded and whether the parameters have been correctly set, etc.
[0098] The preprocessing of the added detection module is ready, execute step S205;
[0099] The preprocessing of the added detection module is not ready, execute step S207.
[0100] S205. If the preprocessing of the added detection module is ready, interrupt the detection order specified by the detection flow box, execute the detection program corresponding to the added detection module, and detect the product image;
[0101] In some embodiments, the system will first pause the original detection order and may need to save the current detection status. Then, the system will immediately call the detection program of the newly added detection module and start to perform corresponding detection on the product image.
[0102] S206. After the detection program corresponding to the added detection module is executed, resume the detection order specified by the detection flow box;
[0103] In some embodiments, the system will return to the original detection order and continue to execute the subsequent detection modules starting from the breakpoint.
[0104] S207. If the preprocessing of the added detection module is not ready, execute the detection program corresponding to the subsequent detection module to detect the product image. The subsequent detection module is the next detection module after the detection module that is currently performing detection in the detection flow box;
[0105] The subsequent detection module refers to the next detection module after the current execution module in the original detection order.
[0106] It should be noted that step S207 is a loop step. After the detection program of the subsequent detection module is executed, it is judged whether the preprocessing of the added detection module is ready; then the subsequent detection module is regarded as the detection module that is currently performing detection, and the loop is executed with reference to steps S205 to S207 until the preprocessing of the detection module is ready.
[0107] S208. If it is after the detection module that is currently performing detection, update the arrangement order of the detection modules in the detection flow box;
[0108] Updating the arrangement order means adjusting the order of the detection modules in the detection flow box to include the newly added module.
[0109] After the detection program of the detection module that is currently performing detection is completed, the detection programs corresponding to the detection modules are sequentially executed according to the updated arrangement order to detect the product image.
[0110] It can be seen that allowing the dynamic addition of detection modules during the execution of the detection program greatly improves the flexibility of the system. By determining the position of the newly added detection module, the system can intelligently decide how to handle this newly added module. For a new module added before the currently executing module, the system will perform preprocessing in parallel, and this parallel processing mechanism improves the overall detection efficiency. The system will dynamically adjust the execution order according to the preprocessing status of the newly added module to ensure the continuity and efficiency of the detection process. For a new module added after the currently executing module, the system will update the arrangement order and execute it at an appropriate time to ensure the integrity of the detection process. In short, it enables the detection system to adapt to changes in detection requirements in real time and make adjustments without stopping the entire detection process. This not only improves the flexibility of the system but also greatly reduces the downtime caused by changes in requirements, thus significantly enhancing the overall efficiency and adaptability of the production line.
[0111] Reducing the detection module:
[0112] However, during the actual use process; after step S104, it further includes:
[0113] Reference Figure 3 , Figure 3 is another flow diagram of the industrial vision detection modular control method in the embodiment of the present application;
[0114] S301. When the detection program is executed, in response to the selection and drag operation of reducing the detection module, remove the reducing detection module from the detection process box, and the reducing detection module is any detection module in the detection process box;
[0115] S302. Determine whether the position of the reducing detection module in the detection process box is before the detection module that is currently performing detection, the detection module itself that is currently performing detection, or after the detection module that is currently performing detection;
[0116] "Before" and "after" are used to represent the relative position relationship in the detection order. "Itself" means that the removed module is the currently executing module.
[0117] S303. If it is before the detection module that is currently performing detection, then reduce the detection module from the detection process box and remove the detection result value of the reducing detection module in the data reading column;
[0118] In some embodiments, the system first needs to delete the corresponding module information from the data structure of the detection process. Then, the system updates the display of the detection process box and removes the visual representation of the module. Next, the system needs to access the relevant data structure of the data reading column, find the detection results corresponding to the removed module, and delete them from the display.
[0119] S304. If it is the detection module itself that is currently performing detection, determine whether the preprocessing of the subsequent detection module is ready. The subsequent detection module is the next detection module of the detection module that is currently performing detection in the detection process box.
[0120] S305. If the preprocessing of the subsequent detection module is ready, interrupt the detection order specified by the detection process box, execute the detection program corresponding to the subsequent detection module, and perform detection on the product image.
[0121] S306. If the preprocessing of the subsequent detection module is not ready, wait until the preprocessing of the subsequent detection module is ready, interrupt the detection order specified by the detection process box, execute the detection program corresponding to the subsequent detection module, and perform detection on the product image.
[0122] S307. If it is after the detection module that is currently performing detection, update the arrangement order of the detection modules in the detection process box.
[0123] S308. After the detection program of the detection module that is currently performing detection is completed, in accordance with the updated arrangement order, sequentially execute the detection programs corresponding to the detection modules, and perform detection on the product image.
[0124] It can be seen that allowing the dynamic removal of detection modules during the execution of the detection program further enhances the flexibility of the system. The system will adopt different processing strategies according to the position of the removed module to ensure the continuity of the detection process. For removing a module before the currently executing module, the system will immediately update the detection process and data display to avoid unnecessary resource waste. When removing the currently executing module, the system will intelligently judge the preparation status of the subsequent module and promptly switch to the next ready module to minimize the interruption time. For removing a module after the currently executing module, the system will update the arrangement order to ensure the correctness of subsequent detection. In short, it can quickly respond to changes in detection requirements and make adjustments without stopping the entire detection process. This not only improves the flexibility and efficiency of the system, but also minimizes the time loss caused by adjustments while ensuring the detection quality, thus significantly enhancing the overall efficiency and adaptability of the production line.
[0125] Modifying the detection module is actually a combination of addition and deletion, which can refer to the above two steps and will not be elaborated here.
[0126] In some embodiments, after step S105, the following steps are further included:
[0127] Refer to Figure 4 , Figure 4 which is another process schematic diagram of the industrial vision inspection modular control method in the embodiments of the present application;
[0128] S401. Mark the suspicious results in the data reading column, where the suspicious results are those whose detection result values do not conform to the preset rules;
[0129] The suspicious results refer to the detection outputs that do not meet the expectations or need further confirmation. The detection result value represents the specific data generated during the detection process. The preset rule refers to the standard or threshold used to judge whether the result is normal.
[0130] In some embodiments, the system first needs to obtain the latest detection result values, and then compare these values with the predefined rules or thresholds. The comparison process may involve simple numerical range checks or more complex logical judgments. Once it is found that the result does not conform to the preset rules, the system will specially mark the result in the data reading column. The marking methods may include changing the text color, adding background highlighting, using special icons, etc.
[0131] S402. In response to the in-depth inspection instruction for the suspicious results, display the original product image related to the results in the product sampling area, and mark the corresponding detection area and detection target;
[0132] The in-depth inspection instruction represents the operation of the user requesting to view more detailed information.
[0133] In some embodiments, the system first needs to receive and parse the user's in-depth inspection instruction to determine the specific suspicious result to be viewed. Then, the system needs to retrieve the corresponding original product image from the storage according to the identification information of the result. After retrieving the image, the system loads and displays it in the product sampling area. Next, the system needs to determine the specific detection area and detection target involved in the result according to the records of the detection algorithm. The system then marks these areas and targets on the displayed image using appropriate visualization techniques (such as contour lines, color blocks, arrows, etc.). The marking process needs to consider the balance between clarity and not obscuring the details of the original image. In addition, the system may also need to provide interactive functions such as zooming and panning so that users can view the marked details more carefully.
[0134] S403. Display the parameter adjustment interface of the corresponding detection module;
[0135] For the specific implementation method, reference can be made to step S103, which will not be elaborated here.
[0136] S404. In response to the parameter adjustment instruction, pause the detection program of the detection module that is currently performing detection;
[0137] Among them, the parameter adjustment instruction represents an operation signal for the user to modify the detection configuration.
[0138] S405. Use the new parameters to re - execute the detection program of the corresponding detection module;
[0139] Among them, the new parameters represent the detection configuration values just adjusted by the user.
[0140] S406. Simultaneously display the suspicious results and the results of the re - detection in the data reading column.
[0141] The results of the re - detection represent the output obtained after performing the detection with the new parameters. Simultaneous display means presenting two sets of data side by side in the same view.
[0142] In some embodiments, the system first needs to obtain new result data from the process of re - detection. Then, the system needs to create or update the display area in the data reading column to accommodate the two sets of result data. The system may need to adjust the layout of the data reading column to ensure that the two sets of results can be clearly displayed side by side. When presenting the data, the system should use appropriate visualization methods, such as tables, charts, or numerical lists, so that users can easily identify and compare the differences. The system also needs to add clear labels to each set of results, such as "original results" and "re - detection results". In addition, the system may need to highlight the main differences between the two sets of results, for example, using color coding or special symbols to mark the changed values. The system should also consider providing additional interactive functions, such as result comparison graphs, difference percentage calculations, etc., to assist users in more in - depth analysis.
[0143] It can be seen that the detection results can be displayed in real - time in the data reading column, providing intuitive data feedback. By comparing with the preset rules, the system can automatically mark the suspicious results, which greatly improves the efficiency of anomaly detection. The operator can conduct in - depth inspections on the suspicious results, and the system will display the original product image and mark the relevant areas, which helps to quickly locate the problem. The system provides a parameter adjustment interface for the detection module, allowing the operator to make immediate adjustments according to the actual situation. After the parameter adjustment, the system will pause the current detection, re - execute the detection with the new parameters, and simultaneously display the original results and the new results for convenient comparison and analysis. In short, the operator can quickly identify and handle abnormal situations based on the real - time feedback without stopping the entire detection process. This not only improves the accuracy of detection, but also significantly enhances the response speed and flexibility of the system, thereby effectively reducing misjudgments and missed detections and improving the overall detection quality and efficiency.
[0144] Next, an exemplary industrial vision detection modular control system 500 provided by the embodiments of the present application will be introduced.Figure 5 It is a schematic diagram of an exemplary hardware structure of the industrial vision inspection modular control system 500 provided by an embodiment of the present application.
[0145] In some embodiments, the industrial vision inspection modular control system 500 is a computer device or the industrial vision inspection modular control system 500 includes a computer device. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it realizes the method in the embodiment of the present application.
[0146] Those skilled in the art can understand that Figure 5 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.
[0147] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
[0148] As used in the above embodiments, depending on the context, the term "when..." can be interpreted to mean "if...", or "after...", or "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining...", or "in response to determining...", or "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".
[0149] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0150] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes: various media that can store program codes such as ROM or random access memory RAM, magnetic disks, or optical discs.
Claims
1. An industrial vision inspection modular control method, characterized in that, Including: Collect a product image of the product and display the product image in the product sampling area; In response to a selection and drag operation on the current detection module, copy the current detection module from the detection module library to the detection process box, where the current detection module is any detection module in the detection module library; After the current detection module is copied to the detection process box, display the detection area and detection target of the current detection module in the product sampling area; In response to an execution instruction, sequentially execute the detection programs corresponding to the detection modules according to the arrangement order of the detection modules in the detection process box to detect the product image; During the execution of the detection program, in response to a selection and drag operation to add a detection module, copy the current detection module from the detection module library to the detection process box, where the added detection module is any detection module in the detection module library; Judge whether the position of the added detection module in the detection process box is before the detection module that is currently performing detection; if it is before the detection module that is currently performing detection, then during the execution of the detection module that is currently performing detection, perform preprocessing of the added detection module in parallel; After the detection program of the detection module that is currently performing detection is executed, judge whether the preprocessing of the added detection module is ready; If the preprocessing of the added detection module is ready, interrupt the detection order specified by the detection process box and execute the detection program corresponding to the added detection module to detect the product image; After the detection program corresponding to the added detection module is executed, resume the detection order specified by the detection process box; if the preprocessing of the added detection module is not ready, then execute the detection program corresponding to the subsequent detection module to detect the product image, where the subsequent detection module is the next detection module of the detection module that is currently performing detection in the detection process box; If it is after the detection module that is currently performing detection, update the arrangement order of the detection modules in the detection process box; After the detection program of the detection module that is currently performing detection is executed, sequentially execute the detection programs corresponding to the detection modules according to the updated arrangement order to detect the product image; During the execution of the detection program, display the detection result value of the implementation detection module in the data reading column.
2. The method according to claim 1, characterized in that, After the step of, in response to an execution instruction, sequentially execute the detection programs corresponding to the detection modules according to the arrangement order of the detection modules in the detection process box to detect the product image, the method further includes: During the execution of the detection program, in response to a selection and drag operation to remove a detection module, remove the reduced detection module from the detection process box, where the reduced detection module is any detection module in the detection process box; Determine whether the position of the reduced detection module in the detection process box is before the detection module that is currently performing detection, the detection module that is currently performing detection itself, or after the detection module that is currently performing detection; If it is before the detection module that is currently performing detection, reduce the detection module from the detection process box and remove the detection result value of the reduced detection module from the data reading column; If it is the detection module itself that is currently performing detection, determine whether the preprocessing of the subsequent detection module is ready, where the subsequent detection module is the next detection module after the detection module that is currently performing detection in the detection process box; If the preprocessing of the subsequent detection module is ready, interrupt the detection order specified in the detection process box, execute the detection program corresponding to the subsequent detection module, and perform detection on the product image; If the preprocessing of the subsequent detection module is not ready, wait until the preprocessing of the subsequent detection module is ready, interrupt the detection order specified in the detection process box, execute the detection program corresponding to the subsequent detection module, and perform detection on the product image; If it is after the detection module that is currently performing detection, update the arrangement order of the detection modules in the detection process box; After the detection program of the detection module that is currently performing detection is completed, sequentially execute the detection programs corresponding to the detection modules according to the updated arrangement order, and perform detection on the product image.
3. The method according to claim 1, wherein After the step of displaying the detection result value of the implemented detection module in the data reading column when the detection program is being executed, the method further includes: Mark suspicious results in the data reading column, where the suspicious results are results where the detection result value does not conform to a preset rule; In response to an in-depth inspection instruction for the suspicious results, display the original product image related to the results in the product sampling area, and mark the corresponding detection area and detection target; Display the parameter adjustment interface of the corresponding detection module; In response to a parameter adjustment instruction, pause the detection program of the detection module that is currently performing detection; Re-execute the detection program of the corresponding detection module with the new parameters; Simultaneously display the suspicious results and the results of the re-detection in the data reading column.
4. The method according to claim 1, characterized in that, After the step of copying the current detection module from the detection module library to the detection process box in response to a selection and drag operation on the current detection module, where the current detection module is any detection module in the detection module library, the method further includes: Generate an optimization suggestion for the detection process box based on a preset association rule of the detection module; In response to the user's confirmation instruction, adjust the detection modules in the detection process box according to the optimization suggestion.
5. The method according to claim 1, wherein After the step of collecting the product image of the product and displaying the product image in the product sampling area, the method further includes: Obtain the arrangement order of the detection modules from the database according to the product type of the product; In response to the user's confirmation instruction, adjust the detection modules in the detection process box according to the arrangement order.
6. The method according to claim 1, characterized in that After the step of copying the current detection module from the detection module library to the detection process box in response to a selection and drag operation on the current detection module, where the current detection module is any detection module in the detection module library, the method further includes: Check whether the current detection module is the latest version; If not, display a prompt message to remind the user to update the outdated one.
7. An industrial vision inspection modular control system, characterized in that, The industrial vision detection modular control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the industrial vision detection modular control system to execute the method according to any one of claims 1-6.
8. A computer program product comprising instructions, characterized in that, When the computer program product runs on the industrial vision detection modular control system, it enables the industrial vision detection modular control system to execute the method according to any one of claims 1-6.
9. A computer-readable storage medium, comprising instructions, characterized in that, When the instruction runs on the industrial vision detection modular control system, it enables the industrial vision detection modular control system to execute the method according to any one of claims 1-6.
Citation Information
Patent Citations
Visual inspection process condition execution control method and control system thereof
CN113312043A