Optical glass non-contact dimensional measurement system based on machine vision

By using a combination of a transparent, sealed liquid injection tank and a multi-polarization light source in optical glass inspection, along with multi-view image acquisition and adaptive adjustment technology, the problem of real edge recognition in the inspection of thick optical glass was solved, and high-precision non-contact dimensional measurement was achieved.

CN120846220BActive Publication Date: 2026-02-10ZHONGSHAN GUANGDA OPTICAL INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511260548.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2026-02-10
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify true contour edges and reflection artifacts in the inspection of thick optical glass, resulting in large measurement errors. Furthermore, single-view image acquisition has blind spots, failing to meet the requirements for high-precision inspection.

Method used

The optical glass is immersed in a transparent, sealed liquid injection tank. Four sets of switchable polarization light sources and a high-resolution camera are used to acquire polarization images. A true edge priority map is generated by combining brightness normalization and background elimination algorithms. Multi-view images are acquired through a six-degree-of-freedom rotation platform. Subpixel positioning and curve fitting techniques are used to recover the contour curve. The measurement parameters are optimized using an adaptive adjustment module.

Benefits of technology

It enables high-precision non-contact dimensional measurement of thick optical glass, eliminates internal reflection distortion, improves edge positioning accuracy and measurement stability, and meets the needs of high-precision testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120846220B_ABST
    Figure CN120846220B_ABST
Patent Text Reader

Abstract

The application provides a machine vision-based optical glass non-contact size measurement system, relates to the field of machine vision and optical detection technology, and the method comprises the following steps: setting a liquid injection groove on a measuring table, and injecting oil liquid matched with the refractive index of the glass to immerse the glass; arranging four groups of polarized light sources equidistantly around the groove, and collecting four groups of polarized images; generating an edge priority graph by applying brightness normalization and background elimination algorithms; collecting the priority graphs of four viewing angles in 90-degree increments on a rotating platform, superimposing and enhancing the priority graphs to combine into a full-viewing-angle edge enhancement graph; restoring the profile curve of the glass by adopting sub-pixel positioning and curve fitting technology; converting the pixel coordinates of the curve into spatial coordinates by using the camera internal parameters and the geometric parameters of the table frame, and calculating the side length, diagonal length and section thickness of the glass; comparing the size parameters with standard values, and adjusting the device parameters and re-measuring until the deviation meets the standard if the deviation exceeds the limit, so that high-precision non-contact size measurement of large-thickness optical glass can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine vision and optical inspection technology, and in particular to a non-contact optical glass dimension measurement system based on machine vision. Background Technology

[0002] In the manufacturing and application of optical glass, dimensional accuracy, as a core quality indicator, directly determines product performance and assembly compatibility.

[0003] Traditional contact measurements rely on mechanical probes to contact the glass surface, which not only easily causes physical damage such as scratches and chipping, compromising the integrity of the optical surface, but also leads to stress deformation due to contact pressure, resulting in distorted measurement data and failing to meet the inspection requirements of high-precision optical components. Existing non-contact measurements mostly employ machine vision technology, but they often face multiple technical bottlenecks in the inspection of thick optical glass exceeding 10mm. Due to multiple internal reflections between the glass surface and bottom, light easily forms complex optical paths within the glass, causing overlap and distortion of the true contour edges and reflection artifacts in the image, blurring and obscuring the true boundaries, making it difficult to accurately identify the true contour edges. Simultaneously, the difference in refractive index between glass and air causes light refraction at the interface, further exacerbating edge imaging shift and blurring.

[0004] Existing methods lack an effective mechanism to distinguish between real edges and reflection interference, leading to a significant increase in measurement errors. Single-view image acquisition is limited by the field of view of the optical system, and blind spots are easily formed in areas such as glass corners and curved surfaces, resulting in incomplete contour information. Furthermore, the lack of a dynamic compensation mechanism means that factors such as changes in the refractive index of the medium caused by environmental temperature fluctuations and small drifts during long-term equipment operation can cause continuous fluctuations in measurement accuracy, seriously affecting the stability and reliability of measurement results and failing to meet the batch inspection requirements of high-precision optical glass. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a machine vision-based non-contact dimension measurement system for optical glass. This system solves the problems in the measurement of thick optical glass, where internal multi-faceted reflections easily cause contour overlap distortion, existing methods cannot separate the true glass edges, and the dimension measurement accuracy is insufficient.

[0006] The present invention provides a machine vision-based non-contact optical glass dimension measurement system, the system comprising:

[0007] An immersion fixing module is used to set a transparent and sealed liquid injection tank on the measuring stage, inject transparent oil that matches the refractive index of the optical glass to be tested into the transparent and sealed liquid injection tank, immerse the optical glass to be tested in the transparent oil, and fix it with a clamp.

[0008] The image acquisition module is used to arrange four sets of switchable polarization light sources at equal intervals around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. The four polarization illumination states are obtained by switching through filters. The module is used in conjunction with a high-resolution industrial camera to synchronously acquire four sets of polarization images under the four polarization illumination states.

[0009] The edge determination module is used to apply brightness normalization and background removal algorithms to generate a true edge priority map by comparing the pixel intensity differences of four sets of polarization images.

[0010] The image merging module is used to acquire the real edge priority image four times in 90-degree increments on a six-degree-of-freedom rotation platform, generate real edge priority images from four perspectives, and use image overlay and edge enhancement algorithms to merge the real edge priority images from four perspectives into a full-view edge enhancement image.

[0011] The contour fitting module is used to extract the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm, and to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map using a curve fitting method.

[0012] The size calculation module is used to convert the coordinates of the contour curve of the optical glass under test from pixel coordinates to spatial coordinates using camera intrinsic parameters and platform geometric parameters, and calculate the size parameters of the optical glass under test in the spatial coordinate system, including glass side length, diagonal length and cross-sectional thickness.

[0013] The adaptive adjustment module is used to compare the size parameters of the optical glass under test with the standard size parameters. If the size deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the size deviation does not exceed the preset threshold.

[0014] Preferably, the application of brightness normalization and background removal algorithms generates a true edge priority map by comparing the pixel intensity differences of four sets of polarization images, specifically including:

[0015] A calibration grid is pre-attached around the transparent sealed injection tank. By detecting the grid corner positions of each set of polarization images, the homography matrix of each set of polarization images relative to the reference angle is calculated, and perspective transformation correction is performed on each set of polarization images.

[0016] Perform grayscale conversion on each group of polarized images after perspective transformation correction;

[0017] Local histogram equalization, multi-scale median filtering, and brightness normalization are performed on each group of polarized images after grayscale conversion.

[0018] Set four sets of polarization images as The polarization difference comparison map C is calculated using a difference comparison model;

[0019] Set comparison threshold The reflection shield M is calculated based on the polarization difference comparison map C and the comparison threshold t;

[0020] Perform a 3×3 pixel opening operation on the reflective mask M to remove isolated noise points, and then perform a 5×5 pixel closing operation to fill small holes.

[0021] like Then keep ,like Then, the median of the gray values ​​of the four polarization images is taken to finally generate the true edge priority map P;

[0022] Gaussian weighted smoothing is applied to the real edge priority map P along the edge direction to eliminate splicing marks.

[0023] Preferably, the calculation formula for the polarization difference comparison map C is as follows:

[0024]

[0025] In the formula, Representing pixels Gray values ​​in polarized images at 0 degrees and 90 degrees; Denotes a constant, and ;

[0026] The formula for calculating the reflective shield M is as follows:

[0027]

[0028] in, Represents pixels Located at the actual edge of the optical glass under test; Represents pixels Located in the internal reflection region or background region of the optical glass under test;

[0029] The formula for calculating the true edge priority graph P is as follows:

[0030]

[0031] In the formula, Representing pixels Gray values ​​in polarized images at 45 degrees and 135 degrees; This indicates the median operation.

[0032] Preferably, the step of acquiring the true edge priority map four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate true edge priority maps from four perspectives, and then merging the four true edge priority maps into a full-view edge enhancement map using image overlay and edge enhancement algorithms, specifically includes:

[0033] Around the six-degree-of-freedom rotating platform, four sets of reference angles, namely 0 degrees, 90 degrees, 180 degrees, and 270 degrees, are measured using a laser tracker, and the corresponding angle reference values ​​are recorded as follows: Generate a list of angle reference values;

[0034] Four angular reference values ​​are sequentially sent to the six-degree-of-freedom rotation platform in 90-degree increments. After receiving the angular reference values ​​and confirming the rotation position through the encoder, the six-degree-of-freedom rotation platform issues a rotation ready signal, triggers the image acquisition operation, and generates true edge priority maps from four perspectives. ;

[0035] The Canny edge detection algorithm is applied to the ground truth edge priority maps from four perspectives. Processing is performed to obtain binary edge maps from four perspectives. And binary edge maps from four perspectives. Perform non-maximum suppression of 3×3 pixels to eliminate isolated noise points with a width of less than 2 pixels in the binary edge image, and then perform opening and closing operations of 5×5 pixels to enhance the edge continuity of the binary edge image.

[0036] Based on the maximum value fusion model, a binary edge map based on four perspectives. Calculate the full-view edge enhancement map ;

[0037] The full-view edge enhancement map Perform 5×5 pixel Gaussian smoothing until the full-view edge enhancement map is obtained. The edge line width in the image is within the range of 2 to 3 pixels, and the edge enhancement map is automatically filled. The broken lines in the image enhance the edge image from all angles. Perform edge alignment correction and ROI extraction processing.

[0038] Preferably, the full-view edge enhancement map The calculation formula is as follows:

[0039]

[0040] In the formula, Representing pixels Gray values ​​in binary edge maps from four perspectives, and It is either 1 or 0. Represents pixels Binary edge map The edge, Represents pixels Not in binary edge map The edge, Similarly; Represents pixels The grayscale value under the full-view edge enhancement image, and It is either 1 or 0. Represents pixels Edge enhancement map in full view The edge, Represents pixels Edge enhancement image not in full view The edge.

[0041] Preferably, the step of extracting the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm, and then using a curve fitting method to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map, specifically includes:

[0042] Scan the full-view edge enhancement map This will make pixels As the full-view edge enhancement map edge point Summarize all edge points Generate the original set of edge points;

[0043] Calculate edge points gradient vector at And perform normalization processing, where, Represents edge points The horizontal gradient vector at that point; Represents edge points The vertical gradient vector at that point;

[0044] Along the gradient normal direction, grayscale values ​​of three full-view edge enhancement maps are collected at one-pixel steps. The sub-pixel offset is calculated using a one-dimensional parabolic interpolation model. and sub-pixel level edge points ;

[0045] Summarize all subpixel level edge points Generate a sub-pixel level set of edge points;

[0046] The subpixel-level edge point set is divided into multiple consecutive subsets based on edge connectivity, and the number of subpixel-level edge points in each subset is greater than or equal to 20.

[0047] The least squares method is used to fit a quadratic curve based on each subset. And solve for the parameters ;

[0048] Calculate the average curvature of the quadratic curve. If the average curvature exceeds a preset curvature threshold, subdivide the quadratic curve and refit it to generate a set of piecewise curve parameters.

[0049] The sub-curves in the segmented curve parameter set are sequentially spliced ​​according to the original edge point order, and cubic spline filtering is performed at the splicing points of each segmented curve to construct a globally smooth curve.

[0050] Calculate the shortest distance from the sub-pixel level edge point to the global smooth curve, and calculate the corresponding maximum error and root mean square error;

[0051] If the maximum error exceeds 1 pixel or the root mean square error exceeds 0.3 pixels, then a certain segment of the sub-curve in the piecewise curve parameter set is abnormal. It is necessary to subdivide the quadratic curve and refit it to output the final global smooth curve, that is, the contour curve of the optical glass under test.

[0052] Preferably, the sub-pixel offset The calculation formula is as follows:

[0053]

[0054] The sub-pixel level edge points The calculation formula is as follows:

[0055]

[0056] .

[0057] Preferably, the step of converting the coordinates of the contour curve of the optical glass under test from pixel coordinates to spatial coordinates using camera intrinsic parameters and rig geometric parameters, and calculating the dimensional parameters of the optical glass under test in the spatial coordinate system, including glass side length, diagonal length, and cross-sectional thickness, specifically includes:

[0058] Sampling is performed on the contour curve of the optical glass under test using equal step increments to obtain sampled pixels. ;

[0059] The camera intrinsic parameters are set as follows: , , These represent the equivalent focal lengths in the horizontal and vertical directions, respectively. , Let x and y represent the principal point coordinates in the x and y directions, respectively, and let Z be the geometric parameter of the test bench. The sampling pixel points are calculated using the following inverse projection formula. Corresponding spatial coordinates And map it to a spatial coordinate system:

[0060]

[0061]

[0062] Summarize all spatial coordinate points Generate a set of spatial coordinate points, and locate the contour endpoints of the optical glass surface under test within the set of spatial coordinate points. and Relative corners and Corresponding points on the upper and lower surfaces;

[0063] Calculate the contour endpoints and The Euclidean distance L between them, which is the side length of the glass:

[0064]

[0065] Calculate the relative corner points and The Euclidean distance D between them, i.e., the length of the diagonal:

[0066]

[0067] Calculate the height difference in the vertical direction between corresponding points on the upper and lower surfaces, which is the section thickness T.

[0068] A machine vision-based non-contact dimension measurement method for optical glass, the method comprising:

[0069] A transparent, sealed liquid injection tank is set on the measuring platform. A transparent oil liquid matching the refractive index of the optical glass to be tested is injected into the transparent, sealed liquid injection tank. The optical glass to be tested is then immersed in the transparent oil liquid and fixed by a clamp.

[0070] Four sets of switchable polarization light sources are arranged equidistantly around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. Four sets of polarization illumination states are obtained by switching through filters. In conjunction with a high-resolution industrial camera, four sets of polarization images are simultaneously acquired in sequence under the four sets of polarization illumination states.

[0071] By applying brightness normalization and background removal algorithms, a true edge priority map is generated by comparing the pixel intensity differences of four sets of polarization images.

[0072] The real edge priority map is acquired four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate real edge priority maps from four perspectives. Then, image overlay and edge enhancement algorithms are used to merge the real edge priority maps from the four perspectives into a full-view edge enhancement map.

[0073] A subpixel localization algorithm is used to extract the curve of the full-view edge enhancement map along the contour direction, and a curve fitting method is used to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map.

[0074] Using camera intrinsic parameters and test bench geometry parameters, the coordinates of the contour curve of the optical glass under test are transformed from pixel coordinates to spatial coordinates, and the dimensional parameters of the optical glass under test, including glass side length, diagonal length and cross-sectional thickness, are calculated in the spatial coordinate system.

[0075] The dimensional parameters of the optical glass under test are compared with the standard dimensional parameters. If the dimensional deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the dimensional deviation does not exceed the preset threshold.

[0076] Compared with related technologies, the machine vision-based non-contact optical glass dimension measurement system provided by this invention has the following advantages:

[0077] This invention involves setting up a transparent, sealed liquid injection tank on a measuring platform, injecting a transparent oil solution with a refractive index matching that of the optical glass under test into the tank, immersing the optical glass in the oil solution, and fixing it with clamps. Four sets of switchable polarization light sources are equidistantly arranged around the transparent, sealed liquid injection tank, each set having a different polarization direction. Four polarization illumination states are obtained by switching between these states using filters, and a high-resolution industrial camera simultaneously acquires four sets of polarization images under these illumination states. A brightness normalization and background removal algorithm is applied, and a true edge priority map is generated by comparing the pixel intensity differences of the four polarization images. The true edge priority map is acquired four times in 90-degree increments on a six-degree-of-freedom rotation platform, generating four true edge priority maps from different perspectives. Image overlay and edge enhancement algorithms are then used to prioritize the true edges from the four perspectives. The images are merged into a full-view edge enhancement image; a sub-pixel positioning algorithm is used to extract the curve of the full-view edge enhancement image along the contour direction, and a curve fitting method is used to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement image; using camera intrinsic parameters and platform geometric parameters, the coordinates of the contour curve of the optical glass under test are transformed from pixel coordinate form to spatial coordinate form, and the dimensional parameters of the optical glass under test, including the glass side length, diagonal length, and cross-sectional thickness, are calculated in the spatial coordinate system; the dimensional parameters of the optical glass under test are compared with the standard dimensional parameters. If the dimensional deviation exceeds the preset threshold, the control parameters of the switchable polarization light source, high-resolution industrial camera, and six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the dimensional deviation does not exceed the preset threshold, thereby realizing high-precision non-contact dimensional measurement of thick optical glass.

[0078] This invention employs a transparent oil solution matching the glass's refractive index to immerse the glass, eliminating the refraction and reflection differences at the glass-medium interface and resolving the contour overlap distortion problem caused by internal multi-faceted reflections, ensuring a clear representation of true edges. This invention utilizes four sets of switchable polarized light sources combined with a differential algorithm to accurately separate true edges from reflection artifacts. Furthermore, reflection masking effectively eliminates isolated noise points and holes, further improving edge localization accuracy. The six-degree-of-freedom rotation platform of this invention can achieve four-view acquisition in 90-degree increments, using maximum value fusion and edge enhancement algorithms to fill in single-view blind spots and generate continuous and complete full-view edge maps. This invention improves edge localization accuracy to the sub-pixel level through sub-pixel localization and piecewise curve fitting techniques, and achieves precise conversion from pixel coordinates to physical coordinates through camera intrinsic parameter calibration. In addition, this invention employs an adaptive compensation mechanism to dynamically adjust the parameters of the light source, camera, and platform, ensuring that dimensional measurement deviations remain stable within a preset threshold through closed-loop error correction, providing an efficient and reliable solution for the inspection of thick optical glass. Attached Figure Description

[0079] Figure 1 This is a system block diagram of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0080] Figure 2 This is a structural block diagram of the image acquisition module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0081] Figure 3 This is a structural block diagram of the edge determination module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0082] Figure 4 This is a structural block diagram of the image merging module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0083] Figure 5 This is a structural block diagram of the contour fitting module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0084] Figure 6 This is a structural block diagram of the dimension calculation module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0085] Figure 7 This is a structural block diagram of the adaptive adjustment module of the machine vision-based non-contact optical glass dimension measurement system of the present invention.

[0086] Figure 8 This is a flowchart of the machine vision-based non-contact dimension measurement method for optical glass according to the present invention. Detailed Implementation

[0087] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0088] Example 1

[0089] like Figure 1 As shown, a machine vision-based non-contact optical glass dimension measurement system includes:

[0090] An immersion fixing module is used to set a transparent and sealed liquid injection tank on the measuring stage, inject transparent oil that matches the refractive index of the optical glass to be tested into the transparent and sealed liquid injection tank, immerse the optical glass to be tested in the transparent oil, and fix it with a clamp.

[0091] The image acquisition module is used to arrange four sets of switchable polarization light sources at equal intervals around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. The four polarization illumination states are obtained by switching through filters. The module is used in conjunction with a high-resolution industrial camera to synchronously acquire four sets of polarization images under the four polarization illumination states.

[0092] The edge determination module is used to apply brightness normalization and background removal algorithms to generate a true edge priority map by comparing the pixel intensity differences of four sets of polarization images.

[0093] The image merging module is used to acquire the real edge priority image four times in 90-degree increments on a six-degree-of-freedom rotation platform, generate real edge priority images from four perspectives, and use image overlay and edge enhancement algorithms to merge the real edge priority images from four perspectives into a full-view edge enhancement image.

[0094] The contour fitting module is used to extract the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm, and to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map using a curve fitting method.

[0095] The size calculation module is used to convert the coordinates of the contour curve of the optical glass under test from pixel coordinates to spatial coordinates using camera intrinsic parameters and platform geometric parameters, and calculate the size parameters of the optical glass under test in the spatial coordinate system, including glass side length, diagonal length and cross-sectional thickness.

[0096] The adaptive adjustment module is used to compare the size parameters of the optical glass under test with the standard size parameters. If the size deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the size deviation does not exceed the preset threshold.

[0097] The immersion fixing module can be equipped with a transparent, sealed injection tank on the measuring platform. A transparent medium oil that matches the refractive index characteristics of the optical glass under test is injected into the injection tank. For example, if the optical glass under test is made of high borosilicate glass with a refractive index of 1.52±0.003, and a base oil with a nominal value of 1.50±0.005 is selected, the initial refractive index of the oil is measured to be 1.497 at 25°C using an Abbe refractometer, with a deviation of 0.023. A high-refractive-index blending liquid is added in proportion, and repeated measurements are performed to adjust the oil refractive index to 1.519, with a deviation of 0.001.

[0098] The glass to be tested is completely immersed in the medium and stably fixed by a special fixture. This eliminates the difference in refraction and reflection at the interface between the glass and the surrounding medium by matching the refractive index, thereby reducing the contour distortion caused by internal multi-faceted reflections at the source. At the same time, it ensures that the glass is stable in position during the measurement process, providing a reliable reference for subsequent image acquisition.

[0099] like Figure 2As shown, the image acquisition module is responsible for acquiring raw optical image data. Four sets of adjustable polarization light sources are evenly spaced around the injection tank. Each set of light sources has the ability to adjust to different polarization directions, and various polarization illumination environments can be created by switching the filter elements. This module, in conjunction with high-resolution industrial imaging equipment, simultaneously acquires multiple sets of polarization images under different polarization illumination conditions. The differences in polarization states can effectively distinguish between true edge reflections and internal interference reflections, providing diverse image data support for subsequent edge extraction.

[0100] like Figure 3 As shown, the edge determination module employs brightness normalization and background removal techniques to achieve edge recognition by comparing pixel brightness differences between images with different polarization states. First, the module performs geometric correction and grayscale conversion on the image. Then, it optimizes image quality through local contrast enhancement and noise suppression. Subsequently, it generates a comparison image using a polarization difference algorithm, constructs a reflective region mask using morphological processing, and finally fuses effective information to generate a true edge-priority image, achieving accurate separation between true edges and interfering reflections.

[0101] like Figure 4 As shown, the image merging module can use a six-degree-of-freedom rotation platform to acquire edge images from four different perspectives by performing multi-view acquisition of the real edge priority map at fixed angle increments. After extracting edge features from each perspective using an edge detection algorithm, image fusion technology is used to integrate the edge information from multiple perspectives. After smoothing and edge alignment correction, a full-view edge enhancement image covering the entire field of view is generated, effectively compensating for the blind spot defects of single-view acquisition and ensuring the continuity and integrity of edge information.

[0102] like Figure 5 As shown, the contour fitting module can extract fine edge curves along the contour direction using sub-pixel localization technology, determine the contour direction by calculating the gradient direction of edge points, and obtain a set of edge points with sub-pixel accuracy by combining interpolation algorithms. Piecewise curve fitting is performed based on edge connectivity, and the fitting results are optimized through curvature detection and error verification. After curve splicing and smoothing, a globally continuous glass contour curve model is constructed to ensure high accuracy and smoothness in contour description.

[0103] like Figure 6 As shown, the dimension calculation module can convert the pixel coordinates of the contour curve into actual spatial coordinates using pre-calibrated camera optical parameters and measuring stage geometric parameters. By locating the contour endpoints, corner points, and corresponding points on the upper and lower surfaces, it uses geometric calculation methods to obtain key dimensional parameters such as the side length, diagonal length, and cross-sectional thickness of the glass, realizing the transformation from optical measurement to physical dimension quantification.

[0104] like Figure 7As shown, the adaptive adjustment module compares the measured dimensions with standard parameters. When the dimensional deviation exceeds the preset range, it dynamically adjusts the polarization light source parameters, camera acquisition parameters, and rotating platform positioning parameters, triggering a re-measurement process. Through a closed-loop feedback mechanism, the measurement conditions are continuously optimized until the dimensional deviation is controlled within the allowable range, ensuring that the system maintains high-precision measurement capabilities even under environmental fluctuations or equipment drift.

[0105] The polarization light source, driven by a controller, recalibrates the reference angle of the polarizer turntable to ensure precise switching of polarization direction. Simultaneously, it re-establishes the trigger synchronization mechanism between the light source and the camera to guarantee consistent illumination conditions across different polarization states. The industrial camera requires optimized exposure parameters, adjusting brightness and contrast through real-time image histogram analysis to ensure clear visibility of grayscale features in edge areas and eliminate image quality differences caused by light intensity fluctuations. The rotating platform recalibrates its rotation position based on the angular reference value, corrects positioning deviations through encoder feedback, and recalculates the homography matrix to achieve precise alignment of images from various viewpoints. After adjustment, a retest process is triggered, re-executing image acquisition, edge extraction, and dimensional calculation steps. This closed-loop feedback mechanism continuously optimizes the parameters of each device until dimensional deviations are controlled within a preset threshold, ensuring stable and reliable measurement results and meeting high-precision testing requirements.

[0106] In the specific implementation process, the applied brightness normalization and background removal algorithm generates a true edge priority map by comparing the pixel intensity differences of four sets of polarization images, specifically including:

[0107] A calibration grid is pre-attached around the transparent sealed injection tank. By detecting the grid corner positions of each set of polarization images, the homography matrix of each set of polarization images relative to the reference angle is calculated, and perspective transformation correction is performed on each set of polarization images.

[0108] Perform grayscale conversion on each group of polarized images after perspective transformation correction;

[0109] Local histogram equalization, multi-scale median filtering, and brightness normalization are performed on each group of polarized images after grayscale conversion.

[0110] Set four sets of polarization images as The polarization difference comparison map C is calculated using a difference comparison model;

[0111] Set comparison threshold The reflection shield M is calculated based on the polarization difference comparison map C and the comparison threshold t;

[0112] Perform a 3×3 pixel opening operation on the reflective mask M to remove isolated noise points, and then perform a 5×5 pixel closing operation to fill small holes.

[0113] like Then keep ,like Then, the median of the gray values ​​of the four polarization images is taken to finally generate the true edge priority map P;

[0114] Gaussian weighted smoothing is applied to the real edge priority map P along the edge direction to eliminate splicing marks.

[0115] In practical applications, a calibration grid can be pre-set around the transparent sealed injection tank. By identifying the spatial position of the grid corner points in each polarization image, the spatial mapping relationship matrix of each group of images relative to the reference angle is calculated, and perspective geometric correction is performed on the images to ensure that the fields of view of images with different polarization states are aligned in the same coordinate system, thus eliminating image misalignment caused by differences in shooting angle.

[0116] After correction, the image can be converted to grayscale, transforming the geometrically corrected color polarized image into a single-channel grayscale image. By integrating color information through standardized grayscale conversion rules, the complexity of subsequent calculations is simplified, providing a unified grayscale information basis for multi-image comparison.

[0117] Subsequently, local contrast enhancement processing can be performed on the grayscale image sequentially. Local histogram equalization is used to improve the grayscale difference in the edge region. Multi-scale median filtering technology is used to suppress small-scale random noise and medium-scale abrupt interference in stages. Brightness standardization processing is implemented to unify the overall grayscale level of the image to a preset range, thereby eliminating brightness fluctuations caused by uneven light sources or differences in device response, and ensuring that subsequent polarization difference analysis is not affected by local brightness anomalies.

[0118] Based on the preprocessed image, the difference in grayscale response between the real edge and the reflection artifact under different polarization states is used to calculate the polarization difference comparison map through the difference comparison model. This highlights the grayscale difference characteristics of the real edge in the polarization state change, weakens the grayscale overlap interference caused by internal reflection, and provides a quantitative basis for the separation of the edge and the reflection area.

[0119] Then, a reasonable grayscale difference threshold can be set to perform threshold segmentation on the polarization difference contrast image, generating a binarized reflection region mask. This mask is used to mark the regions where the real edges are located and the regions affected by reflection interference in the image, providing a spatial positioning basis for subsequent image fusion. In addition, morphological cleansing can be performed on the reflection mask. Small-scale morphological opening operations are used to eliminate isolated noise points in the mask and remove false edge markers; medium-scale morphological closing operations are used to fill the tiny holes in the mask, repairing discontinuities in the edge regions and ensuring complete coverage of the real edge regions by the mask.

[0120] Furthermore, image fusion can be performed based on the cleaned mask. During the fusion process, for regions marked as true edges by the mask, the grayscale information at the corresponding positions is directly retained; for regions marked as reflection interference by the mask, the median grayscale value of the multi-polarization image is used for filling, and the interference region is replaced by the effective information of the neighborhood to generate a preliminary true edge priority map.

[0121] Finally, Gaussian weighted smoothing can be performed on the generated priority map along the edge direction. By eliminating the stitching traces generated during the image fusion process through local weighted averaging, the edge contours remain continuous and smooth, providing high-quality image input for subsequent edge extraction and contour fitting, and ensuring the complete preservation and clear presentation of real edge information.

[0122] The formula for calculating the polarization difference comparison map C is as follows:

[0123]

[0124] In the formula, Representing pixels Gray values ​​in polarized images at 0 degrees and 90 degrees; Denotes a constant, and ;

[0125] The formula for calculating the reflective shield M is as follows:

[0126]

[0127] in, Represents pixels Located at the actual edge of the optical glass under test; Represents pixels Located in the internal reflection region or background region of the optical glass under test;

[0128] The formula for calculating the true edge priority graph P is as follows:

[0129]

[0130] In the formula, Representing pixels Gray values ​​in polarized images at 45 degrees and 135 degrees; This indicates the median operation.

[0131] The calculation of polarization difference contrast maps aims to separate true edges from reflection interference through polarization state differences. Its core logic is to utilize the difference in grayscale response between true edges and internal reflections under different polarization directions to amplify the grayscale features of true edges while weakening the interference signal of reflection artifacts. This calculation takes image grayscale information under orthogonal polarization states of 0 degrees and 90 degrees as input, and constructs a grayscale difference model to highlight the significant response of true edges in polarization changes, suppressing grayscale overlap caused by internal multifaceted reflections, and providing a clear comparative basis for subsequent edge recognition. This operation effectively enhances the contrast between true edges and the background, making edge features stand out from complex reflection interference.

[0132] The reflection mask calculation is based on the quantitative analysis of polarization difference contrast maps, and region segmentation is achieved by setting a reasonable threshold. Its core principle is to divide the image space into two types of regions based on the intensity of pixel grayscale differences in the difference contrast map: when the grayscale difference of pixels exceeds a preset threshold, it is determined to be a real edge region and marked as a valid edge position; when the grayscale difference does not reach the threshold, it is determined to be a region affected by internal reflection or background interference. This binary segmentation forms a spatial mask that accurately marks the spatial distribution of real edges, providing a clear basis for region localization for subsequent image fusion, ensuring accurate extraction of edge information and effective isolation of interference regions.

[0133] The calculation of the true edge priority map is a process of multi-polarization state information fusion, aiming to integrate effective edge information and suppress interference. For regions marked as true edges, the original grayscale information under the corresponding polarization state is directly retained to ensure the complete preservation of edge features; for regions marked as reflections or background interference, the median grayscale values ​​of orthogonal polarization state images at 45 degrees and 135 degrees are used for filling. Median calculation can effectively eliminate isolated noise interference, and by utilizing the statistical characteristics of multi-view information to replace unreliable interference region data, it achieves the dual effect of interference suppression and information completion.

[0134] This selective fusion strategy preserves the clear features of real edges while eliminating artifacts caused by internal reflections, laying a high-quality image foundation for subsequent high-precision contour extraction.

[0135] The process involves acquiring the true edge priority image four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate four true edge priority images from different perspectives. Then, using image overlay and edge enhancement algorithms, the four true edge priority images are merged into a full-view edge enhancement image. Specifically, this includes:

[0136] Around the six-degree-of-freedom rotating platform, four sets of reference angles, namely 0 degrees, 90 degrees, 180 degrees, and 270 degrees, are measured using a laser tracker, and the corresponding angle reference values ​​are recorded as follows: Generate a list of angle reference values;

[0137] Four angular reference values ​​are sequentially sent to the six-degree-of-freedom rotation platform in 90-degree increments. After receiving the angular reference values ​​and confirming the rotation position through the encoder, the six-degree-of-freedom rotation platform issues a rotation ready signal, triggers the image acquisition operation, and generates true edge priority maps from four perspectives. ;

[0138] The Canny edge detection algorithm is applied to the ground truth edge priority maps from four perspectives. Processing is performed to obtain binary edge maps from four perspectives. And binary edge maps from four perspectives. Perform non-maximum suppression of 3×3 pixels to eliminate isolated noise points with a width of less than 2 pixels in the binary edge image, and then perform opening and closing operations of 5×5 pixels to enhance the edge continuity of the binary edge image.

[0139] Based on the maximum value fusion model, a binary edge map based on four perspectives. Calculate the full-view edge enhancement map ;

[0140] The full-view edge enhancement map Perform 5×5 pixel Gaussian smoothing until the full-view edge enhancement map is obtained. The edge line width in the image is within the range of 2 to 3 pixels, and the edge enhancement map is automatically filled. The broken lines in the image enhance the edge image from all angles. Perform edge alignment correction and ROI extraction processing.

[0141] The full-view edge enhancement map The calculation formula is as follows:

[0142]

[0143] In the formula, Representing pixels Gray values ​​in binary edge maps from four perspectives, and It is either 1 or 0. Represents pixels Binary edge map The edge, Represents pixels Not in binary edge map The edge, Similarly; Represents pixels The grayscale value under the full-view edge enhancement image, and It is either 1 or 0. Represents pixels Edge enhancement map in full view The edge, Represents pixels Edge enhancement image not in full view The edge.

[0144] It should be noted that, firstly, laser tracking technology can be used to accurately measure the four key orientations of the six-degree-of-freedom rotation platform, determining the reference angles for the initial and three orthogonal rotation positions, and establishing a standardized angle reference library. This process ensures the accuracy of each viewpoint position through high-precision spatial measurement, providing a fundamental guarantee for the angular consistency of subsequent image acquisition.

[0145] Subsequently, angle commands can be sent to the rotating platform in fixed angle increments. The platform confirms the rotational position accuracy in real time through the encoder. Once in position, it triggers a ready signal and simultaneously starts the image acquisition device to acquire real edge priority images from four different perspectives. This closed-loop positioning and synchronous acquisition mechanism ensures stable acquisition of images from each perspective at each preset angle, guaranteeing the spatial correspondence of multi-view data.

[0146] Then, edge detection algorithms can be applied to extract the initial edge contours of images from each viewpoint, generating a binarized edge map. Small-scale non-maximum suppression is used to remove isolated, noisy edges that are too narrow; then, mesoscale morphological opening and closing operations are employed to eliminate edge breaks and enhance contour continuity, ensuring the integrity and reliability of edge features from each viewpoint.

[0147] Furthermore, fusion operations can be performed based on multi-view edge information, employing a maximum value fusion strategy to integrate edge data from four views. This means that for each spatial location in the image, valid edge information detected by any view is retained. This fusion logic can maximize the coverage of valid edges from each view, compensating for edge loss caused by occlusion or angle limitations from a single viewpoint, and achieving complete integration of edge information across the entire field of view.

[0148] Finally, mesoscale Gaussian smoothing can be applied to the fused edge map to keep the edge line width within a reasonable range, while automatically filling in minor break areas to enhance contour continuity. Edge alignment correction eliminates spatial misalignment caused by rotation, and combined with region of interest extraction technology, the actual contour range of the glass is focused, while irrelevant background noise is removed. This results in a complete, clear, and spatially consistent full-view edge enhancement map, providing high-quality input for subsequent high-precision contour fitting.

[0149] The process of extracting the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm and then using a curve fitting method to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map specifically includes:

[0150] Scan the full-view edge enhancement map This will make pixels As the full-view edge enhancement map edge point Summarize all edge points Generate the original set of edge points;

[0151] Calculate edge points gradient vector at And perform normalization processing, where, Represents edge points The horizontal gradient vector at that point; Represents edge points The vertical gradient vector at that point;

[0152] Along the gradient normal direction, grayscale values ​​of three full-view edge enhancement maps are collected at one-pixel steps. The sub-pixel offset is calculated using a one-dimensional parabolic interpolation model. and sub-pixel level edge points ;

[0153] Summarize all subpixel level edge points Generate a sub-pixel level set of edge points;

[0154] The subpixel-level edge point set is divided into multiple consecutive subsets based on edge connectivity, and the number of subpixel-level edge points in each subset is greater than or equal to 20.

[0155] The least squares method is used to fit a quadratic curve based on each subset. And solve for the parameters ;

[0156] Calculate the average curvature of the quadratic curve. If the average curvature exceeds a preset curvature threshold, subdivide the quadratic curve and refit it to generate a set of piecewise curve parameters.

[0157] The sub-curves in the segmented curve parameter set are sequentially spliced ​​according to the original edge point order, and cubic spline filtering is performed at the splicing points of each segmented curve to construct a globally smooth curve.

[0158] Calculate the shortest distance from the sub-pixel level edge point to the global smooth curve, and calculate the corresponding maximum error and root mean square error;

[0159] If the maximum error exceeds 1 pixel or the root mean square error exceeds 0.3 pixels, then a certain segment of the sub-curve in the piecewise curve parameter set is abnormal. It is necessary to subdivide the quadratic curve and refit it to output the final global smooth curve, that is, the contour curve of the optical glass under test.

[0160] The sub-pixel offset The calculation formula is as follows:

[0161]

[0162] The sub-pixel level edge points The calculation formula is as follows:

[0163]

[0164] .

[0165] Understandably, the first step is to perform a full scan of the edge enhancement map from all angles, identify and filter out pixels that match the edge features, and then aggregate these pixels to form the original edge point set, providing basic data for subsequent high-precision processing.

[0166] Next, the gradient vectors in the horizontal and vertical directions can be calculated for each edge point. Normalization is then used to unify the vector scale and clarify the directions of the tangent and normal lines of the edge. The gradient direction information provides precise spatial orientation for sub-pixel localization, ensuring that interpolation operations are performed along the most sensitive contour direction.

[0167] Then, grayscale values ​​can be collected at fixed intervals along the gradient normal direction. A one-dimensional parabolic interpolation model is used to fit the grayscale distribution characteristics, calculate the sub-pixel level positional offset, and thus determine the edge point coordinates with sub-pixel precision. Through this fine interpolation, the edge positioning accuracy can be improved from the pixel level to the sub-pixel level, significantly improving the accuracy of edge position.

[0168] Subsequently, the sub-pixel set can be divided into multiple continuous subsets based on edge connectivity, ensuring that each subset contains a sufficient number of points to guarantee fitting reliability. A quadratic curve is fitted to each subset using the least squares method, and the curve parameters are solved to describe the local edge morphology. The fitting quality is evaluated through curvature detection. If the curvature change exceeds a threshold, the curve is subdivided and refitted to generate accurate piecewise curve parameters.

[0169] After completing the segmented fitting, a global curve can be constructed. The segmented curves are stitched together according to their original edge order, and cubic spline smoothing is applied at the stitching points to eliminate segmental connection marks, forming a globally continuous and smooth curve model. The fitting accuracy is quantitatively verified by calculating the shortest distance from sub-pixels to the global curve and statistically analyzing the maximum error and root mean square error. If the error exceeds the limit, the abnormal segments are re-subdivided and refitted, ultimately outputting a globally smooth curve that meets the accuracy requirements, i.e., the true contour curve of the optical glass. This process, through multi-stage accuracy control and error feedback, achieves high-precision reconstruction of the contour curve.

[0170] The process involves using camera intrinsic parameters and rig geometry to transform the coordinates of the profile curve of the optical glass under test from pixel coordinates to spatial coordinates, and then calculating the dimensional parameters of the optical glass under test in the spatial coordinate system, including the glass side length, diagonal length, and cross-sectional thickness. Specifically, this includes:

[0171] Sampling is performed on the contour curve of the optical glass under test using equal step increments to obtain sampled pixels. ;

[0172] The camera intrinsic parameters are set as follows: , , These represent the equivalent focal lengths in the horizontal and vertical directions, respectively. , Let x and y represent the principal point coordinates in the x and y directions, respectively, and let Z be the geometric parameter of the test bench. The sampling pixel points are calculated using the following inverse projection formula. Corresponding spatial coordinates And map it to a spatial coordinate system:

[0173]

[0174]

[0175] Summarize all spatial coordinate points Generate a set of spatial coordinate points, and locate the contour endpoints of the optical glass surface under test within the set of spatial coordinate points. and Relative corners and Corresponding points on the upper and lower surfaces;

[0176] Calculate the contour endpoints and The Euclidean distance L between them, which is the side length of the glass:

[0177]

[0178] Calculate the relative corner points and The Euclidean distance D between them, i.e., the length of the diagonal:

[0179]

[0180] Calculate the height difference in the vertical direction between corresponding points on the upper and lower surfaces, which is the section thickness T.

[0181] In practical applications, the extracted optical glass profile curve can be discretized at equal intervals to obtain a series of uniformly distributed pixel coordinate points. This sampling method transforms the continuous curve into a discrete set of points, providing operable basic data for subsequent coordinate transformations while balancing computational accuracy and efficiency.

[0182] Then, spatial mapping can be performed based on pre-calibrated camera optical parameters and rig geometry. The camera intrinsic parameters include the equivalent focal length in the horizontal and vertical directions and the coordinates of the principal imaging point, while the rig parameters mainly consist of the working distance from the camera's imaging plane to the glass surface. Through a spatial inverse projection algorithm, the sampled pixel coordinates are converted one by one into three-dimensional coordinates in actual physical space, achieving a precise mapping from the image coordinate system to the physical coordinate system, providing a true spatial scale benchmark for size quantization.

[0183] After coordinate transformation, all transformed spatial coordinate points can be integrated into a complete point set. From this set, key feature locations can be identified and located, including the endpoints of the glass surface contour for calculating glass side lengths, relative corner points for calculating diagonal lengths, and corresponding points on the upper and lower surfaces for calculating section thickness. Accurate location of feature points is a prerequisite for subsequent dimensional calculations and directly affects the accuracy of dimensional measurement results.

[0184] The glass edge length is obtained by calculating the straight-line distance between the two contour endpoints in physical space, quantifying the length of the glass edge based on the Euclidean distance principle. The diagonal length is determined by calculating the straight-line distance between opposite corner points, reflecting the diagonal dimension of the glass. The cross-sectional thickness is obtained by measuring the height difference in the vertical direction between corresponding points on the upper and lower surfaces, reflecting the thickness dimension of the glass. These three dimensional parameters comprehensively describe the key geometric characteristics of optical glass from the three dimensions of length, diagonal span, and thickness, respectively, achieving accurate conversion from image features to physical dimensions and providing quantitative data support for glass quality inspection.

[0185] Example 2

[0186] like Figure 8 As shown, a non-contact dimension measurement method for optical glass based on machine vision is described, the method comprising:

[0187] S1, A transparent sealed liquid injection tank is set on the measuring platform, and a transparent oil liquid matching the refractive index of the optical glass to be tested is injected into the transparent sealed liquid injection tank. The optical glass to be tested is then immersed in the transparent oil liquid and fixed by a clamp.

[0188] S2, four sets of switchable polarization light sources are arranged at equal intervals around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. Four sets of polarization illumination states are obtained by switching through filters. In conjunction with a high-resolution industrial camera, four sets of polarization images are simultaneously acquired in sequence under the four sets of polarization illumination states.

[0189] S3 applies brightness normalization and background removal algorithms to generate a true edge priority map by comparing the pixel intensity differences of four sets of polarization images;

[0190] S4. The real edge priority map is acquired four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate real edge priority maps from four perspectives. The real edge priority maps from the four perspectives are then merged into a full-view edge enhancement map using image overlay and edge enhancement algorithms.

[0191] S5, a sub-pixel positioning algorithm is used to extract the curve of the full-view edge enhancement map along the contour direction, and a curve fitting method is used to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map.

[0192] S6. Using camera intrinsic parameters and platform geometric parameters, the coordinates of the contour curve of the optical glass under test are transformed from pixel coordinate form to spatial coordinate form, and the dimensional parameters of the optical glass under test, including glass side length, diagonal length and cross-sectional thickness, are calculated in the spatial coordinate system.

[0193] S7. The size parameters of the optical glass to be tested are compared with the standard size parameters. If the size deviation exceeds the preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the size deviation does not exceed the preset threshold.

[0194] Through the above embodiments, this invention utilizes a machine vision-based non-contact dimensional measurement system for optical glass. A transparent, sealed injection tank is set up on the measuring platform. A transparent oil solution matching the refractive index of the optical glass to be measured is injected into the tank, immersing the glass in the oil solution and fixing it with clamps. Four sets of switchable polarization light sources are equidistantly arranged around the transparent, sealed injection tank. Each set of switchable polarization light sources has a different polarization direction. Four polarization illumination states are obtained by switching the light source using filters. A high-resolution industrial camera simultaneously acquires four sets of polarization images under these illumination states. Brightness normalization and background removal algorithms are applied, and a true edge priority map is generated by comparing the pixel intensity differences of the four polarization images. The true edge priority map is acquired four times in 90-degree increments on a six-degree-of-freedom rotation platform, generating four perspective true edge priority maps. Image overlay and edge detection are then used to further refine the image. The enhancement algorithm merges the real edge priority images from four perspectives into a full-view edge enhancement image. A sub-pixel localization algorithm extracts the curve of the full-view edge enhancement image along the contour direction, and a curve fitting method is used to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement image. Using camera intrinsic parameters and platform geometry parameters, the coordinates of the contour curve of the optical glass under test are transformed from pixel coordinates to spatial coordinates, and the dimensional parameters of the optical glass under test, including the glass side length, diagonal length, and cross-sectional thickness, are calculated in the spatial coordinate system. The dimensional parameters of the optical glass under test are compared with standard dimensional parameters. If the dimensional deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, high-resolution industrial camera, and six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the dimensional deviation does not exceed the preset threshold. This enables high-precision non-contact dimensional measurement of thick optical glass.

[0195] This invention employs a transparent oil solution matching the glass's refractive index to immerse the glass, eliminating the refraction and reflection differences at the glass-medium interface and resolving the contour overlap distortion problem caused by internal multi-faceted reflections, ensuring a clear representation of true edges. This invention utilizes four sets of switchable polarized light sources combined with a differential algorithm to accurately separate true edges from reflection artifacts. Furthermore, reflection masking effectively eliminates isolated noise points and holes, further improving edge localization accuracy. The six-degree-of-freedom rotation platform of this invention can achieve four-view acquisition in 90-degree increments, using maximum value fusion and edge enhancement algorithms to fill in single-view blind spots and generate continuous and complete full-view edge maps. This invention improves edge localization accuracy to the sub-pixel level through sub-pixel localization and piecewise curve fitting techniques, and achieves precise conversion from pixel coordinates to physical coordinates through camera intrinsic parameter calibration. In addition, this invention employs an adaptive compensation mechanism to dynamically adjust the parameters of the light source, camera, and platform, ensuring that dimensional measurement deviations remain stable within a preset threshold through closed-loop error correction, providing an efficient and reliable solution for the inspection of thick optical glass.

[0196] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0197] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0198] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

Claims

1. A non-contact optical glass dimension measurement system based on machine vision, characterized in that, The system includes: An immersion fixing module is used to set a transparent and sealed liquid injection tank on the measuring stage, inject transparent oil that matches the refractive index of the optical glass to be tested into the transparent and sealed liquid injection tank, immerse the optical glass to be tested in the transparent oil, and fix it with a clamp. The image acquisition module is used to arrange four sets of switchable polarization light sources at equal intervals around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. The four polarization illumination states are obtained by switching through filters. The module is used in conjunction with a high-resolution industrial camera to synchronously acquire four sets of polarization images under the four polarization illumination states. The edge determination module is used to apply brightness normalization and background removal algorithms to generate a true edge priority map by comparing the pixel intensity differences of four sets of polarization images. The image merging module is used to acquire the real edge priority image four times in 90-degree increments on a six-degree-of-freedom rotation platform, generate real edge priority images from four perspectives, and use image overlay and edge enhancement algorithms to merge the real edge priority images from four perspectives into a full-view edge enhancement image. The contour fitting module is used to extract the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm, and to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map using a curve fitting method. The size calculation module is used to convert the coordinates of the contour curve of the optical glass under test from pixel coordinates to spatial coordinates using camera intrinsic parameters and platform geometric parameters, and calculate the size parameters of the optical glass under test in the spatial coordinate system, including glass side length, diagonal length and cross-sectional thickness. The adaptive adjustment module is used to compare the size parameters of the optical glass under test with the standard size parameters. If the size deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the size deviation does not exceed the preset threshold.

2. The non-contact optical glass dimension measurement system based on machine vision according to claim 1, characterized in that, The applied brightness normalization and background removal algorithm generates a true edge priority map by comparing the pixel intensity differences of four sets of polarization images, specifically including: A calibration grid is pre-attached around the transparent sealed injection tank. By detecting the grid corner positions of each set of polarization images, the homography matrix of each set of polarization images relative to the reference angle is calculated, and perspective transformation correction is performed on each set of polarization images. Perform grayscale conversion on each group of polarized images after perspective transformation correction; Local histogram equalization, multi-scale median filtering, and brightness normalization are performed on each group of polarized images after grayscale conversion. Set four sets of polarization images as The polarization difference comparison map C is calculated using a difference comparison model; Set comparison threshold The reflection shield M is calculated based on the polarization difference comparison map C and the comparison threshold t; Perform a 3×3 pixel opening operation on the reflective mask M to remove isolated noise points, and then perform a 5×5 pixel closing operation to fill small holes. like Then keep ,like Then, the median of the gray values ​​of the four polarization images is taken to finally generate the true edge priority map P; Gaussian weighted smoothing is applied to the real edge priority map P along the edge direction to eliminate splicing marks.

3. The machine vision-based non-contact optical glass dimension measurement system according to claim 2, characterized in that, The formula for calculating the polarization difference comparison image C is as follows: In the formula, Representing pixels Gray values ​​in polarized images at 0 degrees and 90 degrees; Denotes a constant, and ; The formula for calculating the reflective shield M is as follows: in, Represents pixels Located at the actual edge of the optical glass under test; Represents pixels Located in the internal reflection region or background region of the optical glass under test; The formula for calculating the true edge priority graph P is as follows: In the formula, Representing pixels Gray values ​​in polarized images at 45 degrees and 135 degrees; This indicates the median operation.

4. The non-contact optical glass dimension measurement system based on machine vision according to claim 1, characterized in that, The process involves acquiring the true edge priority image four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate four true edge priority images from different perspectives. Then, image overlay and edge enhancement algorithms are used to merge these four true edge priority images into a full-view edge enhancement image. Specifically, this includes: Around the six-degree-of-freedom rotating platform, four sets of reference angles, namely 0 degrees, 90 degrees, 180 degrees, and 270 degrees, are measured using a laser tracker, and the corresponding angle reference values ​​are recorded as follows: Generate a list of angle reference values; Four angular reference values ​​are sequentially sent to the six-degree-of-freedom rotation platform in 90-degree increments. After receiving the angular reference values ​​and confirming the rotation position through the encoder, the six-degree-of-freedom rotation platform issues a rotation ready signal, triggers the image acquisition operation, and generates true edge priority maps from four perspectives. ; The Canny edge detection algorithm is applied to the ground truth edge priority maps from four perspectives. Processing is performed to obtain binary edge maps from four perspectives. And binary edge maps from four perspectives. Perform non-maximum suppression of 3×3 pixels to eliminate isolated noise points with a width of less than 2 pixels in the binary edge image, and then perform opening and closing operations of 5×5 pixels to enhance the edge continuity of the binary edge image. Based on the maximum value fusion model, and using a binary edge map from four perspectives. Calculate the full-view edge enhancement map ; The full-view edge enhancement map Perform 5×5 pixel Gaussian smoothing until the full-view edge enhancement map is obtained. The edge line width in the image is within the range of 2 to 3 pixels, and the edge enhancement map is automatically filled. The broken lines in the image enhance the edge image from all angles. Perform edge alignment correction and ROI extraction processing.

5. The machine vision-based non-contact optical glass dimension measurement system according to claim 4, characterized in that, The full-view edge enhancement map The calculation formula is as follows: In the formula, Representing pixels Gray values ​​in binary edge maps from four perspectives, and It is either 1 or 0. Represents pixels Binary edge map The edge, Represents pixels Not in binary edge map The edge, Similarly; Represents pixels The grayscale value under the full-view edge enhancement image, and It is either 1 or 0. Represents pixels Edge enhancement map in full view The edge, Represents pixels Edge enhancement image not in full view The edge.

6. The non-contact optical glass dimension measurement system based on machine vision according to claim 1, characterized in that, The process of extracting the curve of the full-view edge enhancement map along the contour direction using a sub-pixel positioning algorithm and then using a curve fitting method to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map specifically includes: Scan the full-view edge enhancement map This will make pixels As the full-view edge enhancement map edge point Summarize all edge points Generate the original set of edge points; Calculate edge points gradient vector at point And perform normalization processing, where, Represents edge points The horizontal gradient vector at that point; Represents edge points The vertical gradient vector at that point; Along the gradient normal direction, grayscale values ​​of three full-view edge enhancement maps are collected at one-pixel steps. The sub-pixel offset is calculated using a one-dimensional parabolic interpolation model. and sub-pixel level edge points ; Summarize all subpixel level edge points Generate a sub-pixel level set of edge points; The subpixel-level edge point set is divided into multiple consecutive subsets based on edge connectivity, and the number of subpixel-level edge points in each subset is greater than or equal to 20. The least squares method is used to fit a quadratic curve based on each subset. And solve for the parameters ; Calculate the average curvature of the quadratic curve. If the average curvature exceeds a preset curvature threshold, subdivide the quadratic curve and refit it to generate a set of piecewise curve parameters. The sub-curves in the segmented curve parameter set are sequentially spliced ​​according to the original edge point order, and cubic spline filtering is performed at the splicing points of each segmented curve to construct a globally smooth curve. Calculate the shortest distance from the sub-pixel level edge point to the global smooth curve, and calculate the corresponding maximum error and root mean square error; If the maximum error exceeds 1 pixel or the root mean square error exceeds 0.3 pixels, then a certain segment of the sub-curve in the piecewise curve parameter set is abnormal. It is necessary to subdivide the quadratic curve and refit it to output the final global smooth curve, that is, the contour curve of the optical glass under test.

7. The machine vision-based non-contact optical glass dimension measurement system according to claim 6, characterized in that, The sub-pixel offset The calculation formula is as follows: The sub-pixel level edge points The calculation formula is as follows: 。 8. The non-contact optical glass dimension measurement system based on machine vision according to claim 1, characterized in that, The process involves using camera intrinsic parameters and rig geometry to transform the coordinates of the profile curve of the optical glass under test from pixel coordinates to spatial coordinates, and then calculating the dimensional parameters of the optical glass under test in the spatial coordinate system, including the glass side length, diagonal length, and cross-sectional thickness. Specifically, this includes: Sampling is performed on the contour curve of the optical glass under test using equal step increments to obtain sampled pixel points. ; The camera intrinsic parameters are set as follows: , , These represent the equivalent focal lengths in the horizontal and vertical directions, respectively. , Let x and y represent the principal point coordinates in the x and y directions, respectively, and let Z be the geometric parameter of the test bench. The sampling pixel points are calculated using the following inverse projection formula. Corresponding spatial coordinates And map it to a spatial coordinate system: Summarize all spatial coordinate points Generate a set of spatial coordinate points, and locate the contour endpoints of the optical glass surface under test within the set of spatial coordinate points. and Relative corner points and Corresponding points on the upper and lower surfaces; Calculate the contour endpoints and The Euclidean distance L between them, which is the side length of the glass: Calculate the relative corner points and The Euclidean distance D between them, i.e., the length of the diagonal: Calculate the height difference in the vertical direction between corresponding points on the upper and lower surfaces, which is the section thickness T.

9. A machine vision-based non-contact dimensional measurement method for optical glass, applied to the machine vision-based non-contact dimensional measurement system for optical glass as described in any one of claims 1-8, characterized in that, The method includes: A transparent, sealed liquid injection tank is set on the measuring platform. A transparent oil liquid matching the refractive index of the optical glass to be tested is injected into the transparent, sealed liquid injection tank. The optical glass to be tested is then immersed in the transparent oil liquid and fixed by a clamp. Four sets of switchable polarization light sources are arranged equidistantly around the transparent sealed liquid injection tank. Each set of switchable polarization light sources is set with different polarization directions. Four sets of polarization illumination states are obtained by switching through filters. In conjunction with a high-resolution industrial camera, four sets of polarization images are simultaneously acquired in sequence under the four sets of polarization illumination states. By applying brightness normalization and background removal algorithms, a true edge priority map is generated by comparing the pixel intensity differences of four sets of polarization images. The real edge priority map is acquired four times in 90-degree increments on a six-degree-of-freedom rotation platform to generate real edge priority maps from four perspectives. Then, image overlay and edge enhancement algorithms are used to merge the real edge priority maps from the four perspectives into a full-view edge enhancement map. A subpixel localization algorithm is used to extract the curve of the full-view edge enhancement map along the contour direction, and a curve fitting method is used to recover the contour curve of the optical glass under test based on the curve of the full-view edge enhancement map. Using camera intrinsic parameters and test bench geometry parameters, the coordinates of the contour curve of the optical glass under test are transformed from pixel coordinates to spatial coordinates, and the dimensional parameters of the optical glass under test, including glass side length, diagonal length and cross-sectional thickness, are calculated in the spatial coordinate system. The dimensional parameters of the optical glass under test are compared with the standard dimensional parameters. If the dimensional deviation exceeds a preset threshold, the control parameters of the switchable polarization light source, the high-resolution industrial camera, and the six-degree-of-freedom rotation platform are adaptively adjusted, and the above steps are repeated until the dimensional deviation does not exceed the preset threshold.

Citation Information

Patent Citations

  • Optical device and method for shape and gradient detection and / or measurement and associated device

    CN102124299A

  • Method and system for rapidly measuring thickness of optical glass

    CN118967786A