A method and platform for generating executable programs for machine vision systems

By building a hardware model of the machine vision system and setting a benchmark to generate an executable program, the problem of low efficiency in traditional IoT program generation is solved, and non-professionals can also generate programs efficiently.

CN115113863BActive Publication Date: 2025-09-30SUZHOU DCCK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210252586.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2025-09-30
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

Traditional IoT executable program generation requires professional technicians, which is inefficient and highly dependent.

Method used

By building a hardware model of the machine vision system, setting benchmarks and terminals, generating executable programs, and using visual acquisition modules, benchmark function modules, and connection modules for program generation, dependence on professional technicians is reduced.

Benefits of technology

It enables the generation of executable programs without the need for professional technicians, improves work efficiency, and reduces dependence on professional technicians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115113863B_ABST
    Figure CN115113863B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating an executable program for a machine vision system, comprising the following steps: constructing several hardware models of the machine vision system and setting relevant parameters to establish a corresponding relationship between each of the hardware models and each hardware device in the machine vision system; setting a benchmark for the visual acquisition device of the machine vision system, wherein the benchmark is created based on the process requirements of the workpiece; setting terminals, extracting workpiece features based on the process requirements of the workpiece to be inspected to generate terminals that need to be calculated; converting the generated terminals to the benchmark for calculation, and obtaining the position of each terminal under the benchmark; and packaging the obtained position together with the hardware model to generate an executable program for the machine vision system of the workpiece to be inspected. In addition, the present invention also provides a platform for generating executable programs for the machine vision system. This system development method can directly generate executable programs for direct use based on functions, greatly improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of development technology, and in particular to a method and platform for generating an executable program for a machine vision system. Background Art

[0002] Software development is the process of building a software system or the software components of a system according to user requirements. Software development is a systematic project encompassing requirements capture, analysis, design, implementation, and testing. Software is typically implemented using a programming language and typically developed using software development tools. Software is categorized as system software and application software. Software encompasses more than just the programs that run on a computer; the files associated with these programs are generally considered part of the software. The general process of software design includes designing software functions and implementation algorithms and methods, designing the overall software architecture and modules, programming and debugging, program integration and testing, and writing and submitting programs.

[0003] With the development of IoT technology, IoT development and applications have seen significant growth. However, traditional IoT executable programs are professionally programmed by software developers using a compiler and a specific language. This program generation method often requires highly specialized technical personnel and a large amount of specialized work, resulting in low efficiency, inconvenience, and a high reliance on specialized technical personnel. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and platform for generating an executable program, which can directly generate an executable program for direct use based on the function, thereby greatly improving work efficiency.

[0005] In order to achieve the above-mentioned purpose and other advantages according to the present invention, a method for generating an executable program for a machine vision system is provided, comprising the following steps:

[0006] Constructing several hardware models of the machine vision system and setting relevant parameters to establish a corresponding relationship between each of the hardware models and each hardware device in the machine vision system;

[0007] The visual acquisition device benchmark setting of the machine vision system is established according to the workpiece process requirements;

[0008] Terminal setting: extracting workpiece features based on the process requirements of the workpiece to be inspected to generate the terminals that need to be calculated;

[0009] Convert the generated terminals to the reference and calculate to obtain the position of each terminal under the reference;

[0010] The obtained positional accuracy and the hardware model are packaged together to generate an executable program of a machine vision system for the workpiece to be measured.

[0011] Preferably, generating the terminal to be calculated includes adjusting the ROI of the terminal and setting a calculation method.

[0012] Preferably, the method for generating the executable program includes setting terminals of different models of products of the same type by adding connectors based on collected data.

[0013] Preferably, creating the benchmark includes the steps of coarse positioning, feature capture and constructing a working coordinate system.

[0014] Preferably, the terminal conversion to the calculation under the benchmark includes setting the calibration plate coordinate space, and using the benchmark to convert the calibration plate coordinate space into the workpiece coordinate space, and then converting the terminal coordinate calculation under the calibration plate coordinate space into the terminal coordinate under the workpiece coordinate space.

[0015] Preferably, setting the calibration plate coordinate space includes converting an image of the workpiece photographed by a camera into the calibration plate coordinate space.

[0016] Preferably, the ROI adjustment includes obtaining coordinates by laser and performing parameter setting to adjust the ROI coordinates and size.

[0017] Preferably, the calculation method setting includes the steps of setting a preset calculation method and adjusting calculation parameters, wherein the preset calculation method is a calculation method pre-developed for the machine vision system.

[0018] A second object of the present invention is to provide an executable program generation platform, comprising:

[0019] a visual acquisition module configured to acquire images of the reference and the terminal;

[0020] A benchmark function module is configured to create a benchmark and generate a workpiece coordinate space based on actual needs and corresponding machine equipment;

[0021] A terminal function module is configured to select terminals that need to be calculated;

[0022] The connection module is configured to convert the selected terminal into coordinates in a workpiece coordinate space.

[0023] Preferably, the terminal function module is further configured to perform ROI adjustment and calculation method selection.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] The present invention can generate an executable program through the above steps, and the user can directly call and run this program. In this way, the executable program is directly generated with the help of the development method and development platform. There is no need for very professional development engineers, only basic computer technology is required. Not only is the requirement for staff low, but work efficiency is greatly improved.

[0026] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and to implement it according to the contents of the description, the following preferred embodiments of the present invention are described in detail with reference to the accompanying drawings. The specific implementation methods of the present invention are given in detail by the following embodiments and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 This is a flowchart of Example 1 of the method for generating an executable program for a machine vision system according to the present invention;

[0029] Figure 2 This is a specific flow chart of Example 2 of the method for generating an executable program for a machine vision system according to the present invention;

[0030] Figure 3 Schematic diagram of the reference setting step in Example 3 of the method for generating an executable program for a machine vision system according to the present invention;

[0031] Figure 4 This is a schematic diagram of the terminal setting step in Example 3 of the method for generating an executable program for a machine vision system according to the present invention;

[0032] Figure 5 This is a schematic diagram of the output position in Example 3 of the method for generating an executable program for a machine vision system according to the present invention;

[0033] Figure 6 A schematic diagram of generating an executable program in Example 3 of the method for generating an executable program for a machine vision system according to the present invention;

[0034] Figure 7 A structural block diagram of an executable program generation platform according to the present invention.

[0035] In the figure: 10, visual acquisition module; 20, reference function module; 30, terminal function module; 40, connection module. DETAILED DESCRIPTION

[0036] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0037] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably. Example 1

[0038] Reference Figure 1 A method for generating an executable program for a machine vision system comprises the following steps:

[0039] S11: Build several hardware models of the machine vision system and set relevant parameters to establish the relationship between each hardware model and the hardware device;

[0040] S12: Setting a benchmark for a visual acquisition device of a machine vision system, wherein the benchmark is established according to the workpiece process requirements;

[0041] S13: Terminal setting, extracting workpiece features according to the process requirements of the workpiece to be inspected to generate terminals that need to be calculated; wherein, the terminals are workpiece features captured according to the process requirements of the workpiece; the workpiece features include one or more of the workpiece's point features, line features or surface features.

[0042] S14: converting the generated terminals to the reference for calculation, and obtaining the position of each terminal under the reference;

[0043] S15: The obtained position and the hardware model are packaged together to generate an executable program of the machine vision system of the workpiece to be measured.

[0044] In this embodiment, several hardware modules are first constructed, corresponding machines and equipment are added according to actual needs, and relevant parameters are set to establish the corresponding relationship between each of the hardware models and the hardware equipment. After that, a benchmark is created, and then by setting the terminal functions, user-oriented terminals are generated. Finally, the generated terminals are calculated and output under the benchmark to generate the final executable program. Through this method, the user can directly double-click the program to run and run it, directly edit the program, generate an executable program, and generate the program in sequence. It does not require very professional development engineers, but only basic computer technology is needed to generate executable programs and run them. This method not only has low requirements for staff and does not require professional personnel, but also greatly improves work efficiency and avoids dependence on professional and technical personnel.

[0045] Creating a datum involves coarse positioning, feature capture, and the construction of a work coordinate system. Specifically, the following steps are involved: First, the workpiece is coarsely positioned. Then, based on process requirements, features on the workpiece are captured and geometrically calculated. These features include feature points, feature lines, or feature planes. Finally, a workpiece coordinate system is constructed based on the captured features, creating a datum. This step creates a datum, facilitating the subsequent conversion and connection between terminal coordinates and the datum coordinates.

[0046] Among them, generating the terminals that need to be calculated includes the following specific steps: first capturing the pixel image of the workpiece; then converting the image into a calibration coordinate space through calibration; and finally capturing and generating the terminal coordinates based on the calibration coordinate space.

[0047] Among them, by adding connectors to convert the terminals to the reference for calculation, the output coordinates of each terminal under the reference are obtained, including the following steps: by setting the calibration plate coordinate space, and using the reference to convert the calibration plate coordinate space into the workpiece coordinate space, and then converting the terminal coordinate calculation in the calibration plate coordinate space into the terminal coordinate in the workpiece coordinate space. Example 2

[0048] Reference Figure 2 This embodiment provides a method for generating an executable program for a machine vision system, which specifically includes the following steps:

[0049] S21: Build several hardware models of the machine vision system and set relevant parameters to establish the relationship between each hardware model and the hardware device;

[0050] S22: Setting a benchmark for a visual acquisition device of a machine vision system, wherein the benchmark is established according to the workpiece process requirements;

[0051] S23: Terminal setting, extracting workpiece features according to the process requirements of the workpiece to be inspected to generate terminals that need to be calculated; wherein, the terminals are workpiece features captured according to the process requirements of the workpiece; the workpiece features include one or more of the workpiece's point features, line features or surface features.

[0052] S24: Adjust the ROI and set the calculation method for the generated terminal.

[0053] S25: For products of the same type but different models, different types of terminals are set by adding connectors based on the collected data.

[0054] S26: converting the generated terminals to the reference for calculation, and obtaining the position of each terminal under the reference;

[0055] S27: The obtained position and the hardware model are packaged together to generate an executable program of the machine vision system of the workpiece to be measured.

[0056] In this embodiment, due to slight differences in workpiece size or shape, the terminals to be calculated are readjusted through the steps of ROI adjustment and calculation method setting to make the generated terminal coordinates more accurate. ROI adjustment includes adjusting the ROI coordinates and size through human-computer interaction, specifically, configuring the ROI coordinates and size by dragging a mouse or manually entering the settings. Calculation method selection includes selecting a calculation method and adjusting calculation parameters, specifically, selecting a preset calculation method and adjusting calculation parameters under that calculation method.

[0057] This embodiment also includes adding connectors to configure different terminal types for different product models based on collected data. Since the same type of products differ only in size and specifications, simply collecting and modifying the connector data can be used to configure different recipes. Switching between different models can be done without modifying the program, facilitating operation and program execution, and saving time. Example 3

[0058] To make it easier for those skilled in the art to understand the present invention, this embodiment provides a method for generating an executable program for a machine vision system. This embodiment takes the generation of an executable program for inspecting whether each contact point of an interface meets production standards as an example.

[0059] S31: Construct several hardware models of the machine vision system, and set relevant parameters to establish the relationship between each hardware model and the hardware device; for example, in this embodiment, set a camera and a detection sensor, etc.

[0060] S32: Setting the benchmark of the visual acquisition device of the machine vision system, wherein the benchmark is established according to the workpiece process requirements; Figure 3 In this embodiment, a reference coordinate system is established with the midlines of the upper and lower ends of the workpiece interface as the x-axis and the midlines of the left and right ends as the y-axis.

[0061] S33: Terminal setting, extracting workpiece features according to the process requirements of the workpiece to be inspected to generate the terminals that need to be calculated; refer to Figure 4 In this embodiment, each contact point of the interface is used as a terminal, and a total of 40 terminals Pin1 to Pin40 are established.

[0062] S34: Convert the generated terminals to the reference and calculate to obtain the position of each terminal under the reference; the position is the range of position variation allowed by the axis or center plane of a shape, refer to Figure 5Taking Pin1 as an example, its terminal coordinates are (-21.139, -1.516), and its coordinates under the reference are (-20.9, -1.425). Then the position of Pin1 on the x-axis, Pin1X, is -0.039, and the position of Pin1 on the y-axis, Pin1Y, is -0.0691.

[0063] S35: Package the obtained position and hardware model together to generate the machine vision system executable program for the workpiece to be measured. Figure 6 The executable program of this embodiment is used to check whether the interface contact point meets the production standard. When the difference between the actual coordinates of the contact point being checked and the standard coordinates is within the position degree, it meets the production standard; otherwise, it does not meet the production standard.

[0064] This example uses the generation of an executable program to verify that each interface contact point meets production standards. Through basic operations, a visual program can be directly generated, allowing for the inspection and testing of non-standard workpieces to be directly generated. This eliminates the need for reprogramming or specialized technical personnel; only basic computer skills are required to generate and run the executable program. This reduces both labor and financial costs while significantly improving efficiency. Example 4

[0065] Reference Figure 7 This embodiment provides a system development platform for directly generating executable programs, including:

[0066] A visual acquisition module 10 is configured to acquire images of the reference and the terminal;

[0067] The benchmark function module 20 is configured to create a benchmark and generate a workpiece coordinate space according to actual needs and corresponding machine equipment;

[0068] The terminal function module 30′ is configured to select a terminal to be calculated;

[0069] The connection module 40 is configured to convert the selected terminal into coordinates in the workpiece coordinate space.

[0070] The working principle of the system development platform for directly generating executable programs is as follows: first, the visual acquisition module 10 acquires images, and then the benchmark function module 20 creates a benchmark and generates a workpiece coordinate space based on actual needs and corresponding machine equipment. Subsequently, the terminal function module 30 selects the terminals to be calculated and generates a calibration plate coordinate space. Finally, the connection module 40 converts the terminal coordinates in the calibration plate coordinate space into coordinates in the workpiece coordinate space, realizing coordinate conversion and program generation, and finally generating an executable program.

[0071] In some preferred embodiments, the terminal function module 30 is further configured to perform ROI adjustment and calculation method selection, so that the generated terminal coordinates are more accurate and the conversion is more accurate.

[0072] The number of devices and processing scales described herein are intended to simplify the description of the present invention. Applications, modifications, and variations of the present invention will be readily apparent to those skilled in the art.

[0073] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.

[0074] The apparatus, electronic device, and non-volatile computer storage medium provided in the embodiments of this specification correspond to the method. Therefore, the apparatus, electronic device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device, and non-volatile computer storage medium will not be repeated here.

[0075] The systems, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0076] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0077] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods or systems. Therefore, the embodiments of this specification may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0078] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0081] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0082] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0083] The above description is only an example of the present invention and is not intended to limit one or more embodiments of the present invention. For those skilled in the art, various changes and variations may be made to one or more embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present invention shall be included in the scope of the claims of one or more embodiments of the present invention.

[0084] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

Claims

1. A method for generating an executable program for a machine vision system, characterized in that: The steps include: Constructing several hardware models of the machine vision system and setting relevant parameters to establish a corresponding relationship between each of the hardware models and each hardware device in the machine vision system; The visual acquisition device of the machine vision system performs benchmark setting, and the benchmark is established according to the workpiece process requirements; The visual acquisition device of the machine vision system performs terminal setting, and extracts workpiece features according to the process requirements of the workpiece to be inspected to generate the terminals required for calculation; wherein the terminals are workpiece features captured according to the process requirements of the workpiece; the workpiece features include one or more of the workpiece point features, line features or surface features; The generating of the terminal to be calculated includes first capturing a pixel image of the workpiece; then converting the image into a calibration coordinate space through calibration; and finally capturing and generating the terminal coordinates based on the calibration coordinate space. Convert the generated terminals to the reference and calculate to obtain the position of each terminal under the reference; Packaging the obtained positional accuracy and the hardware model together to generate an executable program of a machine vision system for the workpiece to be measured; The step of creating the reference according to the workpiece process requirements includes the steps of rough positioning, feature capture and construction of a working coordinate system; Generating the terminals that need to be calculated also includes adjusting the ROI of the terminals and setting a calculation method.

2. The method for generating an executable program for a machine vision system according to claim 1, wherein: The method for generating an executable program includes setting terminals of different models of products of the same type by adding connectors according to collected data.

3. The method for generating an executable program for a machine vision system according to claim 1, wherein: The terminal conversion to the reference calculation includes setting the calibration plate coordinate space, and using the reference to convert the calibration plate coordinate space into the workpiece coordinate space, and then converting the terminal coordinate calculation in the calibration plate coordinate space into the terminal coordinate in the workpiece coordinate space.

4. The method for generating an executable program for a machine vision system according to claim 3, wherein: The setting of the calibration plate coordinate space includes converting an image of the workpiece photographed by the photographer into the calibration plate coordinate space.

5. The method for generating an executable program for a machine vision system according to claim 1, wherein: The ROI adjustment includes obtaining coordinates through laser and performing parameter setting to adjust the ROI coordinates and size.

6. The method for generating an executable program for a machine vision system according to claim 1, wherein: The calculation method setting includes the steps of setting a preset calculation method and adjusting calculation parameters, wherein the preset calculation method is a calculation method pre-developed for the machine vision system.

7. A machine vision system executable program generation platform, characterized in that: include: A hardware model configuration module is configured to construct a plurality of hardware models of the machine vision system and set relevant parameters to establish a corresponding relationship between each of the hardware models and each hardware device in the machine vision system; A visual acquisition module is configured to acquire images of a reference and a terminal; wherein the terminal is a workpiece feature captured according to the workpiece process requirements; the workpiece feature includes one or more of a point feature, a line feature, or a surface feature of the workpiece; A benchmark function module is configured to create a benchmark and generate a workpiece coordinate space based on actual needs and corresponding machine equipment; The creation of the benchmark includes the steps of rough positioning, feature capture and construction of a working coordinate system; The terminal function module is configured to select the terminals to be calculated and to adjust the ROI and select the calculation method; The step of selecting the terminal to be calculated includes first capturing a pixel image of the workpiece; then converting the image into a calibration coordinate space through calibration; and finally capturing and generating the terminal coordinates based on the calibration coordinate space. The connection module is configured to convert the selected terminals into coordinates in a workpiece coordinate space to obtain the position of each terminal under the reference; The obtained positional accuracy and the hardware model are packaged together to generate an executable program of a machine vision system for the workpiece to be measured.

Citation Information

Patent Citations

  • Robot workpiece assembly and form and location tolerance detection system and method based on face laser sensor

    CN105333819A

  • Development method and device for machine vision system

    CN108628597A