Visual editing system and method based on LabVIEW platform
The visual editing system on the LabVIEW platform enables graphical configuration and separation of the visual algorithm process, solving the problem that modifying visual algorithms in existing technologies requires delving into the source code, thus improving system maintainability and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU SECOTE PRECISION ELECTRONICS CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-04-17
AI Technical Summary
In the existing LabVIEW vision development process, modifications to vision algorithms require in-depth research into the source code, resulting in low efficiency, high risk, and high maintenance costs, making it difficult for non-professionals to participate.
A vision editing system based on the LabVIEW platform is adopted. Through the project management module, image acquisition and display module, vision operator module, algorithm step module and tool pop-up module, the system realizes the graphical configuration and separation of the vision algorithm process, supports structured configuration files and adaptive tuning engine, and reduces the dependence on professional programming.
This allows on-site personnel to debug and call algorithms without modifying the code, improving the maintainability and flexibility of the system and reducing operation and maintenance costs and technical barriers.
Smart Images

Figure CN121879746A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision software development technology, and in particular to a vision editing system and method based on the LabVIEW platform. Background Technology
[0002] In the fields of automated production and precision inspection, machine vision systems have become a core technology for achieving positioning, measurement, identification, and inspection. Graphical programming environments, represented by the LabVIEW platform and its vision development modules, are widely used for rapid prototyping and deployment of industrial vision systems due to their high efficiency and convenience.
[0003] In related technologies, developers use the low-level vision functions or auxiliary tools provided by LabVIEW to write vision processing algorithms and integrate them into the main control program. This mode realizes the programming implementation of complex vision tasks and constitutes the mainstream technical foundation for the development of current industrial vision applications.
[0004] While the existing LabVIEW vision development workflow is powerful, it reveals significant shortcomings in actual production and maintenance. In the current workflow, the logic and parameters of the vision algorithm are hard-coded into the main program's source code. When production line products change, lighting conditions change, or inspection standards are updated, any modification to the vision algorithm must be manually changed, recompiled, and deployed by software engineers by delving into the project's source code layer. This process is not only inefficient and slow to respond, but also carries the risk of accidental code modification, directly impacting the stability and reliability of the production system. Furthermore, this model completely binds the system's daily debugging and maintenance to engineers with professional programming skills, preventing on-site maintenance personnel from directly participating and increasing the company's long-term operation and maintenance costs and technical barriers. Summary of the Invention
[0005] In view of the above problems, a visual editing system based on the LabVIEW platform is proposed to overcome or at least partially solve the problem that traditional modifications require professional modification of the source code. The system includes: The project management module is used to create, delete, select, and load visual algorithm projects, each of which includes at least one visual algorithm process. The image acquisition and display module is used to acquire images through file import or through acquisition by a connected camera as the objects processed by the visual algorithm project, and to display the intermediate and final results of the image during the processing. The vision operator module is used to provide a variety of vision operators for users to call in the form of a graphical component, wherein the graphical component integrates and encapsulates the low-level vision processing functions of the LabVIEW platform; The algorithm step module is used to receive the user's selection instruction for visual operators from the visual operator module, and record the editable visual algorithm flow composed of multiple visual operators in the order of the selection instruction. The visual algorithm flow includes multiple visual operators, the execution order of the multiple visual operators, and the parameter configuration of each visual operator. The system is configured to separate the visual algorithm flow constructed by the user in the algorithm step module from the program source code and save it as a structured configuration file. The tool pop-up module is used to respond to the user's trigger operation on a specific operator in the visual operator module or the algorithm step module, and pop up the parameter configuration interface of the specific operator to configure the input parameters of the specific operator.
[0006] In an optional embodiment of this application, the structured configuration file is a text file in INI or XML format. The structured configuration file uses the project name of the visual algorithm project as an index to store the visual algorithm configuration information of the visual algorithm project. The structured configuration file is read and parsed to execute the visual algorithm project corresponding to the configuration file.
[0007] In an optional embodiment of this application, the image acquisition and display module further includes a light source control submodule. The light source control submodule is used to provide a graphical interface control for the user to adjust the brightness of the light source of the connected camera when images are acquired through the connected camera.
[0008] In an optional embodiment of this application, the algorithm step module is further configured to provide interactive functionality, the interactive functionality including: The preview function is used to respond to the user's selection operation of any visual operator recorded in the algorithm step module, and to control the image acquisition and display module to display the image processing result when the execution reaches the visual operator.
[0009] In an optional embodiment of this application, the interactive function further includes: The editing function is used to respond to the user's editing operation on any visual operator recorded in the algorithm step module, call the tool pop-up module to pop up the parameter configuration interface of the visual operator, so that the user can modify the parameter configuration of any visual operator, and update the modified effect to the image acquisition and display module.
[0010] In an optional embodiment of this application, the operators provided by the visual operator module include at least one of template matching operator, coordinate following operator, edge grabbing operator, circle grabbing operator, and geometric matching operator.
[0011] In an optional embodiment of this application, the project management module is used to respond to a user's loading or selection operation of a target project, retrieve and load the target vision algorithm configuration corresponding to the target project from the configuration file, and display the target algorithm configuration in the algorithm step module.
[0012] In an optional embodiment of this application, a configuration management engine is further included. The configuration management engine is used to respond to the user's save command by serializing the visual algorithm flow constructed in the current algorithm step module and writing it into the configuration file corresponding to the current algorithm step module. The configuration management engine is also used to read and parse the visual algorithm configuration information of the visual algorithm project from the configuration file in response to system startup instructions or project switching instructions, and load the algorithm configuration information into the algorithm step module.
[0013] In optional embodiments of this application, an adaptive tuning engine is also included. The adaptive tuning engine is used to perform the following operations when the user adjusts the parameters of the visual operator through the tool pop-up module, or when reprocessing a saved visual algorithm flow: Collect performance evaluation metrics of the current visual algorithm process when processing images, and the performance evaluation metrics include at least one or more of matching confidence, localization accuracy and feature contrast. Based on the comparison results between the performance evaluation index and the preset threshold, or based on the analysis results of historical optimized parameter combinations, the system recommends adjustment parameters to the user and synchronously displays the image processing effect using the adjusted parameters through the image acquisition and display module. In response to the user's confirmation of the adjusted parameters, the parameter configuration of the corresponding visual operator in the algorithm step module is updated.
[0014] This invention also discloses a visual editing method based on the LabVIEW platform, comprising the following steps: In response to user actions, create or load a visual algorithm project, wherein the visual algorithm project contains at least one visual algorithm flow; Images are acquired through file import or connected camera acquisition as the processing objects of the vision algorithm project, and intermediate and final results of the images are displayed during the processing. The system provides users with a variety of encapsulated low-level vision processing functions of the LabVIEW platform in the form of graphical components, and receives user selection instructions for the graphical components. In response to the user's selection command, the selected visual operators are recorded in sequence to construct the visual algorithm flow, and parameters are configured for each visual operator. The constructed visual algorithm flow is separated from the program source code and saved as a structured configuration file. In response to the execution command, the structured configuration file is read and parsed, and the input image is processed according to the visual algorithm process and parameter configuration recorded in the structured configuration file.
[0015] This invention separates the visual algorithm process from the program source code and enables full-interface configuration, allowing on-site personnel to directly debug, save, and call the algorithm without modifying the code. This significantly improves the maintainability and flexibility of the system and reduces the technical threshold and maintenance costs of machine vision applications. Attached Figure Description
[0016] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a structural block diagram of a visual editing system based on the LabVIEW platform provided in an embodiment of the present invention; Figure 2 This is a diagram of the visual editing system interface provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the process of adding an item according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the project naming operation provided in an embodiment of the present invention; Figure 5a This is a schematic diagram illustrating the file import method provided in an embodiment of the present invention; Figure 5b This is a schematic diagram of the image selection operation provided in an embodiment of the present invention; Figure 6 A system architecture diagram provided for embodiments of the present invention; Figure 7a This is a schematic diagram of visual operator editing operations provided in an embodiment of the present invention; Figure 7b This is a schematic diagram of the coordinate following operator editing operation provided in an embodiment of the present invention; Figure 7c This is a schematic diagram of the circle grabber operator editing operation provided in an embodiment of the present invention; Figure 7d This is a schematic diagram of the circle grabber 2 operator editing operation provided in an embodiment of the present invention; Figure 8This is a schematic diagram showing the measurement operator after it has been added, as provided in an embodiment of the present invention. Figure 9 This is a schematic diagram of the visual algorithm saving operation provided in an embodiment of the present invention; Figure 10 A flowchart for creating a visual project provided in an embodiment of the present invention; Figure 11 This is a flowchart of a visual editing method based on the LabVIEW platform provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0019] In today's industrial automation, cameras are widely used for visual positioning, inspection, and other tasks, making visual editing software indispensable. LabVIEW, as an automation software development platform, comes with its own visual editing software, NI Vision Assistant.
[0020] In today's industrial automation field, when using LabVIEW as the control language, once vision algorithms are involved, it is necessary to use the NI Vision Assistant, LabVIEW's built-in vision editor, to write the vision algorithms and embed the generated scripts into the main program. If any modifications are needed, such as modifying the edge area or changing the template, the software engineer needs to open the project code and find the vision script at the code level to make modifications. Frequent modifications to the underlying code can easily cause code errors and are not conducive to on-site maintenance.
[0021] Reference Figure 1 This diagram illustrates a structural block diagram of a visual editing system based on the LabVIEW platform provided in an embodiment of the present invention. The system may specifically include: Project management module 101 is used to create, delete, select and load visual algorithm projects. Each visual algorithm project must include at least one visual algorithm process. The project management module is the fundamental organizational unit for the development and application of visual algorithms in this system. It is responsible for the full lifecycle management of visual algorithm projects that include complete visual processing tasks. Each visual algorithm project, as an independent, storable, and reusable logical entity within the visual editing system, encapsulates at least one complete visual algorithm flow and can be expanded to include multiple related flows to handle complex scenarios. Through this module, users can achieve structured control over visual algorithm projects.
[0022] In a specific implementation of this invention, the project management module provides the following operations: creation, deletion, selection, and loading. The creation operation refers to responding to user commands by creating a new visual algorithm project in the system and assigning it a unique project identifier and initial storage structure. During creation, the user can define the project name, description information, and initial algorithm flow template. The deletion operation refers to removing a specified visual algorithm project from the system and releasing its occupied storage resources and related configurations, while ensuring that other projects are not affected. The selection operation refers to selecting an existing visual algorithm project from the project list or file directory and setting it as the currently active project for subsequent process editing, parameter configuration, or test execution. The loading operation refers to reading the saved project file (including its contained visual algorithm flow and associated configurations) from local storage or a network location, completely restoring it to the system's working environment, restoring it to the last saved state, supporting continued editing or direct execution.
[0023] A visual algorithm workflow refers to an executable task sequence constructed by the user through other modules of the system, containing a series of visual processing steps, their execution logic, and parameter configurations. Each visual algorithm project is associated with at least one such workflow, which constitutes the core processing logic of the project.
[0024] In one specific implementation of this system, users can perform the above operations through the project management panel in the graphical interface. Figure 2 The visual editing system interface diagram provided in the embodiments of the present invention is as follows: Figure 2 As shown, users can add projects by right-clicking in the project list. Figure 3 This is a schematic diagram illustrating the process of adding an item according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the project naming operation provided in an embodiment of the present invention, such as... Figure 3 As shown, click the "Add Project" button, as follows. Figure 4 As shown, entering the project name "Project 1" will create Project 1. Assuming a default workflow framework is generated for Project 1, containing four basic operators: image acquisition, preprocessing, edge extraction, and size calculation, the user can edit this workflow in subsequent steps.
[0025] In some embodiments of the present invention, the project management module is further configured to, in response to a user's loading or selection operation of a target project, automatically retrieve and load the target vision algorithm configuration corresponding to the target project from the configuration file, so as to display the target algorithm configuration in the algorithm step module.
[0026] In a specific implementation of this invention, when a user loads or selects a vision algorithm project in the system interface, the project management module automatically locates and reads the corresponding structured configuration file based on the project name and other identifying information. This configuration file is then parsed to extract all the vision algorithm configuration information stored within, and converted into a graphical flowchart that the algorithm step module can recognize and display. This process achieves a complete restoration of the saved project state, allowing the user to immediately view, edit, or run the vision algorithm flow in the algorithm step module.
[0027] This feature enables the system to effectively restore and quickly reuse visual algorithm projects with one click. Users can restore their previous work progress without manually configuring each item, which greatly improves the operational efficiency and user experience in multi-project and multi-task scenarios.
[0028] This module enables the system to manage visual algorithm tasks in a project-based, version-based, and modular manner, making multi-task parallel development, algorithm reuse, and team collaboration possible, and significantly improving the engineering application efficiency and maintainability of the visual algorithm system.
[0029] The image acquisition and display module 102 is used to acquire images through file import or acquisition by a connected camera as objects to be processed in the visual algorithm project, and to display the intermediate and final results of the image during the processing.
[0030] The image acquisition and display module is the core interface and data channel for the system's visual algorithm input-output interaction, undertaking the dual functions of image data acquisition and visualization of processing results. This module ensures that visual algorithm projects can obtain effective input images and provides users with a transparent observation window throughout the algorithm execution process, supporting algorithm debugging, verification, and optimization.
[0031] In a specific implementation of this invention, the image acquisition and display module provides two image acquisition methods: file import and camera acquisition. For example... Figure 2 As shown, you can choose between two methods to acquire images: file reading or camera photography, on the interface. Figure 5a This is a schematic diagram illustrating the file import method provided in an embodiment of the present invention. Figure 5b This is a schematic diagram of the image selection operation provided in an embodiment of the present invention, such as... Figure 5a and Figure 5bAs shown, the system allows users to select and load image files stored on local disks, network locations, or databases through the system interface. This is suitable for offline analysis of existing image samples, algorithm verification, or historical data playback. Camera acquisition supports communication and control with imaging devices connected to the system. By selecting cameras, real-time video stream capture, single-frame acquisition, or triggered image capture can be achieved using different connected cameras. This is suitable for online inspection, real-time monitoring, and visual applications synchronized with production equipment.
[0032] The acquired images are processed by the currently active visual algorithm project and sent to subsequent visual algorithm flows for analysis. Simultaneously, this module is also responsible for providing visual feedback on the processing in a dedicated image display area, specifically displaying intermediate and final results.
[0033] During the algorithm execution process, the intermediate image status after processing by each visual operator can be displayed in real time or step by step. For example, the output images of grayscale conversion, filtering, binarization, edge detection, etc., can be displayed, allowing users to intuitively track the data flow and transformation process. After the algorithm execution is completed, the final output image of the system is displayed. This image usually has the detection result annotations superimposed, such as drawn bounding boxes, measurement lines, feature points, text labels, pass / fail indicators, etc., and the numerical results can be displayed synchronously in the side area of the interface.
[0034] In one specific implementation of this system, the user can import an image of the PCB board to be inspected via the file import button on the interface. This image is immediately displayed in the main view area. The user then runs the solder joint detection algorithm. During execution, the system sequentially displays intermediate images in the auxiliary view area after grayscale conversion, threshold segmentation, and morphological processing. Finally, the main view area displays the result image with all solder joint locations and defect markers labeled, and the status and coordinates of each solder joint are listed in the results panel. This complete visualization link from image input to result output not only reduces the difficulty of algorithm development and debugging but also enhances the transparency and credibility of the system in practical applications, providing crucial support for the rapid iteration and field deployment of visual algorithms.
[0035] In some embodiments of the present invention, the image acquisition and display module further includes a light source control submodule, which provides a graphical interface control for the user to adjust the light source brightness of the connected camera when an image is acquired through a connected camera.
[0036] The light source control submodule is a functional extension of the image acquisition and display module. It is specifically designed to provide users with the ability to adjust the camera light source in real-time in real-time image acquisition scenarios, so as to optimize image quality, adapt to different lighting conditions, and thus ensure the stability and reliability of the visual algorithm processing input.
[0037] In a specific implementation of this invention, the module is activated when the user acquires images through a connected camera. Through graphical controls integrated into the user interface, the brightness control parameters of the underlying camera light source are exposed to the user for interactive adjustment. These graphical controls include, but are not limited to, sliders, knobs, numerical input boxes, or preset mode buttons. By operating these controls, the user can dynamically adjust the luminous intensity of the light source, and the system simultaneously sends adjustment commands to the camera or an independent light source controller, achieving real-time optimization of lighting conditions.
[0038] In one specific implementation of this system, when using a USB industrial camera to detect surface defects on parts, the user can open the light source control panel and adjust the brightness slider from 50% to 80% to enhance the contrast of surface features. By extending the active control of the image acquisition process, users can directly optimize imaging conditions during algorithm development and debugging, reducing dependence on external lighting conditions and improving the adaptability and detection accuracy of the vision system in practical industrial applications.
[0039] The vision operator module 103 is used to provide a variety of vision operators for users to call in the form of a graphical component. The graphical component integrates and encapsulates the low-level vision processing functions of the LabVIEW platform.
[0040] The visual operator module is the core functional library and building block for implementing image processing and machine vision algorithms in this system. It abstracts and encapsulates complex visual processing operations into intuitive graphical components, providing users with low-barrier, high-efficiency algorithm building capabilities. The various visual operators provided in this module cover key aspects of visual applications, from feature extraction and pattern recognition to geometric measurement.
[0041] In some embodiments of the present invention, the operators provided by the visual operator module include at least one of template matching operator, coordinate following operator, edge grabbing operator, circle grabbing operator, and geometric matching operator.
[0042] Figure 6 The system architecture diagram provided for the embodiments of the present invention, in the specific implementation of the present invention, such as Figure 6 As shown, the visual operator module includes, but is not limited to, edge grabbing operators, circle grabbing operators, template matching operators, geometric matching operators, coordinate following operators, edge detector operators, measurement operators, brightness setting operators, measurement clamp operators, point offset operators, etc. Specifically, it can be found in... Figure 2The function list on the right provides these visual operators for users to choose from. Among them, the edge-grabbing operator automatically detects edge contours or straight-line features in a specified area of an image; the circle-grabbing operator identifies circular or arc features in an image and extracts parameters such as the center and radius; the template matching operator performs similarity searches in an image using predefined templates to achieve target localization; the geometric matching operator performs more robust matching and recognition based on geometric features; the coordinate-following operator enables transformations and dynamic tracking between multiple coordinate systems, suitable for motion platforms or assembly scenarios; the edge detector operator provides various edge detection algorithms to extract image gradient features; the measurement operator performs geometric dimension measurements, such as distance, angle, and area; the brightness setting operator adjusts the brightness and contrast of an image or region to optimize image quality; and the measurement clamp operator sets measurement areas or clamps specific structures in an image to perform refined dimensional or positional analysis.
[0043] Each of the above operators is presented as an independent graphical component in the system's operator panel (i.e., Figure 2 In the function list (within the implementation), each component can have an intuitive icon, name, and brief functional description, which users can add to the algorithm flow by dragging and dropping. These graphical components in this invention are not simple interface controls; they deeply integrate and encapsulate mature and stable low-level vision processing function libraries from the LabVIEW platform, such as functional modules in the NI Vision Development Module or IMAQ Vision. This encapsulation allows users to directly call these industrially proven, high-performance vision processing capabilities without writing LabVIEW graphical code or understanding the complex details of low-level function calls.
[0044] In one specific embodiment of the present invention, the user drags the circle-finding operator from the operator panel to the algorithm editing area. This operator's graphical component automatically associates with the corresponding IMAQ Find Circular Edge or similar function in LabVIEW. When the user subsequently sets the search area and edge parameters through the properties panel, they are actually configuring the input parameters of this underlying function. When the system generates an executable flow, it will automatically call these encapsulated LabVIEW functions to complete the actual image processing.
[0045] This module allows the system to retain LabVIEW’s powerful and reliable low-level vision processing capabilities while greatly reducing the technical threshold and cycle time for vision application development, enabling engineers without deep programming skills to quickly build stable and efficient machine vision solutions.
[0046] The algorithm step module 104 is used to receive the user's selection instruction for visual operators from the visual operator module, and record the editable visual algorithm flow consisting of multiple visual operators in the order of the selection instruction. The visual algorithm flow includes multiple visual operators, the execution order of multiple visual operators, and the parameter configuration of each visual operator. The system is configured to separate the visual algorithm flow constructed by the user in the algorithm step module from the program source code and save it as a structured configuration file.
[0047] This module is the core workspace in the system for editing and organizing the visual algorithm workflow. By receiving user selections from the operator library, it dynamically constructs and maintains a complete workflow containing multiple processing steps, explicit execution logic, and parameter settings, thereby transforming graphical operator selections into executable visual tasks.
[0048] In a specific implementation of this invention, each visual operator is represented as an independent graphical node in the algorithm step module. The visual algorithm flow refers to a processing sequence consisting of one or more visual operators connected in a specific order to complete a specific visual task. It not only defines which operators are used but also clarifies the data transfer relationships between operators and the running parameters of each operator. The visual algorithm flow refers to the processing task description defined by the user in the algorithm step module by dragging and connecting visual operators, which includes the operator sequence, execution logic, and parameter settings. It is a high-level logical expression independent of specific programming languages. The separation mechanism means that this invention does not directly compile or embed the user-built flow into the source code but treats it as configuration data independent of the code. Changes to the algorithm flow do not require modification or recompilation of the underlying source code.
[0049] The specific working process of the algorithm step module is as follows: It receives selection instructions. When a user selects an operator in the visual operator module by dragging or clicking, the algorithm step module captures the selection instruction and instantiates the corresponding operator as a process node. It records the order in which the user adds operators or the order explicitly specified through connection operations, dynamically establishing and saving the logical execution relationship between operators. This order determines the processing flow of image data. For each operator node in the process, the module associates and saves its corresponding parameter settings, including all input values, thresholds, ranges, and other configuration information adjusted by the user through subsequent parameter panels.
[0050] Users can flexibly edit the built process in this module, such as adjusting the operator order, deleting or inserting operator nodes, and modifying connection relationships, etc. Figure 2 As shown, users can adjust individual operators or the order of multiple operators in the code list at the bottom left. The system updates the logical representation and internal data structure of the process in real time.
[0051] In one specific implementation of this system, the user drags four operators—image acquisition, grayscale conversion, circle capture, and measurement—into the algorithm step module in sequence. The system automatically generates a flowchart view containing four nodes, connected by default in the order they were added. The user can then adjust the order by dragging the circle capture node before the measurement node, and set its edge threshold and search radius by double-clicking the circle capture node to access the parameter panel. This configuration is automatically saved to the operator node.
[0052] In some embodiments of the present invention, the algorithm step module is further configured to provide interactive functions, including: The preview function is used to respond to the user's selection of any visual operator recorded in the algorithm step module, and to control the image acquisition and display module to display the image processing results when any visual operator is executed.
[0053] In some embodiments of the present invention, the interactive functionality further includes: The editing function is used to respond to user editing operations on any visual operator recorded in the algorithm step module. It calls the tool pop-up module to bring up the parameter configuration interface of the visual operator, allowing the user to modify the parameter configuration of any visual operator, and updates the modified effect to the image acquisition and display module.
[0054] The preview function is a key interactive feature designed for debugging and verifying visual algorithm workflows. When a user clicks or selects a specific visual operator node in the workflow within the algorithm step module, the system automatically captures and reproduces the processing state at that node. Specifically, the system temporarily runs all operators from the workflow start point to the selected node and displays the intermediate image results in the image acquisition and display module. This allows users to intuitively view the output effect of any intermediate step without having to run the entire workflow, thus quickly locating problems, verifying processing logic, or adjusting upstream parameters. The editing function provides the ability to dynamically adjust the parameters of individual operators in the constructed workflow. When a user performs an editing operation on a visual operator node in the algorithm step module, the system automatically associates and calls the tool pop-up module, displaying the parameter configuration interface corresponding to that operator. After the user modifies the parameters in the interface, the system not only updates the operator's configuration but can also selectively re-execute the workflow to that operator in real time or as needed, and immediately feed back the updated processing results to the image acquisition and display module. Figure 7a This is a schematic diagram of the visual operator editing operation provided in an embodiment of the present invention, such as... Figure 7a As shown, the parameters of the template matching operator can be set. Double-clicking the template matching operator will bring up a settings pop-up. After setting, the recognition of image features can be achieved. Figure 7b This is a schematic diagram of the coordinate following operator editing operation provided in an embodiment of the present invention, as shown below. Figure 7bAs shown, the origin ID and angle ID of the coordinate following operator can be edited. Figure 7c This is a schematic diagram of the circle-grabbing operator editing operation provided in an embodiment of the present invention. Figure 7d This is a schematic diagram of the circle grabber 2 operator editing operation provided in an embodiment of the present invention, as shown below. Figure 7c and 7d As shown, several detailed parameters of the circle grabber operator can be edited. Figure 8 This is a schematic diagram showing the measurement operator after it has been added according to an embodiment of the present invention. The measurement operator includes multiple functions, from... Figure 8 As you can see, we chose to find the midpoint this time. At this point, we have edited a practical vision algorithm. In real-world applications, we can add different operators to achieve different effects depending on the needs of different projects. Figure 9 This is a schematic diagram of the visual algorithm saving operation provided in an embodiment of the present invention, such as... Figure 9 As shown, click the "Save Parameters" button. Once a "Save Successfully" message pops up, the visual algorithm has been successfully saved to the file.
[0055] This interactive approach, which allows for immediate changes and visible improvements, greatly simplifies the parameter tuning process and enables rapid iteration and visual verification of results during algorithm debugging.
[0056] In some embodiments of the present invention, the structured configuration file is a text file in INI or XML format. The structured configuration file uses the project name of the visual algorithm project as an index to store the visual algorithm configuration information of the visual algorithm project. The structured configuration file is read and parsed to execute the visual algorithm project corresponding to the configuration file.
[0057] In this embodiment of the invention, when saving or loading the configuration file, the unique project name of the visual algorithm project is used as the core identifier associated with the configuration file. For example, the configuration file can be directly named and stored in the form of "[project name].ini" or "[project name].xml", or a dedicated identifier can be included within the file. <projectname>Fields. This design establishes a clear and intuitive one-to-one correspondence between configuration files and visual algorithm projects, facilitating file management and system retrieval.
[0058] INI format is a classic, easy-to-read and edit configuration file format that organizes data using sections and key-value pairs. Its syntax is simple and it is widely supported across various operating systems and programming environments. XML format is an extensible markup language format that uses custom tags to define the hierarchical structure and semantics of data. It is highly structured, extensible, and supports the description and validation of complex data types.
[0059] When a user selects to execute or load a vision algorithm project, the system locates the corresponding configuration file based on the project name. It then uses a standard INI parsing library or XML parser to read the file content and convert it into a data structure that the system can process internally, thus completely reconstructing the logic and state of the vision algorithm flow. After parsing, the system dynamically calls the corresponding low-level vision processing functions in the LabVIEW platform based on the reconstructed flow information and executes image processing tasks according to the parameters and order specified in the configuration. This ultimately achieves a configuration file-driven algorithm execution mode, without requiring recompiling the source code or graphical editing.
[0060] In one specific implementation of this system, after completing the four-step workflow design, the user clicks "Save Project." The system generates a configuration file named pro1.xml or pro1.ini. This file records in detail the operator type, parameters, and connection relationships between each step. The user can then copy this file to another computer with the same system deployed, and fully reproduce and run the visual inspection workflow by loading the project, without needing to re-edit the graphical interface. Figure 10 The flowchart for creating a vision project provided in this embodiment of the invention is as follows: Step 1: Create a new project and name it; Step 2: Import images (file import or camera acquisition); Step 3: Edit the vision algorithm, which can add different operators and adjust the parameters of the operators; Step 4: Save the algorithm, which saves the algorithm logic to a .xml or .ini file.
[0061] This module enables the system to seamlessly transition from graphical components to executable vision algorithms, allowing users without professional programming skills to quickly build, debug, and optimize complex machine vision processing workflows through intuitive drag-and-drop and connection operations, significantly reducing the technical threshold and time cost of vision system development.
[0062] The tool pop-up module 105 is used to respond to the user's trigger operation on a specific operator in the visual operator module or algorithm step module, and pop up the parameter configuration interface of the specific operator to configure the input parameters of the specific operator.
[0063] Input parameters refer to the external control variables or settings required for a specific visual operator to run. For example, for an edge grabbing operator, input parameters may include edge polarity, edge strength threshold, search range, etc.; for a template matching operator, input parameters may include matching accuracy, allowable rotation angle range, scaling ratio range, etc.
[0064] When the present invention receives a user's trigger operation on a specific operator in the visual operator module or algorithm step module, a modal or non-modal parameter configuration window immediately pops up. In this window, the user sets or modifies various parameters. After confirmation, the configured parameter values will be automatically bound to the instance of the operator in the process and saved.
[0065] In one specific implementation of this system, the user double-clicks the circle-grabbing operator node in the flowchart of the algorithm step module. A pop-up window then appears, displaying multiple input items such as the lower limit of the search radius, the upper limit of the search radius, the edge contrast threshold, and the number of edge points. These items are accompanied by sliders and value boxes for user adjustment. For example, the user can adjust the edge contrast threshold from the default 30 to 50 using the value box. After clicking "OK," this value is updated and saved to the configuration of the circle-grabbing operator node.
[0066] In some embodiments of the present invention, the system further includes a configuration management engine. The configuration management engine is used to respond to the user's save command, serialize the visual algorithm process built in the current algorithm step module and write it into the configuration file corresponding to the current algorithm step module; The configuration management engine is also used to read and parse the visual algorithm configuration information of the visual algorithm project from the configuration file in response to system startup commands or project switching commands, and load the algorithm configuration information into the algorithm step module.
[0067] Specifically, the configuration management engine is the core service module in the system responsible for handling configuration file reading and writing. When a user issues a save command after editing, the engine captures the current process state in the algorithm step module (including all logical information such as operator sequences, parameters, and connection relationships), converts it into a structured data format (such as XML or INI) using serialization technology, and writes it to the configuration file corresponding to the visual algorithm project. This process ensures that the user's editing results can be accurately and completely saved.
[0068] When the system starts up or the user switches to another visual algorithm project, the configuration management engine will automatically respond, locate and read the configuration file of the corresponding project, parse the file content, extract the algorithm configuration information stored therein, and restore it into an internal data structure that can be recognized and displayed by the algorithm step module, thereby realizing the rapid recovery and switching of the project working environment.
[0069] Through centralized management of the configuration management engine, the system achieves efficient synchronization between algorithm configuration data and the operation interface, which not only avoids the risk of data loss, but also supports rapid project deployment, version management, and parallel processing of multiple tasks.
[0070] In some embodiments of the present invention, the system further includes an adaptive tuning engine. The adaptive tuning engine performs the following operations when the user adjusts the parameters of the visual operators through the tool pop-up module, or when reprocessing a saved visual algorithm flow: Collect performance evaluation metrics of the current visual algorithm process when processing images. The performance evaluation metrics include at least one or more of the following: matching confidence, localization accuracy, and feature contrast. Based on the comparison results between performance evaluation indicators and preset thresholds, or based on the analysis results of historical optimized parameter combinations, the system recommends adjustment parameters to users and synchronously displays the image processing effect using the adjusted parameters through the image acquisition and display module. In response to the user's confirmation of the adjusted parameters, update the parameter configuration of the corresponding visual operator in the algorithm step module.
[0071] Among them, matching confidence reflects the reliability of target recognition by operators such as template matching and feature matching, and can be expressed as matching score or similarity percentage; localization accuracy measures the deviation between the target position output by the algorithm (such as center coordinates) and the actual object position, and is often expressed as pixel error or sub-pixel accuracy. Feature contrast characterizes the distinguishability between the features of interest in the image and its background, such as the distinguishability between edges and background.
[0072] These metrics are calculated in real time during algorithm execution, providing a data foundation for subsequent intelligent analysis.
[0073] The adaptive optimization engine compares the collected performance metrics with user-preset performance thresholds (such as a matching score >90% and a positioning error <1 pixel). If the metrics are not met, the engine calculates and generates one or more recommended parameter adjustment schemes based on built-in optimization strategies or historical optimization parameter combinations recorded by the analysis system. Built-in optimization strategies include, but are not limited to, gradient descent and rule-based heuristic search. Simultaneously, the engine immediately allocates computing resources to simulate processing the current image using the recommended parameters and pushes the processed image to the image acquisition and display module in real time for display, allowing users to intuitively preview the adjusted effect.
[0074] Recommended solutions and previews are presented to users in the form of non-modal pop-ups and sidebar suggestion lists. Users can compare the effects of different recommended solutions and select one set for adjustment. After a user confirms an adjustment parameter, the adaptive tuning engine will issue a command to automatically update the parameter configuration of the corresponding visual operator in the algorithm step module. Subsequently, the optimized parameters will be saved to the configuration file along with the project.
[0075] For example, a user is debugging a process for chip pin detection where the edge threshold parameter of the edge-grabbing operator is poorly set, causing some pins to be missed. When the user modifies this parameter through the tool pop-up module, the adaptive tuning engine is triggered. It collects performance metrics of the current process when processing test images and finds low feature contrast and unstable positioning accuracy. The engine then recommends adjusting the threshold from 120 to 95 based on the historical optimization model, and immediately displays the adjusted image in the preview area of the image acquisition display module—the result shows that all pin edges are clearly extracted. After the user confirms the recommendation, the parameter configuration of the edge-grabbing operator is automatically updated to 95 in the algorithm step module.
[0076] By introducing an adaptive tuning engine, the system not only reduces the burden on users to manually adjust parameters, but also bases the optimization process on objective performance data and historical experience, making the parameter settings of vision algorithms faster, more scientific, and more repeatable, ultimately improving the development quality and robustness of the entire vision system.
[0077] This invention separates the visual algorithm process from the program source code and enables full-interface configuration, allowing on-site personnel to directly debug, save, and call the algorithm without modifying the code. This significantly improves the maintainability and flexibility of the system and reduces the technical threshold and maintenance costs of machine vision applications.
[0078] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0079] Reference Figure 11 The diagram illustrates a visual editing method based on the LabVIEW platform according to an embodiment of the present invention, which specifically includes the following steps: Step 1101: In response to user operation, create or load a visual algorithm project, wherein the visual algorithm project contains at least one visual algorithm flow; Step 1102: Acquire images as processing objects for the visual algorithm project by importing files or acquiring them through a connected camera, and display the intermediate and final results of the images during the processing. Step 1103: Provide users with a variety of encapsulated LabVIEW platform low-level vision processing functions in the form of graphical components, and receive user selection instructions for graphical components; Step 1104: Respond to the user's selection command, record the selected visual operators in sequence to construct the visual algorithm flow, configure parameters for each visual operator, separate the constructed visual algorithm flow from the program source code, and save it as a structured configuration file. Step 1105: In response to the execution command, read and parse the structured configuration file, and process the input image according to the visual algorithm process and parameter configuration recorded in the structured configuration file.
[0080] As the method embodiments are basically similar to the system embodiments, the description is relatively simple, and relevant parts can be found in the description of the method embodiments.
[0081] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0082] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0083] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.
[0084] The above provides a detailed description of a visual editing system based on the LabVIEW platform. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.< / projectname>
Claims
1. A visual editing system based on the LabVIEW platform, characterized in that, The system includes: The project management module is used to create, delete, select, and load visual algorithm projects, each of which includes at least one visual algorithm process. The image acquisition and display module is used to acquire images through file import or through acquisition by a connected camera as the objects processed by the visual algorithm project, and to display the intermediate and final results of the image during the processing. The vision operator module is used to provide a variety of vision operators for users to call in the form of a graphical component, wherein the graphical component integrates and encapsulates the low-level vision processing functions of the LabVIEW platform; The algorithm step module is used to receive the user's selection instruction for visual operators from the visual operator module, and record the editable visual algorithm flow composed of multiple visual operators in the order of the selection instruction. The visual algorithm flow includes multiple visual operators, the execution order of the multiple visual operators, and the parameter configuration of each visual operator. The system is configured to separate the visual algorithm flow constructed by the user in the algorithm step module from the program source code and save it as a structured configuration file. The tool pop-up module is used to respond to the user's trigger operation on a specific operator in the visual operator module or the algorithm step module, and pop up the parameter configuration interface of the specific operator to configure the input parameters of the specific operator.
2. The system according to claim 1, characterized in that, The structured configuration file is a text file in INI or XML format. The structured configuration file uses the project name of the vision algorithm project as an index to store the vision algorithm configuration information of the vision algorithm project. The structured configuration file is read and parsed to execute the vision algorithm project corresponding to the configuration file.
3. The system according to claim 1 or 2, characterized in that, The image acquisition and display module also includes a light source control submodule. The light source control submodule is used to provide a graphical interface control for the user to adjust the brightness of the light source of the connected camera when images are acquired through the connected camera.
4. The system according to claim 1, characterized in that, The algorithm step module is also used to provide interactive functions, which include: The preview function is used to respond to the user's selection operation of any visual operator recorded in the algorithm step module, and to control the image acquisition and display module to display the image processing result when the execution reaches the visual operator.
5. The system according to claim 4, characterized in that, The interactive functionality also includes: The editing function is used to respond to the user's editing operation on any visual operator recorded in the algorithm step module, call the tool pop-up module to pop up the parameter configuration interface of the visual operator, so that the user can modify the parameter configuration of any visual operator, and update the modified effect to the image acquisition and display module.
6. The system according to claim 1, characterized in that, The operators provided by the visual operator module include at least one of the following: template matching operator, coordinate following operator, edge grabbing operator, circle grabbing operator, and geometric matching operator.
7. The system according to claim 1, characterized in that, The project management module is also used to respond to the user's loading or selection operation of the target project, retrieve and load the target vision algorithm configuration corresponding to the target project from the configuration file, and display the target algorithm configuration in the algorithm step module.
8. The system according to claim 2, characterized in that, It also includes a configuration management engine. The configuration management engine is used to respond to the user's save command by serializing the visual algorithm flow constructed in the current algorithm step module and writing it into the configuration file corresponding to the current algorithm step module. The configuration management engine is also used to read and parse the visual algorithm configuration information of the visual algorithm project from the configuration file in response to system startup instructions or project switching instructions, and load the algorithm configuration information into the algorithm step module.
9. The system according to claim 1, characterized in that, It also includes an adaptive tuning engine. The adaptive tuning engine is used to perform the following operations when the user adjusts the parameters of the visual operator through the tool pop-up module, or when reprocessing a saved visual algorithm flow: Collect performance evaluation metrics of the current visual algorithm process when processing images, and the performance evaluation metrics include at least one or more of matching confidence, localization accuracy and feature contrast. Based on the comparison results between the performance evaluation index and the preset threshold, or based on the analysis results of historical optimized parameter combinations, the system recommends adjustment parameters to the user and synchronously displays the image processing effect using the adjusted parameters through the image acquisition and display module. In response to the user's confirmation of the adjusted parameters, the parameter configuration of the corresponding visual operator in the algorithm step module is updated.
10. A visual editing method based on the LabVIEW platform, characterized in that, The method includes: In response to user actions, create or load a visual algorithm project, wherein the visual algorithm project contains at least one visual algorithm flow; Images are acquired through file import or connected camera acquisition as the processing objects of the vision algorithm project, and intermediate and final results of the images are displayed during the processing. The system provides users with a variety of encapsulated low-level vision processing functions of the LabVIEW platform in the form of graphical components, and receives user selection instructions for the graphical components. In response to the user's selection command, the selected visual operators are recorded in sequence to construct the visual algorithm flow, and parameters are configured for each visual operator. The constructed visual algorithm flow is separated from the program source code and saved as a structured configuration file. In response to the execution command, the structured configuration file is read and parsed, and the input image is processed according to the visual algorithm process and parameter configuration recorded in the structured configuration file.