Product detection method and device based on machine vision, computer equipment, medium and program product
By setting the conversion relationship between the system coordinate system and the real coordinate system in product detection, determining the product area and graphic detection area, and performing machine vision detection in response to user interaction information, the existing methods of cumbersome adjustment and poor flexibility are solved, and efficient and accurate product detection is achieved.
Patent Information
- Application Number
- CN202510542955.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-08
AI Technical Summary
The existing product detection methods rely on preset configuration parameters, and are cumbersome to adjust and have poor flexibility.
By acquiring detection images, setting the conversion relationship between the system coordinate system and the real coordinate system, determining the product area and the graphic detection area, performing product detection in response to user interaction information, and using machine vision algorithms for defect analysis.
It improves the flexibility and accuracy of product detection, reduces the possibility of false fault alarms, and improves detection efficiency.
Smart Images

Figure CN120451100A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to a product detection method, apparatus, computer equipment, storage medium, and computer program product based on machine vision. Background Art
[0002] Machine vision software is an application used for image processing and analysis. It is often used in conjunction with machine vision systems to enable automated inspection, identification, and classification. Machine vision systems use cameras and image processing algorithms to simulate human vision to observe and analyze products.
[0003] Among related technologies, the basic functions of machine vision software include: image acquisition, acquiring image data from cameras or other image sensors; image processing, processing images using various algorithms such as filtering, edge detection, feature extraction, and image enhancement; feature recognition, identifying and extracting features from images, such as shape, color, size, and position; measurement and analysis, performing geometric measurements or other analyses, such as size, distance, and angle; decision support, making decisions based on the results of processing and analysis, such as determining whether a product is qualified; and interface and reporting, providing a user interface to display processing results and generate inspection reports. Machine vision software significantly improves production efficiency and product quality through automated inspection and analysis, reducing manual intervention and errors. In modern manufacturing, especially in the production of panels and electronic products, it is a critical tool for ensuring high quality standards.
[0004] However, the current product testing methods have the following technical problems:
[0005] Existing product testing methods rely on preset configuration parameters, which are cumbersome to adjust and have poor flexibility. Summary of the Invention
[0006] Based on this, it is necessary to provide a product detection method, device, computer equipment, computer-readable storage medium and computer program product based on machine vision that can improve the detection accuracy and detection efficiency of the equipment for product detection in order to solve the above technical problems.
[0007] In a first aspect, the present application provides a product inspection method based on machine vision. The method comprises:
[0008] Acquire a detection image containing a target object to be detected, and set a system coordinate system based on the detection image, wherein the system coordinate system is associated with a real coordinate system of the detection device according to a preset conversion relationship;
[0009] Determining, based on analysis and processing of the detection image, a plurality of product areas in the detection image, each of the product areas containing at least one of the target objects;
[0010] In response to the acquisition of the interactive information, determining a graphic detection area in the graphic area corresponding to the target object;
[0011] Product inspection based on machine vision is performed on target objects of different categories in the inspection image based on the graphic inspection area.
[0012] In one embodiment, the determining of the graphic detection area in the graphic area corresponding to the target object in response to the acquisition of the interactive information includes:
[0013] If the product area includes the same target objects distributed in an array, determining the graphic detection area of any target object in the array area;
[0014] The graphic detection area is reused to other target objects in the array area to obtain the graphic detection area of the array area.
[0015] In one embodiment, the determining of the graphic detection area in the graphic area corresponding to the target object in response to the acquisition of the interactive information includes:
[0016] Obtaining distribution information of the target objects in the product area;
[0017] The array areas including the same target objects distributed in an array are determined based on the distribution information. If there is regional interference between the array areas, the interfering array areas are nested, and the nested array areas are independent of each other.
[0018] In one embodiment, after performing machine vision-based product inspection on the target objects of different categories in the inspection image based on the graphic inspection area, the method further includes:
[0019] In response to determining bad point information in the detection image, synchronously updating the bad point information in the detection device;
[0020] The defective point information is displayed in real time in the detection image.
[0021] In one embodiment, displaying the defective point information in the detection image in real time includes:
[0022] In response to the interactive pointer moving to a target area corresponding to the bad point, the identification color of the target area is changed.
[0023] In one embodiment, displaying the defective point information in the detection image in real time includes:
[0024] In response to the preset target interactive information acquisition, the bad point information is acquired and displayed, wherein the bad point information includes the point coordinate value and the bad point feature value of the bad point.
[0025] In a second aspect, the present application also provides a product inspection device based on machine vision. The device comprises:
[0026] A detection image module, configured to obtain a detection image containing a target object to be detected, and to set a system coordinate system based on the detection image, wherein the system coordinate system is associated with a real coordinate system of the detection device according to a preset conversion relationship;
[0027] A product area module is configured to determine, based on analysis and processing of the detection image, a plurality of product areas in the detection image, each of the product areas containing at least one target object;
[0028] a detection area module, configured to determine a graphic detection area in the graphic area corresponding to the target object in response to the acquisition of the interactive information;
[0029] A product detection module is configured to perform machine vision-based product detection on target objects of different categories in the detection image based on the graphic detection area.
[0030] In one embodiment, the detection area module includes:
[0031] an array area module, configured to determine the graphic detection area of any target object in the array area if the product area includes the same target objects distributed in an array;
[0032] An array multiplexing module is used to multiplex the graphic detection area to other target objects in the array area to obtain the graphic detection area of the array area.
[0033] In one embodiment, the detection area module includes:
[0034] A distribution information module, configured to obtain distribution information of the target objects within the product area;
[0035] An array nesting module is used to determine the array area including the same target object distributed in an array based on the distribution information. If there is regional interference between the array areas, the mutually interfering array areas are nested, and the nested array areas are independent of each other.
[0036] In one embodiment, after the product detection module, the following further comprises:
[0037] a defective point location module, configured to synchronously update the defective point location information in the detection device in response to determining the defective point location information in the detection image;
[0038] A real-time display module is used to display the defective point information in the detection image in real time.
[0039] In one embodiment, the real-time display module includes:
[0040] The floating identification module is used to change the identification color of the target area in response to the interactive pointer moving to the target area corresponding to the bad point.
[0041] In one embodiment, the real-time display module includes:
[0042] The point feature module is used to obtain and display the bad point information in response to preset target interaction information, wherein the bad point information includes the point coordinate value and the bad point feature value of the bad point.
[0043] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the machine vision-based product inspection method as described in any embodiment of the first aspect.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the machine vision-based product inspection method as described in any embodiment of the first aspect.
[0045] In a fifth aspect, the present application further provides a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the product inspection method based on machine vision as described in any one of the embodiments of the first aspect.
[0046] The above-mentioned method, apparatus, computer device, storage medium, and computer program product based on machine vision can achieve the beneficial effects corresponding to the technical problems in the background technology by deducing the technical features in the claims:
[0047] This application provides a machine vision-based product inspection method, comprising: acquiring an inspection image containing a target object to be inspected; setting a system coordinate system based on the inspection image, wherein the system coordinate system is associated with a real-world coordinate system of an inspection device according to a preset transformation relationship; determining, based on analysis and processing of the inspection image, multiple product regions in the inspection image, each of which contains at least one target object; determining a graphic inspection region within a graphic region corresponding to the target object in response to interactive information acquisition; and performing machine vision-based product inspection on target objects of different categories in the inspection image based on the graphic inspection regions. In implementation, an image containing the target object to be inspected is first captured using a camera or other imaging device; this step forms the basis of the entire inspection process. Subsequently, through image processing algorithm analysis or instruction interactive control, multiple product regions in the image can be identified; and user interaction (such as clicking, selecting a box, etc.) is responded to to confirm a specific graphic region as the inspection region for the target object. Ultimately, deep learning or traditional computer vision algorithms (such as convolutional neural networks (CNNs)) can be used for target classification and defect detection. Based on the standards for specific products, the system will determine defects in identified targets. Defects such as scratches, deformations, and color unevenness can all be analyzed through machine vision technology, thereby achieving automated inspection of different product categories and helping to improve the flexibility and accuracy of target product inspection. Furthermore, by determining the graphic inspection areas where different objects are located, it is helpful to only inspect the valid inspection area containing the target object, thereby excluding irrelevant areas. This helps reduce false fault alarms triggered by graphic interference or non-target features in other areas, and reduces the possibility of over-inspection during the inspection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 A diagram illustrating an application environment of a product inspection method based on machine vision in one embodiment;
[0050] Figure 2 This is a schematic diagram of a first flow chart of a product inspection method based on machine vision in one embodiment;
[0051] Figure 3 A second flow chart of a product inspection method based on machine vision in another embodiment;
[0052] Figure 4 is a third flow chart of a product inspection method based on machine vision in another embodiment;
[0053] Figure 5 A fourth flow chart of a product inspection method based on machine vision in another embodiment;
[0054] Figure 6 is a fifth flow chart of a product inspection method based on machine vision in another embodiment;
[0055] Figure 7 A sixth flow chart of a product inspection method based on machine vision in another embodiment;
[0056] Figure 8 is a structural block diagram of a product inspection device based on machine vision in one embodiment;
[0057] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0059] The embodiment of the present application provides a product detection method based on machine vision, which can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0060] In one embodiment, Figure 2As shown in the figure, a product detection method based on machine vision is provided. Figure 1 The following steps are used as an example to illustrate the terminal in the figure:
[0061] Step 202: Acquire a detection image containing a target object to be detected, set a system coordinate system based on the detection image, and associate the system coordinate system with a real coordinate system of the detection device according to a preset conversion relationship.
[0062] Step 204: Based on the analysis and processing of the detection image, a plurality of product areas in the detection image are determined, each of the product areas containing at least one of the target objects.
[0063] Step 206: In response to the acquisition of the interactive information, determine a graphic detection area in the graphic area corresponding to the target object.
[0064] Step 208: Performing machine vision-based product inspection on the target objects of different categories in the inspection image based on the graphic inspection area.
[0065] Exemplarily, the terminal can perform machine vision-based product detection on the target objects of different categories in the detection image based on the graphic detection area. Specifically, the terminal can set a static shielding process for the detection image outside the graphic detection area, so that only the target features of the graphic detection area are detected. In addition, the terminal can also achieve this by lowering the detection priority and detection threshold of the detection image outside the graphic detection area. The specific detection method adopted is determined by technical personnel based on actual usage requirements and will not be elaborated here.
[0066] In the above-mentioned product inspection method based on machine vision, reasonable deduction is performed in combination with the technical features in the embodiment to achieve the beneficial effect of solving the technical problems raised in the background technology:
[0067] This application provides a machine vision-based product inspection method, comprising: acquiring an inspection image containing a target object to be inspected; setting a system coordinate system based on the inspection image, wherein the system coordinate system is associated with a real-world coordinate system of an inspection device according to a preset transformation relationship; determining, based on analysis and processing of the inspection image, multiple product regions in the inspection image, each of which contains at least one target object; determining a graphic inspection region within a graphic region corresponding to the target object in response to interactive information acquisition; and performing machine vision-based product inspection on target objects of different categories in the inspection image based on the graphic inspection regions. In implementation, an image containing the target object to be inspected is first captured using a camera or other imaging device; this step forms the basis of the entire inspection process. Subsequently, through image processing algorithm analysis or instruction interactive control, multiple product regions in the image can be identified; and user interaction (such as clicking, selecting a box, etc.) is responded to to confirm a specific graphic region as the inspection region for the target object. Ultimately, deep learning or traditional computer vision algorithms (such as convolutional neural networks (CNNs)) can be used for target classification and defect detection. Based on the standards for specific products, the system will determine defects in identified targets. Defects such as scratches, deformations, and color unevenness can all be analyzed through machine vision technology, thereby achieving automated inspection of different product categories and helping to improve the flexibility and accuracy of target product inspection. Furthermore, by determining the graphic inspection areas where different objects are located, it is helpful to only inspect the valid inspection area containing the target object, thereby excluding irrelevant areas. This helps reduce false fault alarms triggered by graphic interference or non-target features in other areas, and reduces the possibility of over-inspection during the inspection process.
[0068] In one embodiment, Figure 3 As shown, step 206 includes:
[0069] Step 302: If the product area includes the same target objects distributed in an array, determining the graphic detection area of any target object in the array area;
[0070] Step 304: Reuse the graphic detection area to other target objects in the array area to obtain the graphic detection area of the array area.
[0071] In this embodiment, when there are multiple products distributed in a dense array, the pattern detection areas can be array-reused by determining one of the pattern detection areas, which helps to improve the overall efficiency of product detection.
[0072] In one embodiment, Figure 4 As shown, step 206 includes:
[0073] Step 402: Obtain distribution information of the target objects in the product area;
[0074] Step 404: Based on the distribution information, determine the array areas including the same target objects distributed in an array. If there is regional interference between the array areas, nest the mutually interfering array areas, and the nested array areas are independent of each other.
[0075] For example, the terminal can obtain the distribution information of target objects within the product area and establish a mapping relationship between the physical product and the coordinate system. Specifically, the coordinate system can include an axis coordinate system, which is the coordinate system of the real physical space; an algorithmic coordinate system, which is the coordinate system of the algorithmic display space; and an image coordinate system, which is a coordinate system set with the center point of the image as the direction.
[0076] Exemplarily, the terminal can determine the mapping relationship between the coordinate systems involved in the algorithm by calibrating the affine transformation relationship between the mechanical origin of the real platform and the coordinate system. In the process of processing array areas, if there is regional interference between array areas, the array areas involved in different target products can be nested so that each nested layer can be processed independently, and different nested levels can be distinguished by parameters such as the number of rows and columns or spacing. Exemplarily, the number of nested layers can be one, two, three, etc., and the specific number of nested layers is determined by technical personnel based on actual detection needs. In this way, through the algorithmic processing of multi-level nested arrays, the "problem of arrays in arrays" caused by regional interference can be solved, which helps to achieve both the automation of regular arrays and the flexibility of complex array processing.
[0077] In this embodiment, when there are array areas that interfere with each other, the array areas can be nested, which helps to adapt to detection images with complex distribution conditions and improve the stability and flexibility of product detection.
[0078] In one embodiment, Figure 5 As shown, after step 208, the following steps are further included:
[0079] Step 502: In response to determining bad point information in the detection image, synchronously updating the bad point information in the detection device;
[0080] Step 504: Display the defective point information in the detection image in real time.
[0081] In this embodiment, after product inspection, if there is bad point information in the inspection image, the bad point information can be updated to the inspection device for real-time display, which helps to improve the efficiency of abnormal handling of product inspection.
[0082] In one embodiment, Figure 6 As shown, step 504 includes:
[0083] Step 602: In response to the interactive pointer moving to the target area corresponding to the bad point, the identification color of the target area is changed.
[0084] In this embodiment, after determining the bad point information, the bad point area can be set to change color when the mouse hovers over it during user interaction, which helps to improve the recognition efficiency of the bad point area.
[0085] In one embodiment, Figure 7 As shown, step 504 includes:
[0086] Step 702: in response to the preset target interactive information acquisition, the bad point information is acquired and displayed, wherein the bad point information includes the point coordinate value and the bad point feature value of the bad point.
[0087] In this embodiment, after the bad point information is determined, the specific information of the bad point can be displayed through interactive operations, which helps to improve the efficiency of handling the bad points.
[0088] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0089] Based on the same inventive concept, embodiments of the present application also provide a machine vision-based product inspection device for implementing the aforementioned machine vision-based product inspection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more machine vision-based product inspection device embodiments provided below can be found in the aforementioned limitations of the machine vision-based product inspection method and will not be further elaborated here.
[0090] In one embodiment, Figure 8As shown, a product inspection device based on machine vision is provided, comprising: a detection image module, a product area module, a detection area module and a product inspection module, wherein:
[0091] A detection image module, configured to obtain a detection image containing a target object to be detected, and to set a system coordinate system based on the detection image, wherein the system coordinate system is associated with a real coordinate system of the detection device according to a preset conversion relationship;
[0092] A product area module is configured to determine, based on analysis and processing of the detection image, a plurality of product areas in the detection image, each of the product areas containing at least one target object;
[0093] a detection area module, configured to determine a graphic detection area in the graphic area corresponding to the target object in response to the acquisition of the interactive information;
[0094] A product detection module is configured to perform machine vision-based product detection on target objects of different categories in the detection image based on the graphic detection area.
[0095] In one embodiment, the detection area module includes:
[0096] an array area module, configured to determine the graphic detection area of any target object in the array area if the product area includes the same target objects distributed in an array;
[0097] An array multiplexing module is used to multiplex the graphic detection area to other target objects in the array area to obtain the graphic detection area of the array area.
[0098] In one embodiment, the detection area module includes:
[0099] A distribution information module, configured to obtain distribution information of the target objects within the product area;
[0100] An array nesting module is used to determine the array area including the same target object distributed in an array based on the distribution information. If there is regional interference between the array areas, the mutually interfering array areas are nested, and the nested array areas are independent of each other.
[0101] In one embodiment, after the product detection module, the following further comprises:
[0102] a defective point location module, configured to synchronously update the defective point location information in the detection device in response to determining the defective point location information in the detection image;
[0103] A real-time display module is used to display the defective point information in the detection image in real time.
[0104] In one embodiment, the real-time display module includes:
[0105] The floating identification module is used to change the identification color of the target area in response to the interactive pointer moving to the target area corresponding to the bad point.
[0106] In one embodiment, the real-time display module includes:
[0107] The point feature module is used to obtain and display the bad point information in response to preset target interaction information, wherein the bad point information includes the point coordinate value and the bad point feature value of the bad point.
[0108] Each module in the aforementioned machine vision-based product inspection device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0109] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be achieved via Wi-Fi, mobile cellular networks, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a product inspection method based on machine vision. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0110] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0111] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0112] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0113] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0115] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0116] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A product detection method based on machine vision, characterized in that: The method comprises: Acquire a detection image containing a target object to be detected, and set a system coordinate system based on the detection image, wherein the system coordinate system is associated with a real coordinate system of the detection device according to a preset conversion relationship; Determining, based on analysis and processing of the detection image, a plurality of product areas in the detection image, each of the product areas containing at least one of the target objects; In response to the acquisition of the interactive information, determining a graphic detection area in the graphic area corresponding to the target object; Product inspection based on machine vision is performed on target objects of different categories in the inspection image based on the graphic inspection area.
2. The method according to claim 1, characterized in that The obtaining of the interactive information in response to which the graphic detection area is determined in the graphic area corresponding to the target object includes: If the product area includes the same target objects distributed in an array, determining the graphic detection area of any target object in the array area; The graphic detection area is reused to other target objects in the array area to obtain the graphic detection area of the array area.
3. The method according to claim 2, characterized in that The obtaining of the interactive information in response to which the graphic detection area is determined in the graphic area corresponding to the target object includes: Obtaining distribution information of the target objects in the product area; The array areas including the same target objects distributed in an array are determined based on the distribution information. If there is regional interference between the array areas, the interfering array areas are nested, and the nested array areas are independent of each other.
4. The method according to claim 1, wherein After performing machine vision-based product detection on the target objects of different categories in the detection image based on the graphic detection area, the method further includes: In response to determining bad point information in the detection image, synchronously updating the bad point information in the detection device; The defective point information is displayed in real time in the detection image.
5. The method according to claim 4, characterized in that The real-time display of the defective point information in the detection image includes: In response to the interactive pointer moving to a target area corresponding to the bad point, the identification color of the target area is changed.
6. The method according to claim 4, characterized in that The real-time display of the defective point information in the detection image includes: In response to the preset target interactive information acquisition, the bad point information is acquired and displayed, wherein the bad point information includes the point coordinate value and the bad point feature value of the bad point.
7. A product inspection device based on machine vision, characterized in that: The device comprises: A detection image module, configured to obtain a detection image containing a target object to be detected, and to set a system coordinate system based on the detection image, wherein the system coordinate system is associated with a real coordinate system of the detection device according to a preset conversion relationship; A product area module is configured to determine, based on analysis and processing of the detection image, a plurality of product areas in the detection image, each of the product areas containing at least one target object; a detection area module, configured to determine a graphic detection area in the graphic area corresponding to the target object in response to the acquisition of the interactive information; A product detection module is configured to perform machine vision-based product detection on target objects of different categories in the detection image based on the graphic detection area.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.