A light tunnel sheet defect detection method and system based on coordinate transformation

By correcting the pose of the optical fiber using Zhang Zhengyou's calibration method and image stitching technology, and combining connected component algorithms and elastic buffer marking, the problems of fixture fixation and inaccurate defect marking in optical fiber inspection were solved, achieving efficient and accurate defect detection and marking.

CN121236067BActive Publication Date: 2026-02-27YANTAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511783877.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-02-27
Estimated Expiration
2045-12-01

AI Technical Summary

Technical Problem

Existing optical fiber defect detection systems suffer from problems such as reliance on fixtures for optical fiber placement, difficulty in accurately locating defect marker coordinates, blurry image acquisition, and disorganized defect classification, resulting in low detection efficiency.

Method used

The camera intrinsic parameters are solved using the Zhang Zhengyou calibration method. Images are acquired through image information acquisition and optical path moving mechanism. Image stitching technology is used to correct pose. Defect detection and marking are achieved by combining connected component algorithm and elastic buffer marking mechanism.

Benefits of technology

It improves the accuracy and efficiency of optical fiber defect detection, reduces manual positioning time, effectively distinguishes different types of defects, and ensures the accuracy of coordinate data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121236067B_ABST
    Figure CN121236067B_ABST
Patent Text Reader

Abstract

The application discloses a light-passing sheet defect detection method and system based on coordinate transformation and relates to the technical field of defect detection. In order to solve the defects that the existing detection needs to fix the workpiece pose by precise elements and the defect mark position coordinates are difficult to accurately position, the application first acquires a coordinate transformation formula from a pixel coordinate system of a light-passing sheet image to a world coordinate system; acquires a coordinate transformation formula from the pixel coordinate system of the light-passing sheet image to a world coordinate system of a light-passing sheet defect detection system; acquires multiple light-passing sheet placement table images containing light-passing sheet units, and simultaneously performs image preliminary processing; adopts image splicing technology to fuse to obtain a global splicing image of the light-passing sheet placement table image, scans the light-passing sheet after the pose is corrected, and acquires a light-passing sheet splicing image; integrates defect coordinate information, and completes defect classification; adopts a marking mechanism to integrate defects, and completes defect identification and defect marking. The application is mainly used for detecting and positioning defects of the light-passing sheet.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of defect detection, in particular to a light transmission sheet defect detection method and system based on coordinate transformation. BACKGROUND

[0002] The light transmission sheet is also called optical film sheet, and its production process is complex and precise. Many precise optical systems need it to provide a flat light transmission interface. In the production and transportation process of the light transmission sheet, micron-level defects such as surface pitting, point damage and elongated defects (scratches, etc.) that are difficult to find can be easily caused, and these defects are difficult to detect manually.

[0003] The automatic detection of light transmission sheet defects has gradually replaced manual detection. At present, there are some defect detection systems, but these devices have some shortcomings, which make it difficult to accurately position the defect mark position coordinates:

[0004] (1) The placement of the light transmission sheet depends on the fixture fixing, which is limited by the placement position;

[0005] (2) When obtaining the image of the light transmission sheet, the area of the light transmission sheet is easily missed, the defect image obtained is blurred, and the subsequent defect detection is difficult;

[0006] (3) The defect classification is messy, and there is no clear and orderly mark symbol.

[0007] Therefore, a light transmission sheet defect detection method and system based on coordinate transformation are needed, which do not need fixture constraint, reduce manual positioning time, can improve marking efficiency, and effectively distinguish defect types. SUMMARY

[0008] The present application provides a light transmission sheet defect detection method and system based on coordinate transformation, which does not need fixture constraint, reduces manual positioning time, can improve marking efficiency, and effectively distinguishes defect types.

[0009] The light transmission sheet defect detection method based on coordinate transformation comprises:

[0010] S1, Zhang Zhengyou calibration method is used to solve the camera intrinsic parameter, camera extrinsic parameter is solved by means of the camera intrinsic parameter, and the coordinate transformation formula from the pixel coordinate system of the light transmission sheet image to the world coordinate system of the light transmission sheet defect detection system is further obtained;

[0011] S2, the image information acquisition mechanism and the light transmission sheet moving mechanism are used to obtain a plurality of light transmission sheet placement table images containing light transmission sheet units, and the image preliminary processing is carried out at the same time;

[0012] S3, using the result of the preliminary processing, a global stitching image of the light pass sheet placement table image is fused by using image stitching technology, the light pass sheet pose is obtained by polygon approximation and contour screening, and the light pass sheet scanning after the corrected pose and the light pass sheet stitching image are obtained again;

[0013] S4, using the stitching image to generate a mask edge map, using a connected domain algorithm to detect defects to obtain defect information;

[0014] S5, using the defect information, using a marking mechanism to integrate the defects to complete defect recognition;

[0015] S6, based on the elastic buffer of the marking mechanism, the movement error is compensated to complete the defect marking on the light pass sheet.

[0016] Further, in S1, the conversion between the camera coordinate system and the world coordinate system and the conversion between the pixel coordinate system and the camera coordinate system are completed respectively, including the following steps:

[0017] S11, conversion from the camera coordinate system to the world coordinate system;

[0018] In the world coordinate system, the camera takes a picture to obtain camera calibration board image information, and solves the camera intrinsic parameter; combined with the camera intrinsic parameter matrix , according to singular value decomposition and absolute orientation, the linear equation set is solved, and the camera rotation matrix R and the translation vector M are calculated; define as the coordinates in the camera coordinate system, as the coordinates in the world coordinate system, and calculate the coordinates of the target point in the world coordinate system according to the camera extrinsic parameter R and the translation vector M:

[0019] ;

[0020] In the formula, is the coordinates of the target point in the world coordinate system, R is the camera rotation matrix, M is the translation vector, is the transpose of the camera rotation matrix; is the coordinates of the target point in the camera coordinate system;

[0021] S12, conversion between the camera coordinate system and the image coordinate system;

[0022] Using the perspective projection relationship, the projection P(x, y) of Pc(Xc, Yc, Zc) in the camera coordinate system on the imaging plane xy satisfies the triangular similarity relationship: , wherein f is the focal length of the camera;

[0023] S13, conversion between the pixel coordinate system and the image coordinate system;

[0024] Let dx be the distance of a unit pixel in the x-axis direction and dy be the distance of a unit pixel in the y-axis direction, and the following relationship is obtained:

[0025] ;

[0026] In the formula, is the origin of the pixel coordinate system; P(u, v) is the pixel coordinate of P;

[0027] S14, conversion between the pixel coordinate system and the world coordinate system;

[0028] Substitute , into the conversion formula between the pixel coordinate system and the image coordinate system, and arrange it into a matrix form:

[0029] ;

[0030] In the formula, fx=f / dx, fy=f / dy, and Zc=f; the conversion relationship between the pixel coordinate system and the world coordinate system is obtained.

[0031] Further, in S2, the light sheet placement table image is acquired and the image is processed for distortion removal and perspective transformation, specifically:

[0032] S21, acquiring a light sheet placement table image;

[0033] The light sheet moving mechanism continuously moves, and after the light sheet moving mechanism reaches the position according to the error stagnation judgment of the image information acquisition mechanism, the light sheet moving mechanism cooperates with the camera to acquire a plurality of light sheet placement table global images containing the light sheet unit under the light source of the light compensation lamp. Due to the particularity of the S-shaped route, each image is named according to the scanning order and sequentially arranged;

[0034] S22, distortion removal processing;

[0035] With the above camera intrinsic parameters , radial distortion coefficients and tangential distortion coefficients , an improved Zhang Zhengyou calibration model is established to process the image for distortion removal:

[0036] S23, perspective transformation;

[0037] The perspective transformation is applied to restore the shape of the light sheet image in the orthographic view. Through the perspective transformation matrix , the following is achieved:

[0038] ;

[0039] The equation represents the coordinates of the target image physical coordinates after perspective transformation .

[0040] Further: in S3, using the result of S2, correct the light sheet position and further obtain the light sheet splicing image, including the following steps:

[0041] S31, obtain the global splicing image of the light sheet placement table;

[0042] Using the result of S2, determine the "candidate overlapping area" according to the moving distance and times of the light sheet moving mechanism, and calculate the overlap rate, use mean fusion in the overlapping area, directly splice on both sides in the non-overlapping area, continue to repeat the fusion and splicing to obtain the global splicing image of the light sheet placement table;

[0043] S32, correct the light sheet position;

[0044] Copy the spliced original image as a gray image, use Sobel operator to extract edge features, perform contour detection and polygon approximation algorithm to filter rectangular contours that meet the appearance size of the light sheet, and finally use the minimum circumscribed inclined rectangle algorithm to calculate the light sheet inclination angle theta:

[0045] ;

[0046] In the formula, is the first point coordinate, is the second point coordinate; knowing the position of the light sheet relative to the light sheet placement table, the light sheet moving mechanism is controlled through affine transformation to correct the light sheet;

[0047] S33, obtain the light sheet splicing image;

[0048] Again, the light sheet is scanned in an S-shaped path, only the image containing the light sheet unit is obtained; the image splicing is repeatedly applied to obtain the light sheet splicing image, and the coordinates of the top point of each light sheet unit image in the splicing image are calculated , and the current coordinate value is compared with the data calculated by the coordinate formula:

[0049] ;

[0050] In the formula, represents the total number of rows of scanning, represents the total number of columns of scanning, represents the distance of horizontal movement, represents the distance of vertical movement, represents the overlap rate between images.

[0051] Further: in S4, using the light sheet unit image obtained in S3, the image is preliminarily processed and the defect information is integrated, the specific steps are as follows:

[0052] S41, the image information collection mechanism enlarges the light transmission sheet image, and processes the mask edge image obtained after the enlargement;

[0053] S42, the connected domain algorithm is used to obtain the internal information of the mask edge image, and it is judged according to the set standard whether there is a defect on the surface of the light transmission sheet;

[0054] S43, all mask edge images are traversed to find contour points and center points, and ellipses with different eccentricities are drawn in the image as marker symbols.

[0055] Further, in S5, the defect information integration includes the following steps:

[0056] S51, point damage and pitting detection;

[0057] If the diameter of the point damage is greater than the first set value, it is considered that the current mask edge image has point damage defects; if the diameter of the point damage is less than the first set value but the number of point damages is greater than the second set value, it is considered that the current mask edge image has pitting defects;

[0058] S52, edge collapse and corner collapse detection;

[0059] A measurement rectangle is drawn on each side of the light transmission sheet, and a measurement handle is created for each measurement rectangle, and the accumulated length of the white area perpendicular to the detection edge direction is calculated , the length of the target light transmission sheet unit is recorded as , and the difference between the two is calculated :

[0060] ;

[0061] If is greater than the third set value , it is considered that the current mask edge image has edge collapse and corner collapse defects;

[0062] S53, elongated defect detection;

[0063] The width W and height H of the elongated defect connected block are extracted by the connected domain algorithm, and the aspect ratio is obtained;

[0064] ;

[0065] If R is greater than the fourth set value , the current connected domain is an elongated connected domain candidate; the larger side of the connected domain is selected: , if , is the fifth set value, it is considered that the current mask edge image has elongated defects.

[0066] Further, in S6, the specific steps of compensating for movement errors on the light sheet by the elastic buffer-based marking mechanism to complete defect marking are as follows:

[0067] S61, the marking mechanism controls the touch pen to complete defect marking on the light sheet, and substitutes the mask edge map coordinates obtained in S5 into the pixel coordinate system to world coordinate system transformation formula to calculate the world coordinates thereof;

[0068] S62, the marking mechanism compensates for movement errors through the elastic buffer and the up-down moving mechanism, and then the touch pen is pressed on the light sheet unit containing defects to draw ellipses with different eccentricities, so as to mark all detected defects on the light sheet;

[0069] S63, the marking is repeatedly performed until all detected defects on the light sheet are marked.

[0070] The light sheet defect detection system for implementing the light sheet defect detection method based on coordinate transformation comprises a light sheet defect detection mechanism, a coordinate transformation module, an image splicing module, a pose rectification module, a defect integration module and a defect marking module.

[0071] The light sheet defect detection mechanism is used to acquire images of the light sheet on a light sheet placing table.

[0072] The coordinate transformation module is used to perform coordinate transformation of the light sheet from a pixel coordinate system to a world coordinate system.

[0073] The image splicing module is used to globally splice the images of the light sheet placing table according to the world coordinates.

[0074] The pose rectification module is used to rectify the pose of the spliced image.

[0075] The defect integration module is used to acquire defect information, integrate the defects and complete defect identification.

[0076] The defect marking module is used to complete defect marking on the light sheet.

[0077] The present application has the following advantages:

[0078] The present application provides a light sheet defect detection method based on coordinate transformation.

[0079] The light passing sheet is firmly adsorbed on the light passing sheet placing table through the air pressure difference generated by the air inlet in the application, so that the clamp is not needed to constrain. The light passing sheet can be placed on the light passing sheet placing table at will, so that the artificial positioning time is reduced, and the detection flexibility is improved. The light source of the light supplementing lamp of the image information collecting mechanism adopts the coaxial light source and the low-angle ring light source, so that the small and many pimple points can be focused, and the thin and thin scratches can be processed. The S-shaped path scanning is designed to cooperate with the image splicing, so that the light passing sheet position can be accurately acquired, and any area of the light passing sheet is not missed. The marking mechanism adopts the elliptical marking defects with different eccentricities, so that the marking efficiency is improved to a certain extent, and the defect types can be effectively distinguished. BRIEF DESCRIPTION OF DRAWINGS

[0080] Figure 1 Flowchart for light passing sheet defect positioning method;

[0081] Figure 2 Positioning diagram of world coordinate system and camera coordinate system;

[0082] Figure 3 Conversion relationship diagram of camera coordinate system and image coordinate system;

[0083] Figure 4 Positioning diagram of image coordinate system and pixel coordinate system;

[0084] Figure 5 Schematic diagram of the system overall structure of the application;

[0085] Figure 6 Schematic diagram of the light supplementing lamp light source of the application;

[0086] Figure 7 Schematic diagram of the marking mechanism of the application;

[0087] Figure 8 Structure schematic diagram of the image information collecting mechanism of the application;

[0088] Figure 9 Path schematic diagram of the light passing sheet moving mechanism of the application;

[0089] Figure 10 Structure schematic diagram of the light passing sheet placing table of the application;

[0090] Figure 11 Sectional view of the light passing sheet placing table of the application;

[0091] Figure 12 Speed curve diagram of the application;

[0092] Figure 13 S-type path scanning schematic diagram of the application;

[0093] Figure 14Flow chart of image splicing of light passing sheet according to the present application;

[0094] Figure 15 Flow chart of obtaining defect information according to the present application;

[0095] Figure 16 Flow chart of drawing ellipse according to the present application;

[0096] Figure 17 Various defect schematic diagrams according to the present application.

[0097] In the figure, 1 is a base plate, 2 is a horizontal moving mechanism, 3 is a light passing sheet placing table, 4 is an image information collecting mechanism, 5 is a vertical moving mechanism, 6 is an up and down moving mechanism, 7 is a marking mechanism, 8 is a coaxial light source, 9 is a low angle annular light source, and 10 is a light passing sheet.

[0098] 301 is an air suction port, and 302 is a ventilation channel.

[0099] 401 is an inclined fixing frame, 402 is a camera fixing plate, 403 is a camera, 404 is a lens, and 405 is an ocular lens.

[0100] 701 is a marking seat plate, 702 is a marking guide rail, 703 is a marking pin positioning block, 704 is a marking slider, 705 is a pen holding block, 706 is a touch pen, 707 is a marking pin, 708 is a fixing spring, and 709 is a stop block. DETAILED DESCRIPTION

[0101] The following merely illustrates the preferred embodiments of the present application, but the protection scope of the present application is not limited thereto, any changes or replacements within the technical range disclosed by the present application can be easily thought by those skilled in the art, which should be covered within the protection scope of the present application. The following embodiments are used to explain the present application, but should not be explained as the limitation of the present application, the protection scope of the present application should be subject to the protection scope of the claims. The embodiments of the present application are described in detail below, in order to facilitate the description of the present application and simplify the description, the technical terms used in the specification of the present application should be interpreted in a broad sense, including but not limited to the conventional replacement schemes not mentioned in the present application, and including direct implementation mode and indirect implementation mode.

[0102] Embodiment 1

[0103] In combination Figures 1-17 In the present embodiment, the light passing sheet defect detection method based on coordinate transformation provided by the present embodiment includes the following steps:

[0104] S1, obtaining the coordinate transformation formula from the pixel coordinate system of the light passing sheet 10 image to the world coordinate system.

[0105] The Zhang Zhengyou calibration method is used to mark the image corner points of the chessboard in the camera calibration board, and the sub-pixel level optimization is performed. According to the position information of the corner points, the camera internal and external parameters are calculated by solving a linear equation set. The camera internal parameters are used to solve the linear equation set to calculate the camera external parameters, and further obtain the coordinate transformation formula from the pixel coordinate system of the light pass sheet 10 image to the world coordinate system of the defect detection system. Wherein, one light pass sheet 10 includes a plurality of light pass sheet units, for example Figure 13 In the embodiment, one light pass sheet 10 includes dozens of light pass sheet units.

[0106] In S1, the conversion between the camera coordinate system and the world coordinate system and the conversion between the pixel coordinate system and the camera coordinate system are respectively completed, including the following steps:

[0107] In the embodiment, as shown in Figure 2 : the world coordinate system Ow is fixed on the bottom plate 1, and the origin is located at the upper left corner of the bottom plate 1, the Y-axis extends along the direction of the horizontal moving mechanism 2, and the Z-axis extends vertically upward. As shown in : the camera coordinate system Oc is fixed at the optical center of the camera 403, the Zc-axis points to the light pass sheet placing table 3 along the direction of the optical axis of the camera 403, and the Xc-axis and the Yc-axis are parallel to the imaging plane respectively. As shown in Figure 3 : the image coordinate system Oi is defined on the imaging plane of the camera coordinate system, the origin is located at the center of the imaging plane, the x-axis is to the right, the y-axis is downward, and the unit is millimeter; the pixel coordinate system Op is defined in the digital image, the origin is located at the upper left corner of the image, the u-axis is to the right, the v-axis is downward, and the unit is pixel. Figure 4

[0108] S11, conversion of the camera coordinate system to the world coordinate system.

[0109] In the world coordinate system, the camera calibration test is performed with the aid of the camera calibration board. The image corner points of the chessboard are found and marked, the sub-pixel points are found through the marked corner points, and finally the world coordinates of the corner points are calculated and recorded. Repeat the above operation to process all images. The CalibrateCamera() function in the OpenCV (Open Source Computer Vision Library, cross-platform computer vision library) library is used to solve the camera internal parameter matrix (K) and the distortion coefficient (distCoeffs). At the same time, four groups of three-dimensional coordinate points are introduced by using the marked corner point information, denoted as . The projection of the four groups of three-dimensional coordinate points on the image is denoted as . The EPNP (efficient perspective-n-point) algorithm is used to combine the camera internal parameter matrix K, and the singular value decomposition and absolute orientation are used to solve the linear equation set to calculate the camera rotation matrix R and the translation vector M.​

[0110] Knowing the position of the world coordinate system, the camera coordinate system needs to be rotated so that the camera coordinate system and the coordinate axes of the world coordinate system are parallel to each other: define Xc as the coordinate in the camera coordinate system, Xw as the coordinate in the world coordinate system, the rotation matrix R and the translation matrix M of the camera coordinate system to the world coordinate system, and Xc = RXw + M. Since it is a rigid body change, the rotation matrix of the camera 403 is an orthogonal matrix, so the above formula can be changed to Xw = RTXc - RTM. Substituting the origin Oc of the camera coordinate system into the above formula, the light point coordinates of the camera 403 in the world coordinate system can be obtained :

[0111] ;

[0112] The orthogonality of the camera extrinsic rigid transformation matrix is:

[0113] ;

[0114] S12, conversion between the camera coordinate system and the image coordinate system;

[0115] The camera coordinate system and the image coordinate system are a pinhole camera model. The pinhole camera model is essentially a perspective projection relationship, and the projection P(x, y) of Pc(Xc, Yc, Zc) on the imaging plane satisfies the triangular similarity relationship, as shown in Figure 3 :

[0116] ;

[0117] In the formula, point B is the point P projected on the plane, point C is the point P projected on the plane, f is the camera focal length, and f is the camera focal length. Simplify the equation: .

[0118] S13, conversion between the pixel coordinate system and the image coordinate system;

[0119] As shown in Figure 4 , the point Op of the pixel coordinate system is at the upper left corner of the imaging plane, and the origin Oi of the image coordinate system is the intersection of the imaging plane and the Zc axis of the camera coordinate system. The unit of the pixel coordinate system is pixel, and the unit of the image coordinate system is millimeter. Define dx as the distance of unit pixel in the x-axis direction, and dy as the distance of unit pixel in the y-axis direction. In this embodiment, dx = dy = 0.007 mm / pixel, and the following relationship can be obtained:

[0120] ;

[0121] In the formula, P(u, v) is the pixel coordinate of P, and O(u0, v0) is the origin of the pixel coordinate system. , Substitute the above formula, and arrange it into matrix form:

[0122] ;

[0123] In the formula, fx=f / dx, fy=f / dy, Zc=f; fx is the scaling factor in the x direction of the image, and fy is the scaling factor in the y direction of the image;

[0124] S14, conversion between the pixel coordinate system and the world coordinate system;

[0125] Substitute Xw=RTXc-RTM into the pixel coordinate system and image coordinate system conversion formula, and arrange it into matrix form:

[0126] ;

[0127] Get the coordinates of any point P in the world coordinate system .

[0128] In summary, during the experiment, the pixel coordinates of the target object will be obtained first, so the above formula can be deduced to obtain the coordinates of the target object in the world coordinate system.

[0129] S2, image stitching and correction of the pose of the light sheet 10;

[0130] Obtain multiple images of the light sheet placement table 3 containing the light sheet 10 unit through the image information acquisition mechanism and the light sheet 10 moving mechanism, and perform preliminary image processing.

[0131] In S2, obtain the global image of the light sheet placement table 3 by means of the defect detection system shown in Figure 5 , and perform preliminary image processing on the image, specifically:

[0132] As shown in Figure 5 , the defect detection system includes an image information acquisition mechanism, a light sheet 10 moving mechanism, and a marking mechanism 7. The image information acquisition mechanism 4 and the marking mechanism 7 are respectively arranged above the light sheet 10 moving mechanism.

[0133] As shown in Figure 8 , the image information acquisition mechanism 4 specifically includes: an inclined fixed frame 401, a camera fixing plate 402, a camera 403, a lens 404, and a fill light for image information acquisition mechanism 4 during image acquisition. The camera 403 is fixed to the inclined fixed frame 401 through the camera fixing plate 402, and the ocular lens 405 cooperates with the camera 403. The fill light can be arranged on the lens 404 (arranged on the outside or near the lens 404), and the exposure value of the fill light is set to 350us.

[0134] ​As shown in Figure 6 , the light source of the light filling lamp is selected as the coaxial light source 8 and the low-angle annular light source 9, wherein, in order to avoid the influence of the shadow on the actual shape around the pockmark and the point injury, the camera 403 needs to be perpendicular to the surface of the light transmission sheet, and the light is perpendicular to the incident. The coaxial light source 8 is used for the pockmark and the point injury, which will appear as a dark spot in the imaging of the camera 403, so as to obtain the actual size of the pockmark and the actual shape around the pockmark.

[0135] Since the scratch is shallow and thin, the incident angle of the light source needs to be very small, and the camera 403 needs to be directly opposite the surface of the light transmission sheet. The low-angle annular light source 9 is used for imaging detection of the shallow and thin scratch, and at this time the light is diffusely reflected, and the scratch area will be brighter than the smooth area. The relative positions of the coaxial light source 8 and the low-angle annular light source 9 are as shown in Figure 6 .

[0136] As shown in Figure 7 , a marking mechanism 7 based on elastic buffering includes a marking base plate 701, a marking guide rail 702, a marking pin positioning block 703, a marking slider 704, a pen holding block 705, a touch pen 706, a marking pin 707, a fixed spring 708, and a stop block 709.

[0137] The marking base plate 701 cooperates with the up-down moving mechanism 6, the marking guide rail 702 is installed at the middle position of the marking base plate 701, the marking slider 704 is installed on the marking guide rail 702, the marking pin positioning block 703 and the stop block 709 are respectively installed on the upper and lower sides of the marking base plate 701, the pen holding block 705 is installed on the marking slider 704, in order to realize elastic buffering, the marking pin 707 is arranged between the pen holding block 705 and the marking pin positioning block 703 for fixing the position of the fixed spring 708, and the fixed spring 708 is sleeved on the marking pin 707. The additional marking guide rail 702 enables the relative sliding between the marking guide rail 702 and the up-down moving mechanism 6, and the touch pen 706 can stably stay on the surface of the light transmission sheet when it contacts the light transmission sheet. The fixed spring 708 not only provides marking pressure, but also offsets the additional displacement of the up-down moving mechanism 6 when it is compressed. The originally strict fixed marking distance is optimized to a loose elastic marking range through the buffering mechanism. When the guide rail and the motor precision are worn and cause excessive or insufficient displacement distance deviation, all the light transmission sheets can still be clearly marked and will not be damaged.

[0138] As shown in Figure 9 , the light transmission sheet 10 moving mechanism includes a horizontal moving mechanism 2, a vertical moving mechanism 5, and a light transmission sheet placing table 3. The horizontal moving mechanism 2 is fixed on the bottom plate 1, the vertical moving mechanism 5 is arranged on the horizontal moving mechanism 2, and the light transmission sheet placing table 3 is arranged on the vertical moving mechanism 5. The moving relationship among the three is as shown in Figure 10 and Figure 11The light transmission sheet placement table 3 is uniformly provided with air suction ports 301, and an air passage 302 is arranged in the light transmission sheet placement table 3, one end of the air passage 302 is communicated with the air suction ports 301, and the other end of the air passage 302 is connected with the air suction device. The air suction ports 301 can be annularly distributed on the light transmission sheet placement table 3. Based on the pressure difference between the atmospheric pressure and the vacuum, when the light transmission sheet placement table 3 works, the internal air is sucked out to form a low-pressure environment, and the object is pressed on the light transmission sheet placement table 3 by using the atmospheric pressure of the outside, so that the uniform and stable adsorption effect is realized. When the light transmission sheet 10 to be detected is placed on the light transmission sheet placement table 3, it is adsorbed and fixed, so that the image information collection and accurate marking are facilitated, the problem that the light transmission sheet 10 to be detected is inconvenient to clamp is solved, and the problems that the clamp damages the light transmission sheet 10 to be detected due to the excessive clamping force and the image collection is affected due to the clamping position are avoided.

[0139] S21, acquire a global image of the light transmission sheet placement table 3;

[0140] The vertical distance from the plane of the bottom plate 1 to the surface of the light transmission sheet placement table 3 is 190 mm, so the surface of the light transmission sheet placement table 3 is selected as the reference surface. The above-mentioned origin (mm) of the world coordinate system is an absolute position, and the initial position coordinates (106.044, 4.356, 231.182) of the camera 403 are created. According to the physical size of the light transmission sheet 10, the image detection point (37, 32, 0) is set to ensure that the photographing area can cover enough unit images of the light transmission sheet 10; the zero point position coordinates (205.6, 168.2, 0) of the light transmission sheet 10 moving mechanism are set; the initial height of the stylus 706 is 30 mm from the surface of the light transmission sheet placement table 3, the maximum rising height of the stylus 706 is 35 mm, and the maximum falling height of the stylus 706 is 32 mm. The center point position of the stylus 706 is created according to the position of the camera 403, and the coordinate position of the center point of the stylus 706 is (208.59, 82.534, 50.042). The projection point of the optical axis of the camera 403 on the plane of the world coordinate system is the center position of the photographing area of the camera 403. The light transmission sheet 10 to be detected is placed on the light transmission sheet placement table 3, and the light transmission sheet 10 moving mechanism is started to move the light transmission sheet placement table 3 to the image detection point. An error threshold pre_err_dist is set, and the value is 0.02 mm; the coordinates of the current point are acquired, including the horizontal coordinate X and the vertical coordinate Y; the coordinates of the image detection point are acquired, including the horizontal coordinate and the vertical coordinate ; the Euclidean distance err_distance between the current point and the target point is calculated, and the calculation formula is as follows:

[0141] ;

[0142] Subsequently, it is judged whether the Euclidean distance between the current point and the target point is greater than a set error threshold to determine whether to perform position correction or control adjustment. If error stagnation occurs (i.e., the actual distance is greater than the set error threshold), the movement command is retriggered, and the servo motor makes a small rapid movement according to the error size until the error is within a reasonable range at a certain moment. Then, the communication protocol sends the in-place flag, and the program determines that the photographing position has been reached.

[0143] In the process of scanning and identifying defects by the camera 403, the image of the light sheet 10 is divided into a plurality of light sheet 10 units. In order to improve the detection efficiency, a plurality of light sheet 10 units are detected at one time. The S-shaped route is defined as the scanning route of the camera 403, and the starting point is the top left corner of the light sheet 10. The S-shaped route is that the image acquisition range is three light sheet 10 units in the length direction and three light sheet 10 units in the width direction (the length and width can be set according to the implementation needs to increase or decrease the number of light sheet 10 units detected at one time, and preferably not more than nine). During detection, the image acquisition range starts from the top left corner of the light sheet 10 to be detected, and continuously acquires image information as the light sheet 10 to be detected moves to the right. When the image acquisition range reaches the rightmost side, it moves down three light sheet 10 units, and then the image acquisition range moves to the left from the rightmost side of the light sheet 10 to be detected. When it reaches the leftmost side, it moves to the right on the next line, and so on, to form an S-shaped movement. The S-shaped path kinematic model is shown in FIG. 8, where the horizontal coordinate is time t, and the unit is s. Figures 12-14

[0144] ;

[0145] In the formula, vx(t) is the instantaneous speed in the x-axis direction, vmax represents the maximum speed of the system in the S-shaped movement process, τ is the time constant, which determines the time required for the speed to reach 63.2% vmax, is the instantaneous angular velocity, represents the exponential decay factor, which describes the gradual process of the speed approaching the maximum value; is the movement period, which is the time required for a complete sinusoidal fluctuation.

[0146] The moving mechanism cooperates with the camera 403 to complete the scanning of the entire light sheet placement table 3 plane along the S-shaped movement path, and obtains a plurality of light sheet placement table 3 global images containing light sheet 10 units. The pixel size of each image is 5120*5120 in length ( ) and 5120*5120 in width (h), and the label of each image constitutes an image matrix array .

[0147] ​In the formula, i represents the number of rows where the image is located in the S-type scanning; j represents the number of columns where the image is located in the S-type scanning. Each image is arranged in sequence. Due to the particularity of the S-type route: if it is an odd row, the image is arranged from ; if it is an even row, the image is arranged from .

[0148] S22, de-distortion processing;

[0149] With the above camera intrinsic parameter K, radial distortion coefficient (k1, k2, k3) and tangential distortion coefficient (p1, p2), an improved Zhang Zhengyou calibration model is established to perform de-distortion processing:

[0150]

[0151] The equation represents the coordinates of the target coordinate (x, y) after distortion correction , in which , represents the distance of the pixel point to the origin of the pixel coordinate system , and (u', v') is the distorted coordinate of P(u, v).

[0152] S23, perspective transformation;

[0153] The perspective transformation is applied to restore the shape of the light tunnel 10 in the orthographic view. The complete perspective matrix is obtained by the following formula, and the perspective transformation matrix is rewritten as an equation group:

[0154]

[0155] In the formula, x is the coordinate of the point in the original image, and y is the coordinate of the point in the target image.

[0156] There are eight unknown variables in the equation (in which the numerical value is ), the coordinates of each vertex in the original image and the target image are substituted, and the statically indeterminate equation group is solved by the least square method to obtain the perspective transformation matrix Mperspective. The coordinate of the image after transformation is calculated by applying the coordinate transformation formula:

[0157]

[0158] The equation represents the physical coordinates of the target image after perspective transformation .

[0159] S3, S-type path scanning to obtain a unit image of the light tunnel 10;

[0160] ​Using the results in S2, the global stitching image of the light pass sheet placement table 3 is obtained by using image stitching technology, the pose of the light pass sheet 10 is obtained by using the minimum circumscribed tilted rectangle algorithm, and the light pass sheet 10 is scanned again after the pose is corrected, and the light pass sheet 10 stitching image is obtained;

[0161] In S3, as shown in Figure 15 the pose of the light pass sheet 10 is corrected using the results of S2, and the light pass sheet 10 stitching image is obtained, including the following steps:

[0162] S31, the global stitching image of the light pass sheet placement table 3 is obtained.

[0163] The moving distance and moving times of the light pass sheet 10 moving mechanism are known, the system draws a "candidate overlap area" on the edge of the image, and calculates the overlap rate. In the overlapping area, the template matching algorithm is used to find the real overlapping part of the two images, and the mean fusion is used in the overlapping area, and the non-overlapping area is directly spliced on both sides. Continue to repeat the fusion and splicing to obtain the global stitching image of the light pass sheet placement table 3 (including the light pass sheet 10 and the light pass sheet placement table 3).

[0164] S32, the pose of the light pass sheet 10 is corrected.

[0165] The stitching original image is copied as a gray image, the contour can be regarded as a pixel boundary with a gray level, the edge area in the image is highlighted by measuring the spatial gradient of the image brightness, and the Sobel operator (a discrete differential operator for edge detection) in image processing is used to extract edge features. The stitching original image is converted into a gray image and subjected to Gaussian blur processing, and then the Sobel operator in the OpenCV library is used to weight and fuse the x-direction gradient image and the y-direction gradient image of the gray image after Gaussian blur to generate a total gradient image. The total gradient image can be divided into foreground and background, highlighting the edge region features of the gray image after Gaussian blur, to obtain a Sobel image; then the adaptive threshold method is used to binarize the Sobel image, the Sobel image is divided into edge region and non-edge region, and then an edge binarization image is obtained.

[0166] Next, contour detection obtains the edge contour map, accurately acquiring the point set P={P0,P1,…Pn}, where P0=Pn. The point set P of the optical patch contour is approximated as a polygon vertex set Q, where Q={Q0,Q1,…,Qm}, and Q0=Qm=P0. A distance threshold ε>0 is set. Polygon approximation starts from the starting point P0 and ending point Pn of the contour, finding the point Pi with the farthest perpendicular distance to the line (Q0,Qm). If the farthest distance dmax>ε, it is added as a new vertex Qi to the point set Q. This method is recursively applied within the intervals {P0,…,Pi-1} and {Pi+1,…,Pn} until the farthest distance dmax<ε within the interval. The point set retained after polygon contour detection is the vertex set Q of the approximate polygon. The optical patch rectangle has 4 vertices. Vertex filtering is performed by removing the circumscribed polygon vertex sets of other non-4-vertex polygons, which are the circumscribed polygon vertices of the optical patch contour. The tilt angle theta is calculated based on the vertex coordinates of the circumscribed polygon of the optical pass 10. The following formula is used to calculate the contour tilt angle:

[0167] ;

[0168] In the formula, , All coordinates are the vertex coordinates of the contour. The position of the optical transmission plate placement stage 3 is determined, and the pose of the optical transmission plate 10 relative to the optical transmission plate placement stage 3 is known. The pose of the optical transmission plate 10 is corrected by manipulating the translation and rotation of the optical transmission plate placement stage 3 through affine transformation. This is achieved through a transformation matrix. Implementation, where tx represents Displacement in the axial direction, ty represents Displacement in the axial direction, It indicates the angle of rotation around the origin (counterclockwise is positive, clockwise is negative).

[0169] The optical filter placement stage 3 uses air pressure difference to firmly attach the optical filter 10 to the stage 3. The optical filter 10 is fixed to the optical filter placement stage 3 and moves up and down along the longitudinal moving mechanism 5; the longitudinal moving mechanism 5 is fixed to the transverse moving mechanism 2 and moves to the right along the transverse moving mechanism 2. The translation and rotation angle theta of the optical filter 10 are controlled according to the rigid body rotation transformation formula to align the optical filter 10.

[0170] S33. Obtain the stitched image of optical transceiver 10.

[0171] like Figure 15 As shown, an S-shaped path scan is performed again on the optical filter 10 to acquire only images containing units of the optical filter 10. Image stitching is then repeated to obtain a stitched image of the optical filter 10, and the coordinates (Xoffset, Yoffset) of the vertices of each optical filter 10 unit image in the stitched image are calculated:

[0172] ;

[0173] In the formula, Ncols represents the total number of rows scanned, and Nrows represents the total width of the scan. , indicating the distance moved laterally Indicates the distance moved vertically. This indicates the overlap rate between images. The current coordinate values ​​are compared with the data calculated using the coordinate transformation formula, accurate to two decimal places, to ensure coordinate accuracy.

[0174] S4. Integrate defect coordinate information to complete defect classification;

[0175] The image obtained by S3 is used to generate a mask edge map. The connected component algorithm is used to perform defect detection on the mask edge map to obtain defect information and fit the label symbol ellipse.

[0176] In S4, the stitched image of the optical fiber 10 obtained in S3 is used for preliminary image processing and integration of defect information. The specific steps are as follows:

[0177] S41. After obtaining multiple 10-unit images of the optical path, each 10-unit image of the optical path needs to be processed individually. For example... Figure 14 As shown: The integrated binarization of the magnified 10-unit image of a single optical pass is performed to obtain the mask integral binary map. The Sobel operator is used to calculate the total gradient and the mask integral binary map is binarized by large law thresholding to obtain the mask edge map.

[0178] S42. Obtain information such as the size and area of ​​the connected regions inside the mask edge map, the number of connected regions, and the width and height of the connected regions. Calculate the allowable range of each defect based on the set values ​​and determine whether there are defects on the surface of the light transmission sheet 10.

[0179] S43. Traverse all mask edge images, requiring the search for the coordinates of five points: the contour vertices and the center point, to be used for fitting the ellipse. For example... Figure 16 As shown, two point sets are defined for the contour points: respectively The set of points with y-coordinates greater than the center point and the set of points with y-coordinates less than the center point are considered. For the set of points with y-coordinates greater than the center point: if there are points with equal x-coordinates, retain the point with the largest y-coordinate. For the set of points with y-coordinates less than the center point: if there are points with equal x-coordinates, retain the point with the smallest x-coordinate. Next, for the set of points with y-coordinates greater than the center point: first sort by ascending x-coordinates, then if there are points with equal x-coordinates, sort by... Coordinate descending order arrangement; the point set with y coordinate less than the center point: first, arrange according to the x coordinate ascending order, if the x coordinate of the point is equal, arrange according to the y coordinate ascending order, ensure that the point set is gathered into a closed figure; then, in order to avoid too dense points to produce fitting error, remove even index points and keep odd index points; finally, combine the two parts of the point set, draw different major and minor axes in the center of the light sheet according to different light sheet types and calculate the eccentricity of the ellipse (one significant digit is retained).

[0180] In order to reduce the influence of noise (such as tiny dust, background texture) on defect detection: set A area inside the ellipse and B area outside the ellipse. A area is sensitive to pitting and point damage; B area detects edge collapse and corner collapse, and has high tolerance to tiny noise.

[0181] With 0.6 as the limit of eccentricity, the light sheet is divided into two categories: the light sheet with large eccentricity is more likely to produce edge collapse, corner collapse and crack defects, and needs to set RIO in B area for key detection; the light sheet with small eccentricity is detected in the order of A area and then B area.

[0182] Among them, the qualified light sheet 10 is marked with green OK; the unqualified light sheet 10 is marked with red NG.

[0183] S5, the marking mechanism 7 completes the defect marking;

[0184] As shown in Figures 15-17 , the defect information obtained by S4 is integrated, and the marking mechanism 7 based on elastic buffer compensates for movement error with the up-down moving mechanism 6 to complete marking on the light sheet 10.

[0185] In S5, integrating defect information further includes the following steps:

[0186] S51, point damage and pitting detection;

[0187] If the diameter of the point damage is less than the first set value and the number of point damages is not more than 5, the light sheet 10 is considered qualified and marked with green OK; if there is one point damage with a diameter greater than the first set value, the light sheet 10 is considered to have point damage defect and marked with red NG. Preferably, the first set value is 0.02 mm. As shown in Figure 17 , the left side of the figure shows Figure 17 (a) that pitting is detected, the diameter of the pitting is less than the first set value, but the number of pitting is 13, and it is judged that the light sheet 10 has pitting defect. Figure 17 (b) that point damage is detected, the left light sheet 10 has one point damage with a diameter of 0.035 mm and one point damage with a diameter of 0.02 mm, which exceeds the threshold value of the first set value, and it is judged that there is point damage defect; Figure 17 (c) that the right light sheet 10 is qualified, the diameter of the two point damages is less than the first set value and there are only two point damages, and it is judged to be qualified.

[0188] S52, edge and corner chipping detection;

[0189] like Figure 17 As shown, Figure 17 (d) indicates the existence of edge collapse. Figure 17 (e) indicates the presence of chipped corners; Representing the length of the target optical filter element 10, a measurement rectangle is drawn on each opposite side of each optical filter element 10. Use the length of the rectangle as the reference length. Create a measurement handle for each measurement rectangle, ensuring... It can stably locate the edge within a rectangle in a direction perpendicular to the edge and accumulate the length. Calculate the unit length. Total length of the white area in the long-distance direction between the detection edge and the detection edge The difference The calculation formula is as follows:

[0190] .

[0191] like Greater than the third set value If any defects are found in the 10-unit optical filter, such as chipped edges or corners, it is considered to have an "NG" (Not Good) defect and is marked in red; otherwise, it is marked in green and is considered "OK". Preferably, the third set value... This represents the minimum length dimension within the tolerance range, with a value of 0.2 mm. For example... Figure 17 As shown in (d): The value is 0.27mm, which is greater than This indicates the presence of edge chipping defects. Similarly, corner chipping defects are detected.

[0192] S53, Detection of slender defects;

[0193] like Figure 17 As shown, Figure 17 (f) indicates the presence of scratches. Figure 17 (g) indicates the presence of fractures. Figure 17 (h) is a standard optical filter. If the diameter of the pits is smaller than the first set value and the number of pits is between 5 and 10, the optical filter 10 is considered qualified and marked with green "OK". If the number of pits is greater than the second set value, the optical filter 10 is considered to have pit defects and is marked with red "NG". Preferably, the second set value is 10.

[0194] Slender defects include chipping and scratches. When detecting slender scratches, the bounding box width W and height H of each connected component are calculated to obtain the aspect ratio. If the aspect ratio R is greater than the fourth set value If so, then the connected component is a candidate for a slender connected component. Preferably, the fourth set value... The value can be adjusted according to the actual situation, and is generally 0.065mm-0.085mm. Then, the larger side of the connected domain width W and height H is selected: If is greater than the fifth set value , it is finally judged as an elongated defect, and a red ellipse with an eccentricity of 0.6 is used for marking; otherwise, it is considered as a small flaw, and a green ellipse with an eccentricity of 0.6 is used for marking. Preferably, the fifth set value represents the maximum side threshold, and is generally 0.26mm-0.34mm. As shown in Figure 17 (g) and Figure 17 (f), there are defects of cracking, scratching, etc.

[0195] After the mask edge image belonging to the defects (point damage, pitting, elongated defect, edge collapse and corner collapse) is counted, the center coordinates of the current mask edge image are recorded, and the defect recognition of the light transmitting sheet 10 is completed.

[0196] Preferably, the light transmitting sheet 10 is a standard light transmitting sheet as shown in Figure 17 Figure 17 (h).

[0197] S6, the marking mechanism 7 based on elastic buffering compensates for the movement error of the up-down moving mechanism 6 to complete marking on the light transmitting sheet 10.

[0198] S61, the marking mechanism 7 controls the stylus 706 to complete defect marking on the light transmitting sheet 10, and the mask edge image coordinates obtained in S4 are substituted into the pixel coordinate system to world coordinate system transformation formula to calculate the world coordinates thereof:

[0199] ;

[0200] The left end of the equation represents the pixel coordinates of the mask edge image, and the right end represents the world coordinates of the mask edge image. According to the coordinates of each vertex in the splicing image of the light transmitting sheet 10, all the world coordinates of the mask edge image containing defects are repeatedly calculated. The light transmitting sheet 10 moving mechanism is S-shaped, and the light transmitting sheet 10 unit containing defects is controlled to move to the center point position of the stylus 706 in turn.

[0201] S62, the marking mechanism 7 based on elastic buffering compensation is used to compensate for the movement error of the light transmitting sheet placing table 3 due to the distance error between the current position and the target position, the screw transmission error (including the pitch error during the manufacture of the screw and the gear wear), and the interference of the noise environment. The positioning accuracy of the stylus 706 is ensured to be ±0.02mm.

[0202] The distance from the initial height of the stylus 706 to the light transmitting sheet 10 is 30mm. After receiving the world coordinates from the defect points, the marking mechanism 7 starts to press down quickly along the up-down moving mechanism 6, and stops after contacting the defects for 50ms. Then, it is lifted to the initial position to complete one marking.

[0203] S63, repeating the marking until all detected defects on the light sheet 10 are marked.

Claims

1. A method for detecting defects in a light tunnel sheet based on coordinate transformation, characterized by, The method comprises the following steps: S1, the camera intrinsic parameters are solved by adopting Zhang Zhengyou calibration method, the camera extrinsic parameters are solved by means of the camera intrinsic parameters, and a coordinate transformation formula from a pixel coordinate system of a light sheet (10) image to a world coordinate system of a light sheet (10) defect detection system is further obtained; S2, a plurality of light sheet placement tables (3) containing light sheet (10) units are obtained by means of an image information acquisition mechanism (4) and a light sheet (10) moving mechanism, and image preliminary processing is simultaneously performed; S3, a global splicing image of the light sheet placement table (3) image is obtained by fusing the preliminary processing result by means of an image splicing technology, the light sheet (10) pose is obtained by polygon approximation and contour screening, and the light sheet (10) is scanned again after the pose is corrected, and a light sheet (10) splicing image is obtained; In S3, the preliminary processing result is used to correct the light sheet (10) pose and further obtain the light sheet (10) splicing image, comprising the following steps: S31, a global splicing image of the light sheet placement table (3) is obtained; The preliminary processing result is used to determine the "candidate overlapping area" according to the moving distance and times of the light sheet (10) moving mechanism, and the overlapping rate is calculated, the mean fusion is adopted in the overlapping area, the non-overlapping area is directly spliced on both sides, and the global splicing image of the light sheet placement table (3) is obtained by continuously repeating the fusion and splicing; S32, the light sheet (10) pose is corrected; The splicing original image is copied as a gray image, the edge features are extracted by using a Sobel operator, the contour detection and polygon approximation algorithm are used to screen the rectangular contour conforming to the appearance size of the light sheet (10), and finally, the minimum circumscribed inclined rectangle algorithm is used to calculate the inclined angle theta of the light sheet (10): ; In the formula, is the first point coordinate, is the second point coordinate; the pose of the light sheet (10) relative to the light sheet placement table (3) is known, and the light sheet (10) is adjusted by an affine transformation control of the light sheet (10) moving mechanism. S33, a light sheet (10) splicing image is obtained; Again, the light pass sheet (10) is subjected to S-shaped path scanning, only the image containing the light pass sheet (10) unit is obtained; the image splicing is repeatedly applied to obtain the spliced image of the light pass sheet (10), and the coordinates of the vertex of each light pass sheet (10) unit image in the spliced image are calculated and the current coordinate value is compared with the data calculated by the coordinate formula: ; wherein represents the total number of rows of scanning, represents the total number of columns of scanning, represents the distance of lateral movement, represents the distance of longitudinal movement, represents the overlap rate between images, w is the width of the light pass, and h is the height of the light pass. S4, a mask edge image is generated by using the splicing image, and defect information is obtained by performing defect detection on the mask edge image by using a connected domain algorithm; S5, the defect information is used to integrate the defects by using a marking mechanism (7), and defect recognition is completed; S6, the marking mechanism (7) based on elastic buffering compensates for the movement error to complete defect marking on the light sheet (10).

2. The method according to claim 1, wherein, In S1, the conversion between the camera coordinate system and the world coordinate system and the conversion between the pixel coordinate system and the camera coordinate system are respectively completed, comprising the following steps: S11, conversion from the camera coordinate system to the world coordinate system; In the world coordinate system, the camera (403) takes a picture to obtain camera calibration board image information, and solves the camera intrinsic parameters; combined with the camera intrinsic parameter matrix , according to singular value decomposition and absolute orientation, a linear equation set is solved, and the camera rotation matrix R and the translation vector M are calculated; the coordinates in the camera coordinate system are defined , the coordinates in the world coordinate system are defined , and the coordinates of the target point in the world coordinate system are calculated according to the camera extrinsic parameters R and the translation vector M. ; wherein is the coordinate of the target point in the world coordinate system, R is the camera rotation matrix, and M is the translation vector, is the transpose of the camera rotation matrix; is the coordinate of the target point in the camera coordinate system; S12, conversion between the camera coordinate system and the image coordinate system; Using the perspective projection relationship, the projection P(x, y) of Pc(Xc, Yc, Zc) in the imaging plane xy in the camera coordinate system satisfies the triangular similarity relationship: , where f is the camera focal length. S13, conversion between the pixel coordinate system and the image coordinate system; Defining dx as the distance of a unit pixel in the x-axis direction and dy as the distance of a unit pixel in the y-axis direction, the following relationship is obtained: ; wherein is the pixel coordinate system origin; P(u,v) is the pixel coordinate of P; S14, conversion between the pixel coordinate system and the world coordinate system; Will , Substitute the values ​​into the pixel coordinate system and image coordinate system transformation formula, and rearrange them into matrix form: ; In the formula, fx=f / dx, fy=f / dy, and Zc=f; the conversion relationship from the pixel coordinate system to the world coordinate system is obtained.

3. The method according to claim 1, wherein, In S2, the plurality of light sheet placement tables (3) containing light sheet (10) units are obtained, and image preliminary processing is simultaneously performed, which specifically comprises the following steps: S21, a light sheet placement table (3) image is obtained; The light passing sheet (10) moving mechanism continuously moves, and the image information collecting mechanism (4) stops according to the error and judges that the light passing sheet (10) moving mechanism reaches a position, then the light passing sheet (10) moving mechanism cooperates with the camera (403) to obtain a plurality of global images of the light passing sheet placement table (3) containing the light passing sheet (10) unit under the light source of the light supplement lamp, and each image is named according to the scanning sequence in view of the particularity of the S-shaped route and sequentially arranged; S22, distortion removal processing is performed; With the above camera intrinsic parameters , radial distortion coefficient and tangential distortion coefficient , the improved Zhang Zhengyou calibration model is established to process image de-distortion. S23, perspective transformation is performed; The perspective transformation is applied to restore the shape of the light tunnel (10) image in the orthographic view through the perspective transformation matrix Implementation: ; Equation represents the target image physical coordinates Coordinates obtained after perspective transformation .

4. The method according to claim 1, wherein, In S4, the mask edge image is generated by using the spliced image, and the specific steps of defect detection on the mask edge image by using a connected domain algorithm to obtain defect information are as follows: S41, the image information acquisition mechanism enlarges the image of the light transmission sheet (10), and processes the mask edge image obtained after the enlargement of the image; S42, the connected domain algorithm is used to obtain the internal information of the mask edge image, and whether the surface of the light transmission sheet (10) has defects is judged according to the set standard; S43, all mask edge images are traversed to find contour points and center points, and ellipses with different eccentricities are drawn in the image as marker symbols.

5. The method according to claim 4, wherein, In S5, the integration of the defects includes the following steps: S51, point damage and pimple detection; If the diameter of the point damage is greater than a first set value, it is considered that the current mask edge image has point damage defects; if the diameter of the point damage is less than the first set value but the number of the point damage is greater than a second set value, it is considered that the current mask edge image has pimple defects; S52, edge collapse and corner collapse detection; A measurement rectangle is drawn on each of the opposite sides of the light sheet (10), and a measurement handle is created for each measurement rectangle, and the accumulated length of the white area in the direction perpendicular to the long direction of the detection edge is calculated , the length of the target light sheet (10) unit is recorded as , and the difference between the two is calculated : ; If greater than a third set value then it is considered that the current mask edge map has a collapse or corner defect; S53, elongated defect detection; The width W and the height H of the elongated defect connected block are extracted by a connected domain algorithm to obtain an aspect ratio ; ; if R is greater than a fourth set value , the current connected domain is an elongated connected domain candidate; a larger edge of the connected domain is selected: , if , is a fifth set value, it is considered that the current mask edge image has an elongated defect.

6. The method according to claim 5, wherein, In S6, the specific steps of the marker mechanism (7) based on elastic buffering to compensate for movement errors to complete defect marking on the light transmission sheet (10) are as follows: S61, the marker mechanism (7) controls the stylus (706) to complete defect marking on the light transmission sheet (10), and the coordinates of the mask edge image obtained in S5 are substituted into the pixel coordinate system to world coordinate system transformation formula to calculate the world coordinates; S62, the marker mechanism (7) compensates for movement errors through elastic buffering and the up-down moving mechanism (6), and then the stylus (706) is pressed on the light transmission sheet (10) unit containing defects to draw ellipses with different eccentricities, so as to mark all detected defects on the light transmission sheet (10); S63, the marking is repeated until all detected defects on the light transmission sheet (10) are marked.

7. A light sheet defect detection system for implementing a light sheet defect detection method based on coordinate transformation according to any one of claims 1-6, characterized in that, The light transmission sheet defect detection mechanism, the coordinate transformation module, the image splicing module, the pose rectification module, the defect integration module and the defect marking module are included. The light transmission sheet defect detection mechanism is used to obtain the image of the light transmission sheet (10) on the light transmission sheet placing table (3); The coordinate transformation module is used to perform coordinate transformation of the light transmission sheet (10) from the pixel coordinate system to the world coordinate system; The image splicing module is used to globally splice the image of the light transmission sheet placing table (3) according to the world coordinates; The pose rectification module is used to rectify the pose of the spliced image; The defect integration module is used to obtain defect information and integrate defects to complete defect recognition; The defect marking module is used to complete defect marking on the light transmission sheet (10).

Citation Information

Patent Citations

  • Image splicing method for large-diameter optical crystal surface micro-defect detection

    CN108760766A

  • Optical flux sheet defect detection method

    CN118570213A