Modeling method and device for detection software, electronic equipment and readable storage medium

By configuring the workstation parameters and image processing algorithms of the automated optical inspection equipment through the visual interface of the modeling software, the problems of high cost and low usability caused by the customized development of existing inspection software are solved, and a general-purpose inspection software that can be quickly adapted to different products and inspection scenarios is realized.

CN122018879APending Publication Date: 2026-05-12BEIJING LUSTER LIGHTTECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LUSTER LIGHTTECH
Filing Date
2025-12-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing customized development model of testing software leads to long R&D cycles, high labor costs, and a lack of versatility and ease of use, making it difficult to quickly adapt to different products and testing scenarios.

Method used

By operating the visual interface of the modeling software, the station parameters, hardware parameters, processing flow and interaction sequence of the automatic optical inspection equipment are configured to establish the first modeling template. The second modeling template is obtained by configuring the target object parameters, image acquisition method and image processing algorithm. Finally, the two are linked through a standardized interface to form the template of the inspection software.

Benefits of technology

It eliminates the need for customized development, reduces the development cost of testing software, improves the simplicity and versatility of operation, and supports rapid adaptation to different products and testing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018879A_ABST
    Figure CN122018879A_ABST
Patent Text Reader

Abstract

The invention discloses a modeling method and device for detection software, electronic equipment and a readable storage medium, and belongs to the field of industrial detection. The method comprises the following steps: configuring work station parameters and hardware parameters of the automatic optical detection equipment and a processing flow and an interaction time sequence of each work station in modeling software based on visual operation, and obtaining a first modeling template under the condition that each work station and hardware normally operate; configuring an object parameter of a target object detected by the automatic optical detection equipment, a detection group to which each work station belongs, a detection picture parameter of each work station, an image acquisition mode, an image processing algorithm and calibration of an image processing result in a target image of the target object; obtaining a second modeling template under the condition that the image processing result and the calibration result of the target image meet corresponding preset conditions; the first modeling template and the second modeling template are associated to obtain the template of the detection software, the operation is simple, customized development is not needed, and the development cost of the detection software is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of industrial inspection, and in particular relates to a modeling method, apparatus, electronic device and readable storage medium for inspection software. Background Technology

[0002] With the development of the industrial vision industry, AOI (Automated Optical Inspection) visual inspection is being used more and more widely in industrial production. The types of products inspected cover various forms such as displays, mobile phone frames, headphones, and batteries. The size, shape, and inspection station configuration of different products vary significantly, which leads to frequent adjustments to the inspection solutions.

[0003] In existing technologies, most detection software adopts a customized "one solution, one development" model. However, the customized model requires separate coding for different products' workstation layout, hardware configuration (camera, light source, etc.), and image processing logic, resulting in long development cycles and high labor costs. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the related art. To this end, this application proposes a modeling method, apparatus, electronic device, and readable storage medium for detection software, which is simple to operate, requires no customized development, and reduces the cost of developing detection software.

[0005] Firstly, this application provides a modeling method for detection software, the method comprising: Based on the visual operation of the modeling software's visual interface, the station parameters and hardware parameters of the automatic optical inspection equipment, as well as the processing flow and interaction sequence of each station, are configured. Under the normal operation of each station and hardware, the first modeling template is obtained. Based on the visual operation of the modeling software's visual interface, configure the object parameters of the target object detected by the automatic optical inspection equipment, the inspection group to which each station belongs, the inspection screen parameters of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. When both the image processing results and the calibration results of the target image meet the corresponding preset conditions, obtain the template of the second modeling template. By associating the first modeling template and the second modeling template, the detection software for the automated optical inspection equipment is obtained.

[0006] According to the modeling method of the detection software in this application, the station parameters, hardware parameters, processing flow and interaction sequence of the automatic optical inspection equipment can be configured through visual operation on the visualization interface of the modeling software. Under normal operation of each station and hardware, a first modeling template is obtained. A second modeling template is obtained by configuring the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. When the image processing results and the calibration results of the target image both meet the corresponding preset conditions, a second modeling template is obtained. The first and second modeling templates are associated to obtain the template of the detection software of the automatic optical inspection equipment. Users can model the template of the detection software of the automatic optical inspection equipment through simple visualization operation. The operation is simple, no customized development is required, and the cost of developing the template of the detection software is reduced.

[0007] According to one embodiment of this application, configuring the workstation parameters of an automated optical inspection equipment includes: In response to visual operations for adding, modifying, or deleting workstations, the workstation parameters for the newly added, modified, or deleted workstations; the workstation parameters include at least some of the following: workstation identifier, workstation name, service merge status, communication address, and communication port; The hardware configuration parameters include: In response to a visual operation that inputs hardware parameters of any hardware, the hardware parameters are stored in a hardware parameter library when the hardware parameters are submitted; the hardware includes at least some of a camera, a light source, a motion control card, and an input / output card. Configure the processing flow and interaction sequence of each workstation, including: The system responds to users setting the workstation's processing flow and interaction sequence via flowchart drag-and-drop.

[0008] According to one embodiment of this application, the configuration of the object parameters of the target object detected by the automatic optical inspection equipment, the inspection group to which each workstation belongs, and the inspection screen parameters of each workstation includes: In response to an operation that sets the object parameters of the target object, retrieve the input object parameters of the target object; In response to the visualization operation of grouping each workstation, multiple inspection groups are obtained, and the grouping layout of each inspection group is displayed; In response to the visual operation of setting detection screen parameters for each workstation, the detection screen parameters of each workstation are obtained; the detection screen parameters include the number of screens, screen names, and template images of the screens.

[0009] According to one embodiment of this application, the image acquisition method includes cropping and stitching parameters, original image parameters, image cropping parameters, and image stitching parameters; Configure image acquisition methods, including: In response to the visualization operation of setting cropping and stitching parameters for each detection group, the cropping and stitching parameters for each detection group are obtained; the cropping and stitching parameters can be any one of the following: cropping and stitching mode, multi-object image cropping and stitching mode, image packet detection mode, and multi-image packet stitching and detection mode; In response to a visualization operation that sets the original image parameters, the original image parameters set for each camera at each workstation are obtained; the original image parameters include at least a portion of the number of images, image pixel width, and height. In response to a visual operation that sets image cropping parameters, the image cropping parameters set for the cameras at each workstation are obtained; the image cropping parameters include the cropping area; In response to the visualization operation of setting image stitching parameters, obtain the image stitching parameters set for each camera at each workstation.

[0010] According to one embodiment of this application, an image processing algorithm is configured, including: In response to the operation of setting image processing algorithms for each workstation, the image processing algorithms for each workstation and the algorithm parameters of each algorithm are obtained.

[0011] According to one embodiment of this application, configuring the calibration of image processing results in the target image of the target object includes: In response to the operation of setting the target image of the target image, the target image is acquired, and a mapping relationship is created between the images acquired by each workstation and each region in the target image. In the case that the image processing results acquired by the workstation indicate that there are defects, the defects are displayed in the target image based on the mapping relationship.

[0012] According to one embodiment of this application, a template for the detection software of an automated optical inspection device is obtained by associating a first modeling template and a second modeling template, including: By linking the first and second modeling templates through a standardized interface, the detection software for the automated optical inspection equipment is obtained.

[0013] Secondly, this application provides an embodiment of the apparatus according to this application, the apparatus comprising: The first processing module is used to configure the station parameters, hardware parameters, processing flow and interaction sequence of the automatic optical inspection equipment based on the visual operation of the modeling software, and obtain the first modeling template under the normal operation of each station and hardware. The second processing module is used to configure the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object based on the visual operation of the modeling software. When the image processing results and the calibration results of the target image both meet the corresponding preset conditions, the second modeling template is obtained. The third processing module is used to associate the first modeling template and the second modeling template to obtain the template for the detection software of the automatic optical inspection equipment.

[0014] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the modeling method of the detection software provided in the first aspect above.

[0015] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the modeling method of the detection software provided in the first aspect above.

[0016] Fifthly, this application provides a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the modeling method of the detection software provided in the first aspect.

[0017] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the modeling method of the detection software provided in the first aspect above.

[0018] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: By configuring the station parameters, hardware parameters, processing flow, and interaction sequence of the automated optical inspection equipment through a visual interface on the modeling software, users can obtain a first modeling template under normal operating conditions of each station and hardware. A second modeling template is then obtained by configuring the object parameters of the target object being inspected by the automated optical inspection equipment, the inspection group to which each station belongs, the inspection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. If both the image processing results and the calibration results of the target image meet the corresponding preset conditions, a second modeling template is obtained. The first and second modeling templates are then linked to obtain the template for the inspection software of the automated optical inspection equipment. Users can model the inspection software of the automated optical inspection equipment through simple visual operations, which is easy to operate, requires no customized development, and reduces the cost of developing inspection software templates.

[0019] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0020] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is one of the flowcharts illustrating the modeling method of the detection software provided in the embodiments of this application; Figure 2 This is a schematic diagram of the process for creating a first modeling template provided in an embodiment of this application; Figure 3 This is a schematic diagram of the visual interface for configuring workstation parameters provided in the embodiments of this application; Figure 4 This is a schematic diagram of the hardware parameters of the camera provided in the embodiments of this application; Figure 5 This is a schematic diagram of the interface for setting up the workstation processing flow provided in an embodiment of this application; Figure 6 This is a schematic diagram of the workstations included in each detection group provided in the embodiments of this application; Figure 7 This is a schematic diagram of the detection screen parameters set for each workstation according to an embodiment of this application; Figure 8 These are the trimming and splicing parameters set for each detection group according to the embodiments of this application; Figure 9 This is a schematic diagram of the process for creating a second modeling template provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of the modeling device for the detection software provided in the embodiments of this application; Figure 11 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0022] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0023] The modeling method, apparatus, electronic device, and readable storage medium of the detection software provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0024] With the development of the industrial vision industry, AOI visual inspection is being used more and more widely in industrial production. The types of products inspected cover various forms such as displays, mobile phone frames, headphones, and batteries. The size, shape, and inspection station configuration of different products vary significantly, which leads to frequent adjustments to the inspection solutions.

[0025] In existing technologies, most testing software adopts a customized "one solution, one development" model: on the one hand, the workstation layout, hardware configuration (camera, light source, etc.), and image processing logic of different products need to be written separately, resulting in long development cycles and high labor costs; on the other hand, the software interface settings are scattered (such as cumbersome right-click menu operation), the parameters are weakly correlated, and there is a lack of compatibility with the configuration of historical projects. Users need to repeatedly learn the operation process, resulting in poor usability and low overall equipment utilization efficiency.

[0026] Therefore, there is an urgent need for a universal testing software modeling method to enable rapid adaptation to different products and testing scenarios, reduce R&D and usage costs, and improve the software's versatility and ease of use.

[0027] like Figure 1 As shown, the modeling method of the detection software includes steps 110, 120 and 130.

[0028] Step 110: Based on the visualization operation in the modeling software's visualization interface, configure the workstation parameters, hardware parameters, processing flow and interaction sequence of each workstation of the automatic optical inspection equipment. Under the condition that each workstation and hardware are running normally, obtain the first modeling template.

[0029] The modeling software in this application is used to customize the testing software for various products. During the customization process, users only need to perform visual operations for testing, without the need to write separate code.

[0030] The modeling software can provide a variety of visual interfaces for users to model and test the software.

[0031] Automated optical inspection equipment is a machine that uses image processing and computer vision technology to automate the inspection of products. It is primarily used to identify and analyze surface defects in products, ensuring that product quality meets standards.

[0032] The target objects are products that need to be tested, including but not limited to displays, mobile phone frames, earphones, batteries, monitors, etc.

[0033] The first modeling template in this application belongs to process modeling, focusing on the general configuration of hardware and workstation logic, establishing the testing workstation topology, hardware parameter library and interaction sequence, forming a basic framework that is independent of specific testing products.

[0034] Process modeling provides a generalized hardware and workstation foundation for the testing software. All configurations are completed through a parameterized interface without the need to modify the code.

[0035] An automated optical inspection station refers to a dedicated area or unit on a production line for performing automated optical inspection. These stations integrate various equipment and technologies to achieve efficient and accurate inspection of products or components. Stations are typically equipped with cameras, lighting equipment, computer processing units, and other related inspection equipment, enabling them to automatically perform tasks such as image acquisition, processing, and analysis.

[0036] See Figure 2 This application provides a flowchart illustrating the process of creating a first modeling template, including: start; Step 201, create a new first modeling template; Step 202: Configure the workstation parameters in the first modeling template. The workstation parameters include at least some of the following: workstation identifier, workstation name, workstation merging status, communication address, and communication port.

[0037] Step 203: Configure hardware parameters in the first modeling template. The hardware includes at least some of the following: camera, light source, motion control card, and input / output card. Step 204: Run each workstation and hardware online; Step 205: Determine whether each workstation and hardware is operating normally. If yes, proceed to step 206; otherwise, proceed to step 207. Step 206: Save and output the first modeling template; End. Step 207: Reopen the first modeling template; proceed to step 202.

[0038] The detailed execution process of the above steps is described in subsequent embodiments.

[0039] The process of configuring the workstation parameters of the automated optical inspection equipment supports visual addition, deletion, and modification of workstation parameters.

[0040] Configuring the hardware parameters of each workstation mainly involves establishing a hardware parameter library, which includes the hardware parameters of each piece of hardware.

[0041] The processing flow and interaction sequence of each workstation are configured mainly by dragging and dropping flowcharts. The processing flow of a workstation includes, but is not limited to, initialization flow, detection start flow, material unloading flow, and simulation acquisition flow.

[0042] After configuring each part, test whether each workstation and hardware are running normally. If each workstation and hardware is running normally, the first modeling template can be obtained.

[0043] Step 120: On the visualization interface of the modeling software, configure the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen parameters of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. If the image processing results and the calibration results of the target image both meet the corresponding preset conditions, obtain the second modeling template.

[0044] The second modeling template in this application belongs to detection modeling, focusing on the adaptation logic of detection algorithms and image processing. Based on the hardware information of the process template, it configures product-specific image preprocessing, algorithm parameters and calibration rules, and supports quick switching and reuse.

[0045] The first modeling template can be adapted to multiple second modeling templates (different target objects), and the same first modeling template can also be adapted to different first modeling templates (different device layouts), achieving cross-scene universality.

[0046] The detection modeling is based on a hardware foundation of process templates, and through modular and reusable functional design, it can be quickly adapted to different products.

[0047] The object parameters of the target object mainly involve the product dimensions of the target object.

[0048] The inspection group to which each workstation belongs refers to the user-defined inspection group (such as "reverse group - side angle group - side straight group"), which allows workstations to be assigned to different inspection groups by dragging and dropping.

[0049] The detection screens for each workstation refer to the images that each workstation needs to capture. Configuring the detection screens includes configuring the number of screens, the screen name, and the template image for the screen.

[0050] Image acquisition methods refer to the image preprocessing process, which involves image cropping, stitching, etc.

[0051] Image processing algorithms refer to setting the algorithms that need to be mounted on all screens of each workstation, and setting the corresponding algorithm parameters for each algorithm.

[0052] Image processing results indicate whether the target object in the image contains defects.

[0053] The calibration of the image processing results in the target image of the target object is to create a mapping relationship between the images collected by each workstation and each region in the target image. If there are defects in the characterization of the image processing results collected by the workstation, the defects are displayed in the target image based on the mapping relationship.

[0054] During the testing process, a second modeling template is obtained when both the image processing results and the target image calibration results (the location or region of the defect in the target image) meet the corresponding preset conditions. Preset conditions for the image processing results include, for example, detecting a defect, and preset conditions for the target image calibration results include, for example, that the defect mapping is correct.

[0055] Step 130: Associate the first modeling template and the second modeling template to obtain the template for the detection software of the automatic optical inspection equipment.

[0056] After obtaining the first modeling template and the second modeling template, they can be associated through a standardized interface to obtain the detection software for the automatic optical inspection equipment. The first modeling template and the second modeling template are independent of each other and can be updated independently.

[0057] This application embodiment allows for the configuration of station parameters, hardware parameters, processing flow, and interaction sequence of an automated optical inspection device via a visual interface on the modeling software. Under normal operating conditions of each station and hardware, a first modeling template is obtained. A second modeling template is then obtained by configuring the object parameters of the target object being inspected by the automated optical inspection device, the inspection group to which each station belongs, the inspection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. If both the image processing results and the calibration results of the target image meet the corresponding preset conditions, a second modeling template is obtained. The first and second modeling templates are then associated to obtain the template for the inspection software of the automated optical inspection device. Users can model the template for the inspection software of the automated optical inspection device simply through visual operations, simplifying the operation, eliminating the need for customized development, and reducing the cost of developing inspection software.

[0058] In some embodiments, configuring the workstation parameters of the automated optical inspection equipment includes: In response to visual operations used to add, modify, or delete workstations, the workstation parameters for the newly added, modified, or deleted workstations; the workstation parameters include at least some of the following: workstation identifier, workstation name, service merge status, communication address, and communication port.

[0059] The workstation identifier can be a workstation serial number, used to uniquely identify the workstation.

[0060] The name of a workstation is usually related to its function or the location of the image being acquired. For example, workstation names may include "front", "back", "side angle", "side straight", etc.

[0061] Service consolidation status typically refers to the integration or merging of multiple workstations (workstations) in production, manufacturing, or workflow. The option is "Yes" or "No".

[0062] The communication address is mainly the workstation IP address.

[0063] The communication ports include the workstation command port and the workstation data port. The workstation command port is used to receive control commands for the workstation, and the workstation data port is used to receive data packets from the workstation.

[0064] The software supports visually adding and deleting inspection workstations, renaming them, and configuring TCP communication parameters (IP address, port number) between workstations for configuring automatic optical inspection equipment. The software automatically generates a workstation list, which users can drag and drop to adjust the workstation order and adapt to different equipment layouts.

[0065] Configuration rules: Workstation information is decoupled from product type, and only the mapping relationship of "workstation name - communication parameters" is recorded. Subsequent detection templates can be associated with specific detection logic through the workstation name.

[0066] See Figure 3 This application provides a schematic diagram of a visual interface for configuring workstation parameters, including controls for workstation services, adding workstations, deleting workstations, modifying workstations, and merging services. It also displays the configured workstation parameters, including serial number, workstation name, service merging status, workstation network association, workstation IP address, workstation command port, and workstation data port.

[0067] The diagram shows the parameters of five workstations, arranged in the following order: serial number, workstation name, service merge status, workstation network association, workstation IP address, workstation command port, and workstation data port. The parameters for the first workstation are "1, reverse, no, 0, 127.0.0.1, 5000, 4999"; The parameters for the second workstation are "2, side angle 1, no, 0, 127.0.0.1, 5003, 5004"; The parameters for the third workstation are "3, side angle 2, no, 0, 127.0.0.1, 5001, 5002"; The parameters for the fourth workstation are "4, Side Straight 1, No, 0, 127.0.0.1, 5005, 5006"; The parameters for the fifth workstation are "5, Side Straight 2, No, 0, 127.0.0.1, 5007, 5008"; The hardware configuration parameters include: In response to a visual operation that inputs hardware parameters for any hardware, the hardware parameters are stored in a hardware parameter library upon submission; the hardware includes at least some of a camera, a light source, a motion control card, and an input / output card.

[0068] This application establishes a hardware parameter library to support hardware parameter configuration for hardware such as cameras, light sources, motion control cards, and I / O cards. The camera's hardware parameters include: brand, serial number, resolution, number of nodes, and configuration files.

[0069] The hardware parameters of the light source / control card include basic parameters such as configuration brand, communication port, and model.

[0070] When replacing hardware, you only need to update the corresponding hardware information in the parameter library, and the process template will be automatically synchronized without the need to refactor the overall logic.

[0071] See Figure 4 The diagram shows the hardware parameters of the camera. This camera belongs to the hardware of the "reverse" workstation. The camera ID is "Scenece-0_Cam_0", the camera name is Cam, the camera serial number is "00L16947390", the camera type is LBAS, the driver type is also LBAS, the initialization model is "automatic", the configuration path is "C:\1.ccf", the resolution is 10, the number of camera nodes is 9, and the image mode is MONO8.

[0072] Configure the processing flow and interaction sequence of each workstation, including: The system responds to users setting the workstation's processing flow and interaction sequence via flowchart drag-and-drop.

[0073] The hardware interaction timing of the workstation (triggering photo capture, light source control, motor movement, etc.) can be set by dragging and dropping flowcharts. It supports the reuse of predefined interaction modules (such as "camera trigger - light source switching - image transmission"), and users do not need to write timing code. They can complete the configuration directly by combining modules through the interface.

[0074] See Figure 5The interface diagram shows the "opposite" setting of the workstation processing flow, including the initialization flow, detection start flow, material unloading flow, and simulation acquisition flow. The simulation acquisition flow can be set up with each execution step through a flowchart, including: start - multiple camera triggers, etc. Processing flows can be added using the "+" control and deleted using the "×" control.

[0075] In some embodiments, configuring the object parameters of the target object detected by the automated optical inspection equipment, the inspection group to which each workstation belongs, and the inspection screen of each workstation includes: In response to an operation that sets the object parameters of the target object, retrieve the object parameters of the target object that were input.

[0076] The embodiments of this application focus on the flexible association between products and workstations in the configuration of target objects, and support the reuse of configuration logic across products.

[0077] The main object parameters of the target object include product dimensions. In actual modeling, the physical dimensions of length, width and thickness need to be entered, with the unit uniformly in mm, which will be automatically associated with subsequent image calibration.

[0078] In response to the visualization operation of grouping each workstation, multiple inspection groups are obtained, and the grouping layout of each inspection group is displayed.

[0079] See Figure 6 This application provides a schematic diagram of the workstations included in each detection group, and each workstation includes: The "Reverse" workstation, "Side Angle 1" workstation, "Side Angle 2" workstation, "Straight Side 1" workstation, and "Straight Side 2" workstation are equipped with draggable controls, allowing workstations to be dragged and grouped. The corresponding groups include the "Reverse" group, the "Side Angle" group, and the "Straight Side" group. The "Reverse" group includes the "Reverse" workstation, the "Side Angle" group includes the "Side Angle 1" workstation and the "Side Angle 2" workstation, and the "Straight Side" group includes the "Straight Side 1" workstation and the "Straight Side 2" workstation. ④ in the figure indicates that each detection group supports the detection of 4 target objects at a time. Of course, new detection groups can also be added through the "Request Add Detection Group" control.

[0080] This application embodiment supports user-defined inspection groups (such as "reverse side group - side corner group - side straight group"), where workstations can be assigned to different groups by dragging and dropping, and the number of inspection objects in each group can be set (1-20). The software generates a schematic diagram of the inspection workstations in real time, intuitively showing the group layout and reducing the user's operating threshold.

[0081] In response to the visual operation of setting detection screen parameters for each workstation, the detection screen parameters of each workstation are obtained.

[0082] The parameters to be detected include the number of images, the image name, and the template image for the image. They may also include the image scaling factor, subtitles, etc.

[0083] See Figure 7 It displays a schematic diagram showing the detection screen parameters set for each workstation. Figure 7 The document displays the serial number, name, image name, scaling factor, template image, and subtitles for each workstation. For example, workstation number 1 is the "reverse" workstation, and the image names for the inspection screens it contains include "coaxial light," "ring light," and "backlight," all with a scaling factor of 0.1. The template image has an "add" control, which can be used to import template images. It also includes a subtitle "edit" control (not shown in the image), which supports inputting text subtitles.

[0084] In some embodiments, the image acquisition method includes cropping and stitching parameters, original image parameters, image cropping parameters, and image stitching parameters; Configure image acquisition methods, including: In response to the visualization operation of setting cropping and stitching parameters for each detection group, the cropping and stitching parameters for each detection group are obtained; the cropping and stitching parameters can be any one of the following: cropping and stitching mode, multi-object image cropping and stitching mode, image packet detection mode, and multi-image packet stitching and detection mode; Image acquisition mainly includes setting cropping and stitching parameters, camera original image parameters, image cropping parameters, and image stitching parameters.

[0085] The cropping and splicing parameters for each detection group need to be set. The cropping and splicing parameters can be any one of the following: cropping and splicing mode (cropping and splicing of a single image), multi-object image cropping and splicing mode (cropping and splicing of multiple images), image packet detection mode (detection of a single image packet), and multi-image packet splicing detection mode (sponging and detecting of multiple image packets). See Figure 8 This application embodiment shows the cropping and splicing parameters set for each detection group. The cropping and splicing parameters set for the "reverse" group and the "side straight" group are cropping and splicing modes, while the cropping and splicing parameters set for the "side corner" group are image packet detection modes.

[0086] In response to a visualization operation that sets the original image parameters, the original image parameters set for each camera at each workstation are obtained; the original image parameters include at least a portion of the number of images, image pixel width, and height.

[0087] The camera original image parameters mainly set the number of images captured by all cameras at each workstation, as well as the image pixel width and height.

[0088] In response to a visualization operation that sets image cropping parameters, the image cropping parameters set for the cameras at each workstation are obtained; the image cropping parameters include the cropping area.

[0089] Image cropping primarily involves setting cropping regions for all camera images from various workstations. Cropping is divided into original image cropping and extracted image cropping. Original image cropping involves drawing the cropping region on the original camera image and then cropping the image within that region. Extracted image cropping involves splitting the original camera image into multiple images by interlacing pixels row by row based on the number of extracted images, drawing cropping regions on each of the split images, and then cropping the image within those regions. Parameter copying and pasting is supported between camera, image, and cropping region objects of the same type.

[0090] Image cropping parameters include region name, width, height, image extraction sequence number, associated image, and associated product.

[0091] In response to the visualization operation of setting image stitching parameters, obtain the image stitching parameters set for each camera at each workstation.

[0092] Image stitching primarily involves stitching together the original or cropped images from all cameras at various workstations and then assigning the stitched image to the inspection workstation's screen. Stitching rules can be imported and exported via CSV files, and it supports copying stitching parameters across multiple products within a single screen, allowing for the reuse of stitching logic across products. Image stitching parameters include geometric transformation parameters, fusion weights, stitching order, and output resolution.

[0093] In some embodiments, configuring an image processing algorithm includes: In response to the operation of setting image processing algorithms for each workstation, the image processing algorithms for each workstation and the algorithm parameters of each algorithm are obtained.

[0094] The algorithm parameters mainly involve setting the algorithms that need to be mounted on all screens of each workstation, and setting the corresponding algorithm parameters for each algorithm.

[0095] Referring to Table 1 below, this application embodiment shows the various algorithm parameters set for a certain workstation. Each algorithm parameter includes parameter name, parameter value, etc.

[0096]

[0097] Table 1 In some embodiments, configuring the calibration of the image processing result in the target image of the target object includes: In response to the operation of setting the target image of the target image, the target image is acquired, and a mapping relationship is created between the images acquired by each workstation and each region in the target image. In the case that the image processing results acquired by the workstation indicate that there are defects, the defects are displayed in the target image based on the mapping relationship.

[0098] The target image is a shape image of the product.

[0099] Image calibration establishes a mapping relationship between all screens at each workstation and the target image, so that defects detected in different screen images can be uniformly displayed in the target image.

[0100] In some embodiments, associating a first modeling template and a second modeling template yields a template for the detection software of an automated optical inspection device, including: By linking the first and second modeling templates through a standardized interface, a template for the detection software of the automated optical inspection equipment is obtained.

[0101] This standardized interface can be a pre-developed standard interface used for template association.

[0102] See Figure 9 This application provides a flowchart illustrating the process of creating a second modeling template, including: start; Step 901: Create a new second modeling template; Step 902: On the second modeling template, set the number of target objects for each detection; Step 903: On the second modeling template, set the detection group to which each workstation belongs; Step 904: On the second modeling template, set the detection screen parameters of the workstation; Step 905: Configure the image acquisition method on the second modeling template; Step 906: Add the original camera image and original image parameters to the second modeling template; Step 907: Set image cropping parameters on the second modeling template; Step 908: Set the image stitching parameters on the second modeling template; Step 909: Save the second modeling template; Step 910: On the second modeling template, run the image acquisition online; Step 911: On the second modeling template, determine whether the acquired image is correct based on the image cropping parameters and image stitching parameters; if not, proceed to step 912; if yes, proceed to step 913. Step 912: Open the most recently saved second modeling template; proceed to step 907. Step 913: On the second modeling template, parse the hardware parameter library; Step 914: Set the template image of the screen on the second modeling template; Step 915: On the second modeling template, set the image processing algorithm and algorithm parameters for each workstation; Step 916: Save the second modeling template; Step 917: View the image processing results online or offline on the second modeling template; Step 918: Determine whether the image processing result contains defects; if not, proceed to step 919; if yes, proceed to step 920. Step 919: Open the most recently saved second modeling template; proceed to step 915. Step 920: Set the target image on the second modeling template; Step 921: On the second modeling template, establish a mapping relationship between the image and the target image to perform image calibration; Step 922, save the second modeling template; Step 923: View the calibration results of defects on the target image online or offline; Step 924: Determine if the calibration result is correct; if yes, proceed to step 925; if no, proceed to step 921. Step 925: Save and output the second modeling template; End.

[0103] The detailed execution process of each of the above steps can be found in the aforementioned embodiments, and will not be repeated here.

[0104] This application's embodiments achieve decoupling of hardware logic and detection logic through the separation of "process modeling" and "detection modeling," allowing the same architecture to adapt to various product and equipment layouts. A parameterized and configurable process modeling method enables workstations, hardware, and interaction sequences to be configured via visual parameters, eliminating the need for custom development and supporting rapid adaptation to hardware replacement and workstation layout adjustments. A modular and reusable detection modeling method allows for flexible configuration and reuse of workstation grouping, image preprocessing modes, and cropping / splitting parameters. Based on screen mounting algorithms and parameter tuning, calibration establishes a mapping relationship between the screen and the target, reducing cross-product modeling costs.

[0105] The detection software modeling method provided in this application can be executed by a detection software modeling device. This application uses the example of a detection software modeling device executing the detection software modeling method to illustrate the detection software modeling device provided in this application.

[0106] This application also provides a modeling apparatus for detection software.

[0107] like Figure 10 As shown, the modeling device of the detection software includes: a first processing module 1010, a second processing module 1020 and a third processing module 1030.

[0108] The first processing module 1010 is used to configure the station parameters, hardware parameters, processing flow and interaction sequence of the automatic optical inspection equipment based on the visual operation of the modeling software, and obtain the first modeling template under the normal operation of each station and hardware. The second processing module 1020 is used to configure the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object based on the visualization operation of the modeling software. When the image processing results and the calibration results of the target image both meet the corresponding preset conditions, the second modeling template is obtained. The third processing module 1030 is used to associate the first modeling template and the second modeling template to obtain the template of the detection software of the automatic optical inspection equipment.

[0109] According to the modeling device of the detection software provided in the embodiments of this application, the station parameters, hardware parameters, processing flow and interaction sequence of the automatic optical inspection equipment can be configured through visual operation on the visual interface of the modeling software. Under normal operation of each station and hardware, a first modeling template is obtained. A second modeling template is obtained by configuring the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen of each station, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. When the image processing results and the calibration results of the target image both meet the corresponding preset conditions, a second modeling template is obtained. The first modeling template and the second modeling template are associated to obtain the template of the detection software of the automatic optical inspection equipment. Users can model the template of the detection software of the automatic optical inspection equipment through simple visual operation. The operation is simple, no customized development is required, and the cost of developing detection software is reduced.

[0110] In some embodiments, the first processing module 1010 is configured to: In response to visual operations for adding, modifying, or deleting workstations, the workstation parameters for the newly added, modified, or deleted workstations; the workstation parameters include at least some of the following: workstation identifier, workstation name, service merge status, communication address, and communication port; The hardware configuration parameters include: In response to a visual operation that inputs hardware parameters of any hardware, the hardware parameters are stored in a hardware parameter library when the hardware parameters are submitted; the hardware includes at least some of a camera, a light source, a motion control card, and an input / output card. Configure the processing flow and interaction sequence of each workstation, including: The system responds to users setting the workstation's processing flow and interaction sequence via flowchart drag-and-drop.

[0111] In some embodiments, the second processing module 1020 is used for: In response to an operation that sets the object parameters of the target object, retrieve the input object parameters of the target object; In response to the visualization operation of grouping each workstation, multiple inspection groups are obtained, and the grouping layout of each inspection group is displayed; In response to the visual operation of setting detection screen parameters for each workstation, the detection screen parameters of each workstation are obtained; the detection screen parameters include the number of screens, screen names, and template images of the screens.

[0112] In some embodiments, the image acquisition method includes cropping and stitching parameters, original image parameters, image cropping parameters, and image stitching parameters; the second processing module 1020 is used for: In response to the visualization operation of setting cropping and stitching parameters for each detection group, the cropping and stitching parameters for each detection group are obtained; the cropping and stitching parameters can be any one of the following: cropping and stitching mode, multi-object image cropping and stitching mode, image packet detection mode, and multi-image packet stitching and detection mode; In response to a visualization operation that sets the original image parameters, the original image parameters set for each camera at each workstation are obtained; the original image parameters include at least a portion of the number of images, image pixel width, and height. In response to a visual operation that sets image cropping parameters, the image cropping parameters set for the cameras at each workstation are obtained; the image cropping parameters include the cropping area; In response to the visualization operation of setting image stitching parameters, obtain the image stitching parameters set for each camera at each workstation.

[0113] In some embodiments, the second processing module 1020 is used for: In response to the operation of setting image processing algorithms for each workstation, the image processing algorithms for each workstation and the algorithm parameters of each algorithm are obtained.

[0114] In some embodiments, configuring the calibration of the image processing result in the target image of the target object includes: In response to the operation of setting the target image of the target image, the target image is acquired, and a mapping relationship is created between the images acquired by each workstation and each region in the target image. In the case that the image processing results acquired by the workstation indicate that there are defects, the defects are displayed in the target image based on the mapping relationship.

[0115] In some embodiments, the third processing module 1030 is used for: By linking the first and second modeling templates through a standardized interface, a template for the detection software of the automated optical inspection equipment is obtained.

[0116] The modeling device of the detection software in this application embodiment can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM or self-service machine, etc. The embodiments of this application do not specifically limit it.

[0117] The modeling device of the detection software in this application embodiment can be a device with an operating system. The operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems; this application embodiment does not specifically limit it.

[0118] The modeling apparatus for the detection software provided in this application embodiment can achieve Figures 1 to 9 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0119] In some embodiments, such as Figure 11 As shown, this application embodiment also provides an electronic device 1100, including a processor 1101, a memory 1102, and a computer program stored on the memory 1102 and executable on the processor 1101. When the program is executed by the processor 1101, it implements the various processes of the modeling method embodiment of the detection software described above and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0120] Processor 1101 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1101 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0121] The memory 1102 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0122] The memory 1102 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 1101. The processor 1101 is used to execute the computer programs stored in the memory 1102 to implement the steps shown in the foregoing method embodiments.

[0123] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0124] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the modeling method embodiment of the detection software described above and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0125] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0126] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the modeling method of the detection software described above.

[0127] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0128] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described modeling method embodiment of the detection software, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0129] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0132] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0133] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0134] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A modeling method for detection software, characterized in that, include: Based on the visual operation of the modeling software's visual interface, the station parameters and hardware parameters of the automatic optical inspection equipment, as well as the processing flow and interaction sequence of each station, are configured. Under the condition that each station and the hardware are running normally, the first modeling template is obtained. Based on visual operation, the modeling software configures the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each workstation belongs, the detection screen parameters of each workstation, the image acquisition method, the image processing algorithm, and the calibration of the image processing results on the target image of the target object. When both the image processing results and the calibration results of the target image meet the corresponding preset conditions, a second modeling template is obtained. The first modeling template and the second modeling template are associated to obtain the template for the detection software of the automatic optical inspection equipment.

2. The modeling method for the detection software according to claim 1, characterized in that, The workstation parameters configured with the automated optical inspection equipment include: In response to visual operations for adding, modifying, or deleting workstations, the workstation parameters for the newly added, modified, or deleted workstations; the workstation parameters include at least a portion of workstation identifier, workstation name, service merging status, communication address, and communication port; The hardware configuration parameters include: In response to a visualization operation that inputs hardware parameters of any hardware, the hardware parameters are stored in a hardware parameter library upon submission; the hardware includes at least a portion of a camera, a light source, a motion control card, and an input / output card. Configure the processing flow and interaction sequence of each workstation, including: The system responds to users setting the workstation's processing flow and interaction sequence via flowchart drag-and-drop.

3. The modeling method for the detection software according to claim 1, characterized in that, The configuration of the target object parameters, the detection group to which each workstation belongs, and the detection screen parameters of each workstation for the automatic optical inspection equipment includes: In response to an operation that sets the object parameters of the target object, retrieve the input object parameters of the target object; In response to the visualization operation of grouping each workstation, multiple inspection groups are obtained, and the grouping layout of each inspection group is displayed; In response to the visual operation of setting detection screen parameters for each workstation, the detection screen parameters of each workstation are obtained; the detection screen parameters include the number of screens, screen names, and template images of the screens.

4. The modeling method for the detection software according to claim 3, characterized in that, The image acquisition method includes cropping and stitching parameters, original image parameters, image cropping parameters, and image stitching parameters; Configure image acquisition methods, including: In response to the visualization operation of setting cropping and stitching parameters for each detection group, the cropping and stitching parameters for each detection group are obtained; the cropping and stitching parameters are any one of the following: cropping and stitching mode, multi-object image cropping and stitching mode, image packet detection mode, and multi-image packet stitching detection mode; In response to a visualization operation that sets original image parameters, the original image parameters set for each camera at each workstation are obtained; the original image parameters include at least a portion of the number of images, image pixel width, and height. In response to a visualization operation that sets image cropping parameters, the image cropping parameters set for the cameras at each workstation are obtained; the image cropping parameters include the cropping area; In response to the visualization operation of setting image stitching parameters, obtain the image stitching parameters set for each camera at each workstation.

5. The modeling method for the detection software according to claim 1, characterized in that, Configure image processing algorithms, including: In response to the operation of setting image processing algorithms for each workstation, the image processing algorithms for each workstation and the algorithm parameters of each algorithm are obtained.

6. The modeling method for the detection software according to claim 1, characterized in that, The image processing results are configured for the calibration of the target image of the target object, including: In response to the operation of setting a target image for the target image, the target image is acquired, and a mapping relationship is created between the images collected by each workstation and each region in the target image, so that if the image processing results of the images collected by the workstation indicate the presence of defects, the defects are displayed in the target image based on the mapping relationship.

7. The modeling method for the detection software according to any one of claims 1-6, characterized in that, The step of associating the first modeling template and the second modeling template to obtain the template for the detection software of the automated optical inspection equipment includes: By associating the first modeling template and the second modeling template through a standardized interface, a template for the detection software of the automated optical inspection equipment is obtained.

8. A modeling apparatus for detection software, characterized in that, include: The first processing module is used to configure the station parameters, hardware parameters, processing flow and interaction sequence of each station of the automatic optical inspection equipment based on the visual operation of the modeling software's visual interface, and to obtain the first modeling template under the normal operation of each station and the hardware. The second processing module is used to configure the object parameters of the target object detected by the automatic optical inspection equipment, the detection group to which each station belongs, the detection screen parameters of each station, the image acquisition method, the image processing algorithm, and the calibration of the target image of the target object based on the visual operation of the modeling software. When the image processing result and the calibration result of the target image both meet the corresponding preset conditions, a second modeling template is obtained. The third processing module is used to associate the first modeling template and the second modeling template to obtain the template of the detection software of the automatic optical inspection equipment.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the modeling method of the detection software as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the modeling method of the detection software as described in any one of claims 1-7.