Method and device for detecting internal cracks of optical thin film
By combining five sinusoidal fringe structured light images with differential and summation processing and polar coordinate transformation, along with a pre-trained model, the problem of automating the detection of internal cracks in optical thin films was solved, achieving efficient and accurate crack detection.
Patent Information
- Application Number
- CN202511930133.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the detection of internal cracks and defects in optical thin films relies on manual inspection, which consumes a lot of manpower and has limited accuracy, making it difficult to achieve efficient automated detection.
A method combining five sinusoidal fringe structured light images with differential and summation processing and polar coordinate transformation is used to detect internal cracks in optical thin films. The method utilizes the diffuse scattering characteristics of light at the cracks to improve detection accuracy and efficiency.
It achieves high-contrast, high-sensitivity, and high-efficiency detection of internal cracks in optical thin films, reducing reliance on manual inspection and improving the accuracy and efficiency of detection.
Smart Images

Figure CN121656285A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of detection technology, specifically, it relates to a method and apparatus for detecting internal cracks in optical thin films. Background Technology
[0002] Optical thin films consist of a multilayer structure, including two layers with orthogonal polarization directions, which can control the polarization direction of a specific light beam. When natural light passes through an optical thin film, light whose vibration direction is perpendicular to the transmission axis of the optical thin film will be absorbed, and only polarized light whose vibration direction is parallel to the transmission axis of the optical thin film will be transmitted.
[0003] The manufacturing process of optical thin films involves steps such as cutting, rolling, cleaning, coding, and polishing. These steps can leave defects such as scratches, creases, inclusions, whitening, and cracks on the surface of the optical thin film; in particular, cracks can occur when the film touches the edge of mechanical equipment.
[0004] Currently, the main methods for detecting defects in optical thin films are manual inspection and automated machine inspection. Detecting obvious defects such as scratches, creases, and inclusions is relatively simple and can be performed by both machines and humans. However, due to the polarization directions of different layers within the optical thin film, cracks can appear in any layer. Therefore, internal cracks in optical thin films are directional, and currently, manual inspection is still the primary method, consuming significant human resources. Furthermore, the accuracy of inspection is limited by the energy and ability of the inspectors. Summary of the Invention
[0005] The present invention aims to provide a method and apparatus for detecting internal cracks in optical thin films, thereby enabling optical detection and defect localization of internal cracks in optical thin films and improving the accuracy and efficiency of crack defect detection.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A method for detecting internal cracks in optical thin films is proposed, comprising: S1: Generate five sinusoidal fringe structured light images, with a phase difference of 2π / 5 for each image; S2: Control the light source to sequentially project five sinusoidal fringe structured light images and trigger the camera to capture images, thus obtaining five original images; wherein, the light source is placed on the side of the upper part of the optical film under test; the camera is placed on the lower part of the optical film under test to capture images of the optical film under test. S3: Difference between the second and fifth original images, difference between the third and fourth original images, and weight the difference results using the first set weight factor; S4: Find the second and fifth original images, sum the third and fourth original images, use the second set weighting factor to weight the summation result, and sum the summation result with the first original image; S5: Convert the results of S3 and S4 into magnitude expressions in polar coordinates; S6: Process the crack image sample set according to steps S1 to S5, annotate the cracks, and then train the model. S7: Use a pre-trained model to detect internal cracks in optical thin films.
[0007] In some embodiments of the present invention, step S3 specifically includes: Subtract the second original image image[1] from the fifth original image image[4]: ; Subtract the third original image image[2] from the fourth original image image[3]: ; Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : .
[0008] In some embodiments of the present invention, step S4 specifically includes: Summing the second original image image[1] and the fifth original image image[4]: ; Summing the third original image image[2] and the fourth original image image[3]: ; Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : ; Will Summing the result with the first original image image[0], and storing the result in... : .
[0009] An optical thin film internal crack detection device is proposed, configured with an optical thin film internal crack detection process, the optical thin film internal crack detection process being used to perform the optical thin film internal crack detection method as described above, including: The strip is used to carry the optical thin film to be tested. A light source, positioned above the strip and on the side of the optical film, is used to project sinusoidal fringe structured light onto the optical film under test. A camera, positioned below the conveyor belt, is used to acquire images of the optical thin film under test; The processing unit is used to invoke the internal crack detection process of the optical thin film to perform internal crack detection on the optical thin film under test.
[0010] In some embodiments of the present invention, the camera is configured to adjust the pitch angle of the camera lens so that the optical film to be tested is fully presented in the camera's field of view.
[0011] In some embodiments of the present invention, the camera comprises two parts, with the included angle being 90 degrees.
[0012] Compared with existing technologies, the advantages and positive effects of this invention are as follows: In the optical thin film internal crack detection method and apparatus proposed in this invention, the light source is configured on the side of the upper part of the optical thin film, and five sinusoidal fringe structured lights with a phase difference of 2π / 5 are sequentially projected onto the optical thin film from the side. The camera is configured on the lower side of the optical thin film to capture images of the optical thin film under the projection of the five structured lights. In areas where the optical thin film does not have internal cracks, the projected structured light undergoes specular reflection, and the image captured by the camera is dark; in areas where internal cracks exist, the projected structured light undergoes diffuse scattering at the crack, thus reflecting from the crack to the lower side of the optical thin film, and the area in the image captured by the camera appears bright. Based on this, this invention eliminates background light intensity and surface dust and other impurities by performing difference and summation on the original image, retains and enhances the amplitude at the crack, and constructs the y-coordinate matrix in the Cartesian coordinate system by difference and the x-coordinate matrix in the Cartesian coordinate system by summation. Then, polar coordinate transformation is performed to convert the horizontal and vertical components in the Cartesian coordinate system into amplitude and phase forms in the polar coordinate system, making the cracks and defects in the processed image stand out, which is beneficial for subsequent model detection. Based on the detection device and detection method of the present invention, no manual labor is required, and high contrast, high sensitivity and high efficiency detection of internal cracks in optical thin films are achieved. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of the optical thin film internal crack detection device proposed in this invention; Figure 2 This is a schematic diagram of the execution steps of the optical thin film internal crack detection method proposed in this invention; Figure 3 To directly capture images of the optical thin film surface without using structured light; Figure 4 These are five original images captured using the method of this invention; Figure 5 This is a schematic diagram of the Nonimator image obtained after the differential processing in step S3 of the present invention. Figure 6 This is a schematic diagram of the Denominator image obtained after the summation process in step S4 of the present invention. Figure 7 The image is a DIST image obtained by the method of this invention (the red box indicates the internal crack area). Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] In the description of this invention, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0016] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0017] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0018] The optical thin film internal crack detection method proposed in this invention is configured in a detection device, such as... Figure 1The system includes: a material strip line 1, a light source 2, and an industrial camera 3; the material strip line 1 is integrated into the production line, and the optical film to be tested 4 is placed on the material strip line 1. The light source 2 is arranged at the upper part of the material strip line 1 to project sinusoidal fringe structured light onto the optical film to be tested; two industrial cameras are arranged at the lower part of the material strip line 1 to acquire images of the optical film to be tested and transmit the images to the processing unit for crack detection.
[0019] The light source 2 is placed three-dimensionally on the upper side of the optical thin film 4 to be tested, for the following reasons:
[0020] (1) When the lateral sinusoidal stripe structured light is projected onto the surface of the optical film, the light will be reflected at the same angle as the projection for the defect-free part. Since the camera is located below the optical film and is not on the path of the mirror reflection light, it cannot receive these reflected lights and the captured image area is dark. However, for the part with internal crack defects, the light is deflected at the crack and the deflected light is partially reflected to the lower side of the optical film. Therefore, the camera can receive this part of the light at the lower part of the optical film and the captured image area is bright, forming a clear contrast with the dark background of the defect-free area. Therefore, it can improve the contrast between the defect and the background, which is beneficial for subsequent processing to identify the crack area.
[0021] (2) Sinusoidal fringe structured light provides structured, periodically changing illumination. Under side-tilted illumination, if there are internal cracks in the optical film, not only will the cracked part become brighter due to light scattering, but the projected fringe pattern will also be distorted, resulting in a phase anomaly. In subsequent processing, the cracked area can be identified by extracting this part of the phase.
[0022] (3) Avoid having light sources in the camera's field of view to avoid overexposure of the image.
[0023] Based on this detection structure, the optical thin film internal crack detection method proposed in this invention is as follows: Figure 2 As shown, it includes:
[0024] S1: Generate five sinusoidal fringe structured light images, each with a phase difference of 2π / 5.
[0025] The optical film to be tested is placed on the strip. Two Basler 6500W pixel industrial monochrome cameras with tilt-shift lenses are used below the strip. The positions of the two cameras are adjusted, and they are slowly adjusted within their respective working distances until the angle between the two cameras is close to 90°. The camera angles and lenses are adjusted so that the optical film to be tested is within their respective fields of view.
[0026] Turn on the light source and adjust the physical positions of the light source, camera, and the optical film under test to avoid the light source appearing in the field of view of both cameras, thus preventing image overexposure. Gradually adjust the camera lens tilt angle to ensure the optical film under test is fully displayed in the camera's field of view. Simultaneously adjust parameters such as aperture and focal length to achieve consistent sharpness of the foreground and background of the scenic area within the field of view when shooting at an angle.
[0027] Five sinusoidal fringe structured light images (image[0], image[1], image[2], image[3], and image[4]) were generated using software. The phase difference between each image is 2π / 5, and the light intensity is expressed by the following formula: Image[0]: ; Image[1]: ; Image[2]: ; Image[3]: ; Image[4]: ; in, Background light intensity; Modulation amplitude; The target phase contains crack information.
[0028] S2: Control the light source to sequentially project five sinusoidal fringe structured light images and trigger the camera to capture images, thus obtaining five original images.
[0029] Keeping the optical film under test relatively stationary with respect to the camera, the light source sequentially projects five original images with a phase difference of 2π / 5. Each time a frame is projected, the camera is triggered to acquire an image. The acquired images are as follows: Figure 4 As shown.
[0030] If defects exist on the surface or inside the optical thin film, they will appear as bright dots or lines in the five original images, in addition to the dark background. These defects include, but are not limited to, surface dust, dents, scratches, and cracks.
[0031] In order to enhance and highlight the internal cracks of the optical thin film while suppressing the interference of defects such as dust and scratches on the surface of the optical thin film, the present invention performs differential summation processing on the original image of the Five Blessings based on a set weight factor, and magnifies and highlights the cracks and defects through polar coordinate transformation. Specifically, it includes the following steps.
[0032] S3: Differentiate the second and fifth original images, and the third and fourth original images, using the first set weighting factor to weight the difference results.
[0033] Subtract image[1] from image[4]: .
[0034] Subtract image[2] from image[3]: .
[0035] and By removing the background light intensity and retaining the difference signal caused by the stripe deformation due to the defect, the cracked area can exhibit values significantly different from its surroundings in the differential image. This significant change is due to the modulation amplitude B and phase. Caused by. Choice and It is because: and It's about phase. Symmetrical and Also about phase Symmetrical.
[0036] Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : .
[0037] This represents the y-coordinate matrix (vertical component) in the Cartesian coordinate system. This weighted summation operation maximizes the representation of the crack region in the difference image, and the weighted average of the two difference images reduces the influence of random noise. Figure 5 As shown.
[0038] Using weights and weight Trigonometric identities can be used This simplifies the weighted results.
[0039] S4: Calculate the sum of the second and fifth original images, sum the sum of the third and fourth original images, use the second set weighting factor to weight the summation result, and sum the summation result with the first original image.
[0040] Summing image[1] and image[4]: .
[0041] Summing image[2] and image[3]: .
[0042] and The sum of two cosine terms is transformed into a single cosine term through symmetric summation, and the phase of the term contains implicit crack information. It was separated.
[0043] Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : .
[0044] By using weighted summation, the influence of background light intensity is reduced, and the process is simplified. The coefficient of the term.
[0045] Will Summing with image[0], the result is stored in : .
[0046] This represents the x-coordinate matrix (horizontal component) in the Cartesian coordinate system. The effect of background light intensity is completely eliminated by summing with image[0], and the crack region is maximized in the difference image, as shown below. Figure 6 As shown.
[0047] S5: Convert the calculation results of S3 and S4 into amplitude expressions in polar coordinates.
[0048] The crack defect mainly affects the modulation amplitude B. In this invention, the amplitude of the crack defect needs to be detected. The real and imaginary parts of the complex signal are constructed through S3 and S4 above, and the amplitude is calculated as follows: = .
[0049] After the above steps, the five original images captured under sinusoidal fringe structured light projection are fused and processed to obtain... Image as Figure 7 As shown, compared to Figure 3 The image shown is of the optical thin film surface without structured light (the cracks and defects are not obvious, and there are many dust and impurities on the optical thin film surface. The imaging intensity is consistent with the cracks, making it difficult to distinguish the cracks from other impurities). The cracks are very prominent in the image, filtering out background impurities, thus providing better conditions for subsequent crack detection.
[0050] S6: Process the crack image sample set according to steps S1 to S5, annotate the cracks, and then train the model.
[0051] The DIST images obtained after step S5 are preprocessed, such as normalized. Cracks are labeled and named using rectangular boxes using annotation software. The dataset is divided into training set, validation set and test set according to the proportion.
[0052] Taking the U-Net network as an example, after the annotation is completed, the model is trained according to the image parameters and target effect. The loss function is selected as binary cross-entropy, and the optimizer Adam is set with a learning rate of 0.001, a sub-segment number of 2, a batch size of 8, an iteration count of 8000, a validation set ratio of 0.2, and a model storage period of 1000.
[0053] The optimal model after training is exported for use by optical thin film crack and defect detection software.
[0054] S7: Use a pre-trained model to detect internal cracks in optical thin films.
[0055] It should be noted that the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A method for detecting internal cracks in optical thin films, characterized in that, include: S1: Generate five sinusoidal fringe structured light images, with a phase difference of 2π / 5 for each image; S2: Control the light source to sequentially project five sinusoidal fringe structured light images and trigger the camera to capture images, thus obtaining five original images; wherein, the light source is placed on the side of the upper part of the optical film under test; the camera is placed on the lower part of the optical film under test to capture images of the optical film under test. S3: Difference between the second and fifth original images, difference between the third and fourth original images, and weight the difference results using the first set weight factor; S4: Find the second and fifth original images, sum the third and fourth original images, use the second set weighting factor to weight the summation result, and sum the summation result with the first original image; S5: Convert the results of S3 and S4 into magnitude expressions in polar coordinates; S6: Process the crack image sample set according to steps S1 to S5, annotate the cracks, and then train the model. S7: Use a pre-trained model to detect internal cracks in optical thin films.
2. The method for detecting internal cracks in optical thin films according to claim 1, characterized in that, Step S3 specifically includes: Subtract the second original image image[1] from the fifth original image image[4]: ; Subtract the third original image image[2] from the fourth original image image[3]: ; Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : 。 3. The method for detecting internal cracks in optical thin films according to claim 1, characterized in that, Step S4 specifically includes: Summing the second original image image[1] and the fifth original image image[4]: ; Summing the third original image image[2] and the fourth original image image[3]: ; Will and Perform a weighted summation, with the weighting factors being respectively , The result is stored in : ; Will Summing the result with the first original image image[0], and storing the result in... : 。 4. An optical thin film internal crack detection device, configured to perform the optical thin film internal crack detection method as described in any one of claims 1-3, characterized in that, include: The strip is used to carry the optical thin film to be tested. A light source, positioned above the strip and on the side of the optical film, is used to project sinusoidal fringe structured light onto the optical film under test. A camera, positioned below the conveyor belt, is used to acquire images of the optical thin film under test; The processing unit is used to invoke the internal crack detection process of the optical thin film to perform internal crack detection on the optical thin film under test.
5. The optical thin film internal crack detection device according to claim 4, characterized in that, The camera is configured to adjust the tilt angle of the camera lens so that the optical film under test is fully visible in the camera's field of view.
6. The optical thin film internal crack detection device according to claim 5, characterized in that, The camera consists of two units, which are at a 90-degree angle to each other.