Abnormality processing method and device based on machine vision, equipment and medium

By obtaining the divided tiles for multiple inspections of workpieces, analyzing real-time and historical defect distribution coefficients, and determining abnormal tiles, the problem of the abnormal distribution position of workpiece defects in the existing technology is solved, and the improvement of workpiece manufacturing efficiency and guaranteeing product quality is achieved.

CN119649085APending Publication Date: 2025-03-18CHINA ELECTRONICS STANDARDIZATION INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411542899.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art cannot effectively analyze and timely discover abnormal changes in the defect distribution position during workpiece manufacturing, resulting in affecting the workpiece manufacturing efficiency.

Method used

By obtaining multiple segmented tiles detected by the workpiece multiple times, the abnormal tiles are determined based on the real-time and historical defect distribution coefficients of each segmented tiles, thereby realizing abnormal analysis and timely discovery of defect distribution locations.

Benefits of technology

Accurate analysis and timely discovery of defect distribution positions during workpiece manufacturing process, optimize the production process, improve production efficiency, and ensure product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649085A_ABST
    Figure CN119649085A_ABST
Patent Text Reader

Abstract

The invention provides an exception handling method and device based on machine vision, equipment and a medium, and relates to the technical field of intelligent manufacturing control, and the method comprises the steps: obtaining a plurality of segmentation image blocks for multiple times of detection of a workpiece; determining a real-time defect distribution coefficient corresponding to each segmented image block on the basis of the number of times that each segmented image block is marked as a defective image block in the multiple times of detection; and determining an abnormal image block according to the real-time defect distribution coefficient corresponding to each segmented image block and the historical defect distribution coefficient corresponding to each segmented image block. The method is used for solving the problem that in the prior art, abnormal changes of defect positions cannot be found in time due to the fact that abnormity of the defect distribution positions cannot be analyzed, and then the workpiece manufacturing efficiency is affected, the abnormity of the defect distribution positions in the workpiece manufacturing process can be accurately analyzed and found in time, the production process is optimized, and the production efficiency is improved. And the production efficiency is improved while the product quality is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing control technology, and in particular to an exception handling method, device, equipment and medium based on machine vision. Background Art

[0002] With the advancement of technology, the application of machine vision in intelligent manufacturing is becoming more and more extensive. Its development trends include higher resolution, faster processing speed, stronger intelligence level and better integration capability. Especially in the field of intelligent manufacturing, machine vision plays an irreplaceable role.

[0003] However, in the related art, some products have certain inherent defects during the production process due to limitations of technology or the production equipment itself. Such defects are caused by the limitations of technology or the production equipment itself. Therefore, the distribution positions of the defective parts on the manufactured workpiece are generally not much different. When machine vision detects the workpiece image, it is easy to obtain defective blocks, but it is unable to analyze the abnormalities of the defect distribution position, resulting in the inability to timely detect abnormal changes in the defect position, which in turn affects the workpiece manufacturing efficiency. Summary of the invention

[0004] The present invention provides a machine vision-based exception handling method, device, equipment and medium to solve the problem in the prior art that the abnormalities of defect distribution positions cannot be analyzed, resulting in the inability to timely detect abnormal changes in defect positions, thereby affecting workpiece manufacturing efficiency.

[0005] The present invention provides an exception handling method based on machine vision, comprising the following steps.

[0006] Obtain multiple segmentation blocks for multiple inspections of the workpiece; Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The abnormal blocks are determined according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0007] According to a machine vision-based exception handling method provided by the present invention, a plurality of segmented image blocks for multiple inspections of a workpiece are obtained, including: Acquire multiple inspection images for multiple inspections of the workpiece; Each detection image is segmented to obtain multiple segmentation blocks.

[0008] According to a machine vision-based exception handling method provided by the present invention, based on the number of times each segmented image block is marked as a defective image block in multiple inspections, a real-time defect distribution coefficient corresponding to each segmented image block is determined, including: Determine a real-time defect coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The real-time defect distribution coefficient corresponding to each segmented image block is determined based on the real-time defect coefficient.

[0009] According to a machine vision-based exception processing method provided by the present invention, a real-time defect distribution coefficient corresponding to each segmented image block is determined based on the real-time defect coefficient, including: The real-time defect distribution coefficient corresponding to each segmented block is determined according to the following formula:

[0010] Wherein, Bi is the real-time defect coefficient, FB is the real-time defect distribution coefficient, a is the number of segmented blocks, Bp is the mean value of the real-time defect coefficient, and a≥i≥1.

[0011] According to a machine vision-based exception handling method provided by the present invention, before determining the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block, the method further includes: Determine the historical defect coefficient corresponding to each segmented image block based on the historical inspection image of the workpiece; The historical defect distribution coefficient is determined using the historical defect coefficient according to the following formula:

[0012] Where Wi is the historical defect coefficient, FA is the historical defect distribution coefficient, a is the number of segmented blocks, Wp is the mean of the historical defect coefficient, and a≥i≥1.

[0013] According to a machine vision-based exception processing method provided by the present invention, an abnormal block is determined according to a real-time defect distribution coefficient corresponding to each segmented block and a historical defect distribution coefficient corresponding to each segmented block, including: Determine the difference between the real-time defect distribution coefficient corresponding to each segmented image block and the historical defect distribution coefficient corresponding to each segmented image block; The segmented blocks whose difference values ​​are greater than a preset abnormal value are determined as abnormal blocks.

[0014] According to a machine vision-based exception handling method provided by the present invention, the method further includes: Get the working parameters of the abnormal block; Based on the historical working parameters of the abnormal block, the working parameters of the abnormal block are adjusted.

[0015] The present invention also provides an exception handling device based on machine vision, comprising the following modules: An acquisition module, used for acquiring a plurality of segmentation blocks for multiple inspections of a workpiece; A first determination module is used to determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The second determination module is used to determine the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0016] According to a machine vision-based exception handling device provided by the present invention, the acquisition module is specifically used for: Acquire multiple inspection images for multiple inspections of the workpiece; Each detection image is segmented to obtain multiple segmentation blocks.

[0017] According to a machine vision-based exception handling device provided by the present invention, the first determination module is specifically used for: Determine a real-time defect coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The real-time defect distribution coefficient corresponding to each segmented image block is determined based on the real-time defect coefficient.

[0018] According to the machine vision-based exception handling device provided by the present invention, the first determination module is specifically used to determine the real-time defect distribution coefficient corresponding to each segmented image block according to the following formula:

[0019] Wherein, Bi is the real-time defect coefficient, FB is the real-time defect distribution coefficient, a is the number of segmented blocks, Bp is the mean value of the real-time defect coefficient, and a≥i≥1.

[0020] According to the machine vision-based exception handling device provided by the present invention, the second determination module is further used for: Determine the historical defect coefficient corresponding to each segmented image block based on the historical inspection image of the workpiece; The historical defect distribution coefficient is determined using the historical defect coefficient according to the following formula:

[0021] Where Wi is the historical defect coefficient, FA is the historical defect distribution coefficient, a is the number of segmented blocks, Wp is the mean of the historical defect coefficient, and a≥i≥1.

[0022] According to a machine vision-based exception handling device provided by the present invention, the second determination module is specifically used for: Determine the difference between the real-time defect distribution coefficient corresponding to each segmented image block and the historical defect distribution coefficient corresponding to each segmented image block; The segmented blocks whose difference values ​​are greater than a preset abnormal value are determined as abnormal blocks.

[0023] According to a machine vision-based exception handling device provided by the present invention, the second determination module is specifically used for: Get the working parameters of the abnormal block; Based on the historical working parameters of the abnormal block, the working parameters of the abnormal block are adjusted.

[0024] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned machine vision-based exception handling methods.

[0025] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned machine vision-based exception handling methods.

[0026] The machine vision-based exception handling method provided by the present invention first obtains multiple segmented blocks for multiple inspections of the workpiece, then determines the real-time defect distribution coefficient corresponding to each segmented block based on the number of times each segmented block is marked as a defective block in the multiple inspections, and finally determines the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block. It can realize accurate analysis and timely discovery of abnormalities in the defect distribution position during the workpiece manufacturing process, thereby optimizing the production process and improving production efficiency while ensuring product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 It is a flow chart of the abnormality handling method based on machine vision provided by the present invention.

[0029] Figure 2 It is a structural schematic diagram of the machine vision-based exception handling device provided by the present invention.

[0030] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] With the advancement of technology, the application of machine vision in intelligent manufacturing is becoming more and more extensive. Its development trends include higher resolution, faster processing speed, stronger intelligence level and better integration capability. Especially in the field of intelligent manufacturing, machine vision plays an irreplaceable role. Specific applications include product detection and classification, program control and optimization, and intelligent sorting. For example, by detecting and analyzing product appearance, size, shape and other features, machine vision can realize automatic detection, classification and statistics of products, avoid manual repetitive labor, and improve production efficiency. At the same time, machine vision can also help smart factories complete automatic detection links, and intelligently control the processing flow or optimize the operation status of the production line based on the detection data; However, in the related art, some products have certain inherent defects during the production process due to limitations of technology or the production equipment itself. Such defects are caused by the limitations of technology or the production equipment itself. Therefore, the distribution positions of the defective parts on the manufactured workpiece are generally not much different. When machine vision detects the workpiece image, it is easy to obtain defective blocks, but it is unable to analyze the abnormalities of the defect distribution position, resulting in the inability to timely detect abnormal changes in the defect position, which in turn affects the workpiece manufacturing efficiency.

[0033] Therefore, there is an urgent need for an exception handling method based on machine vision to solve the above problems.

[0034] Combine the following Figure 1-Figure 3 The present invention describes an exception handling method, device, equipment and medium based on machine vision.

[0035] Figure 1 This is one of the flow charts of the machine vision-based exception handling method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101: Acquire multiple segmented image blocks for multiple inspections of a workpiece.

[0036] In specific implementation, multiple detection images of multiple detections of the workpiece are first obtained, and then each detection image is segmented to obtain multiple segmented blocks. When acquiring, the detection interval duration can also be set, which is not limited in the embodiment of the present invention.

[0037] Specifically, when acquiring the detection image, the workpiece on the workbench can be photographed through a camera, line scanner, CCD, infrared camera, 3D camera or other image capturing equipment, and then the detection image blocks of the workpiece are obtained for collection to ensure the quality of the collected images is reliable. Of course, it can also be obtained in other forms, and the embodiments of the present invention are not limited to this.

[0038] After acquiring the detection image, it provides a basis for subsequent block processing and analysis. The collected blocks are divided into multiple segmented blocks according to the predetermined segmentation standard, and each segmented block is compared with its preset standard image to obtain the similarity between each segmented block and its preset standard image. The similarity is used to determine whether each segmented block is qualified. If qualified, no processing is performed. If unqualified, it is marked as a defective block. Specifically in the segmentation of the image, threshold-based segmentation, edge-based segmentation, clustering-based segmentation, etc. can be selected. Edge detection is one of the commonly used feature extraction methods in visual recognition. It can effectively detect the contour of the object in the block. Common edge detection algorithms include Sobel operator, Canny operator, etc. Other rules can also be used for block segmentation, which is not limited in the embodiment of the present invention.

[0039] Step 102: Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections.

[0040] In a specific implementation, based on the number of times each segmented block is marked as a defective block in multiple tests, the real-time defect coefficient corresponding to each segmented block is determined, and then the real-time defect distribution coefficient corresponding to each segmented block is determined according to the real-time defect coefficient. Specifically,

[0041] After each predetermined number of detections b times, the detection results corresponding to each segmented block are obtained, and the number of times each segmented block is judged as a defective block in the predetermined number of detections b times is marked as Ea, and the ratio between the number of times each segmented block is judged as a defective block in the predetermined number of detections b times and the predetermined number of detections b is marked as the real-time defect coefficient corresponding to each segmented block, that is, the real-time defect coefficient Bi corresponding to each segmented block is calculated by the formula Ea / b=Bi, b is a preset value, which can be selected according to actual needs, b≥1, and then the real-time defect distribution coefficient of each segmented block is obtained by discrete calculation, specifically, the real-time defect distribution coefficient corresponding to each segmented block is determined according to the following formula:

[0042] Wherein, Bi is the real-time defect coefficient, FB is the real-time defect distribution coefficient, a is the number of segmented blocks, Bp is the mean of the real-time defect coefficient, and the real-time defect distribution coefficient reflects the real-time distribution of defects, a≥i≥1.

[0043] Step 103: determine the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0044] In specific implementation, the difference between the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block is first determined, and then the segmented block whose difference is greater than a preset abnormal value is determined as an abnormal block.

[0045] In this step, firstly, the historical defect coefficient corresponding to each segmented block is determined based on the historical inspection image of the workpiece. Specifically, when determining the historical defect distribution coefficient, firstly, the defect detection results corresponding to each segmented block in the historical inspection times c are obtained, that is, whether it is a defective block, where c is a preset number of times. Then, according to the number of times each segmented block is judged as a defective block in the preset inspection times c, analysis is performed to obtain the historical defect coefficient corresponding to each segmented block. Specifically, firstly, the number of times each segmented block is judged as a defective block in the preset inspection times c is marked as Qa, where a is the number of segmented blocks, and a≥1; then the ratio between the number of times each segmented block is judged as a defective block in the preset inspection times c and the preset inspection times c is marked as the historical defect coefficient corresponding to each segmented block, that is, the historical defect coefficient Wi corresponding to each segmented block is calculated by the formula Qa / n=Wi. This coefficient reflects the defect frequency of the block in the past inspection. The larger the historical defect coefficient, the higher the frequency of defects in the corresponding segmented block.

[0046] The historical defect distribution coefficient FA corresponding to the defect coefficient Wi of each segmented block is obtained through discrete calculation, and the defect distribution of the benchmark is reflected through the historical defect distribution coefficient; The specific method of discrete calculation is:

[0047] Where Wi is the historical defect coefficient, FA is the historical defect distribution coefficient, a is the number of segmented blocks, Wp is the mean of the historical defect coefficient, and a≥i≥1.

[0048] After determining the abnormal block, the working parameters of the abnormal block can be obtained, and then the working parameters of the abnormal block can be adjusted based on the historical working parameters of the abnormal block. Specifically, the absolute value of the difference between the historical defect distribution coefficient and the real-time defect distribution coefficient is analyzed, and then the distribution abnormality signal is generated based on the analysis result. Specifically, by |FA-FB|=BI, the absolute value BI of the difference between the historical defect distribution coefficient and the real-time defect distribution coefficient can be obtained. When BI is greater than Y1, a distribution abnormality signal is generated. The generation of a distribution abnormality signal indicates that the distribution position of the workpiece defect in each segmented block is abnormal, that is, the defect distribution position on the workpiece changes abnormally. When BI is less than or equal to Y1, the task is not abnormal and no processing is performed. Y1 is the preset first abnormal value. The specific value is set by relevant personnel according to actual needs, and the embodiment of the present invention does not limit this.

[0049] In another embodiment, after generating a distribution abnormality signal, the absolute value of the difference between the real-time defect coefficient and the historical defect coefficient of each segmented block is obtained. When the absolute value of the difference is large, the corresponding segmented block is marked as an abnormal block. Specifically, for each segmented block, the absolute value of the difference between the real-time defect coefficient Bi and the historical defect coefficient Wi is calculated by the formula |Wi-Bi|=Ra. When Ra is greater than the threshold value Y2, it is judged that the difference is not within the normal fluctuation range, and the segmented block is marked as an abnormal block. Otherwise, no processing is performed. The threshold value Y2 is a preset second abnormal value. The specific value is set by relevant personnel according to actual needs, and the embodiment of the present invention is not limited to this.

[0050] For the blocks marked as abnormal, the operation data of the manufacturing equipment performing a predetermined number of detections b times on each abnormal block is obtained. The operation data may include at least one of the equipment temperature, pressure and speed. Of course, other data types may also be added according to the actual operation conditions. The embodiment of the present invention does not limit this. The following description is given by taking the operation data including the equipment temperature, pressure and speed as an example.

[0051] The average value of the equipment temperature, pressure and speed when the manufacturing equipment performs a predetermined number of detections b times of manufacturing operations on each abnormal block is used as the abnormal equipment temperature, pressure and speed corresponding to each abnormal block, and at the same time, the standard data when the same manufacturing equipment performs e times of manufacturing operations on the corresponding blocks of each abnormal block under standard working conditions is obtained, and the standard data includes equipment temperature, pressure and speed, e is a preset value, and the specific value is set by relevant personnel according to actual needs, and the embodiment of the present invention does not limit this. Then, the average value of the equipment temperature, pressure and speed when the manufacturing equipment performs e times of manufacturing operations on the corresponding blocks of each abnormal block is used as the standard equipment temperature, pressure and speed of the corresponding blocks of each abnormal block, and then the difference between the standard equipment temperature, pressure and speed of the corresponding blocks of each abnormal block and the abnormal equipment temperature, pressure and speed corresponding to each abnormal block is calculated, as well as the corresponding parameter differences of the manufacturing equipment when performing manufacturing operations on each abnormal block, and then according to the corresponding parameter differences of each abnormal block, the corresponding parameters of the manufacturing equipment when performing manufacturing operations on each abnormal block are compensatory control and adjustment.

[0052] In one example, when the parameter difference is positive, the corresponding parameter is increased and adjusted according to the corresponding value of the parameter difference, and when the parameter difference is negative, the corresponding parameter is decreased and adjusted according to the corresponding value of the parameter difference; if the temperature parameter difference of an abnormal block is positive, the pressure parameter difference is negative, and the speed parameter is 0, then when the manufacturing equipment performs a manufacturing operation on the block, the temperature parameter of the manufacturing equipment is increased according to the temperature parameter difference value, the pressure parameter of the manufacturing equipment is decreased according to the pressure parameter difference, and the speed parameter is not processed, thereby achieving the purpose of corresponding compensatory control and adjustment of various parameters of the manufacturing equipment when the manufacturing equipment performs a manufacturing operation on the abnormal block.

[0053] By using the machine vision-based exception handling method provided in the embodiment of the present invention, intelligent production process control can be achieved. By combining machine vision technology and data analysis methods, the anomalies in the defect distribution positions in the workpiece manufacturing process can be accurately analyzed and discovered in a timely manner, and the parameters of the manufacturing equipment can be compensatory controlled and adjusted in a timely manner when performing production operations on abnormal blocks, thereby optimizing the production process, thereby ensuring product quality and improving production efficiency.

[0054] The following is a description of the exception handling device based on machine vision provided by the present invention. The exception handling device based on machine vision described below and the exception handling method based on machine vision described above can be referred to each other.

[0055] like Figure 2 As shown, the machine vision-based exception handling device 200 provided by the present invention includes the following modules: An acquisition module 201 is used to acquire multiple segmentation blocks for multiple inspections of a workpiece; A first determination module 202 is used to determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The second determination module 203 is used to determine the abnormal image block according to the real-time defect distribution coefficient corresponding to each segmented image block and the historical defect distribution coefficient corresponding to each segmented image block.

[0056] According to a machine vision-based exception handling device provided by the present invention, the acquisition module 201 is specifically used for: Acquire multiple inspection images for multiple inspections of the workpiece; Each detection image is segmented to obtain multiple segmentation blocks.

[0057] According to a machine vision-based exception handling device provided by the present invention, the first determination module 202 is specifically used for: Determine a real-time defect coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The real-time defect distribution coefficient corresponding to each segmented image block is determined based on the real-time defect coefficient.

[0058] According to the machine vision-based exception handling device provided by the present invention, the first determination module 202 is specifically used to determine the real-time defect distribution coefficient corresponding to each segmented image block according to the following formula: ; Wherein, Bi is the real-time defect coefficient, FB is the real-time defect distribution coefficient, a is the number of segmented blocks, Bp is the mean value of the real-time defect coefficient, and a≥i≥1.

[0059] According to the machine vision-based exception handling device provided by the present invention, the second determination module 203 is further used for: Determine the historical defect coefficient corresponding to each segmented image block based on the historical inspection image of the workpiece; The historical defect distribution coefficient is determined using the historical defect coefficient according to the following formula: ; Wherein, Wi is the historical defect coefficient, FA is the historical defect distribution coefficient, a is the number of segmented blocks, Wp is the mean of the historical defect coefficient, and a≥i≥1.

[0060] According to the machine vision-based exception handling device provided by the present invention, the second determination module 203 is specifically used for: Determine the difference between the real-time defect distribution coefficient corresponding to each segmented image block and the historical defect distribution coefficient corresponding to each segmented image block; The segmented blocks whose difference values ​​are greater than a preset abnormal value are determined as abnormal blocks.

[0061] According to the machine vision-based exception handling device provided by the present invention, the second determination module 203 is specifically used for: Get the working parameters of the abnormal block; Based on the historical working parameters of the abnormal block, the working parameters of the abnormal block are adjusted.

[0062] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communications interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the exception handling method based on machine vision, and the method includes: Obtain multiple segmentation blocks for multiple inspections of the workpiece; Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The abnormal blocks are determined according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0063] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0064] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the machine vision-based exception handling method provided by the above methods, the method comprising: Obtain multiple segmentation blocks for multiple inspections of the workpiece; Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The abnormal blocks are determined according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0065] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the machine vision-based exception handling method provided by the above methods, the method comprising: Obtain multiple segmentation blocks for multiple inspections of the workpiece; Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in multiple inspections; The abnormal blocks are determined according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

[0066] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for handling exceptions based on machine vision, characterized in that: The method comprises: Obtain multiple segmentation blocks for multiple inspections of the workpiece; Determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in the multiple inspections; The abnormal block is determined according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

2. The machine vision-based exception handling method according to claim 1, characterized in that: The step of obtaining a plurality of segmented image blocks for multiple inspections of the workpiece includes: Acquire multiple inspection images of the workpiece for multiple inspections; Each of the detection images is segmented to obtain a plurality of segmented image blocks.

3. The machine vision-based exception handling method according to claim 2, characterized in that: The determining, based on the number of times each segmented image block is marked as a defective image block in the multiple detections, a real-time defect distribution coefficient corresponding to each segmented image block includes: Determine a real-time defect coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in the multiple detections; A real-time defect distribution coefficient corresponding to each of the segmented blocks is determined based on the real-time defect coefficient.

4. The machine vision-based exception handling method according to claim 3, characterized in that: The determining the real-time defect distribution coefficient corresponding to each segmented block based on the real-time defect coefficient includes: The real-time defect distribution coefficient corresponding to each segmented image block is determined according to the following formula: Wherein, Bi is the real-time defect coefficient, FB is the real-time defect distribution coefficient, a is the number of segmented blocks, Bp is the mean value of the real-time defect coefficient, and a≥i≥1.

5. The machine vision-based exception handling method according to claim 4, characterized in that: Before determining the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block, the method further includes: Determining a historical defect coefficient corresponding to each of the segmented blocks based on a historical inspection image of the workpiece; The historical defect distribution coefficient is determined using the historical defect coefficient according to the following formula: Wherein, Wi is the historical defect coefficient, FA is the historical defect distribution coefficient, a is the number of segmented blocks, Wp is the mean value of the historical defect coefficient, and a≥i≥1.

6. The machine vision-based exception handling method according to claim 5, characterized in that: The determining of the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block comprises: Determine a difference between a real-time defect distribution coefficient corresponding to each segmented image block and a historical defect distribution coefficient corresponding to each segmented image block; The segmented image block whose difference value is greater than a preset abnormal value is determined as the abnormal image block.

7. The machine vision-based exception handling method according to claim 1, characterized in that: The method further comprises: Obtaining working parameters of the abnormal block; Based on the historical operating parameters of the abnormal block, the operating parameters of the abnormal block are adjusted.

8. An abnormality handling device based on machine vision, characterized in that: include: An acquisition module, used for acquiring a plurality of segmentation blocks for multiple inspections of a workpiece; A first determination module, configured to determine a real-time defect distribution coefficient corresponding to each segmented image block based on the number of times each segmented image block is marked as a defective image block in the multiple detections; The second determination module is used to determine the abnormal block according to the real-time defect distribution coefficient corresponding to each segmented block and the historical defect distribution coefficient corresponding to each segmented block.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the machine vision-based exception handling method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the machine vision-based exception handling method as claimed in any one of claims 1 to 7 is implemented.