A visual inspection method, apparatus, device, and readable storage medium
By automatically generating the detection program for AOI inspection equipment, the problem of detection accuracy caused by manually drawing the detection box is solved, and more efficient visual inspection is achieved.
Patent Information
- Application Number
- CN202411103284.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing AOI inspection equipment requires testers to manually draw the inspection outline, resulting in poor accuracy of the inspection results.
By acquiring the processing drawings and visual inspection parameters of the product to be tested, an inspection program is automatically generated, including an inspection frame, and visual inspection is performed using the pixel size conversion parameters of the camera's field of view.
This improves the efficiency and accuracy of generating detection programs, thereby increasing the efficiency of visual inspection of the products under test.
Smart Images

Figure CN119044169B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and more specifically, to a visual inspection method, a visual inspection device, a visual inspection equipment, and a computer-readable storage medium. Background Technology
[0002] AOI (Automated Optical Inspection) is a device that uses optical principles to detect common defects encountered in soldering production. AOI is a relatively new testing technology, but its development is rapid, and many manufacturers have launched AOI testing equipment. During automatic inspection, the machine automatically scans the PCB using a camera, acquires images, compares the tested solder joints with acceptable parameters in a database, processes the images, identifies defects on the PCB, and displays / marks these defects on a monitor or with automatic indicators for repair personnel to fix.
[0003] However, in existing technologies, testers typically need to manually draw the inspection outline of the product under test using AOI testing equipment to generate the inspection program for the product under test, resulting in poor accuracy of AOI inspection results. Summary of the Invention
[0004] One objective of this invention is to provide a visual inspection method, apparatus, device, and readable storage medium.
[0005] According to a first aspect of this disclosure, a visual detection method is provided, comprising:
[0006] Obtain the first processing drawing and first visual inspection parameters of the product to be tested;
[0007] Obtain the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view;
[0008] A first detection program for the product under test is generated based on the first processing drawing, the first visual detection parameters, and the conversion parameters, wherein the first detection program includes at least one first detection frame of the product under test within the camera's field of view.
[0009] The product to be tested is visually inspected according to the first detection program.
[0010] Optionally, obtaining the first processing drawing and first visual inspection parameters of the product to be tested includes:
[0011] Obtain the product information of the product to be tested;
[0012] Based on the product information, the first processing drawing and the first visual inspection parameters of the product to be tested are obtained from the server.
[0013] Optionally, the method further includes:
[0014] The first visual inspection parameter is compared with the second visual inspection parameter of the product under test;
[0015] When the first visual inspection parameter is different from the second visual inspection parameter, the step of generating the first inspection program for the product to be tested based on the first processing drawing, the first visual inspection parameter and the conversion parameter is executed.
[0016] Optionally, the method further includes:
[0017] When the first visual inspection parameter and the second visual inspection parameter are the same, the product to be tested is visually inspected according to the second inspection program, wherein the second inspection program is an inspection program obtained according to the first processing drawing, the second visual inspection parameter and the conversion parameter.
[0018] Optionally, the method further includes:
[0019] An alarm is issued when the first visual detection parameter differs from the second visual detection parameter;
[0020] In response to the confirmation operation of the modification of the visual inspection parameters, the step of generating the first inspection program of the product to be tested based on the first processing drawing, the first visual inspection parameters and the conversion parameters is executed.
[0021] Optionally, generating the first inspection program for the product to be tested based on the first processing drawing, the first visual inspection parameters, and the conversion parameters includes:
[0022] Based on the first processing drawing, a second detection frame is generated, representing the actual dimensions of the product to be tested.
[0023] The second detection box is processed according to the conversion parameters to obtain the first detection box;
[0024] The first detection program is obtained based on the first detection box and the first visual detection parameters.
[0025] Optionally, the processing drawing is a 3D drawing, and the step of generating a second inspection frame representing the actual dimensions of the product to be tested based on the first processing drawing includes:
[0026] Generate 2D drawings of the product to be tested based on the 3D drawings;
[0027] The 2D drawing is analyzed to obtain the second detection frame.
[0028] According to a second aspect of this disclosure, a visual inspection device is provided, comprising:
[0029] The detection parameter acquisition module is used to acquire the first processing drawing and the first visual inspection parameters of the product to be tested.
[0030] The conversion parameter acquisition module is used to acquire the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view;
[0031] The detection program generation module is used to generate a first detection program for the product under test based on the first processing drawing, the first visual detection parameters and the conversion parameters, wherein the first detection program includes at least one first detection frame of the product under test within the camera's field of view.
[0032] A visual inspection module is used to perform visual inspection on the product under test according to the first inspection program.
[0033] According to a third aspect of this disclosure, a visual inspection device is provided, including a processor and a memory, the memory being used to store a computer program for controlling the processor to perform the method according to a first aspect of this disclosure.
[0034] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect of this disclosure.
[0035] Through the embodiments of this disclosure, a first inspection program for the product under test is automatically generated based on the first processing drawing of the product under test, the first visual inspection parameters, and the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view. The product under test is then visually inspected according to the first inspection program. This eliminates the need for testers to manually draw inspection boxes to obtain the inspection program, thereby improving the efficiency and accuracy of the inspection program generation and ultimately improving the visual inspection efficiency of the product under test.
[0036] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.
[0038] Figure 1 This is a flowchart of a visual inspection method provided according to an embodiment of the present disclosure;
[0039] Figure 2 This is a schematic diagram of a first configuration interface according to an embodiment of the present disclosure;
[0040] Figure 3 This is a schematic diagram of a second configuration interface according to an embodiment of the present disclosure;
[0041] Figure 4 This is a schematic diagram of a second configuration interface according to another embodiment of the present disclosure;
[0042] Figure 5 This is a block diagram of a visual inspection apparatus provided according to an embodiment of the present disclosure;
[0043] Figure 6 This is a block diagram of a visual inspection device provided according to an embodiment of the present disclosure. Detailed Implementation
[0044] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement of regions and steps, numerical expressions, and values set forth in these embodiments do not limit the scope of the invention.
[0045] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0046] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0047] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0048] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0049] This embodiment provides a visual inspection method, which can be implemented by a visual inspection device.
[0050] Figure 1 This is a flowchart of a visual inspection method provided according to embodiments of the present disclosure.
[0051] like Figure 1 As shown, the product assembly method may include the following steps S1100 to S1400:
[0052] Step S1100: Obtain the first processing drawing and the first visual inspection parameters of the product to be tested.
[0053] In this embodiment, the first processing drawing can be a drawing used for processing the product to be tested, and the first processing drawing can be a 3D digital model drawing.
[0054] The first visual inspection parameter can be a threshold and / or upper and lower limits representing the acceptable range of visual inspection for the product under test. This first visual inspection parameter can be stored in a CSV file.
[0055] In one embodiment, the first processing drawing and the first visual inspection parameters of the product under test may be pre-stored on the visual inspection device that performs the method of this embodiment.
[0056] In one embodiment, the first processing drawing and the first visual inspection parameters of the product under test may be stored on a server, and the visual inspection device executing the method of this embodiment obtains them from the server. Specifically, obtaining the first processing drawing and the first visual inspection parameters of the product under test may include: obtaining product information of the product under test, and obtaining the first processing drawing and the first visual inspection parameters of the product under test from the server based on the product information of the product under test.
[0057] In this embodiment, the user can set the product information of the product to be visually inspected in the visual inspection device through a first configuration interface. The first configuration interface can be as follows: Figure 2 As shown. For example, this product information could be a project code used to indicate the product type of the product under test.
[0058] The server can provide a second configuration interface, through which users can configure the product information of the product under test and upload the first processing drawing and first visual inspection parameters of the product under test, so as to associate the product information of the product under test with the first processing drawing and first visual inspection parameters of the product under test.
[0059] Furthermore, users can configure the association between workstations, work positions, processes, and product information through the server.
[0060] Specifically, users can also configure project codes, workstation codes, system line identification codes, line types, processes, workstation codes, and workstation names via the server. This basic information forms the foundation for parameter uploading and parameter distribution / retrieval.
[0061] In one example, such as Figure 3 As shown, the server can synchronize project information from the basic data platform, and can also synchronize the unit and station relationship information of the basic data platform by entering the project code or factory instance, and can also synchronize the project part number information of the basic data platform by entering the inventory organization code.
[0062] In one example, such as Figure 3 As shown, the server can also provide a quality parameter management list in the second configuration interface. This list is displayed based on project, unit, and test categories, showing only the latest version of the quality parameters. The server can also filter and display projects for users with different data permissions.
[0063] In one example, such as Figure 4 As shown, users can click the "Add" button in the second configuration interface to enter the quality parameter maintenance page. On the quality parameter maintenance page, users can choose to upload a CSV file, select the corresponding unit station information, and click the "Confirm" button to upload the first visual inspection parameters.
[0064] In one example, such as Figure 3 As shown, when a user selects a corresponding project workstation, the server can provide all versions of the visual inspection parameters for that project, allowing the user to view all uploaded parameter versions. Each version of the visual inspection parameters can include basic project information, such as upload time and version content.
[0065] In one embodiment, the visual inspection device executing the method of this embodiment may, upon the occurrence of an event to acquire parameters, retrieve a first processing drawing and first visual inspection parameters of the product to be tested from a server. The event to acquire parameters may include: receiving an operation to acquire parameters, or reaching a set update time.
[0066] In another embodiment, the visual inspection device performing the method of this embodiment may, upon receiving an operation to acquire parameters, acquire a first processing drawing and first visual inspection parameters of the product to be tested from the server. The visual inspection device may also acquire the first visual inspection parameters of the product to be tested from the server upon reaching a set update time.
[0067] The parameter acquisition operation can be performed by the user clicking the first button on the first configuration interface after setting the product information of the product to be visually inspected in the visual inspection device through the first configuration interface. The first configuration interface can be as follows: Figure 2 As shown, the first button can be as follows: Figure 2 The button for "Pull parameters and save to local" in the first configuration interface shown.
[0068] In this embodiment, the user can pre-set the time interval for updating visual inspection parameters during the visual inspection of the product under test through the first configuration interface in the visual inspection device. This time interval can be, for example, 5 minutes. Then, when the time interval for updating visual inspection parameters reaches 5 minutes, the step of obtaining the first visual inspection parameters is executed once.
[0069] In one embodiment of this disclosure, the method may further include: comparing a first visual inspection parameter with a second visual inspection parameter of the product to be tested; and when the first visual inspection parameter and the second visual inspection parameter are different, performing a step of generating a first inspection program for the product to be tested based on a first processing drawing, the first visual inspection parameter and the conversion parameter.
[0070] In this embodiment, the second visual inspection parameter can be the visual inspection parameter currently being used by the visual inspection device. That is, the second inspection program currently being used by the visual inspection device to perform visual inspection of the product under test is generated based on the second visual inspection parameter.
[0071] Furthermore, if the visual inspection device does not store the second visual inspection parameters, the step of comparing the first visual inspection parameters with the second visual inspection parameters of the product under test can be omitted, and steps S1200 to S1400 can continue to be executed.
[0072] This embodiment enables timely updates to the inspection program used by the visual inspection equipment when visual inspection parameters are updated, avoiding inaccurate visual inspection results of the product under test due to untimely updates of the inspection program, which in turn affects the pass rate of the product under test.
[0073] In one embodiment of this disclosure, the method further includes: issuing an alarm when the first visual inspection parameter differs from the second visual inspection parameter; and, in response to a confirmation operation of the modification of the visual inspection parameter, performing a step of generating a first inspection program for the product to be tested based on the first processing drawing, the first visual inspection parameter, and the conversion parameter.
[0074] In this embodiment, an alarm is issued when the first visual inspection parameters differ from the second visual inspection parameters, reminding the tester to confirm whether the first visual inspection parameters should be used to test the product under test. If the tester confirms that the first visual inspection parameters are being used, they can perform a confirmation operation to modify the visual inspection parameters, causing the visual inspection equipment to execute subsequent steps S1200 to S1400.
[0075] This embodiment can improve the reliability and accuracy of visual inspection results.
[0076] In one embodiment of this disclosure, the method further includes: when the first visual inspection parameters and the second visual inspection parameters are the same, performing visual inspection on the product to be tested according to a second inspection program, wherein the second inspection program is an inspection program obtained based on the first processing drawing, the second visual inspection parameters, and the conversion parameters.
[0077] In this embodiment, when the first visual detection parameters and the second visual detection parameters are the same, it indicates that the visual detection parameters of the product under test have not changed. In order to reduce the computing power of the visual inspection equipment, it is not necessary to generate a first inspection program based on the first visual detection parameters to perform visual inspection on the product under test. Therefore, the second inspection program generated based on the second visual detection parameters can continue to be used to perform visual inspection on the product under test.
[0078] This embodiment can reduce the computing power of visual inspection equipment.
[0079] Step S1200: Obtain the conversion parameters from the actual size of the product to be inspected to the pixel size of the camera's field of view.
[0080] In this embodiment, the camera can be calibrated based on the calibrated product to obtain the conversion parameters from the actual size of the product to be detected to the pixel size of the camera's field of view.
[0081] In some embodiments, the camera may be recalibrated before visual inspection is performed when the type of product to be visually inspected is changed.
[0082] In some embodiments, the conversion parameters may be stored in the vision inspection device after the camera is calibrated. If the type of product to be inspected is not changed in the vision inspection device, and an inspection program needs to be generated, the stored conversion parameters may be obtained from the vision inspection device.
[0083] Step S1300: Generate the first inspection program for the product to be inspected based on the first processing drawing, the first visual inspection parameters, and the converted parameters.
[0084] The first detection program includes at least one first detection frame of the product under test within the camera's field of view.
[0085] In this embodiment, the first detection program can be used to detect whether the deviation between at least one detection area of the product under test and the corresponding first detection frame in the camera's field of view conforms to the corresponding first visual detection parameters.
[0086] In one embodiment of this disclosure, generating a first detection program for the product under test based on a first processing drawing, first visual inspection parameters, and conversion parameters includes: generating a second detection frame representing the actual size of the product under test based on the first processing drawing; processing the second detection frame according to the conversion parameters to obtain a first detection frame; and obtaining the first detection program based on the first detection frame and the first visual inspection parameters.
[0087] In this embodiment, the second detection frame represents the actual size of the product under test and the actual position of the detection area within the product under test.
[0088] Since visual inspection involves taking pictures of the product under test with a camera and detecting whether there are defects in the product under test based on the captured images, it is necessary to convert the second detection box in the product under test to the camera's field of view according to the conversion parameters to obtain the first detection box.
[0089] In one embodiment of this disclosure, the processing drawing is a 3D drawing. Based on the first processing drawing, a second detection frame representing the actual size of the product to be tested is generated, including: generating a 2D drawing of the product to be tested based on the 3D drawing; and parsing the 2D drawing to obtain the second detection frame.
[0090] This embodiment can automatically generate the testing program for the product to be tested based on 3D drawings, eliminating the need for testers to manually draw the testing frame, thus improving the efficiency and accuracy of testing program generation and consequently increasing the production efficiency of the product to be tested.
[0091] Step S1400: Perform visual inspection on the product to be tested according to the first inspection program.
[0092] In this embodiment, visual inspection of the product under test according to the first inspection program may include: controlling a camera to take a picture of the product under test to obtain an image to be inspected; and performing visual inspection on the image to be inspected according to the first inspection program to obtain a visual inspection result of the product under test.
[0093] Through the embodiments of this disclosure, a first inspection program for the product under test is automatically generated based on the first processing drawing of the product under test, the first visual inspection parameters, and the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view. The product under test is then visually inspected according to the first inspection program. This eliminates the need for testers to manually draw inspection boxes to obtain the inspection program, thereby improving the efficiency and accuracy of the inspection program generation and ultimately improving the visual inspection efficiency of the product under test.
[0094] This embodiment also provides a visual inspection device 5000, such as... Figure 5 As shown, the visual inspection device 5000 includes a detection parameter acquisition module 5100, a conversion parameter acquisition module 5200, a detection program generation module 5300, and a visual inspection module 5400.
[0095] The detection parameter acquisition module 5100 is used to acquire the first processing drawing and the first visual inspection parameters of the product to be tested.
[0096] The conversion parameter acquisition module 5200 is used to acquire the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view.
[0097] The detection program generation module 5300 is used to generate a first detection program for the product under test based on the first processing drawing, the first visual detection parameters and the conversion parameters, wherein the first detection program includes at least one first detection frame of the product under test within the camera's field of view.
[0098] The visual inspection module 5400 is used to perform visual inspection on the product under test according to the first inspection program.
[0099] In one embodiment of this disclosure, the detection parameter acquisition module 5100 is used for:
[0100] Obtain the product information of the product to be tested;
[0101] Based on the product information, the first processing drawing and the first visual inspection parameters of the product to be tested are obtained from the server.
[0102] In one embodiment of this disclosure, the visual inspection device 5000 further includes:
[0103] A module for comparing the first visual inspection parameters with the second visual inspection parameters of the product under test;
[0104] The detection program generation module 5300 is used to execute the step of generating a first detection program for the product under test based on the first processing drawing, the first visual detection parameters, and the conversion parameters when the first visual detection parameters are different from the second visual detection parameters.
[0105] In one embodiment of this disclosure, the visual inspection device 5000 further includes:
[0106] A module for performing visual inspection on the product under test according to a second inspection program when the first visual inspection parameters and the second visual inspection parameters are the same, wherein the second inspection program is an inspection program obtained according to the first processing drawing, the second visual inspection parameters and the conversion parameters.
[0107] In one embodiment of this disclosure, the visual inspection device 5000 further includes:
[0108] A module for issuing an alarm when the first visual detection parameter is different from the second visual detection parameter;
[0109] The test program generation module 5300 is used to perform the step of generating a first test program for the product under test based on the first processing drawing, the first visual inspection parameters, and the conversion parameters in response to a confirmation operation of the modification of the visual inspection parameters.
[0110] In one embodiment of this disclosure, the detection program generation module 5300 is used for:
[0111] Based on the first processing drawing, a second detection frame is generated, representing the actual dimensions of the product to be tested.
[0112] The second detection box is processed according to the conversion parameters to obtain the first detection box;
[0113] The first detection program is obtained based on the first detection box and the first visual detection parameters.
[0114] In one embodiment of this disclosure, the processing drawing is a 3D drawing, and generating a second detection frame representing the actual dimensions of the product to be tested based on the first processing drawing includes:
[0115] Generate 2D drawings of the product to be tested based on the 3D drawings;
[0116] The 2D drawing is analyzed to obtain the second detection frame.
[0117] This embodiment also provides a visual inspection device 6000, such as... Figure 6 As shown, it includes a processor 6100 and a memory 6200, the memory 6200 being used to store a computer program, the computer program being used to control the processor 6100 to perform a method according to any embodiment of the present disclosure.
[0118] This embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any embodiment of this disclosure.
[0119] The above embodiments mainly focus on the differences from other embodiments, but those skilled in the art should understand that the above embodiments can be used alone or in combination as needed.
[0120] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. However, those skilled in the art should understand that the above embodiments can be used individually or in combination as needed. Furthermore, for the apparatus embodiments, since they correspond to the method embodiments, the description is relatively simple; relevant parts can be referred to the corresponding parts of the method embodiments. The system embodiments described above are merely illustrative, and the modules described as separated areas may or may not be physically separated.
[0121] This invention can be an apparatus, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0122] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical compression devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0123] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0124] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0125] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0126] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0127] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0129] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims
1. A visual inspection method, characterized in that, include: Obtain the first processing drawing and the first visual inspection parameters of the product to be tested; the first visual inspection parameters are the threshold and / or upper and lower limits of the visual inspection pass range of the product to be tested; Obtain the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view; A first detection program for the product under test is generated based on the first processing drawing, the first visual detection parameters, and the conversion parameters, wherein the first detection program includes at least one first detection frame of the product under test within the camera's field of view. The product to be tested is visually inspected according to the first detection program; The method further includes: The first visual inspection parameter is compared with the second visual inspection parameter of the product to be tested; the second visual inspection parameter is the visual inspection parameter currently being used by the visual inspection equipment. When the first visual inspection parameter is different from the second visual inspection parameter, the step of generating the first inspection program for the product to be tested based on the first processing drawing, the first visual inspection parameter and the conversion parameter is executed.
2. The method according to claim 1, characterized in that, The acquisition of the first processing drawing and the first visual inspection parameters of the product to be tested includes: Obtain the product information of the product to be tested; Based on the product information, the first processing drawing and the first visual inspection parameters of the product to be tested are obtained from the server.
3. The method according to claim 1, characterized in that, The method further includes: When the first visual inspection parameter and the second visual inspection parameter are the same, the product to be tested is visually inspected according to the second inspection program, wherein the second inspection program is an inspection program obtained according to the first processing drawing, the second visual inspection parameter and the conversion parameter.
4. The method according to claim 1, characterized in that, The method further includes: An alarm is issued when the first visual detection parameter differs from the second visual detection parameter; In response to the confirmation operation of the modification of the visual inspection parameters, the step of generating the first inspection program of the product to be tested based on the first processing drawing, the first visual inspection parameters and the conversion parameters is executed.
5. The method according to claim 1, characterized in that, The step of generating a first inspection program for the product to be tested based on the first processing drawing, the first visual inspection parameters, and the conversion parameters includes: Based on the first processing drawing, a second detection frame is generated, representing the actual dimensions of the product to be tested. The second detection box is processed according to the conversion parameters to obtain the first detection box; The first detection program is obtained based on the first detection box and the first visual detection parameters.
6. The method according to claim 5, characterized in that, The processing drawing is a 3D drawing. Generating a second inspection frame representing the actual dimensions of the product to be tested based on the first processing drawing includes: Generate 2D drawings of the product to be tested based on the 3D drawings; The 2D drawing is analyzed to obtain the second detection frame.
7. A visual inspection device, characterized in that, include: The detection parameter acquisition module is used to acquire the first processing drawing and the first visual inspection parameters of the product to be tested; the first visual inspection parameters are the threshold and / or upper and lower limits of the visual inspection qualified range of the product to be tested; The conversion parameter acquisition module is used to acquire the conversion parameters from the actual size of the product under test to the pixel size of the camera's field of view; The detection program generation module is used to generate a first detection program for the product under test based on the first processing drawing, the first visual detection parameters and the conversion parameters, wherein the first detection program includes at least one first detection frame of the product under test within the camera's field of view. A visual inspection module is used to perform visual inspection on the product under test according to the first inspection program; The visual inspection device also includes: A module for comparing the first visual inspection parameters with the second visual inspection parameters of the product under test; the second visual inspection parameters are the visual inspection parameters currently being used by the visual inspection equipment. The detection program generation module is used to execute the step of generating a first detection program for the product under test based on the first processing drawing, the first visual detection parameters, and the conversion parameters when the first visual detection parameters are different from the second visual detection parameters.
8. A visual inspection device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, the computer program being used to control the processor to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Image processing method and device, computer equipment, storage medium and program product
CN116363049A