Mirror surface defect detection method and system
By using laser beam scanning and 3D model construction, the applicability and accuracy issues of surface defect detection for mirror-like objects in existing technologies have been resolved, enabling high-precision detection of mirror objects of different sizes, and making it suitable for small objects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing surface defect detection technologies for mirrors are difficult to apply to mirror objects of different sizes, have inconsistent detection accuracy, and have complex hardware structures that are difficult to adapt to the detection of small objects.
A laser beam is used to scan mirror-like surfaces, and the reflected light spot image is captured by a receiving plate. By discretizing the elliptical arc scanning path and mapping the theoretical reflected light spot trajectory, defects are identified in real time, and a three-dimensional model is constructed to mark the defect location.
It achieves high-precision defect detection for mirror objects of different sizes, is suitable for small objects, has high detection accuracy, and has a simplified system structure.
Smart Images

Figure CN121656282A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of defect detection technology, specifically relating to a method and system for detecting defects on mirror-like surfaces. Background Technology
[0002] To address the demand for efficient and rapid inspection in industrial production, various non-contact optical methods for detecting mirror defects have emerged in recent years. However, the strong specular reflection of mirrors creates interference signals and easily images environmental dust and fibers. Distinguishing between genuine product defects and environmental contaminants is a major challenge, easily leading to false detections. Furthermore, increasing the threshold to reduce false detections may result in missed detections. Therefore, the ability to detect defects effectively remains a significant issue.
[0003] The latest technical solution employs an innovative hemispherical diffuse illumination system, consisting of an acrylic hemispherical cover and 12 adjustable-angle LEDs. The inner surface is coated with a specially formulated diffuse reflection coating, achieving a uniform illumination effect similar to an integrating sphere. The system is designed with five basic illumination modes and 25 combinations, optimized and verified using LightTools optical simulation software, ultimately determining 90° as the optimal LED angle. Regarding the detection method, the current solution uses dark-field technology to suppress high-reflection interference. The camera is mounted at a 45° angle, symmetrically arranged with the black mask to form a directional dark field. The image processing workflow includes grayscale conversion, adaptive threshold binarization, morphological operations, and edge detection. Finally, defects are located through contour search, and their feature parameters are calculated. The system is specifically optimized for four typical defects: dents, protrusions, scratches, and grooves, and can detect minute defects.
[0004] While existing technologies offer solutions for detecting defects on highly reflective metal surfaces, they neglect the actual changes in the optical properties of the material, choose to suppress reflection characteristics, and do not discuss the applicability of the system to complex surfaces, such as curved surfaces. The system requires precise control of the LED angle and illumination mode angle, which can only be achieved at specific angles. Although the exposure problem is solved, the illumination intensity is significantly reduced. Experiments show that the system's detection performance is inconsistent for different types of defects. Dents and bumps are relatively easy to identify, while scratches are more sensitive to light source conditions and may require parameter adjustments for different defect types. The system is not very applicable to objects with multiple defects, and the system's hardware structure is complex and bulky, making it unsuitable for detecting small mirror objects. Summary of the Invention
[0005] To address the problems existing in the prior art, the purpose of this invention is to provide a surface defect detection system for mirror-like objects that is applicable to mirror-like objects of different specifications and has higher detection accuracy.
[0006] The technical solution of this invention is: A method for detecting defects on mirror-like surfaces includes the following steps: A laser beam is emitted from a laser onto the mirror-like surface being inspected, and a receiving plate and a camera are set at a preset receiving position to ensure that the camera can capture the image of the reflected light spot of the laser beam reflected from the mirror-like surface being inspected onto the receiving plate. A region of origin (ROI) to be detected is planned on the receiving board. A laser beam is used to scan the surface of the mirror-like object being detected along a preset elliptical path. The laser beam is reflected by the surface of the mirror-like object being detected onto the ROI region on the receiving board, and the elliptical arc scanning path is discretized into multiple continuous path points. Based on the planned ROI region to be detected, the theoretical reflected light spot trajectory of the elliptical arc scanning path reflected by the detected mirror-like surface onto the receiving plate is obtained. The theoretical reflected light spot trajectory is divided into multiple equal parts, and a one-to-one mapping relationship is established with each path point on the discretized elliptical arc scanning path. Keeping the laser stationary, the mirror-like surface to be inspected is pushed at a constant speed along a straight line, and the actual reflected light spot on the receiving plate is acquired in real time by a camera. When the actual reflected light spot changes abnormally relative to the theoretical reflected light spot, it is considered a defect. The path point corresponding to the defect on the elliptical arc scanning path is identified, the actual position coordinates of the defect on the receiving plate are recorded, and the position of the equally divided point of the theoretical reflected light spot trajectory is obtained based on the identified path point. Based on the actual position coordinates of the defect on the receiving plate and the equidistant points of its mapping on the theoretical reflected light spot trajectory, the optical path offset is obtained, and the normal vector deflection information of the defect at the surface of the detected mirror-like surface is determined. Based on the incident point of the laser beam, the position of the equally divided point of the defect on the theoretical reflected light spot trajectory, and the normal vector deflection information of the defect at the surface of the tested mirror, the three-dimensional spatial coordinates of the defect on the surface of the tested mirror are obtained. Based on the three-dimensional spatial coordinates of all defects, a three-dimensional model of the inspected mirror-like surface is constructed, and the defect locations corresponding to the defects are marked on the three-dimensional model.
[0007] Preferably, the method for discretizing the elliptical arc scan path into multiple consecutive path points is as follows: Based on the parametric ellipse equation, the differential of the arc length of the elliptical arc scanning path is calculated, and then the total arc length of the elliptical arc scanning path is obtained. S ; Total arc length S Divided into n Equal portions; Based on the principle of equal arc length, determine the coordinates of the path points corresponding to each equally divided point on the elliptical arc scanning path.
[0008] Preferably, the total arc length of the elliptical arc scanning path SDetermined according to the following formula: , in, , , , In the formula, S This represents the total arc length of the elliptical arc scan path; The differential of the arc length of the elliptical arc scan path; and The equation of the parametric ellipse, t These are the parameter values for the equation of the ellipse. These are the coordinates of the center point of the elliptical arc; a and b These are the major and minor semi-axis of the ellipse arc, respectively; This is the initial value of parameter t, corresponding to the starting point parameter of the elliptical arc scan path; The endpoint value of parameter t corresponds to the endpoint parameter of the elliptical arc scan path.
[0009] Preferably, the method for obtaining and establishing the mapping relationship of the theoretical reflected light spot trajectory includes: Based on the imaging characteristics of the reflected light spot on the receiving plate after laser irradiation, assuming that the detected mirror-like surface is an ideal mirror, the laser is used to scan the ideal mirror along the elliptical arc scanning path. The trajectory of the laser beam after ideal mirror reflection on the receiving plate is obtained, which is the theoretical reflected trajectory of the elliptical arc scanning path on the receiving plate. The theoretical reflected light spot trajectory is divided into n equal parts to obtain n division points; Establish a one-to-one mapping relationship between each path point on the elliptical arc scanning path and the equally divided points of the theoretical reflected light spot trajectory.
[0010] Preferably, the optical path offset is determined according to the following formula: , In the formula, θ The deflection angle between the actual position of the defect on the receiving plate and its corresponding equally spaced points on the theoretical reflected light spot trajectory; d The distance between the actual coordinates of the defect on the receiving plate and the corresponding equally spaced points on the theoretical reflected light spot trajectory; L This is the theoretical optical path length from the reflection point of the laser beam on the ideal mirror to the receiving plate.
[0011] Preferably, the normal vector deflection information of the defect located on the surface of the tested mirror is: the deflection angle between the theoretical normal vector and the actual normal vector of the laser beam on the surface of the tested mirror, which is the normal vector deflection angle, and the normal vector deflection angle is related to the optical path offset. θ same.
[0012] Preferably, the method for determining the three-dimensional spatial coordinates of the defect on the surface of the detected mirror-like object includes the following steps: Find the normal vector of the light beam at the corresponding point on the surface of the object being measured; The three-dimensional coordinates of the defect on the tested mirror-like surface are obtained by using the incident vector, normal vector, and reflection point of the light beam on the surface of the object being tested. The normal vector of the light beam at the corresponding point on the surface of the object being measured is determined by the following formula: , in, n The normal vector of the plane containing the beam of light from the object being measured is not included. is the normal vector of the light beam at the corresponding point on the surface of the object being measured; For beam based n and Deflection angle; k is the unit vector of the rotation axis.
[0013] Preferably, the method for constructing the three-dimensional model of the detected mirror-like surface and the method for marking the defect location include: The three-dimensional coordinate information of the mirror-like surface being inspected is obtained. The defect detection results are matched with the corresponding three-dimensional coordinate information. Based on the projection relationship between the pixel position of the defect in the reflected light spot image and the three-dimensional point cloud, the three-dimensional region where the defect is located is determined. Based on the distribution area of defects in the image coordinate system, the three-dimensional coordinate points in the corresponding area are extracted from the point cloud and the defects are marked. Export the labeled point cloud data as a .ply file, and mark any defective 3D coordinates with different colors. A surface defect detection system for mirror-like surfaces, used to implement the method described in any of the above embodiments, comprising: A laser used to emit a laser beam toward the mirror-like surface being inspected; A camera used to capture images of a laser beam reflected off a mirror-like surface being tested and onto a receiving plate; The receiving plate is set at a preset receiving position to receive the reflected light spot of the laser beam after being reflected by the mirror-like surface being tested; The control unit is used to control the laser to scan along the elliptical arc scanning path; Processing unit, used to perform the following operations: A preset elliptical arc scanning path is planned for the reflection point of the laser beam on the surface of the mirror being tested, and the path is discretized into multiple continuous path points. Based on the ideal mirror assumption, the theoretical reflected light spot trajectory is obtained, and then divided into multiple equal parts to establish a mapping relationship with the path points; Analyze the reflected light spots, identify defects, record the actual position coordinates, and obtain the mapping points; Obtain optical path offset and normal vector deflection information; Obtain the three-dimensional spatial coordinates of the defect; Build a 3D model and mark the defects.
[0014] Compared with the prior art, the method and system for detecting surface defects of mirror-like surfaces of the present invention have the following advantages: Utilizing its specular reflection properties, a laser beam is struck on the surface of an object and reflected into a receiving plate. The surface of the object being tested is amplified by the light signal. For different defects, the corresponding defects can be identified by grayscale edge detection of the image. It is applicable to mirror-like objects of different sizes and has high detection accuracy. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the system composition in an embodiment of the present invention, wherein 1 is a laser, 2 is a camera, 3 is a receiving plate, 4 is the mirror-like surface to be measured, 5 is an imaging pattern, and 6 is a linear guide rail. Figure 2 The grayscale value and amplitude curves are shown in the embodiments of the present invention; Figure 3 This is a detection image of a mirror-like object reflected onto a receiving plate in an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0017] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0018] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0019] In order to be applicable to mirror-like objects of different specifications and improve the accuracy of detection, this embodiment provides a method and system for detecting surface defects in mirror-like objects.
[0020] See Figure 1 As shown, a surface defect detection system for mirror-like surfaces includes: a laser 1, a camera 2, a receiving plate 3, a control unit, a processing unit, and a linear guide rail 6. The laser emits a laser beam towards the mirror-like surface being inspected; the camera captures the image of the laser beam reflected from the surface onto the receiving plate; the receiving plate is positioned at a preset receiving location to receive the reflected light spot from the surface; the control unit controls the laser to scan the surface; and the processing unit performs the following operations: planning a preset elliptical arc scanning path for the reflection points of the laser beam on the surface and discretizing the path into multiple continuous path points; acquiring the theoretical reflected light spot trajectory on the receiving plate based on the ideal mirror assumption, dividing it into multiple equal parts, and establishing a mapping relationship with the path points; analyzing the reflected light spot, identifying defects, recording the actual position coordinates, and obtaining the mapped points; acquiring the optical path offset and normal vector deflection information; acquiring the three-dimensional spatial coordinates of the defect; and constructing a three-dimensional model and marking the defect.
[0021] See Figures 1 to 3 As shown, based on the above system, a method for detecting surface defects on mirror-like surfaces is implemented, including the following steps: S1. Use a laser to emit a laser beam toward the mirror-like surface to be tested, and set up a receiving plate and a camera at a preset receiving position to ensure that the camera can capture the image of the reflected light spot of the laser beam reflected from the mirror-like surface to the receiving plate. S2. Plan a ROI region to be detected on the receiving board, use a laser beam to scan the surface of the mirror-like object to be detected along a preset elliptical path, and make the laser beam reflect off the surface of the mirror-like object to be detected onto the ROI region on the receiving board, and discretize the elliptical arc scanning path into multiple continuous path points. S3. Based on the planned ROI region to be detected, obtain the theoretical reflected light spot trajectory of the elliptical arc scanning path reflected on the receiving plate by the detected mirror-like surface. Divide the theoretical reflected light spot trajectory into multiple equal parts and establish a one-to-one mapping relationship with each path point on the discretized elliptical arc scanning path. S4. Keeping the laser stationary, mount the mirror-like surface to be inspected on a linear guide rail. Slowly push the mirror-like surface to be inspected at a constant speed of 1mm / s to 5mm / s using the linear guide rail. The actual reflected light spot on the receiving plate is collected in real time by the camera. When the actual reflected light spot changes abnormally relative to the theoretical reflected light spot, it is considered a defect. Identify the path point corresponding to the defect on the elliptical arc scanning path, record the actual position coordinates of the defect on the receiving plate, and obtain the position of the equally divided point of the theoretical reflected light spot trajectory based on the identified path point. S5. Based on the actual position coordinates of the defect on the receiving plate and the equidistant points of its mapping on the theoretical reflected light spot trajectory, obtain the optical path offset and determine the normal vector deflection information of the defect located on the surface of the detected mirror-like surface. S6. Based on the incident point of the laser beam, the position of the equally divided point of the defect in the theoretical reflected light spot trajectory, and the normal vector deflection information of the defect at the surface of the tested mirror, obtain the three-dimensional spatial coordinates of the defect on the surface of the tested mirror. S7. Based on the three-dimensional spatial coordinates of all defects, construct a three-dimensional model of the surface to be inspected (mirror-like surface), and mark the defect locations corresponding to the defects on the three-dimensional model.
[0022] Furthermore, the method for discretizing the elliptical arc scan path into multiple consecutive path points is as follows: Based on the parametric ellipse equation, the differential of the arc length of the elliptical arc scanning path is calculated, and then the total arc length of the elliptical arc scanning path is obtained. S ; Total arc length S Divided into n Divide into equal parts, each part being [length missing]. Δs=S / n ; Find the parameters corresponding to each division point through numerical integration. t i This makes from t min arrive t i The arc length is i *Δs; Based on the parameters corresponding to each division point t i Get the points on the elliptical arc Q i Coordinates are ,in Here are the coordinates of the center point of the ellipse. a and b These are the major and minor semi-axis of the ellipse arc, respectively.
[0023] Preferably, the total arc length of the elliptical arc scanning path S Determined according to the following formula: , in, , , , In the formula, S This represents the total arc length of the elliptical arc scan path; The differential of the arc length of the elliptical arc scan path; and The equation of the parametric ellipse, t These are the parameter values for the equation of the ellipse. These are the coordinates of the center point of the elliptical arc; a and b These are the major and minor semi-axis of the ellipse arc, respectively; This is the initial value of parameter t, corresponding to the starting point parameter of the elliptical arc scan path; The endpoint value of parameter t corresponds to the endpoint parameter of the elliptical arc scan path.
[0024] Preferred methods for obtaining and establishing the mapping relationship of theoretical reflected light spot trajectories include: Based on the imaging characteristics of the reflected light spot on the receiving plate after laser irradiation, assuming that the surface to be detected is an ideal mirror, the laser is used to scan the ideal mirror along an elliptical arc scanning path. The trajectory of the laser beam after ideal mirror reflection on the receiving plate is obtained, which is the theoretical reflected trajectory of the elliptical arc scanning path on the receiving plate. The theoretical reflected light spot trajectory is divided into n equal parts to obtain n division points; Establish a one-to-one mapping relationship between each path point on the elliptical arc scanning path and the equally divided points of the theoretical reflected light spot trajectory.
[0025] Preferably, the optical path offset is determined according to the following formula: , In the formula, θ The angle between the actual position of the defect on the receiving plate and the corresponding equally spaced points on the theoretical reflected light spot trajectory is the deflection angle. d The distance between the actual coordinates of the defect on the receiving plate and the corresponding equally spaced points on the theoretical reflected light spot trajectory; L This is the theoretical optical path length from the reflection point of the laser beam on the ideal mirror to the receiving plate.
[0026] Preferably, the normal vector deflection information at the defect location on the surface of the inspected mirror is: the deflection angle between the theoretical normal vector and the actual normal vector on the surface of the inspected mirror, which is the normal vector deflection angle, and the normal vector deflection angle is related to the optical path offset. θ same.
[0027] Preferably, the method for determining the three-dimensional spatial coordinates of the defect on the surface of the inspected mirror includes the following steps: Obtain the incident direction of the laser beam, the actual normal vector of the defect point located on the surface of the mirror being inspected, and the theoretical coordinates of the laser beam's reflection point on the receiving plate; The actual reflection direction of the defect point is obtained based on the incident direction of the laser beam and the actual normal vector of the defect point located on the surface of the mirror being inspected. Establish the equation of a straight line extending from the laser beam along the incident direction; establish the equation of a straight line extending in the opposite direction from the theoretical reflection point coordinates on the receiving plate along the actual reflection direction of the defect point, and obtain the position parameters of the intersection point of the two straight lines. By substituting the intersection point position parameters into the equation of the straight line extending along the incident direction of the laser beam, the precise three-dimensional spatial coordinates of the defect point on the surface of the mirror-like object being inspected can be obtained.
[0028] Specifically, derive the equation of the normal vector of the reflective surface of the object being measured: , in, n The normal vector of the plane containing the beam of light from the object being measured is not included. is the normal vector of the light beam at the corresponding point on the surface of the object being measured; For beam based n and Deflection angle; k Let be the unit vector of the rotation axis. The rotation axis is used to determine the direction of rotation of the normal vector, and it follows the right-hand rule (the four fingers of the right hand bend towards the direction of rotation, and the direction pointed to by the thumb is the rotation axis). k The positive direction. If the rotation angle is clockwise (viewed from the positive direction of the axis), it is equivalent to rotating along − k Direction rotation: (Using the laser incident direction (unit vector)) u and the coordinates of the reflected point on the receiving plate p r A plane can be uniquely determined by the unit normal vector of that plane. k =± np A straight line will be reflected from the receiving plate in front of the object being measured. If the object being measured reflects the line above the line, the "counterclockwise" rotation can be determined according to the right-hand rule. k =+ np Or rotate "clockwise" k =− np .
[0029] The three-dimensional coordinates of the defect on the surface of the object under test are obtained by using the incident vector, normal vector, and reflection point of the light beam: Let: Laser emission point: o , Laser incident direction (unit vector): u, Normal vector (unit vector) at the reflection point: n , Coordinates of the reflected point on the receiving board: , Find the 3D coordinates of the surface of the mirror class being tested: x , 1. First determine the direction of reflection. v : , 2. Parameterize two straight lines (parameters) s , t (as scalar) Incident line (the equation of the straight line of the laser beam along the incident direction): Reflection ray (from the reflection point to the receiving point; equivalently, extending backward from the receiving point, i.e., the equation of a straight line extending backward from the theoretical reflection point coordinates on the receiving plate along the actual reflection direction of the defect point): Lianlide definition ,but , 3. Compare both sides of the above equation with... u and v Taking the inner product, we get a system of 2×2 linear equations: writing ,in M For the 2×2 matrix above, Solve s , t (like M reversible), s , t This refers to the position parameter of the intersection point of the two lines: The reflection point is obtained: (Also available) (Both should be the same; averaging under numerical error is also acceptable.)
[0030] Furthermore, the method for constructing a 3D model of the inspected mirror-like surface and the method for marking defect locations include the following steps: First, a rough 3D coordinate information of the surface of the object under test is obtained through a light stripe reflection 3D reconstruction algorithm. While performing surface defect detection, the system spatially matches the defect detection results with the 3D reconstruction data. When the detection module determines that a defect exists on the current plane, the system determines the 3D region where the defect is located based on the pixel position of the defect in the image and the projection relationship between the defect and the 3D point cloud.
[0031] Subsequently, based on the general distribution area of defects in the image coordinate system, the 3D coordinate points within the corresponding intervals are extracted from the point cloud and labeled as defects. During the labeling stage, the system assigns different color labels to the 3D coordinate points with defects (e.g., red indicates defect areas, and gray or blue indicates normal surfaces).
[0032] Finally, the system exports the labeled point cloud data as a .ply format file. In this way, the generated 3D model can not only reflect the spatial morphology of the object's surface, but also intuitively display the specific location and extent of defects in 3D space, realizing the integrated visualization of surface defect detection and 3D morphology reconstruction.
[0033] In summary, based on the above methods, the process of detecting defects on mirror-like surfaces can be described in detail as follows: Step 1: Perform camera calibration on the flat-panel calibration target and obtain the camera's internal and external parameters; Step 2: Extract the center of the light stripe; Step 3: Calibrate the equations of the laser point and the plane it lies in; Step 4: Laser reflection detection of defects; Step 5: Coarse Defect Location.
[0034] In step one, a multi-line structured light monocular vision measurement system is used, mainly composed of an optical projector (laser), an image acquisition unit, and a computer. The calibration method adopted is Zhang Zhengyou's planar template calibration method. This method refers to the camera calibration method proposed by Professor Zhang Zhengyou in 1998. Its basic principle is to use a planar calibration plate, move the calibration plate several times within the camera's field of view, capture images from multiple different perspectives, extract feature points, and calculate the uniqueness matrix of each image. This allows for the calculation of the camera's intrinsic parameters (focal length, principal point position, etc.) and extrinsic parameters (position and attitude). Nonlinear optimization parameters are then used to minimize projection errors. Due to the convenience and strong applicability of Zhang's calibration method, this invention adopts Zhang's calibration method.
[0035] Furthermore, in step two, Steger An algorithm is a type of algorithm based on HessianThis matrix-based method for line center extraction, capable of achieving sub-pixel accuracy, is particularly suitable for processing images of light stripes or lines with Gaussian distributions. Its core idea is to determine the normal direction of the line by calculating the second derivative of the image function, and then perform a Taylor expansion along that direction to locate the gray-level extrema (i.e., the line center).
[0036] Hessian The matrix is: , in Indicates image along x The second-order partial derivative (representing the gray value along) x (rate of change of direction), where Indicates image along y The second-order partial derivative (representing the gray value along) y (rate of change of direction), and It is the mixed second-order partial derivative of the image (representing the gray value in...). x and y (Rate of change of direction).
[0037] Taylor's formula is: in: Image in x First-order partial derivatives in the direction (i.e.) x The gradient in direction represents the rate of change of grayscale.
[0038] Image in y First-order partial derivatives in the direction (i.e.) y (gradient of direction).
[0039] : Direction of line normal x Components (normal direction from) Hessian The eigenvectors of the matrix are determined, pointing in the direction of maximum gradient.
[0040] : Direction of line normal y Quantity.
[0041] : Subpixel offset in the normal direction, used to locate grayscale extreme points (line center).
[0042] First, Gaussian filtering is applied to the original raster image to eliminate noise interference while preserving edge structure. Then, the first-order gradient (grayscale change rate) and second-order Hessian matrix of each pixel are calculated, and the curvature characteristics of the edges are determined using the second derivative. Extreme points of the grayscale distribution are found in the direction of the largest gradient magnitude (i.e., the direction of the major axis of the ellipse). These points correspond to the symmetry centers of the edges. The local grayscale distribution is approximated using a second-order Taylor expansion, solving for the coordinates of the extreme points with sub-pixel precision. Connected points are filtered according to the gradient direction (Directional Template) to ensure that the centerline direction is consistent with the raster arrangement direction. Redundant points are eliminated, and the most significant central path is retained, ultimately generating a smooth and continuous centerline. Just like... Figure 1 As shown, the green line is the center line of the laser.
[0043] Furthermore, in step three, after obtaining the pixel coordinates of the two points on the left and right of the laser center line, and since there is a calibration plate on the plane, the equation of the plane can be obtained by using the extrinsic parameters obtained from the calibration plate and the intrinsic parameters obtained by Zhang's calibration method. Using the principle of line-plane intersection, the equation system is constructed by converting the pixel coordinates into the ray equation in the camera coordinate system and the intersection of the equation with the plane to be obtained. The three-dimensional coordinates of the two endpoints of the line in the camera coordinate system can be calibrated. The three-dimensional coordinates of the two endpoints of another line are obtained at different positions using the same method. Several lines are obtained. Then, the leftmost endpoint and the rightmost endpoint are fitted into two lines using the least squares method. The plane where the laser is located is obtained by fitting the two lines using the least squares method, and the intersection of the two lines is the laser emission point.
[0044] Specifically: Pixel coordinates → 3D ray Based on the camera intrinsic parameter matrix pixel coordinates Convert to normalized coordinates: in: The camera is x Focal length in direction (in pixels).
[0045] The camera is y Focal length in direction (in pixels).
[0046] Camera main point x Coordinates (pixel coordinates of the center point of the image).
[0047] Camera main point y coordinate.
[0048] : pixel coordinates x value.
[0049] : pixel coordinates y value.
[0050] : Normalized coordinates x value.
[0051] : Normalized coordinates y value.
[0052] Ray direction vector is .in, This is the ray direction vector originating from the camera origin (in the camera coordinate system).
[0053] Intersection of a ray and a plane Plane equations ray parameter equation , Solve simultaneously t : , Intersection coordinates: Principle of fitting straight lines at left and right endpoints When the fan-shaped laser emitted by the laser shines on the calibration plate at different positions, each laser line segment has two boundary points, one on the left and one on the right. These boundary points are actually located on the two boundary lines of the laser fan-shaped plane.
[0054] Left endpoint: All located on the left boundary line of the laser plane. Right endpoint: All located on the right boundary line of the laser plane. For the left endpoint set and right endpoint set Theoretically, all left endpoints are collinear, and the same applies to the right. The optimal line is fitted using the least squares method.
[0055] Calculate the centroid (reference point for the line): Construct the covariance matrix: right and Eigenvalue decomposition is performed, and the eigenvector corresponding to the largest eigenvalue is the direction of the line. and .
[0056] Equation of the straight line: Determine the laser emission point in different cases: 1. Two lines intersect Solve the equation directly: If a solution exists The intersection point is .
[0057] 2. Skew lines Calculate the direction of the common perpendicular: Construct the connection vector: Calculation parameters: Coordinates of the foot of the perpendicular: Laser source: Laser plane fitting Input data: All left endpoints and all right endpoints and laser source .
[0058] Plane equation form: in It is the unit normal vector.
[0059] Least squares fitting steps: Constructing a data matrix A (size is (2) N +1)×4): Perform on A SVD break down: Planar parameters are V The last column: Normalized normal vector: The final plane equation is: like Figure 2As shown, further, in step four, the image generated on the receiving plate is analyzed. We fix the camera to record video, push the object under test at a constant speed, and then process the video frame by frame, analyzing whether there are defects reflected onto the receiving plate in each frame. A ROI region is set to identify a specified area, which is then converted into a grayscale image, and then... Otsu Threshold segmentation and morphological processing are performed to filter the image contours reflected onto the receiving plate based on conditions such as width, height, and area. Each contour interval is scanned, and points where the detected gray value suddenly drops within a certain range are marked as the defect start point, and points where it rises within a certain range are marked as the defect end point (we use red laser, so the defective area will darken).
[0060] Its detected images are as follows Figure 3 As shown, two minor defects were detected at the corresponding positions of the tested object.
[0061] In the fifth step, as shown in the figure, an arc will be formed on the receiving plate. We extract the center line of the stripes in the above figure using the gray-scale centroid method, using the parameter t (usually from 0 to 2π). Since only a part of the ellipse is shown, the parameter range needs to be determined. arrive Parametric Ellipse Equation: Calculate the differential of arc length Calculate the total arc length Divide the total arc length into n Divide into equal parts, each part being the length of... Find the parameters corresponding to each division point through numerical integration. This makes from arrive The arc length is i* .
[0062] Then, the points on the elliptical arc Coordinates are Similarly, divide the straight line into two parts. n Divide the line into equal parts and correspond them to points on the arc. Detect the beginning and end of the object-occluded line segment. The disappeared part is the part reflected by the laser. Calculate the coordinates of the original line segment reflected by the mirror to the receiving plate, and then divide it into... n Divide the line into equal parts, and associate each part with an arc. Calculate the offset of the arc from the line at that point. , d The distance between the receiving boards. L The distance from the plane (not reflected by the object being measured) to the reflector. Similar to the deflection angle of the normal vector, we can derive the equation of the normal vector of the reflecting surface of the object being measured. Through the incident point, the normal vector, and the reflection point, we can determine a three-dimensional coordinate, which is the surface coordinate of the object being measured. By establishing a three-dimensional model, when a defect appears in the image, the corresponding position is marked.
[0063] In summary, the principle behind the mirror-like surface defect detection method proposed in this invention lies in using a laser beam to scan the lens surface and detecting and locating defects by detecting the scattered light signals from surface imperfections (scratches, pits, dirt spots). It is primarily used for detecting surface defects and is commonly used in the inspection of lithography machine lenses.
[0064] During defect detection: 1. Detection based on the imaging characteristics of the reflected light spot on the receiving plate after laser irradiation: When the laser is reflected on an ideal smooth surface (an ideal mirror-like surface to be detected), the light spot should be continuous and uniform; if there are defects on the surface, the reflected light spot will show abnormal shape. A combination of large contour detection and internal pixel analysis is used: First, the boundary of the overall reflected stripes or light spot is extracted to ensure accurate detection range; then, the continuity of pixel grayscale or position (abnormal changes in the reflected light spot) is detected within the region. If there are jumps or discontinuities, they are considered defects.
[0065] 2. If the detected reflected light spot exhibits local pixel abrupt changes, grayscale discontinuities, or abnormal geometric contours (such as local breaks / protrusions), it is judged as a defect. By statistically analyzing the gradient change amplitude between adjacent pixels, if it exceeds a set threshold, it can be determined that there is a potential defect in that area.
[0066] 3. Project the outlier points in the receiver plate image coordinate system back to the camera coordinate system, and obtain the 3D ray direction through the relationship between the camera's intrinsic and extrinsic parameters. Combine this with known reflection geometric constraints (receiver plate position, reflection angle, etc.) to determine the spatial location of the defect points on the surface of the object being measured.
[0067] 4. Based on the morphological characteristics of the defects, distinguish them as "continuous jump defects" (cracks, scratches) and "local abrupt defects" (bubbles, impurities).
[0068] Based on the change in reflection intensity, defects can be distinguished as "weak reflection defects" (pits, depressions) and "strong reflection defects" (protrusions, burrs).
[0069] Defect location: 1. The offset of the laser reflection point directly corresponds to the offset of the surface normal vector: that is, the change in the position of the laser irradiation point on the receiving plate can reflect the change in the surface normal vector of the object being measured (the normal vector of the laser beam on the surface of the mirror-like object being tested). By establishing the correspondence between the receiving plate point and the actual point of the object being measured through the arc length proportional method, the geometric mapping from pixel point to physical point is realized.
[0070] 2. Calculate the offset between the measured object point and the theoretical reflection point, and map this offset to the change in the surface normal vector. Combine the camera ray direction, the offset normal vector, and the reflection geometry to calculate the three-dimensional coordinates of the measured object surface point in the camera coordinate system.
[0071] 3. Match the surface points of the object obtained from the 3D reconstruction with the abnormal areas identified in the defect detection step to obtain the spatial coordinates of the defect points. Mark the defect locations on the 3D model to establish the correspondence between the defect points and the overall geometric model of the object surface.
[0072] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for detecting defects on mirror-like surfaces, characterized in that, Includes the following steps: A laser beam is emitted from a laser onto the mirror-like surface being inspected, and a receiving plate and a camera are set at a preset receiving position to ensure that the camera can capture the image of the reflected light spot of the laser beam reflected from the mirror-like surface being inspected onto the receiving plate. A region of origin (ROI) to be detected is planned on the receiving board. A laser beam is used to scan the surface of the mirror-like object being detected along a preset elliptical path. The laser beam is reflected by the surface of the mirror-like object being detected onto the ROI region on the receiving board, and the elliptical arc scanning path is discretized into multiple continuous path points. Based on the planned ROI region to be detected, the theoretical reflected light spot trajectory of the elliptical arc scanning path reflected by the detected mirror-like surface onto the receiving plate is obtained. The theoretical reflected light spot trajectory is divided into multiple equal parts, and a one-to-one mapping relationship is established with each path point on the discretized elliptical arc scanning path. Keeping the laser stationary, the mirror-like surface to be inspected is pushed at a constant speed along a straight line, and the actual reflected light spot on the receiving plate is acquired in real time by a camera. When the actual reflected light spot changes abnormally relative to the theoretical reflected light spot, it is considered a defect. The path point corresponding to the defect on the elliptical arc scanning path is identified, the actual position coordinates of the defect on the receiving plate are recorded, and the position of the equally divided point of the theoretical reflected light spot trajectory is obtained based on the identified path point. Based on the actual position coordinates of the defect on the receiving plate and the equidistant points of its mapping on the theoretical reflected light spot trajectory, the optical path offset is obtained, and the normal vector deflection information of the defect at the surface of the detected mirror-like surface is determined. Based on the incident point of the laser beam, the position of the equally divided point of the defect on the theoretical reflected light spot trajectory, and the normal vector deflection information of the defect at the surface of the tested mirror, the three-dimensional spatial coordinates of the defect on the surface of the tested mirror are obtained. Based on the three-dimensional spatial coordinates of all defects, a three-dimensional model of the inspected mirror-like surface is constructed, and the defect locations corresponding to the defects are marked on the three-dimensional model.
2. The method for detecting surface defects of mirror-like surfaces according to claim 1, characterized in that, The method for discretizing the elliptical arc scan path into multiple consecutive path points includes the following steps: Based on the parametric ellipse equation, the differential of the arc length of the elliptical arc scanning path is calculated, and then the total arc length of the elliptical arc scanning path is obtained. S ; Total arc length S Divided into n Equal portions; Based on the principle of equal arc length, determine the coordinates of the path points corresponding to each equally divided point on the elliptical arc scanning path.
3. The method for detecting surface defects on mirror-like surfaces according to claim 2, characterized in that, The total arc length of the elliptical arc scanning path S Determined according to the following formula: , in, , , , In the formula, S This represents the total arc length of the elliptical arc scan path; The differential of the arc length of the elliptical arc scan path; and The equation of the parametric ellipse, t These are the parameter values for the equation of the ellipse. These are the coordinates of the center point of the elliptical arc; a and b These are the major and minor semi-axis of the ellipse arc, respectively; This is the initial value of parameter t, corresponding to the starting point parameter of the elliptical arc scan path; The endpoint value of parameter t corresponds to the endpoint parameter of the elliptical arc scan path.
4. The method for detecting surface defects of mirror-like surfaces according to claim 1, characterized in that, The method for obtaining and establishing the mapping relationship of the theoretical reflected light spot trajectory includes the following steps: Based on the imaging characteristics of the reflected light spot on the receiving plate after laser irradiation, assuming that the detected mirror-like surface is an ideal mirror, the laser is used to scan the ideal mirror along the elliptical arc scanning path. The trajectory of the reflected light spot on the receiving plate after the laser beam undergoes ideal mirror reflection is obtained, which is the theoretical trajectory of the reflected light spot on the receiving plate of the elliptical arc scanning path. The theoretical reflected light spot trajectory is divided into n equal parts to obtain n division points; Establish a one-to-one mapping relationship between each path point on the elliptical arc scanning path and the equally divided points of the theoretical reflected light spot trajectory.
5. The method for detecting surface defects of mirror-like surfaces according to claim 1, characterized in that, The optical path offset is determined according to the following formula: , In the formula, θ The deflection angle between the actual position of the defect on the receiving plate and its corresponding equally spaced points on the theoretical reflected light spot trajectory; d The distance between the actual coordinates of the defect on the receiving plate and the corresponding equally spaced points on the theoretical reflected light spot trajectory; L This is the theoretical optical path length from the reflection point of the laser beam on the ideal mirror to the receiving plate.
6. The method for detecting surface defects of mirror-like surfaces according to claim 5, characterized in that, The normal vector deflection information of the defect located on the surface of the tested mirror is: the deflection angle between the theoretical normal vector and the actual normal vector of the laser beam on the surface of the tested mirror, which is the normal vector deflection angle. This normal vector deflection angle is related to the optical path offset. θ same.
7. The method for detecting surface defects of mirror-like surfaces according to claim 6, characterized in that, The method for determining the three-dimensional spatial coordinates of the defect on the surface of the inspected mirror-like surface includes the following steps: Obtain the incident direction of the laser beam, the actual normal vector of the defect point located on the surface of the mirror being inspected, and the theoretical coordinates of the laser beam's reflection point on the receiving plate; The actual reflection direction of the defect point is obtained based on the incident direction of the laser beam and the actual normal vector of the defect point located on the surface of the mirror being inspected. Establish the equation of a straight line extending from the laser beam along the incident direction; establish the equation of a straight line extending in the opposite direction from the theoretical reflection point coordinates on the receiving plate along the actual reflection direction of the defect point, and obtain the position parameters of the intersection point of the two straight lines. By substituting the intersection point position parameters into the equation of the straight line extending along the incident direction of the laser beam, the precise three-dimensional spatial coordinates of the defect point on the surface of the mirror-like object being inspected can be obtained.
8. The method for detecting surface defects of mirror-like surfaces according to claim 7, characterized in that, The method for constructing the three-dimensional model of the detected mirror-like surface and the method for marking the defect location include the following steps: The three-dimensional coordinate information of the surface to be detected is obtained, the defect detection results are matched with the three-dimensional coordinate information, and the three-dimensional region range of all defects is determined based on the pixel position of the defect in the reflected light spot image and the projection relationship of the three-dimensional point cloud. Based on the distribution area of defects in the image coordinate system, the three-dimensional coordinate points in the corresponding area are extracted from the point cloud and the defects are marked. Export the marked point cloud data as a .ply file and mark the defective 3D coordinates with different colors.
9. A surface defect detection system for mirror-like surfaces, used to implement the method as described in any one of claims 1-8, characterized in that, include, A laser used to emit a laser beam toward the mirror-like surface being inspected; A camera used to capture images of a laser beam reflected off a mirror-like surface being tested and onto a receiving plate; The receiving plate is set at a preset receiving position to receive the reflected light spot of the laser beam after being reflected by the mirror-like surface being tested; The control unit is used to control the laser to scan along the elliptical arc scanning path; Processing unit, used to perform the following operations: A preset elliptical arc scanning path is planned for the reflection point of the laser beam on the surface of the mirror being tested, and the path is discretized into multiple continuous path points. Obtain the theoretical reflected spot trajectory of the laser beam on the receiving plate, divide it into multiple equal parts, and establish a mapping relationship with the path points; Analyze the reflected light spots, identify defects, record the actual position coordinates, and obtain the mapping points; Obtain optical path offset and normal vector deflection information; Obtain the three-dimensional spatial coordinates of the defect; construct a three-dimensional model and mark the defect.
Citation Information
Cited By
Method and system for measuring coaxiality of a hole system based on a laser beam
CN122130013A