CN110567968A - part defect detection method and device - Google Patents

part defect detection method and device Download PDF

Info

Publication number
CN110567968A
CN110567968A CN201910831630.6A CN201910831630A CN110567968A CN 110567968 A CN110567968 A CN 110567968A CN 201910831630 A CN201910831630 A CN 201910831630A CN 110567968 A CN110567968 A CN 110567968A
Authority
CN
China
Prior art keywords
image
polarization
target sub
light source
camera
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
CN201910831630.6A
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.)
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Original Assignee
Changchun Institute of Optics Fine Mechanics and Physics of CAS
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 Changchun Institute of Optics Fine Mechanics and Physics of CAS filed Critical Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority to CN201910831630.6A priority Critical patent/CN110567968A/en
Publication of CN110567968A publication Critical patent/CN110567968A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • G01N2021/8835Adjustable illumination, e.g. software adjustable screen
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • G01N2021/8848Polarisation of light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Biochemistry (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to a method and a device for detecting part defects, which comprises the following steps: acquiring a first polarization image and a second polarization image; respectively conducting guiding filtering processing on the first polarization image and the second polarization image; taking any sub-image in the first polarization image or the second polarization image after filtering processing as a target sub-image, and judging whether the target sub-image has a defect area by using a filtering kernel; respectively traversing all sub-images of the first polarization image and all sub-images of the second polarization image after filtering processing of the target sub-image to obtain a first binary image corresponding to the first polarization image and a second binary image corresponding to the second polarization image; and fusing the first binary image and the second binary image into a detection result binary image. The invention solves the problem of missing detection caused by low contrast of part defect imaging caused by the illumination problem in the existing part defect detection method or system, and effectively improves the success rate and accuracy of the detection of the defects of the tiny parts in particular.

Description

Part defect detection method and device
Technical Field
The invention relates to the technical field of part detection, in particular to a method and a device for detecting part defects.
background
with the continuous development of the part processing industry, the demand of parts is increasing day by day, and the quality requirements of the part products are stricter and stricter. Because the production and manufacturing process flow of the part is complex, the part is easy to generate some surface defects in the production process, such as scratches, indentations, uneven cutting marks and the like. Therefore, the detection of the defects of the parts is very important, and the durability of the parts, the safety of products and even the safety of human bodies are related.
the traditional part defect detection is mainly manually detected, but some defects of tool marks, indentation or uneven surfaces can be detected only by forming a certain angle between human eyes and a light source, and some tiny cracks and scratches are easy to miss detection. With the increasing demand of part products, the manual detection method cannot meet the requirements of high-quality and high-efficiency part detection. Nowadays, the development of machine vision provides a new direction for a part detection method. However, in the process of part inspection, it is still very challenging to quickly and accurately detect tool marks on the surface of the part, uneven defects on the surface of the part, and surface scratches and cracks of the tiny part. Detecting the defects of tool marks and uneven surfaces, wherein the defects can be detected only by continuously adjusting different relative positions of a light source, a part and a camera; the defect detection difficulty of the tiny parts is that strong reflected light can be generated due to over-strong illumination, so that the defects are covered under the reflected strong light; too weak light can result in underexposure of the part image and defects that are difficult to detect. Therefore, when detecting defects of different part sizes and different types of parts, the illumination intensity of the light source, the resolution of the camera, the design parameters of the lens, the relative positions of the light source, the part and the camera, a processing algorithm of machine vision and the like have high requirements.
Disclosure of Invention
In view of the above, it is necessary to provide a method and an apparatus for detecting a defect of a part, which are capable of easily detecting missing parts by manual inspection and solving the problems of complexity and high requirement of the conventional method and system for detecting a defect of a part by machine vision.
In order to solve the problems, the invention adopts the following technical scheme:
a part defect detection method comprises the following steps:
Step S1: acquiring a first polarization image of a part to be detected shot by a first polarization camera and a second polarization image of the part to be detected shot by a second polarization camera, wherein the first polarization image is the polarization image of the part to be detected when the first polarization camera, the part to be detected and a side polarization light source form an included angle, and the second polarization image is the polarization image of the part to be detected when the second polarization camera and an upper polarization light source are both positioned above the part to be detected;
step S2: respectively conducting guiding filtering processing on the first polarization image and the second polarization image;
Step S3: taking any one of the first polarization image or the second polarization image after filtering as a target sub-image, judging whether the target sub-image has a defect area by using a filtering kernel, if so, converting the target sub-image into a binary image, wherein the gray value of a pixel forming the defect area is 0 or 1; if not, converting the target sub-image into a binary image with the gray values of the pixels being preset values, wherein the preset value is 1 when the gray value of the pixel forming the defect area is 0, or the preset value is 0 when the gray value of the pixel forming the defect area is 1;
step S4: traversing all sub-images of the first polarization image and the second polarization image after filtering processing of the target sub-image respectively to obtain a first binary image corresponding to the first polarization image and a second binary image corresponding to the second polarization image;
Step S5: and fusing the first binary image and the second binary image into a detection result binary image.
Meanwhile, the invention also provides a part defect detection device, which comprises:
The conveying belt is used for conveying the parts to be detected to the discharge port from the feeding port after sequentially passing through the first detection position and the second detection position;
a side polarized light source disposed above the conveyor belt at the first detection position for providing polarized light illumination for a first polarized camera;
the first polarization camera is arranged above the conveyor belt at the first detection position and used for shooting a first polarization image of the part to be detected when the first polarization camera and the part to be detected form an included angle with the side polarization light source;
An upper polarized light source disposed above the conveyor belt at the second inspection position for providing polarized illumination to a second polarized camera;
The second polarization camera is arranged above the conveyor belt at the second detection position and used for shooting a second polarization image of the part to be detected when the second polarization camera and the upper polarization light source are both positioned above the part to be detected;
The rear-end computer is respectively connected with the side polarized light source, the first polarized camera, the upper polarized light source and the second polarized camera and is used for detecting the defects of the part to be detected by using the part defect detection method according to any one of claims 1 to 4 to obtain a defect detection result and displaying the defect detection result.
compared with the prior art, the invention has the following beneficial effects:
the invention provides a part defect detection method and a device, belonging to an on-line detection method and a device, wherein the part defect detection method is characterized in that polarization images of parts to be detected in different polarization directions under the irradiation of different polarization light sources are obtained based on the shooting of a polarization camera, the contrast and the definition of the polarization images are enhanced by carrying out noise reduction and filtering on the polarization images and enhancing the defect area of the polarization images, and finally a detection result binary image of the parts to be detected is obtained. The part defect detection device based on the part defect detection method not only has all the advantages of the method, but also has the advantages of simple structure, high stability, low cost and no need of multiple groups of illumination light sources, and can meet the requirements of high quality and high efficiency of part processing detection.
Drawings
FIG. 1 is a schematic flow chart of a method for detecting defects of a part according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a part defect detecting apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic bottom view of the upper polarized light source and the second polarized camera of the present invention;
FIG. 4 is another bottom view of the upper polarized light source and the second polarized camera of the present invention.
Detailed Description
The technical solution of the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
in one embodiment, as shown in fig. 1, the invention discloses a method for detecting a defect of a part, which comprises the following steps:
Step S1: acquiring a first polarization image of a part to be detected shot by a first polarization camera and a second polarization image of the part to be detected shot by a second polarization camera, wherein the first polarization image is the polarization image of the part to be detected when the first polarization camera and the part to be detected form an included angle with a side polarization light source, and the second polarization image is the polarization image of the part to be detected when the second polarization camera and an upper polarization light source are both positioned above the part to be detected;
step S2: respectively conducting guiding filtering processing on the first polarization image and the second polarization image;
Step S3: taking any one of the first polarization image or the second polarization image after filtering as a target sub-image, judging whether the target sub-image has a defect area by using a filtering kernel, if so, converting the target sub-image into a binary image, wherein the gray value of pixels forming the defect area is 0 or 1; if not, converting the target sub-image into a binary image with the gray values of the pixels being preset values, wherein the preset value is 1 when the gray value of the pixel forming the defect area is 0, or the preset value is 0 when the gray value of the pixel forming the defect area is 1;
Step S4: respectively traversing all sub-images of the first polarization image and all sub-images of the second polarization image after filtering processing of the target sub-image to obtain a first binary image corresponding to the first polarization image and a second binary image corresponding to the second polarization image;
Step S5: and fusing the first binary image and the second binary image into a detection result binary image.
specifically, in step S1, a first polarization image of a part to be detected, which is captured by a first polarization camera, and a second polarization image of the part to be detected, which is captured by a second polarization camera, are first obtained, where the first polarization image is a polarization image of the part to be detected, which is captured by the first polarization camera when the part to be detected and a side polarization light source form an included angle, the side polarization light source provides polarization illumination for the first polarization camera, and the side polarization light source, the part to be detected and the first polarization camera form a certain included angle, and the value of the included angle is different according to the type of the part to be detected; the second polarization image is a polarization image of the same part to be detected, which is shot by the second polarization camera when the second polarization camera and the upper polarization light source are both positioned above the part to be detected, and the upper polarization light source is positioned between the part to be detected and the second polarization camera and used for providing polarization illumination for the second polarization camera.
In step S2, the first polarization image and the second polarization image are respectively subjected to guiding filtering processing to improve the contrast of the defect region, so as to obtain the first polarization image and the second polarization image after filtering processing.
and judging the sub-image of each polarization image through the filtering kernel to judge whether each sub-image has a defect area, wherein the sub-image of each polarization image refers to the size of the image corresponding to the size of each filtering kernel. Specifically, in step S3, taking any one of the first polarization image or the second polarization image after the filtering process as a target sub-image, determining whether the target sub-image has a defect area by using a filter kernel, and if the target sub-image has the defect area, converting the target sub-image into a binary image, where a gray value of a pixel constituting the defect area is 0 or 1; if the target sub-image does not have the defect area, the target sub-image is converted into a binary image with the gray values of the pixels being preset values, and when the gray value of the pixel forming the defect area is 0, the preset value is 1, or when the gray value of the pixel forming the defect area is 1, the preset value is 0, so that the gray value of the defect area is always different from the gray value of the defect-free area, and the defect area is convenient to distinguish.
further, as a specific implementation manner, the process of determining whether the target sub-image has the defect area by using the filter kernel includes the following steps:
step S3-1: calculating the average gray value of the target sub-image;
step S3-2: calculating the proportion of pixels with gray values larger than the average gray value in the target sub-image to all pixels of the target sub-image and the proportion of pixels with gray values smaller than the average gray value in the target sub-image to all pixels of the target sub-image;
Step S3-3: judging whether the two proportions obtained in the step S3-2 are both larger than a threshold value, if so, determining that the target sub-image has a defect area; if not, the target sub-image has no defect area; wherein, the threshold value is: and the preset percentage of the difference between the proportion of the pixels with the gray value larger than the average gray value in the target sub-image to all the pixels in the target sub-image and the proportion of the pixels with the gray value smaller than the average gray value in the target sub-image to all the pixels in the target sub-image is calculated.
Because the defect area is represented by the area with the gray value obviously higher or lower than the defect-free area under different lighting conditions, whether the defect area exists in the target sub-image can be judged according to the relation between the average gray value of the target sub-image and the proportion of the pixels with the gray value larger than the average gray value and the proportion of the pixels with the gray value smaller than the average gray value. Because the number of pixels in the defective area is generally less than that of pixels in the non-defective area, when the gray-scale value of the defective area is higher (high brightness), the proportion of pixels in the target sub-image with gray-scale values greater than the average gray-scale value to all pixels in the target sub-image is smaller than the proportion of pixels in the target sub-image with gray-scale values less than the average gray-scale value to all pixels in the target sub-image; when the gray value of the defect area is low (low brightness), the proportion of the pixels with the gray values larger than the average gray value in the target sub-image to all the pixels of the target sub-image is larger than the proportion of the pixels with the gray values smaller than the average gray value in the target sub-image to all the pixels of the target sub-image. Therefore, whether the target sub-image has the defect area or not can be judged according to the size relation between the proportion of the pixels with the gray values larger than the average gray value in the target sub-image to all the pixels of the target sub-image and the proportion of the pixels with the gray values smaller than the average gray value in the target sub-image to all the pixels of the target sub-image. In order to further improve the accuracy of determining the defective area of the target sub-image, in this embodiment, a threshold is set, and when both the two ratios are greater than the threshold, it indicates that the target sub-image has the defective area, and conversely, it indicates that the target sub-image does not have the defective area, where the threshold is a preset percentage of a difference between a ratio of pixels in the target sub-image having a gray scale value greater than the average gray scale value to all pixels in the target sub-image and a ratio of pixels in the target sub-image having a gray scale value less than the average gray scale value to all pixels in the target sub-image, and a specific value of the preset percentage may be set by a person skilled in the art according to the type of the part to be detected and an actual detection requirement, for example, the preset percentage may be 3%, and the specific value of the preset percentage may.
in step S3, when the target sub-image has a defect area, the process of converting the target sub-image into a binary image includes the following steps:
Firstly, when a target sub-image has a defect area, dividing a gray value interval of the target sub-image into a plurality of gray value intervals, assuming that the minimum gray value of the target sub-image is 10 and the maximum gray value of the target sub-image is 210, then the gray value interval of the target sub-image is [10, 210], dividing the interval [10, 210] into a plurality of gray value intervals, for example, 10 gray value intervals, wherein the 10 gray value intervals are [10, 30], [30, 50], …, [190, 210], and in the actual detection, the number of the divided gray value intervals can be set according to the size of the gray value interval of the target sub-image and the actual requirement; after dividing into a plurality of gray scale intervals, determining a threshold range according to the gray scale value and the gray scale interval of the defect area in the target sub-image, wherein the process of determining the threshold range is as follows:
when the defect area in the target sub-image is a high-brightness defect area, taking the interval where the highest value of the gray value of the target sub-image is as a threshold range;
when the defect area in the target sub-image is a low-brightness defect area, taking the interval where the lowest gray value of the target sub-image is located as a threshold range;
And setting the gray value of the pixel of which the gray value is within the threshold range in the target sub-image as 1 and the gray values of other pixels as 0, or setting the gray value of the pixel of which the gray value is within the threshold range in the target sub-image as 0 and the gray values of other pixels as 1.
the part defect detection method provided by the embodiment is a dynamic threshold filtering algorithm, when a target subimage has a defect area, the gray value interval of the target subimage is divided into a plurality of gray value intervals, and the threshold range is determined according to the gray value and the gray value interval of the defect area in the target subimage, so that the problem that a single threshold cannot effectively extract the defect area can be avoided, and the method is favorable for quickly, accurately and stably extracting the texture defect on the polarization image of the part to be detected.
In step S4, the target sub-image is traversed through all sub-images of the first polarization image and the second polarization image after the filtering processing, and all sub-images are converted into corresponding binary images, so as to obtain a first binary image corresponding to the first polarization image and a second binary image corresponding to the second polarization image.
In step S5, the first binary image and the second binary image are fused into a binary image of the detection result, the fusion method is to directly add the first binary image and the second binary image, and in the binary image of the detection result obtained after the fusion, the defect area is black (the non-defective area is white) or the defect area is white (the non-defective area is black), and whether the part to be detected has a defect, the shape and the size of the defect, and the like can be quickly and accurately determined according to the binary image of the detection result.
the part defect detection method provided by the embodiment obtains the polarization images of the part to be detected in different polarization directions under the irradiation of different polarization light sources based on the polarization camera shooting, and enhances the contrast and definition of the polarization images by performing noise reduction and filtering on the polarization images and enhancing the defect area of the polarization images, so as to finally obtain the binary image of the detection result of the part to be detected.
In another embodiment, the invention discloses a part defect detection device, which has the advantages of simple structure, high stability, low cost and no need of multiple groups of illumination light sources, and can meet the requirements of high quality and high efficiency of part processing detection. The part defect detection device comprises a conveyor belt, a side polarized light source, a first polarized camera, an upper polarized light source, a second polarized camera and a rear-end computer, wherein the conveyor belt is used for conveying a part to be detected to a discharge port from a feeding port after sequentially passing through a first detection position and a second detection position; the side polarized light source is arranged above the conveyor belt at the first detection position and used for providing polarized light illumination for the first polarized camera; the first polarization camera is arranged above the conveyor belt at the first detection position, and included angles are formed among the first polarization camera, the part to be detected and the side polarization light source, and the first polarization camera, the part to be detected and the side polarization light source are used for shooting a first polarization image of the part to be detected when the part to be detected moves to the first detection position; the upper polarized light source is arranged above the conveyor belt at the second detection position and used for providing polarized illumination for the second polarized camera; the second polarization camera is arranged above the conveyor belt at the second detection position, and the second polarization camera and the upper polarization light source are both positioned above the part to be detected and are used for shooting a second polarization image of the part to be detected when the part to be detected moves to the second detection position; and the rear-end computer is respectively connected with the side polarized light source, the first polarized camera, the upper polarized light source and the second polarized camera and is used for detecting the defects of the part to be detected by using the part defect detection method to obtain a defect detection result and displaying the defect detection result.
referring to fig. 2, wait to detect part 1 and deliver to conveyer belt 2 through the pay-off mouth on, conveyer belt 2 mainly is driven by the motor, and conveyer belt 2 drives and waits to detect part 1 and loop through first detection position and second detection position, reachs the discharge gate finally.
side polarized light source 3 and first polarization camera 4 are located the top of first detection position department conveyer belt 2, side polarized light source 3 passes through side polarized light source mount 5 to be fixed in the latter half of side polarized light source dead lever 6, the top and the erection bracing board 7 fixed connection of side polarized light source dead lever 6, first polarization camera 4 passes through polarization camera mount 8 to be fixed in the latter half of polarization camera dead lever 9, the top and the erection bracing board 7 fixed connection of polarization camera dead lever 9, side polarized light source mount 5, side polarized light source dead lever 6, polarization camera mount 8 and polarization camera dead lever 9 all are located the top of first detection position department conveyer belt 2. By adjusting the side polarized light source fixing frame 5 and the polarized camera fixing frame 8, the side polarized light source 3, the part to be detected 1 and the first polarized camera 4 form a certain included angle, so that the first polarized camera 4 can obtain a high-quality polarized image conveniently. When the conveyor belt 2 drives the part 1 to be detected to move to the first detection position, the side polarized light source 3 illuminates, polarized light emitted by the side polarized light source 3 is reflected by the part 1 to be detected and then enters the first polarized camera 4, the first polarized camera 4 shoots a first polarized image of the part to be detected and sends the first polarized image to the rear-end computer.
the upper polarized light source 10 and the second polarized camera 11 are located above the conveyor belt 2 at the second detection position, the upper polarized light source 10 and the second polarized camera 11 are respectively fixed at the lower half part of the polarized camera and polarized light source fixing rod 12, the top end of the polarized camera and polarized light source fixing rod 12 is fixedly connected with the mounting support plate 7, and the upper polarized light source 10 is located below the second polarized camera 11, as shown in fig. 3 and 4, 10 in fig. 3 is the upper polarized light source, the upper polarized light source 10 is annular, 11-1 is the lens part of the second polarized camera 11, 10-1 in fig. 4 is the small polarized light source forming the upper polarized light source 10, the small polarized light sources 10-1 are uniformly distributed along the circumference, the upper polarized light source 10 is formed jointly, and 11-1 is the lens part of the second polarized camera. When the conveyor belt 2 drives the part 1 to be detected to move to the second detection position, namely when the part 1 to be detected is located below the upper polarized light source and the second polarized camera, the upper polarized light source illuminates, the second polarized camera shoots a second polarized image of the part 1 to be detected, and the second polarized image is sent to the rear-end computer. The first polarization camera 4 and the second polarization camera can capture polarization images with different polarization directions, for example, the first polarization camera 4 can capture polarization images with polarization directions of 0 °, 45 °, 90 ° or 135 °, the second polarization camera can capture polarization images with polarization directions of 0 °, 60 °, 120 ° or directions perpendicular to and parallel to the polarization direction of the light source, and the polarization images with different polarization directions captured by the first polarization camera 4 and the second polarization camera can detect defect regions with different parts.
The rear-end computer is respectively connected with the side polarized light source 3, the first polarized camera 4, the upper polarized light source and the second polarized camera, and the rear-end computer performs defect detection on the part 1 to be detected by using the part defect detection method to obtain a defect detection result, namely a detection result binary image, and displays the defect detection result, namely the detection result binary image. The back-end computer includes an obtaining module, a filtering module, an image transforming module, an image fusing module and a display module, wherein the obtaining module executes step S1 in the method for detecting a defect of a component, the filtering module executes step S2, the image transforming module executes step S3 and step S4, the image fusing module executes step S5, the display module is configured to display a result of the defect detection (i.e., a binary image of the detection result obtained by the image fusing module) in real time, and the content of the steps executed by each module in the back-end computer may refer to each step described in the embodiment of the method for detecting a defect of a component, which is not described herein again.
In the part defect detection device, the side polarized light source and the upper polarized light source can be used for illumination by replacing light sources with different wavelengths and light sources with different polarization states; meanwhile, different polarized illumination angles can be adjusted, and different polarized light source quantities can be installed to detect the part to be detected. In addition, the first polarization camera and the second polarization camera can capture the polarization image of the part to be detected through different design schemes (amplitude division, aperture division, focal plane division, rotating camera front polarizing film).
further, in order to avoid that the polarization states of the illumination polarized light of the side polarized light source and the upper polarized light source interfere with each other when the side polarized light source and the upper polarized light source work simultaneously to influence the image quality of the part to be detected, when the first polarized camera and the side polarized light source work, the rear-end computer controls the upper polarized light source to stop illuminating; when the second polarization camera shoots and the upper polarization light source works, the rear-end computer controls the side polarization light source to stop lighting.
further, in order to avoid the influence of natural light on the polarization states of the polarized light of the side polarized light source and the upper polarized light source and reduce the effect of detecting the part defects, the part defect detecting device needs to work in a darkroom or the part defect detecting device needs to be equipped with a light shield which is arranged at the first detecting position and the second detecting position and covers the side polarized light source, the first polarized camera, the upper polarized light source and the second polarized camera.
according to the part defect detection method and device, the part to be detected is illuminated through the polarized light source, the polarized image is obtained through the polarized camera, and the defect on the surface of the part is detected through processing the polarized image. The method and the device can effectively avoid the need of multiple groups of light sources with different angles and multiple groups of cameras with different angles when detecting different defect types; meanwhile, the problem of low contrast of a defective area of a part and difficulty in finding the position of the defect due to the problem of light intensity of a light source is solved. Meanwhile, the polarization image is processed by a rear-end computer, so that the position of the part defect can be rapidly and accurately extracted, and the defective part can be detected. The part defect detection method and the device are simple and convenient in design, reduce the complexity of a plurality of lighting sources with different angles and shooting cameras with different angles during part detection, do not occupy excessive space, and reduce the detection cost of a system device; on the other hand, the method and the device effectively improve the image acquisition speed, and have better accuracy and timeliness through the real-time processing of the back-end computer. Simulation results show that the part defect detection method and device provided by the invention are practical and effective.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
the above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. a part defect detection method is characterized by comprising the following steps:
Step S1: acquiring a first polarization image of a part to be detected shot by a first polarization camera and a second polarization image of the part to be detected shot by a second polarization camera, wherein the first polarization image is the polarization image of the part to be detected when the first polarization camera, the part to be detected and a side polarization light source form an included angle, and the second polarization image is the polarization image of the part to be detected when the second polarization camera and an upper polarization light source are both positioned above the part to be detected;
Step S2: respectively conducting guiding filtering processing on the first polarization image and the second polarization image;
step S3: taking any one of the first polarization image or the second polarization image after filtering as a target sub-image, judging whether the target sub-image has a defect area by using a filtering kernel, if so, converting the target sub-image into a binary image, wherein the gray value of a pixel forming the defect area is 0 or 1; if not, converting the target sub-image into a binary image with the gray values of the pixels being preset values, wherein the preset value is 1 when the gray value of the pixel forming the defect area is 0, or the preset value is 0 when the gray value of the pixel forming the defect area is 1;
step S4: traversing all sub-images of the first polarization image and the second polarization image after filtering processing of the target sub-image respectively to obtain a first binary image corresponding to the first polarization image and a second binary image corresponding to the second polarization image;
step S5: and fusing the first binary image and the second binary image into a detection result binary image.
2. the part defect detection method according to claim 1, wherein the process of judging whether the target sub-image has the defect area by using the filter kernel comprises the following steps:
step S3-1: calculating the average gray value of the target sub-image;
step S3-2: calculating the proportion of pixels with gray values larger than the average gray value in the target sub-image to all pixels of the target sub-image and the proportion of pixels with gray values smaller than the average gray value in the target sub-image to all pixels of the target sub-image;
Step S3-3: judging whether the two proportions obtained in the step S3-2 are both larger than a threshold value, if so, determining that the target sub-image has a defect area; if not, the target sub-image has no defect area; wherein the threshold is: and the preset percentage of the difference between the proportion of the pixels with the gray values larger than the average gray value in the target sub-image to all the pixels of the target sub-image and the proportion of the pixels with the gray values smaller than the average gray value in the target sub-image to all the pixels of the target sub-image is calculated.
3. the method for detecting defects of parts according to claim 1 or 2, wherein the process of converting the target sub-image into a binary image comprises the steps of:
dividing the gray value interval of the target sub-image into a plurality of gray value intervals, and determining a threshold range according to the gray value of the defect area in the target sub-image and the gray value intervals;
And setting the gray value of the pixel of which the gray value is within the threshold range in the target sub-image as 1 and the gray values of other pixels as 0, or setting the gray value of the pixel of which the gray value is within the threshold range in the target sub-image as 0 and the gray values of other pixels as 1.
4. The part defect detection method of claim 3, wherein the process of determining the threshold range according to the gray value of the defect region in the target sub-image and the gray interval comprises:
When the defect area in the target sub-image is a high-brightness defect area, taking the interval where the highest value of the gray value of the target sub-image is as a threshold range;
and when the defect area in the target sub-image is a low-brightness defect area, taking the interval where the lowest gray value of the target sub-image is located as a threshold range.
5. a part defect detecting apparatus, comprising:
The conveying belt is used for conveying the parts to be detected to the discharge port from the feeding port after sequentially passing through the first detection position and the second detection position;
a side polarized light source disposed above the conveyor belt at the first detection position for providing polarized light illumination for a first polarized camera;
The first polarization camera is arranged above the conveyor belt at the first detection position and used for shooting a first polarization image of the part to be detected when the first polarization camera and the part to be detected form an included angle with the side polarization light source;
An upper polarized light source disposed above the conveyor belt at the second inspection position for providing polarized illumination to a second polarized camera;
The second polarization camera is arranged above the conveyor belt at the second detection position and used for shooting a second polarization image of the part to be detected when the second polarization camera and the upper polarization light source are both positioned above the part to be detected;
The rear-end computer is respectively connected with the side polarized light source, the first polarized camera, the upper polarized light source and the second polarized camera and is used for detecting the defects of the part to be detected by using the part defect detection method according to any one of claims 1 to 4 to obtain a defect detection result and displaying the defect detection result.
6. the part defect detecting apparatus according to claim 5, further comprising a side polarized light source fixing rod and a side polarized light source fixing frame;
The side polarized light source is fixed on the lower half portion of the side polarized light source fixing rod through the side polarized light source fixing frame, and the top end of the side polarized light source fixing rod is fixedly connected with the mounting support plate.
7. the part defect detecting device of claim 6, further comprising a polarization camera fixing rod and a polarization camera fixing frame;
the first polarization camera is fixed on the lower half portion of the polarization camera fixing rod through the polarization camera fixing frame, and the top end of the polarization camera fixing rod is fixedly connected with the installation supporting plate.
8. The part defect detecting device of claim 6 or 7, further comprising a polarized camera and polarized light source fixing rod;
The upper polarized light source and the second polarized camera are respectively fixed on the lower half portion of the polarized camera and polarized light source fixing rod, and the upper polarized light source is located below the second polarized camera.
9. The part defect detecting apparatus according to claim 5 or 6,
When the first polarization camera and the side polarization light source work, the rear-end computer controls the upper polarization light source to stop illuminating; when the second polarization camera shoots and the upper polarization light source works, the rear-end computer controls the side polarization light source to stop lighting.
10. the part defect detecting apparatus according to claim 5 or 6, further comprising a light shield;
The light shield is disposed at the first detection position and the second detection position.
CN201910831630.6A 2019-09-04 2019-09-04 part defect detection method and device Pending CN110567968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910831630.6A CN110567968A (en) 2019-09-04 2019-09-04 part defect detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910831630.6A CN110567968A (en) 2019-09-04 2019-09-04 part defect detection method and device

Publications (1)

Publication Number Publication Date
CN110567968A true CN110567968A (en) 2019-12-13

Family

ID=68777729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910831630.6A Pending CN110567968A (en) 2019-09-04 2019-09-04 part defect detection method and device

Country Status (1)

Country Link
CN (1) CN110567968A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861980A (en) * 2020-05-29 2020-10-30 合肥联宝信息技术有限公司 Imaging detection method, electronic equipment and computer readable storage medium
CN111899231A (en) * 2020-07-17 2020-11-06 武汉精立电子技术有限公司 Display panel defect detection method, device, equipment and storage medium
CN113256576A (en) * 2021-05-18 2021-08-13 福州大学 Automatic optical element detection system and method based on polarization imaging and machine learning
CN114705698A (en) * 2022-06-02 2022-07-05 季华实验室 Defect detection method, device, system and storage medium
CN116499362A (en) * 2023-06-26 2023-07-28 太原科技大学 Steel plate size online measurement system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201225983Y (en) * 2008-02-28 2009-04-22 唐有福 Detection device for hard capsule
CN102253007A (en) * 2011-05-06 2011-11-23 中国农业大学 Method for detecting quality of cotton
CN102334422A (en) * 2010-07-27 2012-02-01 中国农业科学院蔬菜花卉研究所 Machine vision based real-time diagnosis method and system of vegetable leaf diseases
CN102353684A (en) * 2011-06-23 2012-02-15 南京林业大学 Method for acquiring laser meat image by double-laser triangle method
CN204789357U (en) * 2015-04-27 2015-11-18 中国人民解放军理工大学 Electrolytic capacitor outward appearance packing defect image detection system
CN105136734A (en) * 2015-08-27 2015-12-09 李学新 Capsule near-infrared fault analysis method
CN105203543A (en) * 2015-09-22 2015-12-30 华中农业大学 Machine vision based whole case red grape fruit size grading device and method
CN106872465A (en) * 2016-12-27 2017-06-20 中国农业大学 Birds fertile egg detection screening plant based on machine vision

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201225983Y (en) * 2008-02-28 2009-04-22 唐有福 Detection device for hard capsule
CN102334422A (en) * 2010-07-27 2012-02-01 中国农业科学院蔬菜花卉研究所 Machine vision based real-time diagnosis method and system of vegetable leaf diseases
CN102253007A (en) * 2011-05-06 2011-11-23 中国农业大学 Method for detecting quality of cotton
CN102353684A (en) * 2011-06-23 2012-02-15 南京林业大学 Method for acquiring laser meat image by double-laser triangle method
CN204789357U (en) * 2015-04-27 2015-11-18 中国人民解放军理工大学 Electrolytic capacitor outward appearance packing defect image detection system
CN105136734A (en) * 2015-08-27 2015-12-09 李学新 Capsule near-infrared fault analysis method
CN105203543A (en) * 2015-09-22 2015-12-30 华中农业大学 Machine vision based whole case red grape fruit size grading device and method
CN106872465A (en) * 2016-12-27 2017-06-20 中国农业大学 Birds fertile egg detection screening plant based on machine vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
蔡逸超 等: "应用多尺度多方向模板卷积的筒子纱缺陷检测", 《纺织学报》 *
许龙: "基于机器视觉的SMT芯片检测方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861980A (en) * 2020-05-29 2020-10-30 合肥联宝信息技术有限公司 Imaging detection method, electronic equipment and computer readable storage medium
CN111861980B (en) * 2020-05-29 2022-02-01 合肥联宝信息技术有限公司 Imaging detection method, electronic equipment and computer readable storage medium
CN111899231A (en) * 2020-07-17 2020-11-06 武汉精立电子技术有限公司 Display panel defect detection method, device, equipment and storage medium
CN113256576A (en) * 2021-05-18 2021-08-13 福州大学 Automatic optical element detection system and method based on polarization imaging and machine learning
CN114705698A (en) * 2022-06-02 2022-07-05 季华实验室 Defect detection method, device, system and storage medium
CN116499362A (en) * 2023-06-26 2023-07-28 太原科技大学 Steel plate size online measurement system
CN116499362B (en) * 2023-06-26 2023-09-15 太原科技大学 Steel plate size online measurement system

Similar Documents

Publication Publication Date Title
CN110567968A (en) part defect detection method and device
CN108760765B (en) Side-view camera shooting-based surface damage defect detection device and method
CN108445007B (en) Detection method and detection device based on image fusion
RU2763417C2 (en) System and related method for detecting small defects on/in glass sheet on process line
CN103743761B (en) A kind of eyeglass watermark defect image detection device
CN110261390B (en) Optical detection system and method for surface defects of diffuse reflection structured light
US7924418B2 (en) Inspection apparatus and method
CN107664644B (en) Object appearance automatic detection device and method based on machine vision
CN102374996B (en) Multicast detection device and method for full-depth tooth side face defects of bevel gear
CN104101611A (en) Mirror-like object surface optical imaging device and imaging method thereof
CN110208269B (en) Method and system for distinguishing foreign matters on surface of glass from foreign matters inside glass
CN109856164A (en) A kind of machine vision acquires the optimization device and its detection method of a wide range of image
CN110987970A (en) Object surface defect detection system and detection method
CN110412055B (en) Lens white fog defect detection method based on multi-light-source dark field illumination
CN102141379A (en) Novel glass bottle and jar detection device
CN110648301A (en) Device and method for eliminating imaging reflection
CN113763322B (en) Pin Pin coplanarity visual detection method and device
CN214097211U (en) Transparent plate glass's defect detecting device
CN111103309A (en) Method for detecting flaws of transparent material object
CN103091332B (en) Detection method and detection system of U-shaped powder pipe based on machine vision
CN114577805A (en) MiniLED backlight panel defect detection method and device
KR102632169B1 (en) Apparatus and method for inspecting glass substrate
CN105301016A (en) Image detection method for scratches of wheel tread
CN114324344A (en) Non-lambert surface inspection system for line scanning
CN115165920A (en) Three-dimensional defect detection method and detection equipment

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191213

WD01 Invention patent application deemed withdrawn after publication