Mirror-like defect positioning method and device, electronic equipment and storage medium
By calculating the local standard deviation of the global phase gradient extremum map of the surface of a mirror-like object, the problem of complex calculation and inability to eliminate color interference in the existing technology is solved, and more efficient defect localization is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIHUA LAB
- Filing Date
- 2023-11-30
- Publication Date
- 2026-06-23
AI Technical Summary
Existing mirror-like defect recognition technologies involve complex calculations and cannot effectively eliminate color interference, resulting in low detection efficiency.
By calculating the wrapping phase of the surface of a mirror-like object, a local standard deviation map of the global phase gradient extremum is obtained. Image analysis techniques are then used to detect the local standard deviation map to locate defects.
It improves the efficiency of locating mirror-like defects, can more clearly display defects on the object's surface, simplifies the calculation process, and eliminates color interference.
Smart Images

Figure CN117522849B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual recognition technology, and more specifically, to a method, apparatus, electronic device, and storage medium for locating mirror-like defects. Background Technology
[0002] Appearance quality inspection is a common requirement in the manufacturing industry. Traditional appearance inspection is done manually. In recent years, computer vision technology has developed rapidly, and computer vision automated inspection has been widely used in many fields. However, there is still a great challenge in inspecting surfaces with low roughness, such as mirror or mirror-like surfaces. Examples include surface finish assessment of metal medical devices, defect location of solar monocrystalline silicon, appearance quality assessment of ceramics, and defect identification of high-gloss paint surfaces.
[0003] Fringe deflection is a technique capable of high-precision 3D reconstruction of mirror and mirror-like surfaces. In practical defect detection applications, considering efficiency factors, it is often not necessary to obtain the final 3D reconstruction result. Instead, phase analysis and modulation analysis are used to identify and locate the defect position. Among these, modulation analysis cannot eliminate color interference, and the calculation process of existing phase analysis techniques is relatively complex. In order to further improve the efficiency of defect location, a fast and effective phase analysis technique is needed to realize online real-time detection of surface defects of low-roughness objects.
[0004] Therefore, in order to solve the technical problems of the existing mirror-like defect identification technology, which has a relatively complex calculation process and cannot eliminate the interference of color, there is an urgent need for a mirror-like defect localization method, device, electronic device and storage medium. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for locating mirror-like defects. By detecting the local standard deviation map of the global phase gradient extremum map obtained by calculating the wrapping phase of the surface of a mirror-like object, the mirror-like defects can be located. This solves the problems of existing mirror-like defect identification technologies, such as relatively complex calculation processes and inability to eliminate color interference. The local standard deviation map of the global phase gradient extremum map can more clearly show the defects on the surface of the mirror-like object, thus improving the efficiency of mirror-like defect location.
[0006] Firstly, this application provides a method for locating mirror-like defects, comprising the following steps:
[0007] Obtain the deformation fringe pattern on the surface of the mirror-like object under test;
[0008] The phase-shifting method is used to calculate the wrapping phase in the horizontal and vertical directions corresponding to the deformed fringe pattern.
[0009] According to the preset phase gradient calculation formula, the phase gradient extreme value map in the horizontal direction corresponding to the phase wrapped in the horizontal axis and the phase gradient extreme value map in the vertical direction corresponding to the phase wrapped in the vertical axis are calculated and fused to obtain the global phase gradient extreme value map.
[0010] The local standard deviation map of the global phase gradient extremum map is calculated based on the preset standard deviation calculation local window and the preset local standard deviation map calculation formula.
[0011] By using image analysis technology to detect the local standard deviation map, the location of defects on the surface of the mirror-like object under test can be obtained.
[0012] The mirror-like defect localization method provided in this application can locate mirror-like defects. It detects the defects by using the local standard deviation map of the global phase gradient extremum map obtained by calculating the wrapping phase of the mirror-like object surface. This solves the problems of relatively complex calculation process and inability to eliminate color interference in existing mirror-like defect identification technologies. The local standard deviation map of the global phase gradient extremum map can more clearly show the defects on the surface of the mirror-like object, thus improving the localization efficiency of mirror-like defects.
[0013] Optionally, obtain the deformation fringe pattern of the surface of the mirror-like object to be tested, including:
[0014] Obtain the N-step phase shift map generated by the detection system;
[0015] Using multi-step phase-shifting technology, the N-step phase-shifting map is projected onto the surface of the mirror-like object under test and phase-shifted to obtain the deformed fringe light reflected from the surface of the mirror-like object under test;
[0016] The deformed fringe light is collected to generate a deformed fringe pattern on the surface of the mirror-like object under test.
[0017] The mirror-like defect localization method provided in this application can locate mirror-like defects. By using phase measurement deflection, the deformation fringe pattern of the surface of the mirror-like object to be tested can be quickly obtained, which is beneficial to improving the localization efficiency of mirror-like defects.
[0018] Optionally, based on a preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated and fused to obtain a global phase gradient extreme value map, including:
[0019] According to the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated.
[0020] The global phase gradient extreme value map is obtained by fusing the phase gradient extreme value map in the horizontal axis direction and the phase gradient extreme value map in the vertical axis direction.
[0021] The mirror-like defect localization method provided in this application can locate mirror-like defects. By fusing the calculated phase gradient extreme value map of the horizontal axis direction corresponding to the phase and the phase gradient extreme value map of the vertical axis direction corresponding to the phase, a global phase gradient extreme value map is obtained. The global phase gradient extreme value map can better reflect the deformation defects on the surface of the mirror-like object, which is beneficial to improving the localization efficiency of mirror-like defects.
[0022] Optionally, based on the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated, including:
[0023] Based on the preset phase gradient calculation formula, the phase gradient quality map in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the phase gradient quality map in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated.
[0024] Based on the preset phase gradient extremum calculation formula, the phase gradient extremum map corresponding to the horizontal axis phase gradient quality map and the phase gradient extremum map corresponding to the vertical axis phase gradient quality map are calculated.
[0025] Optionally, the preset phase gradient calculation formula includes a phase gradient calculation formula along the horizontal axis and a phase gradient calculation formula along the vertical axis.
[0026] The specific formula for calculating the phase gradient along the horizontal axis is as follows:
[0027] ;
[0028] in, This represents the phase gradient along the horizontal axis, which wraps the phase along either the horizontal or vertical axis, representing the phase gradient at the pixel coordinate (i, j) within the phase. The wrap phase at pixel coordinates (i, j); For the wrapper operator, use express , The operation rules are as follows:
[0029] ;
[0030] The specific formula for calculating the phase gradient along the vertical axis is as follows:
[0031] ;
[0032] in, The phase gradient in the vertical direction of the pixel point at coordinate (i, j) is the phase gradient that wraps the phase in the horizontal direction or the phase in the vertical direction.
[0033] Optionally, the preset phase gradient extremum calculation formula includes the extremum calculation formula for the phase gradient quality map in the horizontal axis direction and the extremum calculation formula for the phase gradient quality map in the vertical axis direction.
[0034] The specific formula for calculating the extrema of the phase gradient quality map in the horizontal axis direction is as follows:
[0035] ;
[0036] in, This represents the extreme value of the phase gradient at pixel coordinates (i,j) in the phase gradient quality map along the horizontal axis. This represents the phase gradient of a pixel at coordinate (i,j) along the vertical axis in the phase gradient quality map. This represents the phase gradient along the horizontal axis of the pixel at coordinate (i,j) in the quality map. It is the absolute value;
[0037] The specific formula for calculating the extrema of the phase gradient quality map in the vertical axis direction is as follows:
[0038] ;
[0039] in, This represents the extreme value of the phase gradient at pixel coordinate (i,j) in the phase gradient quality map along the vertical axis. This represents the phase gradient along the vertical axis of the pixel at coordinate (i,j) in the quality map. This represents the phase gradient of a pixel at coordinate (i,j) along the horizontal axis in the phase gradient quality map.
[0040] Optionally, the preset formula for calculating the local standard deviation plot is as follows:
[0041] ;
[0042] in, This represents the local standard deviation of the pixel at coordinates (i,j) in the global phase gradient extremum map, where k is a preset local window for standard deviation calculation. This represents the local standard deviation of the pixel coordinates (q, p) in the global phase gradient extremum map. This is the average value of the global phase gradient extrema of each pixel within a local window calculated using standard deviation, centered at the pixel coordinates (q, p) in the global phase gradient extrema map.
[0043] Secondly, this application provides a mirror-like defect locating device for locating mirror-like defects, comprising:
[0044] The acquisition module is used to acquire the deformation stripe pattern of the surface of the mirror-like object under test;
[0045] The first calculation module is used to calculate the wrapping phase in the horizontal axis direction and the wrapping phase in the vertical axis direction corresponding to the deformed fringe pattern by using the phase shift method.
[0046] The fusion module is used to calculate and fuse the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction according to the preset phase gradient calculation formula, so as to obtain the global phase gradient extreme value map.
[0047] The second calculation module is used to calculate the local window based on the preset standard deviation and the preset local standard deviation map calculation formula, and to calculate the local standard deviation map of the global phase gradient extremum map.
[0048] The detection module is used to detect the local standard deviation map using image analysis technology to obtain the location of defects on the surface of the mirror-like object to be tested.
[0049] This type of mirror defect localization device detects mirror defects by analyzing the local standard deviation map of the global phase gradient extremum map obtained from the wrapping phase of the mirror-like object surface. This solves the problems of existing mirror defect identification technologies, such as relatively complex calculation processes and the inability to eliminate color interference. The local standard deviation map of the global phase gradient extremum map can more clearly show the defects on the surface of the mirror-like object, thus improving the localization efficiency of mirror defects.
[0050] Thirdly, this application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the mirror-like defect localization method described above.
[0051] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the mirror-like defect localization method described above.
[0052] Beneficial effects: The mirror-like defect localization method, device, electronic device and storage medium provided in this application detect the local standard deviation map of the global phase gradient extremum map obtained by calculating the wrapping phase of the mirror-like object surface to locate mirror-like defects. This solves the problems of relatively complex calculation process and inability to eliminate color interference in existing mirror-like defect identification technologies. The local standard deviation map of the global phase gradient extremum map can more clearly show the defects on the surface of the mirror-like object, thus improving the localization efficiency of mirror-like defects. Attached Figure Description
[0053] Figure 1 A flowchart of a method for locating mirror-like defects provided in an embodiment of this application.
[0054] Figure 2 This is a schematic diagram of the structure of the mirror-like defect locating device provided in the embodiments of this application.
[0055] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0056] Figure 4 This is a schematic diagram of a deformed stripe pattern.
[0057] Figure 5 A schematic diagram showing the phase wrapped in the horizontal and vertical axes.
[0058] Figure 6 This is a schematic diagram of the fusion process of the global phase gradient extremum map.
[0059] Figure 7 This is a schematic diagram illustrating the calculation process of a local standard deviation plot.
[0060] Labeling Explanation: 1. Acquisition Module; 2. First Calculation Module; 3. Fusion Module; 4. Second Calculation Module; 5. Detection Module; 301. Processor; 302. Memory; 303. Communication Bus. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0062] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0063] Please refer to Figure 1 , Figure 1 This application provides a method for locating mirror-like defects in some embodiments, comprising the following steps:
[0064] Step S101: Obtain the deformation stripe pattern of the surface of the mirror-like object to be tested;
[0065] Step S102: Calculate the wrapping phase in the horizontal and vertical directions corresponding to the deformed fringe pattern using the phase shift method.
[0066] Step S103: According to the preset phase gradient calculation formula, calculate and fuse the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase to obtain the global phase gradient extreme value map.
[0067] Step S104: Calculate the local standard deviation map of the global phase gradient extremum map based on the preset standard deviation calculation local window and the preset local standard deviation map calculation formula.
[0068] Step S105: Using image analysis technology, detect the local standard deviation map to obtain the defect location on the surface of the mirror-like object to be tested.
[0069] This method for locating mirror-like defects detects defects by analyzing the local standard deviation of the global phase gradient extremum map, which is calculated from the wrapping phase of the mirror-like object's surface. This addresses the problems of existing mirror-like defect identification technologies, such as relatively complex calculation processes and the inability to eliminate color interference. The local standard deviation of the global phase gradient extremum map can more clearly display the defects on the surface of the mirror-like object, thus improving the efficiency of mirror-like defect location.
[0070] Specifically, in step S101, obtaining the deformation stripe pattern of the surface of the mirror-like object to be tested includes:
[0071] Obtain the N-step phase shift map generated by the detection system;
[0072] By using multi-step phase-shifting technology, the N-step phase-shifting pattern is projected onto the surface of the mirror-like object under test and phase-shifted to obtain the deformed fringe light reflected from the surface of the mirror-like object under test.
[0073] Collect deformed fringe light to generate a deformed fringe pattern on the surface of the mirror-like object under test.
[0074] In step S101, a detection system such as a PMD (Phase Measuring Deflectometry) system is set up to acquire an N-step phase-shift map generated by the detection system using a computer or other equipment. A light source device, such as a display, is used as the light source to project the N-step phase-shift map (i.e., the projected fringe map) onto the surface of the mirror-like object under test (i.e., the mirror-like surface). Using multi-step phase-shifting technology, phase shifting occurs simultaneously with projection. The surface of the mirror-like object under test reflects the projected light, resulting in distorted fringe light. Simultaneously with phase shifting, a camera or other acquisition device is used to collect the distorted fringe light, generating the corresponding distorted fringe map, thus obtaining the distorted fringe map of the surface of the mirror-like object under test. The aforementioned equipment can be modified according to actual needs, but is not limited to this.
[0075] Specifically, in step S101, the phase shift direction during the N-step phase shift map projection includes both the horizontal and vertical coordinate directions. When the phase shift direction during the N-step phase shift map projection is the horizontal coordinate direction, the generated deformed fringe pattern is a deformed fringe pattern in the horizontal coordinate direction; when the phase shift direction during the N-step phase shift map projection is the vertical coordinate direction, the generated deformed fringe pattern is a deformed fringe pattern in the vertical coordinate direction. Figure 4 As shown, Figure 4 This is a schematic diagram of a deformed fringe pattern, where the upper deformed fringe pattern is the deformed fringe pattern in the vertical axis direction, and the lower deformed fringe pattern is the deformed fringe pattern in the horizontal axis direction.
[0076] Specifically, in step S102, the deformed fringe patterns in the horizontal and vertical directions are extracted from the deformed fringe patterns. Using the phase-shifting method, the wrapping phase in the horizontal (X) direction corresponding to the deformed fringe pattern and the wrapping phase in the vertical (Y) direction corresponding to the deformed fringe pattern are calculated. For example... Figure 5 As shown, Figure 5 This diagram illustrates the wrapping of phase along the horizontal and vertical axes, with the left side showing the wrapping of phase along the horizontal axis and the right side showing the wrapping of phase along the vertical axis.
[0077] The specific formula for calculating the wrapping phase is as follows:
[0078] ;
[0079] in, To wrap the phase, The intensity of the deformed fringe pattern (this intensity can be either the intensity of the deformed fringe pattern in the horizontal axis or the intensity of the deformed fringe pattern in the vertical axis; if it is the intensity of the deformed fringe pattern in the horizontal axis, i.e., when...) = When, it is to calculate the phase wrapped in the horizontal axis direction; if it is the intensity of the distorted fringe pattern in the vertical axis direction, that is, when = When this is the case, it is to calculate the phase wrapped in the vertical axis direction.
[0080] Specifically, in step S103, according to the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase are calculated and fused to obtain a global phase gradient extreme value map, including:
[0081] Based on the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase are calculated.
[0082] By fusing the phase gradient extremum map in the horizontal axis direction and the phase gradient extremum map in the vertical axis direction, a global phase gradient extremum map is obtained.
[0083] Specifically, in step S103, according to the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase are calculated, including:
[0084] Based on the preset phase gradient calculation formula, the phase gradient quality map in the horizontal direction corresponding to the phase and the phase gradient quality map in the vertical direction corresponding to the phase are calculated.
[0085] Based on the preset phase gradient extremum calculation formula, the phase gradient extremum map corresponding to the phase gradient quality map in the horizontal direction and the phase gradient extremum map corresponding to the phase gradient quality map in the vertical direction are calculated.
[0086] In step S103, based on a preset phase gradient calculation formula, the phase gradients corresponding to the X-direction and Y-direction wrapping phases are calculated, and the corresponding phase gradient quality maps (a phase gradient quality map in the horizontal axis direction and a phase gradient quality map in the vertical axis direction) are formed from the corresponding phase gradients. The preset phase gradient calculation formula includes a phase gradient calculation formula along the horizontal axis direction and a phase gradient calculation formula along the vertical axis direction. The phase gradient calculation formula along the horizontal axis direction is specifically as follows:
[0087] ;
[0088] in, This represents the phase gradient along the horizontal axis for a pixel at coordinate (i,j) that is wrapped in the phase along either the horizontal or vertical axis. The wrap phase for pixel coordinates (i,j) (this wrap phase can be a wrap phase in the horizontal or vertical direction; if it is a wrap phase in the horizontal direction, then...) The phase gradient along the horizontal axis is the phase gradient that wraps around the phase. If the phase is wrapped around the vertical axis, then... (The phase gradient along the horizontal axis is the phase gradient that wraps the phase in the vertical axis direction). For the wrapper operator, let's assume it's used... express , The operation rules are as follows:
[0089] ;
[0090] The specific formula for calculating the phase gradient along the vertical axis is as follows:
[0091] ;
[0092] in, This represents the phase gradient along the vertical axis for a pixel at coordinate (i,j) that is wrapped in the phase along either the horizontal or vertical axis. The wrap phase for pixel coordinates (i,j) (this wrap phase can be a wrap phase in the horizontal or vertical direction; if it is a wrap phase in the horizontal direction, then...) The phase gradient along the vertical axis is the phase gradient that wraps around the phase in the horizontal axis direction. If the phase is wrapped around the vertical axis direction, then... To calculate the phase gradient along the vertical axis that wraps the phase. The phase gradient of the last row and last column is not calculated, or the phase gradient of the last row and last column is equal to the phase gradient of the second-to-last row and second-to-last column, respectively.
[0093] In step S103, the phase gradient extreme value maps corresponding to the phase gradient quality map in the horizontal axis direction and the phase gradient quality map in the vertical axis direction are calculated according to the preset phase gradient extreme value calculation formula.
[0094] The formula for calculating the extreme values of the phase gradient in the horizontal axis (the formula for calculating the extreme values of the phase gradient mass map in the horizontal axis) is as follows:
[0095] ;
[0096] in, Let represent the phase gradient at pixel coordinates (i,j) in the extreme phase gradient map along the horizontal axis. This represents the phase gradient along the vertical axis of the pixel at coordinate (i,j) in the phase gradient quality map. This represents the phase gradient along the horizontal axis at pixel coordinates (i,j) in the quality map. The formula for calculating the phase gradient extremum map along the entire horizontal axis is to compare the maximum absolute value of the phase gradient along the vertical axis and the maximum absolute value of the phase gradient along the horizontal axis at the pixel coordinate (i,j) position in the horizontal axis phase gradient quality map, and select the maximum of these two values as the phase gradient at the pixel coordinate (i,j) position in the horizontal axis phase gradient quality map.
[0097] The formula for calculating the extreme values of the phase gradient in the vertical axis (the formula for calculating the extreme values of the phase gradient mass map in the vertical axis) is as follows:
[0098] ;
[0099] in, Let represent the phase gradient at pixel coordinate (i,j) in the extreme value map of the phase gradient along the vertical axis. This represents the phase gradient along the vertical axis at pixel coordinate (i,j) in the quality map. The phase gradient of pixel (i,j) in the vertical axis phase gradient quality map is the phase gradient along the horizontal axis. The calculation formula for the extreme value map of the phase gradient in the vertical axis means comparing the maximum value of the absolute value of the phase gradient along the vertical axis and the maximum value of the absolute value of the phase gradient along the horizontal axis at pixel (i,j) in the vertical axis phase gradient quality map, and selecting the maximum value of these two values as the phase gradient at pixel (i,j) in the vertical axis phase gradient quality map.
[0100] In step S103, the phase gradient extremum map in the horizontal axis direction and the phase gradient extremum map in the vertical axis direction are fused to obtain the global phase gradient extremum map. The specific formula for fusion calculation of the global phase gradient extremum map is as follows:
[0101] ;
[0102] in, The phase gradient at pixel coordinate (i,j) in the global phase gradient extremum map is represented by the fusion calculation formula of the entire global phase gradient extremum map. It compares the phase gradient at pixel coordinate (i,j) in the vertical axis phase gradient extremum map and the phase gradient at pixel coordinate (i,j) in the horizontal axis phase gradient extremum map, and selects the maximum value of the two values as the phase gradient at pixel coordinate (i,j) in the global phase gradient extremum map.
[0103] like Figure 6 As shown, Figure 6 This diagram illustrates the fusion process of global phase gradient extremum maps, where a represents the phase gradient extremum map along the horizontal axis, b represents the phase gradient extremum map along the vertical axis, and c represents the global phase gradient extremum map. Arrows indicate fusion along their directions. Figure 6 It can be seen that by fusing the phase gradient extremum map in the horizontal axis direction and the phase gradient extremum map in the vertical axis direction, that is, taking the maximum value of the phase gradient at the same position as the phase gradient at that position in the global phase gradient extremum map, the global phase gradient extremum map is obtained. In Figures a, b, and c, the irregular parts on the left are the defect locations with a larger degree of defects on the surface of the mirror-like object, such as grooves, pits, etc. The small dots in the shaded parts of Figures a, b, and c are the defect locations with a shallower degree of defects, such as slight bumps, scratches, etc.
[0104] Specifically, in step S104, the preset formula for calculating the local standard deviation plot is as follows:
[0105] ;
[0106] in, This represents the local standard deviation of the pixel at coordinates (i,j) in the global phase gradient extremum map, where k is a preset local window for standard deviation calculation. This represents the local standard deviation of the pixel coordinates (q, p) in the global phase gradient extremum map. This is the average value of the global phase gradient extrema of each pixel within a local window calculated using standard deviation, centered at the pixel coordinates (q, p) in the global phase gradient extrema map.
[0107] like Figure 7 As shown, Figure 7 This diagram illustrates the calculation process of the local standard deviation plot. In Figures c and d, c represents the global phase gradient extremum plot, and d represents the local standard deviation plot. Arrows indicate the calculation process. In Figures c and d, the irregularly shaped areas on the left represent defects with a higher degree of severity on the surface of the mirror-like object. In Figure c, the small dots in the shaded area on the right represent defects with a lower degree of severity. In Figure d, the small dots in the bright area on the right represent defects with a lower degree of severity. Figure 7 It can be seen that the local standard deviation map shows the surface defects of mirror-like objects more clearly than the global phase gradient extremum map. The local standard deviation map of this scheme can more clearly show the surface defects of mirror-like objects.
[0108] Specifically, in step S105, image analysis technology is used to detect the local standard deviation map to obtain the defect location on the surface of the mirror-like object to be tested. That is, the local standard deviation map is located, and image analysis technology is used to perform image filtering, threshold segmentation, morphological processing and contour extraction on the local standard deviation map to extract the local defects on the surface of the mirror-like object to be tested and obtain the defect location on the surface of the mirror-like object to be tested.
[0109] As shown above, this method for locating mirror defects involves acquiring the deformation fringe pattern of the surface of the mirror-like object under test. Using the phase-shifting method, it calculates the wrapping phase in the horizontal and vertical directions corresponding to the deformation fringe pattern. Based on a preset phase gradient calculation formula, it calculates and fuses the extreme values of the horizontal and vertical phase gradients corresponding to the wrapping phases to obtain a global phase gradient extreme value map. Then, based on a preset standard deviation calculation formula, it calculates the local standard deviation map of the global phase gradient extreme value map. Using image analysis technology, it detects the local standard deviation map to obtain the defect location on the surface of the mirror-like object under test. Therefore, by detecting the local standard deviation map of the global phase gradient extreme value map obtained from the wrapping phase of the mirror-like object surface, mirror defects can be located. This solves the problems of relatively complex calculation processes and the inability to eliminate color interference in existing mirror defect recognition technologies. The local standard deviation map of the global phase gradient extreme value map can more clearly display the defects on the surface of the mirror-like object, improving the efficiency of mirror defect location.
[0110] refer to Figure 2 This application provides a mirror-like defect locating device for locating mirror-like defects, comprising:
[0111] Module 1 is used to acquire the deformation stripe pattern of the surface of the mirror-like object to be tested;
[0112] The first calculation module 2 is used to calculate the wrapping phase in the horizontal axis direction and the wrapping phase in the vertical axis direction corresponding to the deformed fringe pattern by using the phase shift method.
[0113] The fusion module 3 is used to calculate and fuse the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase according to the preset phase gradient calculation formula, so as to obtain the global phase gradient extreme value map.
[0114] The second calculation module 3 is used to calculate the local window based on the preset standard deviation and the preset local standard deviation map calculation formula, and to calculate the local standard deviation map of the global phase gradient extremum map.
[0115] The detection module 5 is used to detect the local standard deviation map using image analysis technology to obtain the location of defects on the surface of the mirror-like object to be tested.
[0116] This type of mirror defect localization device detects mirror defects by analyzing the local standard deviation map of the global phase gradient extremum map obtained from the wrapping phase of the mirror-like object surface. This solves the problems of existing mirror defect identification technologies, such as relatively complex calculation processes and the inability to eliminate color interference. The local standard deviation map of the global phase gradient extremum map can more clearly show the defects on the surface of the mirror-like object, thus improving the localization efficiency of mirror defects.
[0117] Specifically, when module 1 acquires the deformation stripe pattern of the surface of the mirror-like object under test, it executes the following:
[0118] Obtain the N-step phase shift map generated by the detection system;
[0119] By using multi-step phase-shifting technology, the N-step phase-shifting pattern is projected onto the surface of the mirror-like object under test and phase-shifted to obtain the deformed fringe light reflected from the surface of the mirror-like object under test.
[0120] Collect deformed fringe light to generate a deformed fringe pattern on the surface of the mirror-like object under test.
[0121] When module 1 is executed, a detection system such as a PMD (Phase Measuring Deflectometry) system is set up to acquire an N-step phase shift map generated by the detection system using a computer or other equipment. A light source device such as a monitor is used as the light source to project the N-step phase shift map (i.e., the projected fringe map) onto the surface of the mirror-like object under test (i.e., the mirror-like surface). Using multi-step phase shifting technology, phase shifting occurs simultaneously with projection. The surface of the mirror-like object under test reflects the projected light, resulting in distorted fringe light. Simultaneously with the phase shift, a camera or other acquisition device is used to collect the distorted fringe light, generating the corresponding distorted fringe map, thus obtaining the distorted fringe map of the surface of the mirror-like object under test. The aforementioned equipment can be modified according to actual needs, but is not limited to this.
[0122] Specifically, when module 1 is executed, the phase shift direction during the N-step phase shift map projection includes both the horizontal and vertical coordinate directions. When the phase shift direction during the N-step phase shift map projection is the horizontal coordinate direction, the generated deformed fringe pattern is a deformed fringe pattern in the horizontal coordinate direction; when the phase shift direction during the N-step phase shift map projection is the vertical coordinate direction, the generated deformed fringe pattern is a deformed fringe pattern in the vertical coordinate direction, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of a deformed fringe pattern, where the upper deformed fringe pattern is the deformed fringe pattern in the vertical axis direction, and the lower deformed fringe pattern is the deformed fringe pattern in the horizontal axis direction.
[0123] Specifically, when the first calculation module 2 is executed, it extracts the deformed fringe pattern in the horizontal and vertical directions from the deformed fringe pattern. Using the phase-shifting method, it calculates the wrapping phase in the horizontal (X) direction corresponding to the deformed fringe pattern and the wrapping phase in the vertical (Y) direction corresponding to the deformed fringe pattern. For example... Figure 5 As shown, Figure 5 This diagram illustrates the wrapping of phase along the horizontal and vertical axes, with the left side showing the wrapping of phase along the horizontal axis and the right side showing the wrapping of phase along the vertical axis.
[0124] The specific formula for calculating the wrapping phase is as follows:
[0125] ;
[0126] in, To wrap the phase, The intensity of the deformed fringe pattern (this intensity can be either the intensity of the deformed fringe pattern in the horizontal axis or the intensity of the deformed fringe pattern in the vertical axis; if it is the intensity of the deformed fringe pattern in the horizontal axis, i.e., when...) = When, it is to calculate the phase wrapped in the horizontal axis direction; if it is the intensity of the distorted fringe pattern in the vertical axis direction, that is, when = When this is the case, it is to calculate the phase wrapped in the vertical axis direction.
[0127] Specifically, when the fusion module 3 calculates and fuses the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase according to the preset phase gradient calculation formula to obtain the global phase gradient extreme value map, it executes:
[0128] Based on the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase are calculated.
[0129] By fusing the phase gradient extremum map in the horizontal axis direction and the phase gradient extremum map in the vertical axis direction, a global phase gradient extremum map is obtained.
[0130] Specifically, when the fusion module 3 calculates the extreme value map of the phase gradient in the horizontal direction corresponding to the phase and the extreme value map of the phase gradient in the vertical direction corresponding to the phase according to the preset phase gradient calculation formula, it executes:
[0131] Based on the preset phase gradient calculation formula, the phase gradient quality map in the horizontal direction corresponding to the phase and the phase gradient quality map in the vertical direction corresponding to the phase are calculated.
[0132] Based on the preset phase gradient extremum calculation formula, the phase gradient extremum map corresponding to the phase gradient quality map in the horizontal direction and the phase gradient extremum map corresponding to the phase gradient quality map in the vertical direction are calculated.
[0133] When the fusion module 3 executes, it calculates the phase gradients corresponding to the X-direction and Y-direction wrapped phases based on a preset phase gradient calculation formula. These phase gradients then form corresponding phase gradient quality maps (a phase gradient quality map along the horizontal axis and a phase gradient quality map along the vertical axis). The preset phase gradient calculation formula includes formulas for the phase gradient along the horizontal axis and along the vertical axis. Specifically, the formula for the phase gradient along the horizontal axis is as follows:
[0134] ;
[0135] in, This represents the phase gradient along the horizontal axis for a pixel at coordinate (i,j) that is wrapped in the phase along either the horizontal or vertical axis. The wrap phase for pixel coordinates (i,j) (this wrap phase can be a wrap phase in the horizontal or vertical direction; if it is a wrap phase in the horizontal direction, then...) The phase gradient along the horizontal axis is the phase gradient that wraps around the phase. If the phase is wrapped around the vertical axis, then... (The phase gradient along the horizontal axis is the phase gradient that wraps the phase in the vertical axis direction). For the wrapper operator, let's assume it's used... express , The operation rules are as follows:
[0136] ;
[0137] The specific formula for calculating the phase gradient along the vertical axis is as follows:
[0138] ;
[0139] in, This represents the phase gradient along the vertical axis for a pixel at coordinate (i,j) that is wrapped in the phase along either the horizontal or vertical axis. The wrap phase for pixel coordinates (i,j) (this wrap phase can be a wrap phase in the horizontal or vertical direction; if it is a wrap phase in the horizontal direction, then...) The phase gradient along the vertical axis is the phase gradient that wraps around the phase in the horizontal axis direction. If the phase is wrapped around the vertical axis direction, then... To calculate the phase gradient along the vertical axis that wraps the phase. The phase gradient of the last row and last column is not calculated, or the phase gradient of the last row and last column is equal to the phase gradient of the second-to-last row and second-to-last column, respectively.
[0140] When the fusion module 3 is executed, it calculates the phase gradient extreme value maps corresponding to the phase gradient quality map in the horizontal axis direction and the phase gradient quality map in the vertical axis direction according to the preset phase gradient extreme value calculation formula.
[0141] The formula for calculating the extreme values of the phase gradient in the horizontal axis (the formula for calculating the extreme values of the phase gradient mass map in the horizontal axis) is as follows:
[0142] ;
[0143] in, The phase gradient at pixel coordinate (i,j) in the extreme value map of phase gradient along the horizontal axis. This represents the phase gradient along the vertical axis of the pixel at coordinate (i,j) in the phase gradient quality map. This represents the phase gradient along the horizontal axis at pixel coordinates (i,j) in the quality map. The formula for calculating the phase gradient extremum map along the entire horizontal axis is to compare the maximum absolute value of the phase gradient along the vertical axis and the maximum absolute value of the phase gradient along the horizontal axis at the pixel coordinate (i,j) position in the horizontal axis phase gradient quality map, and select the maximum of these two values as the phase gradient at the pixel coordinate (i,j) position in the horizontal axis phase gradient quality map.
[0144] The formula for calculating the extreme values of the phase gradient in the vertical axis (the formula for calculating the extreme values of the phase gradient mass map in the vertical axis) is as follows:
[0145] ;
[0146] in, The phase gradient at pixel coordinates (i,j) in the phase gradient extremum map. This represents the phase gradient along the vertical axis at pixel coordinate (i,j) in the quality map. The phase gradient of pixel (i,j) in the vertical axis phase gradient quality map is the phase gradient along the horizontal axis. The calculation formula for the extreme value map of the phase gradient in the vertical axis means comparing the maximum value of the absolute value of the phase gradient along the vertical axis and the maximum value of the absolute value of the phase gradient along the horizontal axis at pixel (i,j) in the vertical axis phase gradient quality map, and selecting the maximum value of these two values as the phase gradient at pixel (i,j) in the vertical axis phase gradient quality map.
[0147] When fusion module 3 is executed, it fuses the phase gradient extremum maps in the horizontal and vertical directions to obtain a global phase gradient extremum map. The specific formula for calculating the fusion of the global phase gradient extremum map is as follows:
[0148] ;
[0149] in, The phase gradient at pixel coordinate (i,j) in the global phase gradient extremum map is represented by the fusion calculation formula of the entire global phase gradient extremum map. It compares the phase gradient at pixel coordinate (i,j) in the vertical axis phase gradient extremum map and the phase gradient at pixel coordinate (i,j) in the horizontal axis phase gradient extremum map, and selects the maximum value of the two values as the phase gradient at pixel coordinate (i,j) in the global phase gradient extremum map.
[0150] like Figure 6 As shown, Figure 6 This diagram illustrates the fusion process of global phase gradient extremum maps, where a represents the phase gradient extremum map along the horizontal axis, b represents the phase gradient extremum map along the vertical axis, and c represents the global phase gradient extremum map. Arrows indicate fusion along their directions. Figure 6 It can be seen that by fusing the phase gradient extremum map in the horizontal axis direction and the phase gradient extremum map in the vertical axis direction, that is, taking the maximum value of the phase gradient at the same position as the phase gradient at that position in the global phase gradient extremum map, the global phase gradient extremum map is obtained. In Figures a, b, and c, the irregular parts on the left are the defect locations with a larger degree of defects on the surface of the mirror-like object, such as grooves, pits, etc. The small dots in the shaded parts of Figures a, b, and c are the defect locations with a shallower degree of defects, such as slight bumps, scratches, etc.
[0151] Specifically, when the second calculation module 4 is executed, the preset formula for calculating the local standard deviation plot is as follows:
[0152] ;
[0153] in, This represents the local standard deviation of the pixel at coordinates (i,j) in the global phase gradient extremum map, where k is a preset local window for standard deviation calculation. This represents the local standard deviation of the pixel coordinates (q, p) in the global phase gradient extremum map. This is the average value of the global phase gradient extrema of each pixel within a local window calculated using standard deviation, centered at the pixel coordinates (q, p) in the global phase gradient extrema map.
[0154] like Figure 7 As shown, Figure 7 This diagram illustrates the calculation process of the local standard deviation plot. In Figures c and d, c represents the global phase gradient extremum plot, and d represents the local standard deviation plot. Arrows indicate the calculation process. In Figures c and d, the irregularly shaped areas on the left represent defects with a higher degree of severity on the surface of the mirror-like object. In Figure c, the small dots in the shaded area on the right represent defects with a lower degree of severity. In Figure d, the small dots in the bright area on the right represent defects with a lower degree of severity. Figure 7 It can be seen that the local standard deviation map shows the surface defects of mirror-like objects more clearly than the global phase gradient extremum map. The local standard deviation map of this scheme can more clearly show the surface defects of mirror-like objects.
[0155] Specifically, when the detection module 5 is executed, it uses image analysis technology to detect the local standard deviation map to obtain the defect location on the surface of the mirror-like object to be tested. That is, it locates the local standard deviation map and performs image filtering, threshold segmentation, morphological processing and contour extraction on the local standard deviation map to extract the local defects on the surface of the mirror-like object to be tested and obtain the defect location on the surface of the mirror-like object to be tested.
[0156] As described above, this type of mirror defect localization device acquires the deformation fringe pattern of the surface of the mirror-like object to be tested. Using the phase-shifting method, it calculates the wrapping phase in the horizontal and vertical directions corresponding to the deformation fringe pattern. Based on a preset phase gradient calculation formula, it calculates and fuses the extreme values of the horizontal and vertical phase gradients corresponding to the wrapping phase in the horizontal and vertical directions to obtain a global phase gradient extreme value map. Based on a preset standard deviation calculation formula, it calculates the local standard deviation map of the global phase gradient extreme value map and uses image analysis technology to detect the local standard deviation map, thus obtaining the defect location on the surface of the mirror-like object to be tested. Therefore, by detecting the local standard deviation map of the global phase gradient extreme value map obtained from the wrapping phase of the mirror-like object surface, mirror defects can be located. This solves the problems of relatively complex calculation processes and the inability to eliminate color interference in existing mirror defect recognition technologies. The local standard deviation map of the global phase gradient extreme value map can more clearly display the defects on the surface of the mirror-like object, improving the localization efficiency of mirror defects.
[0157] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other via a communication bus 303 and / or other forms of connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the electronic device is running, the processor 301 executes the computer program to perform the mirror-like defect localization method in any optional implementation of the above embodiments, to achieve the following function: acquiring the deformation stripe pattern of the surface of the mirror-like object to be tested. By using the phase-shifting method, the wrapping phase in the horizontal and vertical directions corresponding to the deformed fringe pattern is calculated. Based on the preset phase gradient calculation formula, the extreme value maps of the horizontal and vertical phase gradients corresponding to the wrapping phase in the horizontal and vertical directions are calculated and fused to obtain the global phase gradient extreme value map. Based on the preset standard deviation calculation formula, the local window and the local standard deviation map are calculated to obtain the local standard deviation map of the global phase gradient extreme value map. Using image analysis technology, the local standard deviation map is detected to obtain the defect location on the surface of the mirror-like object under test.
[0158] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it executes the mirror-like defect localization method in any optional implementation of the above embodiments to achieve the following functions: acquiring the deformation fringe pattern of the surface of the mirror-like object to be tested; calculating the wrapping phase in the horizontal and vertical directions corresponding to the deformation fringe pattern using the phase-shifting method; calculating and fusing the extreme value map of the horizontal phase gradient corresponding to the wrapping phase in the horizontal direction and the extreme value map of the vertical phase gradient corresponding to the wrapping phase in the vertical direction according to a preset phase gradient calculation formula to obtain a global phase gradient extreme value map; calculating a local window based on a preset standard deviation and a preset local standard deviation map calculation formula to obtain a local standard deviation map of the global phase gradient extreme value map; and using image analysis technology to detect the local standard deviation map to obtain the defect location on the surface of the mirror-like object to be tested. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0159] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0160] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0161] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0162] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0163] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for locating mirror-like defects, characterized in that, Including the following steps: Obtain the deformation fringe pattern on the surface of the mirror-like object under test; The phase-shifting method is used to calculate the wrapping phase in the horizontal and vertical directions corresponding to the deformed fringe pattern. Based on a preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal axis and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical axis are calculated and fused to obtain a global phase gradient extreme value map, including: According to the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated. The global phase gradient extreme value map is obtained by fusing the phase gradient extreme value map in the horizontal axis direction and the phase gradient extreme value map in the vertical axis direction. The local standard deviation map of the global phase gradient extremum map is calculated based on the preset standard deviation calculation local window and the preset local standard deviation map calculation formula. Using image analysis technology, the local standard deviation map is detected to obtain the location of defects on the surface of the mirror-like object under test; The preset phase gradient calculation formula includes a phase gradient calculation formula along the horizontal axis and a phase gradient calculation formula along the vertical axis. The specific formula for calculating the phase gradient along the horizontal axis is as follows: ; in, This represents the phase gradient along the horizontal axis, which wraps the phase along either the horizontal or vertical axis, representing the phase gradient at the pixel coordinate (i, j) within the phase. The wrap phase at pixel coordinates (i, j); For the wrapper operator, use express , The operation rules are as follows: ; The specific formula for calculating the phase gradient along the vertical axis is as follows: ; in, The phase gradient in the vertical direction of the pixel at coordinate (i, j) is the phase gradient wrapped in the horizontal or vertical direction. The preset phase gradient extremum calculation formula includes the extremum calculation formula for the phase gradient quality map in the horizontal axis direction and the extremum calculation formula for the phase gradient quality map in the vertical axis direction. The specific formula for calculating the extrema of the phase gradient quality map in the horizontal axis direction is as follows: ; in, This represents the extreme value of the phase gradient at pixel coordinates (i,j) in the phase gradient quality map along the horizontal axis. This represents the phase gradient of a pixel at coordinate (i,j) along the vertical axis in the phase gradient quality map. This represents the phase gradient along the horizontal axis of the pixel coordinate (i,j) in the quality map. It is the absolute value; The specific formula for calculating the extrema of the phase gradient quality map in the vertical axis direction is as follows: ; in, This represents the extreme value of the phase gradient at pixel coordinate (i,j) in the phase gradient quality map along the vertical axis. This represents the phase gradient along the vertical axis of the pixel at coordinate (i,j) in the quality map. This represents the phase gradient of a pixel at coordinate (i,j) along the horizontal axis in the phase gradient quality map.
2. The method for locating mirror-like defects according to claim 1, characterized in that, Obtain the deformation fringe pattern of the surface of the mirror-like object under test, including: Obtain the N-step phase shift map generated by the detection system; Using multi-step phase-shifting technology, the N-step phase-shifting map is projected onto the surface of the mirror-like object under test and phase-shifted to obtain the deformed fringe light reflected from the surface of the mirror-like object under test; The deformed fringe light is collected to generate a deformed fringe pattern on the surface of the mirror-like object under test.
3. The method for locating mirror-like defects according to claim 1, characterized in that, Based on the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal axis and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical axis are calculated, including: Based on the preset phase gradient calculation formula, the phase gradient quality map in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the phase gradient quality map in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated. Based on the preset phase gradient extremum calculation formula, the phase gradient extremum map corresponding to the horizontal axis phase gradient quality map and the phase gradient extremum map corresponding to the vertical axis phase gradient quality map are calculated.
4. The method for locating mirror-like defects according to claim 1, characterized in that... The preset formula for calculating the local standard deviation plot is as follows: ; in, This represents the local standard deviation of the pixel at coordinates (i,j) in the global phase gradient extremum map, where k is a preset local window for standard deviation calculation. This represents the local standard deviation of the pixel coordinates (q, p) in the global phase gradient extremum map. This is the average value of the global phase gradient extrema of each pixel within a local window calculated using standard deviation, centered at the pixel coordinates (q, p) in the global phase gradient extrema map.
5. A device for locating mirror-like defects, used for locating mirror-like defects, characterized in that, include: The acquisition module is used to acquire the deformation stripe pattern of the surface of the mirror-like object under test; The first calculation module is used to calculate the wrapping phase in the horizontal axis direction and the wrapping phase in the vertical axis direction corresponding to the deformed fringe pattern by using the phase shift method. The fusion module is used to calculate and fuse the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction according to a preset phase gradient calculation formula, to obtain a global phase gradient extreme value map, including: According to the preset phase gradient calculation formula, the extreme value map of the phase gradient in the horizontal direction corresponding to the phase wrapped in the horizontal direction and the extreme value map of the phase gradient in the vertical direction corresponding to the phase wrapped in the vertical direction are calculated. The global phase gradient extreme value map is obtained by fusing the phase gradient extreme value map in the horizontal axis direction and the phase gradient extreme value map in the vertical axis direction. The second calculation module is used to calculate the local window based on the preset standard deviation and the preset local standard deviation map calculation formula, and to calculate the local standard deviation map of the global phase gradient extremum map. The detection module is used to detect the local standard deviation map using image analysis technology to obtain the location of defects on the surface of the mirror-like object to be tested. The preset phase gradient calculation formula includes a phase gradient calculation formula along the horizontal axis and a phase gradient calculation formula along the vertical axis. The specific formula for calculating the phase gradient along the horizontal axis is as follows: ; in, This represents the phase gradient along the horizontal axis, which wraps the phase along either the horizontal or vertical axis, representing the phase gradient at the pixel coordinate (i, j) within the phase. The wrap phase at pixel coordinates (i, j); For the wrapper operator, use express , The operation rules are as follows: ; The specific formula for calculating the phase gradient along the vertical axis is as follows: ; in, The phase gradient in the vertical direction of the pixel at coordinate (i, j) is the phase gradient wrapped in the horizontal or vertical direction. The preset phase gradient extremum calculation formula includes the extremum calculation formula for the phase gradient quality map in the horizontal axis direction and the extremum calculation formula for the phase gradient quality map in the vertical axis direction. The specific formula for calculating the extrema of the phase gradient quality map in the horizontal axis direction is as follows: ; in, This represents the extreme value of the phase gradient at pixel coordinates (i,j) in the phase gradient quality map along the horizontal axis. This represents the phase gradient of a pixel at coordinate (i,j) along the vertical axis in the phase gradient quality map. This represents the phase gradient along the horizontal axis of the pixel coordinate (i,j) in the quality map. It is the absolute value; The specific formula for calculating the extrema of the phase gradient quality map in the vertical axis direction is as follows: ; in, This represents the extreme value of the phase gradient at pixel coordinate (i,j) in the phase gradient quality map along the vertical axis. This represents the phase gradient along the vertical axis of the pixel at coordinate (i,j) in the quality map. This represents the phase gradient of a pixel at coordinate (i,j) along the horizontal axis in the phase gradient quality map.
6. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program executable by the processor, and when the processor executes the computer program, it performs the steps in the mirror-like defect localization method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it performs the steps in the mirror-like defect localization method as described in any one of claims 1-4.