Metal surface defect detection device and method based on Mueller matrix detection
Through the metal surface defect detection device based on the Mueller matrix, the problem of strict requirements for fixed systems and lighting conditions in the prior art is solved, and the defect detection in rapid and multi-scene situations is realized, and the detection capability is enhanced.
Patent Information
- Application Number
- CN202510401240.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing polarization optical detection technology requires the construction of a fixed system and requires strict lighting conditions, so it is impossible to quickly detect defects in real time and on-site.
The metal surface defect detection device based on Mueller matrix detection is adopted, which includes a light source, a polarizer, a polarizer, an image acquisition module and an image processing module. The defect characteristic information is obtained through the Mueller matrix parameter information to achieve rapid detection.
The device can directly and quickly obtain polarization characteristic information of the metal surface without additional optical paths and detection equipment, improve defect detection capabilities in complex scenarios, reduce the requirements for light conditions, and can perform defect detection anytime and anywhere.
Smart Images

Figure CN119915825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical imaging detection, and in particular to a metal surface defect detection device and method based on Mueller matrix detection. Background Art
[0002] Metal materials are widely used in the manufacturing industry, and their surface quality directly affects the performance and reliability of products. Accurately detecting metal surface defects is the key to ensuring product quality. However, traditional defect detection methods such as manual visual inspection, ultrasonic testing, and magnetic particle testing have obvious limitations. Manual visual inspection relies on the operator's experience and subjective judgment, which can easily lead to inconsistent results and low efficiency; although ultrasonic testing is effective for internal defects, it has low sensitivity to surface micro-defects and is complicated to operate; magnetic particle testing is only applicable to ferromagnetic materials, ineffective for non-ferromagnetic materials, and has high requirements for the detection environment and is easily disturbed by external magnetic fields. In contrast, optical imaging detection technology has the advantages of high precision, non-contact, and high efficiency. It shows significant superiority in metal surface defect detection and has broad application prospects. However, traditional optical imaging methods are sensitive to ambient lighting conditions and imaging viewing angles. Some metal surface defects can only be captured at specific viewing angles and cannot be observed at other viewing angles, which increases the instability of the detection system. Therefore, studying a robust metal surface defect detection method that adapts to different ambient lighting conditions and imaging viewing angles is crucial to improving the reliability of optical imaging detection.
[0003] Polarization optical imaging technology uses the change in the vibration direction of light waves to obtain object information. By analyzing the polarization change of reflected light, tiny defects and unevenness on the metal surface can be detected. The reflection of light on the metal surface usually changes the polarization state of light. When the material is subjected to stress or structural changes, it will also affect the propagation of polarized light. By collecting Stokes parameters, the polarization properties of light are fully characterized, and surface defects can be identified and located. However, polarization imaging technology may also be disturbed by ambient lighting conditions and imaging angles. For this reason, the Mueller matrix is introduced to describe the change in polarization state. The Mueller matrix is a 4×4 matrix used to describe the change in polarization state of light after passing through an optical system or material, and can convert the Stokes parameters of the incident light into the Stokes parameters of the outgoing light. The Mueller matrix is related to the intrinsic properties of the target surface and is not affected by ambient lighting conditions and imaging angles. Therefore, the metal surface defect detection method based on the Mueller matrix is expected to overcome the shortcomings of low detection efficiency and sensitivity to ambient lighting conditions and imaging angles of traditional methods, and improve the accuracy of defect recognition.
[0004] At present, only a small number of studies at home and abroad have applied Mueller matrix detection to defect detection, and there are technical limitations, which makes it difficult to adapt to the detection needs in various situations. The patent (CN116482123A) applied by Quanzhou Equipment Manufacturing Research Institute in 2023 proposed a method for detecting microscopic defects on the surface of optical components, using the Jones matrix to describe polarized light, and then converting it into a Mueller matrix to characterize the distribution and polarization state of the scattered field. However, this method needs to derive the Mueller matrix by calculating the Jones matrix, and compare multiple Mueller matrices to obtain defect information. The calculation complexity is high and it is not conducive to high-speed defect detection environment. The patent (CN111982825B) applied by Tsinghua University Shenzhen International Graduate School in 2020 proposed a method for full polarization fast dynamic Stokes imaging, which calculates the Stokes vector within a certain time period by continuously collecting at least 5 images, and performs continuous and uniform Stokes imaging on dynamic samples. However, this method requires collecting images at a certain time interval and adopts a scattered sampling optical path layout, which is not suitable for metal defect feature recognition under high-speed conditions. The patent (CN111328370A) applied by Heren Technology (Shenzhen) Co., Ltd. in 2019 proposed a surface defect detection system and method, which uses a multi-laser illumination method to obtain incident light with different polarization states through a prism and a polarizing system, and illuminates the surface of the object to be tested fixed on a rotating worktable. However, this method requires multi-faceted lighting, has harsh working environment requirements, and cannot perform real-time and rapid defect detection. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the polarization optical detection technology in the prior art requires the construction of a fixed system, has strict requirements on lighting conditions, and is unable to perform real-time and rapid defect detection. In order to overcome the above defects of the prior art, the present invention provides a metal surface defect detection device and method based on Mueller matrix detection.
[0006] In a first aspect, the technical solution adopted by the present invention is a metal surface defect detection device based on Mueller matrix detection, comprising: The device body comprises: A light source, for providing visible light; A polarizer, used for receiving the visible light and modulating the visible light into incident polarized light of four polarization states by adjusting its polarization angle, wherein the incident polarized light is incident on the surface of the object to be measured and reflected polarized light is reflected from the surface of the object to be measured; A polarizer, used for receiving the reflected polarized light, and modulating the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle, so as to obtain outgoing polarized light of sixteen polarization states; An image acquisition module, used to receive the outgoing polarized light of each polarization state and form a corresponding imaging image; A housing, wherein the light source, the polarizer, the analyzer and the image acquisition module are arranged in the housing; An image processing module is connected to the device body; the image processing module is used to receive all the imaging images, perform calculations on all the imaging images after preprocessing, obtain a Mueller matrix about the surface of the object to be tested, and use a grayscale image to represent each image unit of the Mueller matrix, use a custom image quality index as a screening standard, screen each image unit of the Mueller matrix, obtain a screened high-quality image, perform wavelet decomposition and fusion processing on the high-quality image, obtain a fused grayscale image, perform image processing on the fused grayscale image, obtain a processed image to be tested, use the processed image to be tested to find the surface defect contour of the object to be tested through a contour detection function, and draw a line mark on the processed image to be tested.
[0007] The beneficial effects of the present invention are as follows: by using the above-mentioned metal surface defect detection device based on Mueller matrix detection, the device can directly and quickly obtain polarization feature information of the metal surface without the need for additional optical paths, detection equipment, etc., and processes the collected images in real time through an image processing module, effectively improving the contrast between object defects and the surface of the object in complex scenes, and enhancing the defect detection capability of the imaging system; the device obtains defect feature information by extracting Mueller matrix parameter information of the metal surface, and the Mueller matrix parameters contain multi-dimensional polarization parameter information, so that defect feature information in different directions can be observed under limited lighting conditions, reducing the requirements for lighting conditions; the image processing module of the device automatically screens high-quality images for fusion processing, strengthens various defect features, and realizes fast and multi-scene detection; the device can perform defect detection anytime and anywhere, and does not need to build a complex fixing system, so it is easy to carry.
[0008] Preferably, the polarizer is composed of a first ultrasonic motor and a second ultrasonic motor which are sequentially arranged along the visible light emission direction, the first ultrasonic motor and the second ultrasonic motor both comprising a hollow mounting hole, the polarizer further comprising a first retaining ring, a first linear polarizer mounted in the hollow mounting hole of the first ultrasonic motor via the first retaining ring, a second retaining ring, and a first quarter-wave plate mounted in the hollow mounting hole of the second ultrasonic motor via the second retaining ring; with this structure, the angle combination of the first quarter-wave plate and the first linear polarizer in the polarizer can be adjusted by adjusting the angle of the ultrasonic motor to modulate the visible light into light of different polarization states, and the ultrasonic motor can use the motor to automatically adjust the angle of the polarizer according to the set angle, which is simple, convenient and efficient.
[0009] Preferably, the polarizer is composed of a third ultrasonic motor and a fourth ultrasonic motor which are arranged in sequence along the emergent direction of the reflected polarized light, and the third ultrasonic motor and the fourth ultrasonic motor both include a hollow mounting hole. The polarizer also includes a third retaining ring, a second quarter-wave plate installed in the hollow mounting hole of the third ultrasonic motor via the third retaining ring, a fourth retaining ring, and a second linear polarizer installed in the hollow mounting hole of the fourth ultrasonic motor via the fourth retaining ring. With this structure, the angle combination of the second quarter-wave plate and the second linear polarizer in the polarizer can be adjusted by adjusting the angle of the ultrasonic motor to modulate the reflected polarized light of any polarization state into four polarization states of emergent polarized light. The ultrasonic motor can use the motor to automatically adjust the angle of the analyzer according to the set angle, which is simple, convenient and efficient.
[0010] Preferably, the image processing module includes a first processing module, a calculation module, a linear stretching processing module, a grayscale characterization module, a quality screening module, a fusion processing module, a second processing module and a defect contour detection module connected in sequence; the first processing module is used to preprocess the image, and the preprocessing is specifically filtering and noise reduction processing; the calculation module is used to calculate the image output by the first processing module to obtain the Mueller matrix of the surface of the object to be measured; the linear stretching processing module is used to perform linear stretching processing on each image unit of the Mueller matrix to obtain the Mueller matrix image unit after linear stretching; the grayscale characterization module is used to perform linear stretching processing on each Mueller matrix image unit after linear stretching The first element is used to perform grayscale image representation to obtain the Mueller matrix image unit after grayscale representation; the quality screening module is used to use the customized image quality index as the screening standard to screen from all the Mueller matrix image units after grayscale representation to obtain the screened high-quality image; the fusion processing module is used to perform wavelet decomposition and fusion processing on the screened high-quality image to obtain the fused grayscale image; the second processing module is used to perform sharpening, secondary filtering and binarization processing on the fused grayscale image to obtain the processed image to be tested; the defect contour detection module is used to search for the defect contour of the object surface in the processed image to be tested, filter out some noise contours, and finally mark the detected defect contour on the image. With this structure, by automatically screening high-quality images for fusion processing, various defect features are strengthened, the characteristic information of the surface of the object to be tested is strengthened, and environmental interference such as uneven lighting and single lighting angle is overcome to achieve defect detection on the metal surface.
[0011] Preferably, the quality screening module includes a contrast calculation module, a gradient calculation module, an information entropy calculation module, an edge contour calculation module, a variance calculation module, a quality index calculation module and an image screening module; the contrast calculation module is used to calculate the grayscale co-occurrence matrix contrast value of each Mueller matrix image unit after the grayscale representation; the gradient calculation module is used to calculate the average gradient value of each Mueller matrix image unit after the grayscale representation; the information entropy calculation module is used to calculate the information entropy value of each Mueller matrix image unit after the grayscale representation; the edge contour calculation module is used to calculate the edge outer contour of each Mueller matrix image unit after the grayscale representation Total length value; the variance calculation module is used to calculate the gray value variance value of each Mueller matrix image unit after grayscale characterization; the quality index calculation module is used to weight the grayscale co-occurrence matrix contrast value, average gradient value, information entropy value, edge outer contour total length value and gray value variance value of each Mueller matrix image unit after grayscale characterization, and obtain the quality index of each Mueller matrix image unit after grayscale characterization; the image screening module is used to automatically screen out the quality index higher than its custom quality index from all the obtained quality indexes as the high-quality index, and the Mueller matrix image unit corresponding to the high-quality index is the screened high-quality image. With this structure, by automatically calculating the contrast, gradient, information entropy, edge contour length, and gray value variance of the image, the quality index of each matrix image unit is calculated, and the high-quality image unit with obvious defect edge features and high image contrast is automatically screened out, providing an effective defect image for subsequent image fusion, which is convenient for subsequent defect detection; that is, the high-quality image with obvious defect edge features and high image contrast is automatically screened out from 16 matrix image units.
[0012] In a second aspect, the technical solution adopted by the present invention is a metal surface defect detection method based on Mueller matrix detection, the method comprising the following steps: S1, a light source emits visible light, the visible light enters a polarizer, and the polarizer sequentially modulates the visible light into incident polarized light of four polarization states by adjusting its polarization angle; S2, the incident polarized light rays of the four polarization states are incident on the surface of the object to be measured in sequence, and the surface of the object to be measured reflects reflected polarized light rays of the four polarization states in sequence; S3, the reflected polarized light of the four polarization states enter the analyzer in sequence, and the analyzer modulates the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle, thereby obtaining outgoing polarized light of sixteen polarization states; S4, the image acquisition module receives the outgoing polarized light of each polarization state and forms a corresponding imaging image, the image processing module receives all the imaging images, performs filtering and noise reduction on all the imaging images, and then calculates the Mueller matrix of the detection target; S5, performing linear stretching processing on each image unit of the Mueller matrix, and stretching and mapping the grayscale value range of each image unit of the Mueller matrix to [0, 255], to obtain a linearly stretched Mueller matrix image unit; using a grayscale image to characterize each linearly stretched Mueller matrix image unit, to obtain a grayscale characterized Mueller matrix image unit; S6. Using the customized image quality index as the screening standard, screening is performed from all the grayscale-characterized Mueller matrix image units to obtain a screened high-quality image, the screened high-quality image is subjected to wavelet decomposition and fusion processing to obtain a fused grayscale image, the fused grayscale image is sequentially sharpened, secondary filtered and binarized to obtain a processed image to be tested, the processed image to be tested is used through the cv2.findContours() contour detection function to find closed contours in the image to be tested, and then the effective defect contours are screened out through the set contour filtering feature parameters, and line markings are drawn on the processed image to be tested.
[0013] The above-mentioned metal surface defect detection method based on Mueller matrix detection is adopted. The method can directly and quickly obtain polarization characteristic information of the metal surface without the need for additional optical paths, detection equipment, etc., and the collected images are processed in real time through the image processing module, effectively improving the contrast between object defects and object surfaces in complex scenes, and enhancing the defect detection capability of the imaging system; the device obtains defect characteristic information by extracting Mueller matrix parameter information of the metal surface. The Mueller matrix parameters contain multi-dimensional polarization parameter information, so defect characteristic information in different directions can be observed under limited lighting conditions, reducing the requirements for lighting conditions; the device can perform defect detection anytime and anywhere, and there is no need to build a complex fixing system, so it is easy to carry.
[0014] Preferably, in step S6, the specific process of obtaining the screened high-quality image includes the following steps: S6.1, calculating the contrast value of the grayscale co-occurrence matrix of each Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, and represents the gray level, Represents the frequency value of the corresponding position in the gray-level co-occurrence matrix; S6.2, calculate the average gradient value of each grayscale-characterized Mueller matrix image unit, and the calculation formula is: ; in, and represent the gradients of the Mueller matrix image unit in the horizontal direction and the vertical direction after the grayscale representation, N represents the total number of pixels in the Mueller matrix image unit after the grayscale representation, Indicates The gradient magnitude of pixels; S6.3, calculating the information entropy value of the Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, Represents grayscale value The probability of Only when it is involved in the calculation; S6.4, calculate the total length of the edge outer contour of the Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, The result image of Canny edge detection is represented, and the edge pixel value is counted when it is greater than 0; the grayscale value variance value of the Mueller matrix image unit after the grayscale representation is calculated by the variance calculation module; the calculation formula is: ; in, Represents the grayscale representation of the Mueller matrix image unit The gray value of a pixel, represents the mean gray value of all pixels. represents the total number of pixels in the Mueller matrix image unit after the grayscale representation; S6.5. The contrast value, average gradient value, information entropy value, total length value of the edge outer contour and gray value variance value of each image unit of the Mueller matrix after the grayscale representation are weighted and fused to obtain the quality index of each image unit of the Mueller matrix after the grayscale representation. The calculation formula for the weighted fusion is: ; in, as well as represents the weight coefficient of the corresponding parameter, Represents the contrast value of the image unit based on the gray-level co-occurrence matrix, Represents the average gradient value of the image unit, Represents the information entropy value of the image unit, Indicates the total length of the edge contour of the image unit. Indicates the gray value variance of the image unit; S6.6. Automatically select the quality index greater than Q from all the quality indexes obtained in step S6.5 as the high-quality index, and the grayscale-characterized Mueller matrix image unit corresponding to the high-quality index is the selected high-quality image. This step can automatically select high-quality image units with obvious defect edge features and high image contrast, provide effective defect images for subsequent image fusion, and facilitate subsequent defect detection.
[0015] Preferably, in step S1, the specific process of the polarizer modulating the visible light into four polarization states of incident polarized light in sequence by adjusting its polarization angle is as follows: the first ultrasonic motor and the second ultrasonic motor in the polarizer respectively rotate the first linear polarizer and the first quarter-wave plate, so that the first linear polarizer and the first quarter-wave plate complete four rotation angle combinations to modulate the visible light into four polarization states of incident polarized light in sequence.
[0016] Preferably, in step S3, the specific process of the polarizer modulating the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle is as follows: the third ultrasonic motor and the fourth ultrasonic motor in the polarizer rotate the second linear polarizer and the second quarter-wave plate respectively, and for the reflected polarized light of any polarization state, the second linear polarizer and the first quarter-wave plate complete four different rotation angle combinations to modulate the reflected polarized light of this polarization state into outgoing polarized light of four polarization states. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a structural principle diagram of a metal surface defect detection device based on Mueller matrix detection according to the present invention; Figure 2 It is a structural schematic diagram of the device body in the present invention; Figure 3 It is a schematic diagram of representing the surface Mueller matrix information of the object to be tested in the form of a grayscale image in a specific embodiment of the present invention; Figure 4 It is a schematic diagram of a denoised image obtained by performing secondary denoising using a non-local mean denoising algorithm in a specific embodiment of the present invention; Figure 5is a defect contour detection result diagram in a specific embodiment of the present invention; As shown in the figure: 100, light source; 110, polarizer; 120, object to be measured; 130, analyzer; 140, image acquisition module; 150, image processing module; 200, shell; 211, first ultrasonic motor; 212, first linear polarizer; 213, first retaining ring; 214, second ultrasonic motor; 215, first quarter wave plate; 216, second retaining ring; 231, third retaining ring; 232, second quarter wave plate; 233, third ultrasonic motor; 234, fourth retaining ring; 235, second linear polarizer; 236, fourth ultrasonic motor. DETAILED DESCRIPTION
[0018] The invention will be further described below with reference to the accompanying drawings and in combination with specific implementations, so that those skilled in the art can implement the invention with reference to the description. The protection scope of the invention is not limited to the specific implementations.
[0019] Those skilled in the art should understand that, in the disclosure of the present invention, the orientation or positional relationship indicated by terms such as "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. are based on the orientation or positional relationship shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.
[0020] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0021] In the description of the embodiments of the present application, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0022] In order to solve the shortcomings of existing polarization optical detection technology, such as the need to build a fixed system and strict requirements on lighting conditions, the present invention fully considers the advantages of the multi-polarization state information of the Mueller matrix, and aims to propose a real-time and high-speed detection method that can adapt to a universal environment. Based on polarization imaging detection, the present invention proposes a device and a new method for detecting metal surface defects: first, the Mueller matrix parameters of the object surface are detected and visualized; then, the Mueller matrix component images are fused to obtain a new polarization feature image; finally, the defect position is calibrated through the contour detection function, and the defect detection results are output for use in subsequent screening processes.
[0023] The present invention relates to a metal surface defect detection device based on Mueller matrix detection, such as Figure 1 As shown, including: The device body comprises: A light source 100, for providing visible light; The polarizer 110 is used to receive the visible light and modulate the visible light into incident polarized light of four polarization states by adjusting its polarization angle, the incident polarized light is incident on the surface of the object to be measured 120, and the surface of the object to be measured 120 reflects the reflected polarized light; The polarizer 130 is used to receive the reflected polarized light and modulate the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle, so as to obtain outgoing polarized light of sixteen polarization states; The image acquisition module 140 is used to receive the outgoing polarized light of each polarization state and form a corresponding imaging image; A housing 200, wherein the light source 100, the polarizer 110, the analyzer 130 and the image acquisition module 140 are disposed in the housing 200; An image processing module 150 is connected to the device body; the image processing module 150 is used to receive all the imaging images, perform combined calculations on all the imaging images after preprocessing, obtain the Mueller matrix of the detection target, and use a grayscale image to represent each image unit of the Mueller matrix, use a custom image quality index as a screening standard, screen each image unit of the Mueller matrix, obtain a screened high-quality image, perform wavelet decomposition and fusion processing on the high-quality image, obtain a fused grayscale image, perform image processing on the fused grayscale image, obtain a processed image to be tested, use the processed image to be tested to find the surface defect contour of the object to be tested 120 through a contour detection function, and draw a line mark on the processed image to be tested.
[0024] In a specific embodiment, the light source 100 is an LED light source 100 for providing visible light for illumination.
[0025] In a specific embodiment, the main material of the object to be tested 120 is metal, and it can also be expanded to other different materials, such as ceramics, plastics, glass, etc.
[0026] In a specific embodiment, the image acquisition module 140 uses a black-and-white image sensor, which can achieve high-sensitivity imaging of the scene reflected light beam.
[0027] In a specific embodiment, the image processing module 150 adopts a host computer, which is a computer device having a central processing unit, a memory, a communication interface, a human-computer interaction interface, and functions for data acquisition, processing, storage, and display.
[0028] In a specific embodiment, the housing 200 is made of various plastic materials, including but not limited to metal, resin, and plastic.
[0029] In a specific embodiment, Figure 2 As shown, the polarizer 110 is composed of a first ultrasonic motor 211 and a second ultrasonic motor 214 which are sequentially arranged along the visible light emission direction, the first ultrasonic motor 211 and the second ultrasonic motor 214 both include a hollow mounting hole, and the polarizer 110 also includes a first retaining ring 213, a first linear polarizer 212 mounted in the hollow mounting hole of the first ultrasonic motor 211 through the first retaining ring 213, a second retaining ring 216, and a first quarter wave plate 215 mounted in the hollow mounting hole of the second ultrasonic motor 214 through the second retaining ring 216; Figure 2 In the embodiment, the first ultrasonic motor 211 and the second ultrasonic motor 214 rotate the first linear polarizer 212 and the first quarter-wave plate 215 respectively, so that the first linear polarizer 212 and the first quarter-wave plate 215 complete four rotation angle combinations to sequentially modulate the visible light into four polarization states of incident polarized light. The ultrasonic motor can use the motor to automatically adjust the angle of the polarizer 110 according to the set angle, which is simple, convenient and efficient.
[0030] In a specific embodiment, Figure 2As shown, the analyzer 130 is composed of a third ultrasonic motor 233 and a fourth ultrasonic motor 236 which are sequentially arranged along the emission direction of the reflected polarized light, and the third ultrasonic motor 233 and the fourth ultrasonic motor 236 each include a hollow mounting hole, and the analyzer 130 also includes a third retaining ring 231, a second quarter wave plate 232 mounted in the hollow mounting hole of the third ultrasonic motor 233 through the third retaining ring 231, a fourth retaining ring 234, and a second linear polarizer 235 mounted in the hollow mounting hole of the fourth ultrasonic motor 236 through the fourth retaining ring 234; Figure 2 In the process, the angle combination of the second quarter wave plate 232 and the second linear polarizer 235 in the analyzer 130 is adjusted by adjusting the angle of the ultrasonic motor to modulate the reflected polarized light of any polarization state into the outgoing polarized light of four polarization states. The ultrasonic motor can use the motor to automatically adjust the angle of the analyzer 130 according to the set angle, which is simple, convenient and efficient.
[0031] In a specific embodiment, the polarizer 110 modulates the visible light into incident polarized light of four polarization states, namely, horizontal linear polarization, 45-degree linear polarization, vertical linear polarization, and right-hand circular polarization. The analyzer 130 modulates the incident polarized light of each polarization state into outgoing polarized light of four polarization states, namely, horizontal linear polarization, 45-degree linear polarization, vertical linear polarization, and right-hand circular polarization. That is, the incident polarized light of one polarization state corresponds to the outgoing polarized light of four polarization states, resulting in a total of sixteen outgoing polarized light states.
[0032] In a specific embodiment, the first ultrasonic motor 211 , the second ultrasonic motor 214 , the third ultrasonic motor 233 , and the fourth ultrasonic motor 236 are piezoelectric resonant motors.
[0033] In a specific embodiment, the first linear polarizer 212 and the second linear polarizer 235 are both thin-film linear polarizers with an operating wavelength of 400 nm-700 nm and an outer diameter of ø25.4 mm.
[0034] In a specific embodiment, the first quarter wave plate 215 and the second quarter wave plate 232 both have an operating wavelength of 400nm-700nm, achromatic quarter wave plate with outer diameter ø25.4mm.
[0035] In a specific embodiment, the first retaining ring 213 , the second retaining ring 216 , the third retaining ring 231 and the fourth retaining ring 234 are all retaining rings with a thread diameter of SM1, which are respectively used to fix the first linear polarizer 212 , the first quarter wave plate 215 , the second linear polarizer 235 and the second linear polarizer 235 .
[0036] In a specific embodiment, the image processing module 150 includes a first processing module, a calculation module, a linear stretching processing module, a grayscale characterization module, a quality screening module, a fusion processing module, a second processing module and a defect contour detection module connected in sequence; the first processing module is used to preprocess the image, and the preprocessing is specifically filtering and noise reduction processing to improve the image quality; the calculation module is used to combine and calculate the image output by the first processing module to obtain the Mueller matrix of the detection target; the linear stretching processing module is used to perform linear stretching processing on each image unit of the Mueller matrix to obtain the Mueller matrix image unit after linear stretching; the grayscale characterization module is used to perform linear stretching processing on each Mueller matrix after linear stretching The described quality screening module is used for screening all the Mueller matrix image units after grayscale characterization with a custom image quality index as a screening standard to obtain a screened high-quality image; the described fusion processing module is used for performing wavelet decomposition and fusion processing on the screened high-quality image to obtain a fused grayscale image; the described second processing module is used for performing sharpening and noise reduction processing on the fused grayscale image to obtain a processed image to be tested; the described defect contour detection module is used for searching for defect contours on the surface of an object in the processed image to be tested, filtering out some noise contours, and finally marking the detected defect contours on the image.
[0037] In a specific embodiment, the quality screening module includes a contrast calculation module, a gradient calculation module, an information entropy calculation module, an edge contour calculation module, a variance calculation module, a quality index calculation module and an image screening module; the contrast calculation module is used to calculate the grayscale co-occurrence matrix contrast value of each Mueller matrix image unit after the grayscale representation; the gradient calculation module is used to calculate the average gradient value of each Mueller matrix image unit after the grayscale representation; the information entropy calculation module is used to calculate the information entropy value of each Mueller matrix image unit after the grayscale representation; the edge contour calculation module is used to calculate the total length value of the edge outer contour of each Mueller matrix image unit after the grayscale representation; The variance calculation module is used to calculate the grayscale value variance value of each Mueller matrix image unit after grayscale representation; the quality index calculation module is used to weight the grayscale co-occurrence matrix contrast value, average gradient value, information entropy value, edge outer contour total length value and grayscale value variance value of each Mueller matrix image unit after grayscale representation (the specific weight value will be determined by the specific detection object) to obtain the quality index of each Mueller matrix image unit after grayscale representation; the image screening module is used to automatically screen out quality indicators higher than its custom quality indicators from all the quality indicators obtained as high-quality indicators, and the Mueller matrix image unit corresponding to the high-quality indicators is the screened high-quality images.
[0038] The present invention relates to a metal surface defect detection method based on Mueller matrix detection, the method comprising the following steps: Step 1: According to Figure 2 As shown, the components required for the detection device are prepared. The light source 100 is an LED visible light source 100; the first ultrasonic motor 211, the second ultrasonic motor 214, the third ultrasonic motor 233 and the fourth ultrasonic motor 236 are piezoelectric resonant motors; the first retaining ring 213, the second retaining ring 216, the third retaining ring 231 and the fourth retaining ring 234 are retaining rings with an external thread diameter of SM1, the first linear polarizer 212 and the second linear polarizer 235 are thin-film linear polarizers; the first quarter-wave plate 215 and the second quarter-wave plate 232 are achromatic quarter-wave plates; the image acquisition module 140 uses a black-and-white image sensor (CCD). And according to the attached Figure 1The device is constructed in the order shown. First, the visible light source 100 is installed in the shell 200 and fixed by bolts; then the first linear polarizer 212, the first quarter wave plate 215, the second linear polarizer 235 and the second quarter wave plate 232 are installed at the hollow mounting holes of the first ultrasonic motor 211, the second ultrasonic motor 214, the third ultrasonic motor 233 and the fourth ultrasonic motor 236 respectively, and fixed by the first clamping ring 213, the second clamping ring 216, the third clamping ring 231 and the fourth clamping ring 234 respectively; and the first ultrasonic motor 211, the second ultrasonic motor 214, the third ultrasonic motor 233 and the fourth ultrasonic motor 236 are installed in sequence inside the shell 200 and fixed by bolts, and finally the image acquisition module 140 is installed and fixed at the specified position of the shell 200 by bolts, and finally each device is connected to the host computer through a data cable.
[0039] Step 2: By using a self-made program of the host computer, the angles of the first ultrasonic motor 211, the second ultrasonic motor 214, the third ultrasonic motor 233 and the fourth ultrasonic motor 236 are adjusted so that the first linear polarizer 212, the second linear polarizer 235, the first quarter wave plate 215 and the second quarter wave plate 232 can achieve different angle combinations, and images are collected under different angle combinations, wherein the image naming rule is: "H" represents horizontal linear polarization, "V" represents vertical linear polarization, "P" represents 45° linear polarization, and "R" represents right-handed circular polarization. Images are collected according to the grouping rule, and the grouping rule is: HH, HV, HP, HR, PH, PV, PP, PR, VH, VV, VP, VR, RH, RV, RP, RR; that is, the image acquisition module 140 is used to collect images under 16 different polarization state combinations; during the acquisition process, each collected image is named according to the grouping rule and then transferred to the specified folder.
[0040] Step 3: Use the image processing software in the host computer program to process the image. The software first performs preprocessing operations such as filtering and noise reduction on the image acquired by the imported image acquisition module to improve the image quality and signal-to-noise ratio. Then, the software calculates the Mueller matrix using the following formula: ; Use grayscale image to represent the surface Mueller matrix information of the object to be tested as shown in the attached Figure 3 shown.
[0041] Step 4: In order to extract accurate image information from the Mueller matrix for the convenience of image display and processing, the image unit corresponding to each Mueller matrix element is first linearly stretched, and the grayscale co-occurrence matrix contrast value, average gradient value, information entropy value, total length value of the edge outer contour, and grayscale value variance value of the linearly stretched Mueller matrix image unit are calculated. Then, the grayscale co-occurrence matrix contrast value, average gradient value, information entropy value, total length value of the edge outer contour, and grayscale value variance value of each grayscale-characterized Mueller matrix image unit are weighted and fused to calculate the quality index of each image unit, and the matrix image units that meet the requirements are screened out by setting the quality index threshold. In a specific embodiment, the weight ratio is set to 1:0.3:0.3:1:0.3 (grayscale co-occurrence matrix contrast value: average gradient value: information entropy value: total length value of the edge outer contour: grayscale value variance value), and the quality index threshold is 1, so that high-quality images that meet the conditions are screened out, which are [2, 1], [2, 3], [3, 1], and [3, 2] respectively. The images are fused using a wavelet decomposition and fusion algorithm (by performing wavelet decomposition on multiple input images, fusing the coefficients of each level, and reconstructing a fused image), that is, by image fusion, the polarization state information in different directions contained in different image units of the Mueller matrix is collected to enhance the defect features in different directions. In a specific embodiment, the db1 wavelet in the Daubechies wavelet family is selected as the basis function, and the number of layers of wavelet decomposition is 1 (the role of the db1 wavelet as a basis function is to perform multi-resolution decomposition on the image, so that it presents low-frequency and high-frequency features at different scale levels, providing an effective basic representation for subsequent image compression, denoising, feature extraction and other processing). The wavelet has good time-frequency localization characteristics and is suitable for multi-resolution analysis of images. Next, a sharpening filter is defined to enhance the edges in the image, making high-frequency features such as scratches more obvious, and the noise interference is filtered out by a secondary noise reduction algorithm.
[0042] In a specific embodiment, the sharpening kernel is defined as , use the non-local mean denoising algorithm to perform secondary denoising to obtain the denoised image, as shown in the attached figure. Figure 4As shown. Subsequently, the denoised image is binarized to obtain a processed image to be tested, and an edge detection algorithm is used to search for defect contours on the surface of the object to be tested 120 in the binarized image. The edge features are drawn in the form of lines and the circumscribed rectangle of the connected area is drawn. The contours that are not within the specified range of the matrix feature parameters are filtered out by setting the feature parameters, and finally the filtered contours are drawn on the image in the form of lines. In a specific embodiment, the binarization process adopts a fixed threshold method with a threshold of 185. The contour filtering feature parameter is set to a closed contour area of 600 pixels, that is, a contour area less than 600 pixels is regarded as an invalid defect area. The final defect contour detection result is shown in the attached figure. Figure 5 shown.
Claims
1. A metal surface defect detection device based on Mueller matrix detection, characterized in that: include: The device body comprises: A light source (100) for providing visible light; A polarizer (110) is used to receive the visible light and modulate the visible light into incident polarized light of four polarization states by adjusting its polarization angle, wherein the incident polarized light is incident on the surface of the object to be measured (120), and reflected polarized light is reflected from the surface of the object to be measured (120); A polarizer (130) is used to receive the reflected polarized light and modulate the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle, thereby obtaining outgoing polarized light of sixteen polarization states; An image acquisition module (140) is used to receive outgoing polarized light of each polarization state and form a corresponding imaging image; A housing (200), wherein the light source (100), the polarizer (110), the analyzer (130) and the image acquisition module (140) are arranged in the housing (200); An image processing module (150) is connected to the device body; the image processing module (150) is used to receive all the image images, perform calculations on all the image images after preprocessing, obtain a Mueller matrix about the surface of the object to be tested (120), and use a grayscale image to represent each image unit of the Mueller matrix, use a custom image quality index as a screening standard, screen each image unit of the Mueller matrix, obtain a screened high-quality image, perform wavelet decomposition and fusion processing on the high-quality image, obtain a fused grayscale image, perform image processing on the fused grayscale image, obtain a processed image to be tested, use the processed image to be tested to find the surface defect contour of the object to be tested (120) through a contour detection function, and draw a line mark on the processed image to be tested.
2. A metal surface defect detection device based on Mueller matrix detection according to claim 1, characterized in that: The polarizer (110) is composed of a first ultrasonic motor (211) and a second ultrasonic motor (214) which are sequentially arranged along the visible light emission direction, the first ultrasonic motor (211) and the second ultrasonic motor (214) both comprising a hollow mounting hole, and the polarizer (110) further comprises a first retaining ring (213), a first linear polarizer (212) mounted in the hollow mounting hole of the first ultrasonic motor (211) via the first retaining ring (213), a second retaining ring (216), and a first quarter wave plate (215) mounted in the hollow mounting hole of the second ultrasonic motor (214) via the second retaining ring (216).
3. A metal surface defect detection device based on Mueller matrix detection according to claim 2, characterized in that: The polarizer (130) is composed of a third ultrasonic motor (233) and a fourth ultrasonic motor (236) which are arranged in sequence along the emission direction of the reflected polarized light. The third ultrasonic motor (233) and the fourth ultrasonic motor (236) both include a hollow mounting hole. The polarizer (130) also includes a third retaining ring (231), a second linear polarizer (235) installed in the hollow mounting hole of the third ultrasonic motor (233) via the third retaining ring (231), a fourth retaining ring (234), and a second quarter-wave plate (232) installed in the hollow mounting hole of the fourth ultrasonic motor (236) via the fourth retaining ring (234).
4. A metal surface defect detection device based on Mueller matrix detection according to claim 1, 2 or 3, characterized in that: The image processing module (150) comprises a first processing module, a calculation module, a linear stretching processing module, a grayscale characterization module, a quality screening module, a fusion processing module, a second processing module and a defect contour detection module which are connected in sequence; the first processing module is used to preprocess the image, and the preprocessing is specifically filtering and noise reduction processing; the calculation module is used to calculate the image output by the first processing module to obtain a Mueller matrix about the surface of the object to be measured (120); the linear stretching processing module is used to perform linear stretching processing on each image unit of the Mueller matrix to obtain a Mueller matrix image unit after linear stretching; the grayscale characterization module is used to perform linear stretching processing on each Mueller matrix image unit after linear stretching A grayscale image is represented to obtain a Mueller matrix image unit after grayscale representation; the quality screening module is used to use a custom image quality index as a screening standard to screen from all the Mueller matrix image units after grayscale representation to obtain a screened high-quality image; the fusion processing module is used to perform wavelet decomposition and fusion processing on the screened high-quality image to obtain a fused grayscale image; the second processing module is used to perform sharpening, secondary filtering and binarization processing on the fused grayscale image to obtain a processed image to be tested; the defect contour detection module is used to search for defect contours on the surface of the object to be tested (120) in the processed image to be tested, filter out some noise contours, and finally mark the detected defect contours on the image.
5. The metal surface defect detection device based on Mueller matrix detection according to claim 4, characterized in that: The quality screening module includes a contrast calculation module, a gradient calculation module, an information entropy calculation module, an edge contour calculation module, a variance calculation module, a quality index calculation module and an image screening module; the contrast calculation module is used to calculate the grayscale co-occurrence matrix contrast value of each Mueller matrix image unit after the grayscale representation; the gradient calculation module is used to calculate the average gradient value of each Mueller matrix image unit after the grayscale representation; the information entropy calculation module is used to calculate the information entropy value of each Mueller matrix image unit after the grayscale representation; the edge contour calculation module is used to calculate the total length of the edge outer contour of each Mueller matrix image unit after the grayscale representation degree value; the variance calculation module is used to calculate the gray value variance value of each Mueller matrix image unit after the grayscale representation; the quality index calculation module is used to weight the grayscale co-occurrence matrix contrast value, average gradient value, information entropy value, edge outer contour total length value and gray value variance value of each Mueller matrix image unit after the grayscale representation, so as to obtain the quality index of each Mueller matrix image unit after the grayscale representation; the image screening module is used to automatically screen out the quality index higher than its custom quality index from all the quality indexes obtained as the high-quality index, and the Mueller matrix image unit corresponding to the high-quality index is the screened high-quality image.
6. A metal surface defect detection method based on Mueller matrix detection, the method is implemented by a metal surface defect detection device based on Mueller matrix detection according to any one of claims 1 to 5, characterized in that: The method comprises the following steps: S1, a light source (100) emits visible light, the visible light enters a polarizer (110), and the polarizer (110) sequentially modulates the visible light into incident polarized light rays of four polarization states by adjusting the polarization angle thereof; S2, the incident polarized light rays in the four polarization states are incident on the surface of the object to be measured (120) in sequence, and the surface of the object to be measured (120) reflects reflected polarized light rays in the four polarization states in sequence; S3, the reflected polarized light rays of the four polarization states sequentially enter the analyzer (130), and the analyzer (130) modulates the reflected polarized light rays of any polarization state into outgoing polarized light rays of four polarization states by adjusting the polarization angle thereof, thereby obtaining outgoing polarized light rays of sixteen polarization states; S4, the image acquisition module (140) receives the outgoing polarized light of each polarization state and forms a corresponding imaging image, the image processing module (150) receives all the imaging images, performs filtering and noise reduction processing on all the imaging images, and then calculates the Mueller matrix of the detection target; S5, performing linear stretching processing on each image unit of the Mueller matrix, and stretching and mapping the grayscale value range of each image unit of the Mueller matrix to [0, 255], to obtain a linearly stretched Mueller matrix image unit; using a grayscale image to characterize each linearly stretched Mueller matrix image unit, to obtain a grayscale characterized Mueller matrix image unit; S6. Using the customized image quality index as the screening standard, screening is performed from all the grayscale-characterized Mueller matrix image units to obtain a screened high-quality image, the screened high-quality image is subjected to wavelet decomposition and fusion processing to obtain a fused grayscale image, the fused grayscale image is sequentially sharpened, secondary filtered and binarized to obtain a processed image to be tested, the processed image to be tested is used through the cv2.findContours() contour detection function to find closed contours in the image to be tested, and then the effective defect contours are screened out through the set contour filtering feature parameters, and line markings are drawn on the processed image to be tested.
7. A metal surface defect detection method based on Mueller matrix detection according to claim 6, characterized in that: In step S6, the specific process of obtaining the screened high-quality images includes the following steps: S6.1, calculating the contrast value of the grayscale co-occurrence matrix of each Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, and represents the gray level, Represents the frequency value of the corresponding position in the gray-level co-occurrence matrix; S6.2, calculate the average gradient value of each grayscale-characterized Mueller matrix image unit, and the calculation formula is: ; in, and represent the gradients of the Mueller matrix image unit in the horizontal direction and the vertical direction after the grayscale representation, N represents the total number of pixels in the Mueller matrix image unit after the grayscale representation, Indicates The gradient magnitude of pixels; S6.3, calculating the information entropy value of the Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, Represents grayscale value The probability of Only when it is involved in the calculation; S6.4, calculate the total length of the edge outer contour of the Mueller matrix image unit after the grayscale representation, and the calculation formula is: ; in, The result image of Canny edge detection is represented, and the edge pixel value is counted when it is greater than 0; the grayscale value variance value of the Mueller matrix image unit after the grayscale representation is calculated by the variance calculation module; the calculation formula is: ; in, Represents the grayscale representation of the Mueller matrix image unit The gray value of a pixel, represents the mean gray value of all pixels. represents the total number of pixels in the Mueller matrix image unit after the grayscale representation; S6.
5. The contrast value, average gradient value, information entropy value, total length value of the edge outer contour and gray value variance value of each image unit of the Mueller matrix after the grayscale representation are weighted and fused to obtain the quality index of each image unit of the Mueller matrix after the grayscale representation. The calculation formula for the weighted fusion is: ; in, as well as represents the weight coefficient of the corresponding parameter, Represents the contrast value of the image unit based on the gray-level co-occurrence matrix, Represents the average gradient value of the image unit, Represents the information entropy value of the image unit, Indicates the total length of the edge contour of the image unit. Indicates the gray value variance of the image unit; S6.
6. Automatically select quality indicators greater than Q from all quality indicators obtained in step S6.5 as high-quality indicators, and the grayscale-characterized Mueller matrix image unit corresponding to the high-quality indicator is the selected high-quality image.
8. The metal surface defect detection method based on Mueller matrix detection according to claim 6, characterized in that: In step S1, the specific process of the polarizer (110) modulating the visible light into incident polarized light of four polarization states in sequence by adjusting its polarization angle is as follows: the first ultrasonic motor (211) and the second ultrasonic motor (214) in the polarizer (110) respectively rotate the first linear polarizer (212) and the first quarter-wave plate (215), so that the first linear polarizer (212) and the first quarter-wave plate (215) complete four rotation angle combinations to modulate the visible light into incident polarized light of four polarization states in sequence.
9. The metal surface defect detection method based on Mueller matrix detection according to claim 6, characterized in that: In step S3, the specific process of the polarizer (130) modulating the reflected polarized light of any polarization state into outgoing polarized light of four polarization states by adjusting its polarization angle is as follows: the third ultrasonic motor (233) and the fourth ultrasonic motor (236) in the polarizer (130) respectively rotate the second linear polarizer (235) and the second quarter-wave plate (232), and for the reflected polarized light of any polarization state, the second linear polarizer (235) and the first quarter-wave plate (215) complete four different rotation angle combinations to modulate the reflected polarized light of the polarization state into outgoing polarized light of four polarization states.
Citation Information
Patent Citations
A method for full polarization fast dynamic Stokes imaging
CN111982825B
Optical element surface microdefect detection method, system, equipment and medium
CN116482123A
Method and apparatus for imaging using polarimetry and matrix based image reconstruction
CA2428628A1
Polarization detector and polarization detecting method
CN103698015A
Device for precisely calibrating inclined angle between wave plate and polaroid, and calibration method
CN104931234A
Cited By
Fine metal powder defect detection method and system based on image recognition
CN120655638A
Polarization imaging metal surface scratch identification system
CN121027123A