CN114240833A - Industrial camera defect classification method based on priority - Google Patents

Industrial camera defect classification method based on priority Download PDF

Info

Publication number
CN114240833A
CN114240833A CN202111325508.5A CN202111325508A CN114240833A CN 114240833 A CN114240833 A CN 114240833A CN 202111325508 A CN202111325508 A CN 202111325508A CN 114240833 A CN114240833 A CN 114240833A
Authority
CN
China
Prior art keywords
defect
filter
priority
industrial camera
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111325508.5A
Other languages
Chinese (zh)
Inventor
葛铭
沈井学
魏江
尹广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Baizijian Technology Co ltd
Original Assignee
Hangzhou Baizijian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Baizijian Technology Co ltd filed Critical Hangzhou Baizijian Technology Co ltd
Priority to CN202111325508.5A priority Critical patent/CN114240833A/en
Publication of CN114240833A publication Critical patent/CN114240833A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a priority-based industrial camera defect classification method. The method is suitable for the field of industrial camera surface detection. The technical scheme adopted by the invention is as follows: a method for classifying industrial camera defects based on priority is characterized by comprising the following steps: acquiring a defect identified from a product image, and determining the size of the defect; 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 geometry and having a set of grayscale threshold values; and based on the geometric shape of the trigger filter of the defect and the gray threshold range corresponding to the defect, combining a preset defect type quick look-up table to quickly judge the type of the defect, wherein the defect type quick look-up table comprises two-dimensional data consisting of the shape of the defect and the gray threshold and corresponding priority. The image filter bank is defined with a background reference filter of 256x256 pixels and an 8x8 pixel point filter.

Description

Industrial camera defect classification method based on priority
Technical Field
The invention relates to a priority-based industrial camera defect classification method. The method is suitable for the field of industrial camera surface detection.
Background
In industrial camera surface inspection applications, situations are often encountered in which defects need to be classified and identified, and due to the fact that the shapes and gray scales of actual defects are very different and complex, classification using a relatively simple pattern is difficult. Meanwhile, the conventionally used rear-end off-line processing method has low efficiency and long time delay, and cannot meet the real-time requirement of dynamically feeding back according to defect types.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: in view of the above existing problems, a method for classifying defects of an industrial camera based on priority is provided to simply, quickly and effectively classify the defects.
The technical scheme adopted by the invention is as follows: a method for classifying industrial camera defects based on priority is characterized by comprising the following steps:
acquiring a defect identified from a product image, and determining the size of the defect;
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 geometry and having a set of grayscale threshold values;
and based on the geometric shape of the trigger filter of the defect and the gray threshold range corresponding to the defect, combining a preset defect type quick look-up table to quickly judge the type of the defect, wherein the defect type quick look-up table comprises two-dimensional data consisting of the shape of the defect and the gray threshold and corresponding priority.
The image filter bank is defined with a background reference filter of 256x256 pixels and an 8x8 pixel point filter.
The image filter bank also defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.
The gray threshold value set comprises-255 to-180, -180 to-80, -80 to 80, 80 to 180 and 180 to 255;
when the defect gray scale is between-255 and-180, judging the defect pixel to be very dark; dark defective pixels in-180 to-80; 80-80 are normal pixels; 80-180 bright defective pixels; 180-255 are very bright defective pixels.
The utility model provides an industry camera defect classification device based on priority which characterized in that:
the defect acquisition module is used for acquiring the defects identified from the product image and determining the sizes of the defects;
the filter triggering module is used for triggering one or more parallel processing filters from a preset image filter group based on the size of the defect, and each filter defines a two-dimensional geometric shape and is provided with a group of gray threshold value groups;
and the defect type judging module is used for quickly judging the type of the defect by combining a preset defect type lookup table based on the geometric shape of the trigger filter of the defect and the gray threshold range corresponding to the defect, wherein the defect type lookup table comprises two-dimensional data consisting of the shape of the defect and the gray threshold and corresponding priority.
The image filter bank is defined with a background reference filter of 256x256 pixels and an 8x8 pixel point filter.
The image filter bank also defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.
The gray threshold value set comprises-255 to-180, -180 to-80, -80 to 80, 80 to 180 and 180 to 255;
when the defect gray scale is between-255 and-180, judging the defect pixel to be very dark; dark defective pixels in-180 to-80; 80-80 are normal pixels; 80-180 bright defective pixels; 180-255 are very bright defective pixels.
A storage medium having stored thereon a computer program executable by a processor, the computer program comprising: the computer program when executed implements the steps of the priority-based industrial camera defect classification method.
A defect classification apparatus having a memory and a processor, the memory having stored thereon a computer program executable by the processor, characterized by: the computer program when executed implements the steps of the priority-based industrial camera defect classification method.
The invention has the beneficial effects that: the invention triggers a filter based on the defect size, determines the defect shape and the gray characteristic through the filter, and quickly judges the defect type from a defect type quick look-up table based on the shape and the gray characteristic.
The present invention greatly improves the real-time defect classification capability of machine vision based surface inspection systems by employing a two-dimensional matrix array to quickly and efficiently process predefined defect classifications, by using multi-pass (corresponding to multiple filters) processing and built-in fast look-up tables (LUTs).
Drawings
FIG. 1 is a flow chart of fast lookup table formation in an embodiment.
FIG. 2 is a flow chart of an embodiment.
Detailed Description
The embodiment is a method for classifying defects of an industrial camera based on priority, which specifically comprises the following steps:
s1, acquiring the defect identified from the product image, and determining the size of the defect;
s2, triggering one or more parallel processing filters from a preset image filter group based on the size of the defect, wherein each filter defines a two-dimensional geometric shape and is provided with a group of gray threshold groups;
s3, based on the geometry of the trigger filter and the gray threshold range corresponding to the defect, combining a preset defect type lookup table to quickly judge the defect type, wherein the defect type lookup table comprises two-dimensional data consisting of the defect shape and the gray threshold and corresponding priority.
The embodiment predefines a set of image filter banks, which are used for enhancing defects in geometric dimensions and have the unit of pixels, and defines a background reference filter (256x256) and a point filter (8x8), and then defines a plurality of specific shape filters (according to specific scenes and requirements), and also defines a vertical strip filter (8x64) and a horizontal strip filter (64x 8);
setting the gray threshold value can enable the system to ignore most gray information and reduce the data processing amount, and is a key factor in a high-speed line scanning system detection strategy. In the embodiment, a set of gray threshold values is set for each filter, and a common method is to divide-255 to +255 gray levels (8-bit image) into five regions by 4 threshold values, such as: -180< -80<80<180 so that defective pixels in the first interval (-255 to-180) can be judged to be very dark; -180 to-80) are dark defective pixels; (-80) are acceptable normal pixels; (80-180) a bright defective pixel; (180-255) are very bright defective pixels.
This embodiment prioritizes between threshold sets of filters, and when the system detects a defect, depending on its size, may trigger multiple filters arranged in the image filter bank, and if more than one filter threshold triggers, the order set in the priority logic determines which filter was used first to determine the defect type. The general sequence is as follows:
dark spot 1
Bright point 2
Dark longitudinal defect 3
Dark lateral defect 4
The filter threshold value set according to the priority level can be organized into a two-dimensional defect type quick look-up table and stored in the built-in storage of the FPGA.
When an image acquired by a camera is subjected to two-dimensional filtering, a source image enters a filter processing flow in an FPGA and respectively enters a plurality of different filter pipelines, each pipeline is subjected to parallel processing, and the FPGA determines which threshold value group is suitable for a specific pixel through rapid matching of a quick look-up table on the preprocessed image, so that the defect type is rapidly judged.
The embodiment also provides a priority-based industrial camera defect classification device, which comprises a defect acquisition module, a filter triggering module and a defect type judgment module, wherein the defect acquisition module is used for acquiring the defects identified from the product image and determining the sizes of the defects; the filter triggering module is used for triggering one or more filters from a preset image filter group based on the size of the defect, and each filter defines a two-dimensional geometric shape and is provided with a group of gray threshold value groups; and the defect type judging module is used for quickly judging the defect type by combining a preset defect type quick look-up table based on the shape and the gray scale based on the geometric shape of the trigger filter of the defect and the gray scale threshold range corresponding to the defect.
The present embodiment also provides a storage medium having stored thereon a computer program executable by a processor, the computer program when executed implementing the steps of the priority-based industrial camera defect classification method in this example.
The present embodiment also provides a defect classification device having a memory and a processor, the memory having stored thereon a computer program executable by the processor, the computer program when executed implementing the steps of the priority-based industrial camera defect classification method in this example.

Claims (10)

1. A method for classifying industrial camera defects based on priority is characterized by comprising the following steps:
acquiring a defect identified from a product image, and determining the size of the defect;
triggering one or more filters from a preset image filter set based on the size of the defect, each filter defining a two-dimensional geometry and having a set of grayscale threshold values;
and based on the geometric shape of the trigger filter of the defect and the gray threshold range corresponding to the defect, combining a preset defect type quick look-up table to quickly judge the type of the defect, wherein the defect type quick look-up table comprises two-dimensional data consisting of the shape of the defect and the gray threshold and corresponding priority.
2. The priority-based industrial camera defect classification method according to claim 1, characterized in that: the image filter bank is defined with a background reference filter of 256x256 pixels and an 8x8 pixel point filter.
3. The priority-based industrial camera defect classification method according to claim 2, characterized in that: the image filter bank also defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.
4. The priority-based industrial camera defect classification method according to claim 1, characterized in that: the gray threshold value set comprises-255 to-180, -180 to-80, -80 to 80, 80 to 180 and 180 to 255;
when the defect gray scale is between-255 and-180, judging the defect pixel to be very dark; dark defective pixels in-180 to-80; 80-80 are normal pixels; 80-180 bright defective pixels; 180-255 are very bright defective pixels.
5. The utility model provides an industry camera defect classification device based on priority which characterized in that:
the defect acquisition module is used for acquiring the defects identified from the product image and determining the sizes of the defects;
the filter triggering module is used for triggering one or more filters from a preset image filter group based on the size of the defect, and each filter defines a two-dimensional geometric shape and is provided with a group of gray threshold value groups;
and the defect type judging module is used for quickly judging the type of the defect by combining a preset defect type lookup table based on the geometric shape of the trigger filter of the defect and the gray threshold range corresponding to the defect, wherein the defect type lookup table comprises two-dimensional data consisting of the shape of the defect and the gray threshold and corresponding priority.
6. The priority-based industrial camera defect classification device according to claim 5, wherein: the image filter bank is defined with a background reference filter of 256x256 pixels and an 8x8 pixel point filter.
7. The priority-based industrial camera defect classification device according to claim 6, wherein: the image filter bank also defines a vertical stripe filter of 8x64 pixels and a horizontal stripe filter of 64x8 pixels.
8. The priority-based industrial camera defect classification method according to claim 5, characterized in that: the gray threshold value set comprises-255 to-180, -180 to-80, -80 to 80, 80 to 180 and 180 to 255;
when the defect gray scale is between-255 and-180, judging the defect pixel to be very dark; dark defective pixels in-180 to-80; 80-80 are normal pixels; 80-180 bright defective pixels; 180-255 are very bright defective pixels.
9. A storage medium having stored thereon a computer program executable by a processor, the computer program comprising: the computer program when executed performs the steps of the priority based industrial camera defect classification method of any of claims 1 to 4.
10. A defect classification apparatus having a memory and a processor, the memory having stored thereon a computer program executable by the processor, characterized by: the computer program when executed performs the steps of the priority based industrial camera defect classification method of any of claims 1 to 4.
CN202111325508.5A 2021-11-10 2021-11-10 Industrial camera defect classification method based on priority Pending CN114240833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111325508.5A CN114240833A (en) 2021-11-10 2021-11-10 Industrial camera defect classification method based on priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111325508.5A CN114240833A (en) 2021-11-10 2021-11-10 Industrial camera defect classification method based on priority

Publications (1)

Publication Number Publication Date
CN114240833A true CN114240833A (en) 2022-03-25

Family

ID=80748880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111325508.5A Pending CN114240833A (en) 2021-11-10 2021-11-10 Industrial camera defect classification method based on priority

Country Status (1)

Country Link
CN (1) CN114240833A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0742431A1 (en) * 1995-05-10 1996-11-13 Mahlo GmbH &amp; Co. KG Method and apparatus for detecting flaws in moving fabrics or the like
CN110766095A (en) * 2019-11-01 2020-02-07 易思维(杭州)科技有限公司 Defect detection method based on image gray level features
CN111402236A (en) * 2020-03-17 2020-07-10 北京科技大学 Hot-rolled strip steel surface defect grading method based on image gray value
CN112241699A (en) * 2020-10-13 2021-01-19 无锡先导智能装备股份有限公司 Object defect category identification method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0742431A1 (en) * 1995-05-10 1996-11-13 Mahlo GmbH &amp; Co. KG Method and apparatus for detecting flaws in moving fabrics or the like
CN110766095A (en) * 2019-11-01 2020-02-07 易思维(杭州)科技有限公司 Defect detection method based on image gray level features
CN111402236A (en) * 2020-03-17 2020-07-10 北京科技大学 Hot-rolled strip steel surface defect grading method based on image gray value
CN112241699A (en) * 2020-10-13 2021-01-19 无锡先导智能装备股份有限公司 Object defect category identification method and device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
QIWU LUO等: "Automated Visual Defect Classification for Flat Steel Surface: A Survey", IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, vol. 69, no. 12, 12 October 2020 (2020-10-12), pages 9329, XP011819810, DOI: 10.1109/TIM.2020.3030167 *
王胜春;戴鹏;袁伟民;杜馨瑜;王昊;: "粗糙集理论在钢轨表面缺陷分类中的应用", 铁道建筑, no. 09, 20 September 2018 (2018-09-20) *
范剑英等: "电机铜排表面毛刺缺陷检测技术研究", 仪器仪表学报, vol. 40, no. 3, 31 March 2019 (2019-03-31), pages 14 - 22 *

Similar Documents

Publication Publication Date Title
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
US7257267B2 (en) Method and system for image segmentation
US7373018B2 (en) Method and system for object recognition using fractal maps
CN109685760B (en) MATLAB-based SLM powder bed powder laying image convex hull depression defect detection method
CN109859181A (en) A kind of PCB welding point defect detection method
CN109727233B (en) LCD defect detection method
JP2007235951A (en) Vehicle image recognition apparatus and its method
CN108647706B (en) Article identification classification and flaw detection method based on machine vision
CN114219794B (en) Method and system for evaluating surface quality of shaving board based on machine vision
CN116559183B (en) Method and system for improving defect judging efficiency
CN112686890A (en) Artificial board surface defect detection method based on singular value decomposition
CN116630304B (en) Lithium battery mold processing detection method and system based on artificial intelligence
CN110648330B (en) Defect detection method for camera glass
CN106780464A (en) A kind of fabric defect detection method based on improvement Threshold segmentation
CN110070523B (en) Foreign matter detection method for bottle bottom
CN113506246B (en) Concrete 3D printing component fine detection method based on machine vision
CN113838043A (en) Machine vision-based quality analysis method in metal foil manufacturing
CN114463314A (en) Wafer defect detection method and system based on color difference shadow model
CN108805854B (en) Method for rapidly counting tablets and detecting completeness of tablets in complex environment
CN110060239B (en) Defect detection method for bottle opening of bottle
CN114240833A (en) Industrial camera defect classification method based on priority
CN117351001A (en) Surface defect identification method for regenerated aluminum alloy template
CN107967690B (en) Self-adaptive ferrographic abrasive particle image binarization processing method
CN109584212B (en) MATLAB-based SLM powder bed powder laying image scratch defect identification method
CN115205193A (en) Steel plate surface defect detection method based on microdefect YOLO network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination