Industrial camera defect classification method based on priority

By adopting a priority-based defect classification method in industrial camera surface detection, using image filters and defect type quick lookup tables to quickly determine defect types, solving the problem of low efficiency in complex defect classification in the prior art, and achieving efficient and real-time defect classification.

CN114240833BActive Publication Date: 2025-05-23HANGZHOU BAIZIJIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111325508.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-05-23
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In industrial camera surface detection, it is difficult for the prior art to effectively classify defects with extremely different shapes and grayscales, and the back-end offline processing efficiency is low, which cannot meet the needs of real-time feedback.

Method used

The priority-based industrial camera defect classification method is adopted to obtain the size of the defect, trigger a preset image filter group, and quickly determine the defect type by combining the defect type quick lookup table. This method defines a variety of filters and grayscale threshold groups, and uses two-dimensional geometry and grayscale features for rapid classification.

Benefits of technology

It realizes rapid and effective classification of industrial camera defects, improves real-time defect classification capabilities, and meets the needs of dynamic feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114240833B_ABST
    Figure CN114240833B_ABST
Patent Text Reader

Abstract

The present invention relates to a priority-based industrial camera defect classification method. It is applicable to the field of industrial camera surface detection. The technical solution adopted by the present invention is: a priority-based industrial camera defect classification method, characterized in that: defects identified from product images are obtained and the size of the defects is determined; based on the size of the defects, one or more parallel processing filters are triggered from a preset image filter group, each filter defines a two-dimensional geometric shape and is provided with a set of grayscale threshold groups; based on the geometric shape of the defect triggering filter and the grayscale threshold range corresponding to the defect, the defect type is quickly determined in combination with a preset defect type quick lookup table, wherein the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority. The image filter group defines a 256x256 pixel background reference filter and an 8x8 pixel point filter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a priority-based industrial camera defect classification method, which is applicable to the field of industrial camera surface detection. Background Art

[0002] In industrial camera surface inspection applications, we often encounter situations where defects need to be classified and identified. Since the shapes and grayscales of actual defects vary greatly and are very complex, it is difficult to classify them using relatively simple models. At the same time, the conventional back-end offline processing methods are also inefficient and have long delays, and cannot meet many real-time requirements for dynamic feedback based on defect types. Summary of the invention

[0003] The technical problem to be solved by the present invention is: in view of the above-mentioned existing problems, a priority-based industrial camera defect classification method is provided to classify defects simply, quickly and effectively.

[0004] The technical solution adopted by the present invention is: a priority-based industrial camera defect classification method, characterized in that:

[0005] Obtain defects identified from product images and determine the size of the defects;

[0006] triggering one or more parallel processing filters from a preset image filter bank based on the size of the defect, each filter defining a two-dimensional geometric shape and having a set of grayscale thresholds;

[0007] Based on the geometric shape of the filter triggered by the defect and the grayscale threshold range corresponding to the defect, the defect type is quickly determined in combination with a preset defect type quick lookup table, where the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority.

[0008] The image filter group defines a background reference filter of 256x256 pixels and a point filter of 8x8 pixels.

[0009] The image filter group further defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.

[0010] The grayscale threshold group includes -255 to -180, -180 to -80, -80 to 80, 80 to 180 and 180 to 255;

[0011] When the defect grayscale is between -255 and -180, it is judged as a very dark defective pixel; -180 to -80 is a dark defective pixel; -80 to 80 is a normal pixel; 80 to 180 is a bright defective pixel; 180 to 255 is a very bright defective pixel.

[0012] A priority-based industrial camera defect classification device, characterized by:

[0013] A defect acquisition module, used to acquire defects identified from product images and determine the size of the defects;

[0014] A filter triggering module, for triggering one or more parallel processed filters from a preset image filter group based on the size of the defect, each filter defining a two-dimensional geometric shape and having a set of grayscale threshold groups;

[0015] The defect type determination module is used to quickly determine the defect type based on the geometric shape of the filter triggered by the defect and the grayscale threshold range corresponding to the defect, combined with a preset defect type quick lookup table, where the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority.

[0016] The image filter group defines a background reference filter of 256x256 pixels and a point filter of 8x8 pixels.

[0017] The image filter group further defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.

[0018] The grayscale threshold group includes -255 to -180, -180 to -80, -80 to 80, 80 to 180 and 180 to 255;

[0019] When the defect grayscale is between -255 and -180, it is judged as a very dark defective pixel; -180 to -80 is a dark defective pixel; -80 to 80 is a normal pixel; 80 to 180 is a bright defective pixel; 180 to 255 is a very bright defective pixel.

[0020] A storage medium stores a computer program executable by a processor, wherein the computer program implements the steps of the priority-based industrial camera defect classification method when executed.

[0021] A defect classification device comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and is characterized in that when the computer program is executed, the steps of the priority-based industrial camera defect classification method are implemented.

[0022] The beneficial effects of the present invention are as follows: the present invention triggers a filter based on the defect size, determines the defect shape and grayscale features through the filter, and quickly determines the defect type from a defect type quick lookup table based on the shape and grayscale features.

[0023] The present invention uses a two-dimensional matrix array to quickly and efficiently process predefined defect classifications, and greatly improves the real-time defect classification capability of a surface inspection system based on machine vision by using multi-channel (corresponding to multiple filters) processing and a built-in fast lookup table (LUT). BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A flowchart for quickly looking up a table in an embodiment.

[0025] Figure 2 A flowchart of an embodiment. DETAILED DESCRIPTION

[0026] This embodiment is a priority-based industrial camera defect classification method, which specifically includes the following steps:

[0027] S1. Obtain the defects identified from the product image and determine the size of the defects;

[0028] S2, triggering one or more parallel processing filters from a preset image filter group based on the size of the defect, each filter defining a two-dimensional geometric shape and having a set of grayscale threshold groups;

[0029] S3. Based on the geometric shape of the trigger filter of the defect and the grayscale threshold range corresponding to the defect, the defect type is quickly determined in combination with a preset defect type quick lookup table, wherein the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority.

[0030] This embodiment predefines a set of image filter groups, which enhance defects from a geometric dimension, with the unit being pixels. This example defines a background reference filter (256x256) and a point filter (8x8), and then defines multiple specific shape filters (according to specific scenarios and requirements). This example also defines a vertical stripe filter (8x64) and a horizontal stripe filter (64x8);

[0031] Setting the grayscale threshold can make the system ignore most of the grayscale information and reduce the amount of data processing. It is a key factor in the detection strategy of the high-speed line scan system. In this embodiment, a group of grayscale threshold groups are set for each filter. The commonly used method is to divide the grayscale levels of -255 to +255 (8-bit image) into five intervals with 4 thresholds, such as: -180<-80<80<180. In this way, the pixels in the first interval (-255 to -180) can be judged as very dark defective pixels; (-180 to -80) are dark defective pixels; (-80 to 80) are acceptable normal pixels; (80 to 180) are bright defective pixels; (180 to 255) are very bright defective pixels.

[0032] This embodiment sets priorities between threshold groups of multiple filters. When the system detects a defect, it may trigger multiple filters set in the image filter group according to its size. If more than one filter threshold is triggered, the order set in the priority logic determines which filter is used to determine the defect type first. The usual order is as follows:

[0033] Dark spot = 1

[0034] Highlights = 2

[0035] Dark longitudinal defects = 3

[0036] Dark lateral defects = 4

[0037] The filter thresholds set according to the priority levels are organized into a two-dimensional defect type lookup table and stored in the built-in storage of the FPGA.

[0038] After the image captured by the camera is two-dimensionally filtered, the source image enters the filter processing flow in the FPGA and enters multiple different filter pipelines. Each pipeline is processed in parallel. The FPGA determines which threshold group is applicable to a specific pixel by quickly matching the pre-processed image with the quick lookup table, thereby quickly determining the defect type.

[0039] The present embodiment also provides a priority-based industrial camera defect classification device, including a defect acquisition module, a filter trigger module and a defect type determination module, wherein the defect acquisition module is used to acquire defects identified from product images and determine the size of the defects; the filter trigger module is used to trigger one or more filters from a preset image filter group based on the size of the defect, each filter defines a two-dimensional geometric shape and is provided with a set of grayscale threshold groups; the defect type determination module is used to quickly determine the defect type based on the geometric shape of the defect triggering the filter and the grayscale threshold range corresponding to the defect, combined with a preset defect type quick lookup table based on shape and grayscale.

[0040] This embodiment also provides a storage medium on which a computer program that can be executed by a processor is stored. When the computer program is executed, the steps of the priority-based industrial camera defect classification method in this example are implemented.

[0041] This embodiment also provides a defect classification device, which has a memory and a processor, and the memory stores a computer program that can be executed by the processor. When the computer program is executed, the steps of the priority-based industrial camera defect classification method in this example are implemented.

Claims

1. A priority-based industrial camera defect classification method, Features: Obtain defects identified from product images and determine the size of the defects; triggering one or more filters from a preset image filter set based on the size of the defect, each filter defining a two-dimensional geometric shape and having a set of grayscale thresholds; Based on the geometric shape of the filter triggered by the defect and the grayscale threshold range corresponding to the defect, the defect type is quickly determined in combination with a preset defect type quick lookup table, where the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority; The image filter group defines a background reference filter of 256x256 pixels and a point filter of 8x8 pixels.

2. The priority-based industrial camera defect classification method according to claim 1, Features: The image filter group further defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.

3. The priority-based industrial camera defect classification method according to claim 1, Features: The grayscale threshold group includes -255~-180, -180~-80, -80~80, 80~180 and 180~255; When the defect grayscale is between -255 and -180, it is judged as a very dark defective pixel; -180 to -80 is a dark defective pixel; -80 to 80 is a normal pixel; 80 to 180 is a bright defective pixel; 180 to 255 is a very bright defective pixel.

4. A priority-based industrial camera defect classification device, Features: A defect acquisition module, used to acquire defects identified from product images and determine the size of the defects; A filter triggering module, for triggering one or more filters from a preset image filter group based on the size of the defect, each filter defining a two-dimensional geometric shape and having a set of grayscale threshold groups; A defect type determination module is used to quickly determine the defect type based on the geometric shape of the filter triggered by the defect and the grayscale threshold range corresponding to the defect, combined with a preset defect type quick lookup table, where the defect type quick lookup table includes two-dimensional data consisting of defect shape and grayscale threshold and corresponding priority; The image filter group defines a background reference filter of 256x256 pixels and a point filter of 8x8 pixels.

5. The priority-based industrial camera defect classification device according to claim 4, Features: The image filter group further defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.

6. The priority-based industrial camera defect classification device according to claim 4, Features: The grayscale threshold group includes -255~-180, -180~-80, -80~80, 80~180 and 180~255; When the defect grayscale is between -255 and -180, it is judged as a very dark defective pixel; -180 to -80 is a dark defective pixel; -80 to 80 is a normal pixel; 80 to 180 is a bright defective pixel; 180 to 255 is a very bright defective pixel.

7. A storage medium having stored thereon a computer program executable by a processor, Features: When the computer program is executed, the steps of the priority-based industrial camera defect classification method described in any one of claims 1 to 3 are implemented.

8. A defect classification device comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, Features: When the computer program is executed, the steps of the priority-based industrial camera defect classification method described in any one of claims 1 to 3 are implemented.