A digital projection measurement system and method for micro transparent sample detection
By using a digital projection measurement system, combined with multi-mode illumination and a folding optical path design, the problem of insufficient imaging resolution in traditional contact lens inspection equipment has been solved, enabling precise detection of micron-level defects and geometric parameters, thus improving inspection accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SIGMA SQUARES (BEIJING) TECH CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional contact lens inspection equipment suffers from insufficient imaging resolution, blurred edge details, poor illumination uniformity, lack of automatic measurement and calibration mechanisms, low inspection efficiency, and difficulty in meeting the high-precision requirements for micron-level defect and geometric parameter inspection.
A digital projection measurement system is adopted, including an illumination subsystem, an optical path subsystem, an imaging subsystem, a display subsystem, a calibration subsystem, and an interactive control subsystem. Combining multi-mode illumination and a folding optical path design, it achieves high-resolution imaging and automated operation, and integrates multiple algorithms for multi-round measurement.
It enables precise detection of micron-level defects and geometric parameters, significantly improving detection accuracy, efficiency, and reliability, and supports automated processing of various measurement options.
Smart Images

Figure CN121558774B_ABST
Abstract
Description
A digital projection measurement system and method for detecting tiny transparent samples Technical Field
[0001] This application relates to the field of optical measurement technology, specifically a digital projection measurement system and method for detecting tiny transparent samples. Background Technology
[0002] Contact lenses require inspection for micron-level defects (scratches, bubbles) and geometric parameters (diameter, base curve). As medical devices that come into direct contact with the eye, they have extremely high requirements for the precision of geometric parameters, specifically including:
[0003] 1. Diameter measurement: Accuracy requirement ±0.02mm, which affects wearing comfort.
[0004] 2. Edge smoothness: Requires detection of micron-level surface defects.
[0005] 3. Material transparency: Testing for air bubbles and impurities in transparent materials is required.
[0006] Traditional inspection equipment, such as contact lens optical projectors (also known as corneal contact lens optical contour projectors), is specifically designed for inspecting the edges, inclusions, and surface defects of corneal contact lenses. Its principle is optical magnification combined with a projection screen display, and manual comparison with a standard template. However, it suffers from the following main problems: insufficient imaging resolution, blurred edge details; poor illumination uniformity, a single illumination mode (bright field only), and low edge contrast; a complex imaging system structure that is difficult to adapt to industrial inspection needs; and a lack of automatic measurement and calibration mechanisms, resulting in low inspection efficiency and reliance on operator experience.
[0007] Therefore, there is an urgent need for a high-resolution, compact, uniformly illuminated digital imaging system with automatic measurement capabilities. Summary of the Invention
[0008] In view of this, the purpose of this application is to provide a digital projection measurement system and method for detecting tiny transparent samples, so as to solve the problems in the background art.
[0009] To achieve the above objectives, this application adopts the following technical solution:
[0010] This application discloses a digital projection measurement method for detecting tiny transparent samples, comprising:
[0011] An illumination subsystem is used to provide illumination modes for a target type, wherein the illumination modes for the target type include point light source illumination mode, bright field illumination mode, and dark field illumination mode;
[0012] An optical path subsystem is used to converge the light of the target type illumination mode along a preset reflective optical path to the sample;
[0013] An imaging subsystem is used to image the contact lens sample based on light penetrating the sample;
[0014] A display subsystem is used to display images of the contact lens sample and measurement options;
[0015] The verification subsystem is used to verify the presence and clarity of the contact lens sample image.
[0016] An interactive control subsystem is used to extract the positioning features of the contact lens sample image during lens verification and clarity verification, and respond to the measurement options selected by the external user in the current control round. Based on the positioning features, the subsystem performs measurement processing on the contact lens sample image to obtain the measurement result of the current round, and displays the contact lens sample image with the measurement result mark of the current control round based on the display subsystem. The measurement options of the current control round are determined based on the contact lens sample image with the measurement result mark of the previous control round. The measurement options include length measurement, angle measurement, area measurement, and defect extraction.
[0017] In one embodiment of this application, the illumination subsystem includes an LED light source, a variable aperture for limiting the light emitted by the LED light source to provide multiple illumination modes, and an illumination relay lens for projecting the light output by the variable aperture onto the imaging subsystem.
[0018] The LED light source, the variable aperture, and the lighting relay lens are arranged coaxially in sequence.
[0019] In one embodiment of this application, the lighting subsystem further includes a light source aperture, a collimating lens, a relay lens, and a first right-angle refracting prism arranged coaxially in sequence between the LED light source and the variable aperture. The light source aperture is used to limit the emission angle of the LED light source. The collimating lens is used to convert the light output from the light source aperture into parallel light. The relay lens is used to transmit the parallel light to the first right-angle refracting prism. The first right-angle refracting prism is used to refract the horizontal light to the variable aperture in the vertical direction.
[0020] The optical path subsystem includes a transparent sample tray and a second right-angle folding prism. Light from the illumination relay lens passes through the sample tray and is refracted by the second right-angle folding prism to the horizontal imaging subsystem.
[0021] The received light rays of the imaging subsystem are parallel to and opposite in direction to the output light rays of the collimating lens.
[0022] In one embodiment of this application, the verification of the presence and clarity of the contact lens sample image includes:
[0023] The contact lens sample image is preprocessed to obtain a preprocessed image, wherein the preprocessing includes grayscale conversion and filtering;
[0024] Contour features are extracted from the preprocessed image, and the preprocessed image is matched with a pre-constructed empty background image to obtain the matching degree, wherein the matching is a difference operation or a normalized cross-correlation matching;
[0025] Extract the sharpness and roundness of the contour features, wherein the sharpness is calculated based on the edge gradient;
[0026] When the matching degree is greater than a preset matching degree threshold, and the contour features include contours with roundness greater than a preset roundness threshold and sharpness greater than a preset contour sharpness threshold, it is determined whether the contact lens image has been verified through the lens.
[0027] Calculate the gradient sharpness of the preprocessed image Multi-scale Laplacian operator clarity and image entropy clarity ;
[0028] For the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness The sharpness of the preprocessed image is obtained by performing a weighted summation. Among them, clarity The mathematical expression is:
[0029]
[0030] In the formula, Indicates the first weight. Indicates the second weight. Indicates the third weight;
[0031] When the sharpness of the preprocessed image is compared with a preset overall sharpness threshold, the contact lens image is determined to have passed the sharpness check.
[0032] In one embodiment of this application, extracting the localization features of the contact lens sample image includes:
[0033] Obtain the preprocessed image output by the verification subsystem;
[0034] Extract contour features and their dimensions from the preprocessed image, and filter out intermediate contour features whose dimensions are greater than a preset size threshold;
[0035] Calculate the roundness of the intermediate contour features, and take the intermediate contour features with roundness greater than a preset roundness threshold as the target contour features.
[0036] The largest target contour feature is taken as the container contour, and the largest target contour feature within the container contour is taken as the lens outer contour.
[0037] An ellipse is fitted to the outer contour of the lens to obtain an outer ellipse of the lens.
[0038] Extract the center of the outer ellipse of the lens, align the outer ellipse of the lens with a pre-constructed lens outer contour template based on the center, and scale the lens outer contour template so that pixels in the lens outer contour that exceed a preset ratio value coincide with the lens outer contour template.
[0039] The printing area and optical area of the contact lens are extracted based on the overlapped lens outer contour template, and the scaling ratio of the lens outer contour template is used as the basis. Calculate the actual size corresponding to each pixel. The lens outer contour template is pre-marked with the relative positions of the outer contour, printing area, and optical area to the center, and the actual size of each pixel. for:
[0040]
[0041] In the formula, This is the reference size for each pixel of the lens outer contour template when it is not scaled.
[0042] Based on the center of the contact lens, the outer contour of the lens, the printed area, the optical area, and the actual size of the pixel. Construct localization features.
[0043] In one embodiment of this application, when the measurement option is defect extraction, the contact lens sample image is measured based on the positioning features to obtain the measurement result of the current round, including:
[0044] An edge extraction band is obtained by extending the edge of the printed area and the optical area and edge.
[0045] Contour features are extracted from the edge extraction band, and the contour features are filtered to obtain the printing area edge contour and optical area edge contour with a roundness greater than a preset roundness threshold.
[0046] A circularity verification algorithm is performed on the outer contour of the lens, the edge contour of the printing area, and the edge contour of the optical area to obtain edge defect detection results; and based on a pre-built defect extraction module, defect extraction is performed on the contact lens sample image to obtain regional defect detection results for the printing area and the optical area.
[0047] The measurement results for the current round are constructed based on the edge defect detection results and the area defect detection results.
[0048] In one embodiment of this application, a circularity verification algorithm is performed on the outer contour of the lens, the edge contour of the printed area, and the edge contour of the optical area to obtain edge defect detection results, including:
[0049] Multiple sampling rays are generated based on the center of the contact lens, and the intersection points of these sampling rays with the edge contour are extracted to obtain multiple contour sampling points. The edge contour is one of the outer contour of the lens, the edge contour of the printing area, and the edge contour of the optical area.
[0050] Based on the center of the contact lens and multiple contour sampling points Generate multiple radii And record multiple radii length and angle and based on multiple radii length and angle Construct a radius sequence;
[0051] Calculate all lengths within the radius sequence. The standard deviation is calculated to obtain the overall standard deviation; the overall standard deviation is then compared with a preset overall standard deviation threshold.
[0052] When the overall standard deviation is less than or equal to the preset overall standard deviation threshold, the outer contour of the lens is deemed to be qualified; otherwise, the first-order difference sequence of the radius sequence is calculated.
[0053] When there are N consecutive points in the first-order difference sequence whose absolute values are greater than a preset difference threshold, it is determined that the edge contour has a local abrupt defect, and based on the angle... Locate the position of the local mutation defect; otherwise, extract multiple local segments from the radius sequence based on a preset sliding window of multiple widths, and calculate the standard deviation of the radius length within the multiple local segments to obtain the multi-scale local standard deviation.
[0054] The multi-scale standard deviation is compared with a preset local standard deviation threshold. When the multi-scale standard deviation is greater than the preset local standard deviation threshold, it is determined that the edge contour has a local soft-edge defect, and based on the angle... Locate the position of the localized edge defect; otherwise, perform a discrete Fourier transform on the radius sequence to obtain the frequency domain sequence.
[0055] Calculate the ratio of multiple harmonic energies to DC component energy in the frequency domain sequence, and determine whether there is a target harmonic component whose ratio is greater than a preset ratio threshold. If so, determine the overall deformation type of the edge contour based on the target harmonic component. If not, determine that the edge contour has an unknown overall deformation defect.
[0056] In one embodiment of this application, the training method of the defect detection model includes:
[0057] Obtain sample images of contact lenses with defects;
[0058] The contact lens sample images are labeled to obtain training samples, wherein the labeling information includes defect location boxes, defect types, and confidence levels;
[0059] The artificial neural network is trained based on the training samples to obtain a defect detection model.
[0060] In one embodiment of this application, when the measurement option is length measurement, angle measurement, or area measurement, the contact lens sample image is measured based on the positioning features to obtain the measurement result of the current round, including:
[0061] When a measurement line or measurement closed image is received from user input, a pixel length value is output based on the measurement line, and an actual length value is calculated based on the pixel length value and the reference size corresponding to each pixel. Alternatively, a pixel area is output based on the measurement closed image, and an actual area is calculated based on the pixel area and the reference size corresponding to each pixel. The measurement line or measurement closed image is generated based on positioning features or user-defined features.
[0062] When a included angle graphic is received from user input, the included angle corresponding to the included angle graphic is read and output, wherein the included angle graphic is generated based on the positioning feature or is generated by user definition.
[0063] This application also provides a digital projection measurement method for detecting tiny transparent samples, including:
[0064] The contact lens sample image is acquired based on a preset digital projection system, wherein the digital projection system includes an illumination subsystem for providing an illumination mode of the target type, an optical path subsystem for converging the light of the illumination mode of the target type along a preset reflective optical path to the sample, an imaging subsystem for imaging based on the light penetrating the sample to obtain the contact lens sample image, and a display subsystem for displaying the contact lens sample image and measurement options.
[0065] The presence and clarity of the contact lens sample images were verified.
[0066] During lens verification and clarity verification, the positioning features of the contact lens sample image are extracted. In response to the measurement options selected by the external user in the current control round, the contact lens sample image is measured based on the positioning features to obtain the measurement results of the current round. The contact lens sample image with the measurement results of the current control round is displayed based on the display subsystem. The measurement options of the current control round are determined based on the contact lens sample image with the measurement results of the previous control round. The measurement options include length measurement, angle measurement, area measurement, and defect extraction.
[0067] The beneficial effects of this application are as follows: This application discloses a digital projection measurement system and method for detecting tiny transparent samples. The system achieves distortion-free full-field imaging through dual telecentric lenses, and combines multi-mode illumination with a folding optical path design to ensure accurate detection of micron-level defects (such as scratches and bubbles) and geometric parameters (such as diameter and base arc). Simultaneously, it achieves system compactness and automated operation, significantly improving detection accuracy, efficiency, and reliability. Furthermore, the projection measurement system in this application integrates multiple algorithms, enabling multi-round measurements. Each round's measurement request can be generated based on the measurement marks output from the previous round, allowing for flexible and high-precision automated measurement of sample images. Attached Figure Description
[0068] The present application will be further described below with reference to the accompanying drawings and embodiments:
[0069] Figure 1 is a schematic diagram of the structure of a digital projection measurement system for detecting tiny transparent samples according to an embodiment of this application;
[0070] Figure 2 is a diagram of the main optical path configuration in one embodiment of this application;
[0071] Figure 3 is an optimized optical path configuration diagram in one embodiment of this application;
[0072] Figure 4 is a schematic diagram of a variable aperture shown in one embodiment of this application;
[0073] Figure 5 is a schematic diagram of point light source illumination shown in one embodiment of this application;
[0074] Figure 6 is a schematic diagram of a bright field light source illumination shown in one embodiment of this application;
[0075] Figure 7 is a schematic diagram of a dark field light source illumination shown in one embodiment of this application;
[0076] Figure 8 is a schematic diagram of the image operation interaction process in one embodiment of this application;
[0077] Figure 9 is a schematic diagram of the specific process of defect extraction in one embodiment of this application;
[0078] Figure 10 is a schematic flowchart of a straight line measurement in one embodiment of this application;
[0079] Figure 11 is a schematic flowchart of a circular measurement in one embodiment of this application. Detailed Implementation
[0080] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0081] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the layers related to this application and are not drawn according to the actual number, shape and size of the layers in the actual implementation. In the actual implementation, the form, number and proportion of each layer can be arbitrarily changed, and the layer layout may also be more complex.
[0082] Numerous details are explored in the following description to provide a more thorough explanation of embodiments of this application; however, it will be apparent to those skilled in the art that embodiments of this application may be practiced without these specific details.
[0083] Figure 1 is a schematic diagram of a digital projection measurement system for detecting tiny transparent samples according to an embodiment of this application. As shown in Figure 1, the digital projection measurement system for detecting tiny transparent samples according to this application includes an illumination subsystem 100, an optical path subsystem 200, an imaging subsystem 300, a display subsystem 400, a calibration subsystem, and an interactive control subsystem. The illumination subsystem 100, the sample optical path subsystem 200, and the imaging subsystem 300 are arranged in series along the optical axis to form a continuous optical path transmission link from the LED light source to the display screen. The illumination subsystem 100 outputs a uniform or collimated beam, which is modulated by the sample optical path subsystem 200, captured and digitally processed by the imaging subsystem 300, and finally visualized on the image processing and display subsystem 400. The sample is placed on a precision base, which integrates a precision guide rail and a fine-tuning mechanism to ensure that the optical axis concentricity error is less than 0.01° to maintain high-fidelity imaging.
[0084] The principles governing the structure and function of each subsystem are as follows:
[0085] The lighting subsystem 100 is used to provide target-type lighting modes, including point light source lighting mode, bright field lighting mode and dark field lighting mode;
[0086] The illumination subsystem includes an LED light source 101, a variable aperture 102 for limiting the light emitted by the LED light source 101 to provide multiple illumination modes, and an illumination relay lens 107 for projecting the light output by the variable aperture onto the imaging subsystem; the LED light source 101, the variable aperture 102, and the illumination relay lens 107 are arranged coaxially in sequence.
[0087] Specifically, the LED light source 101 is a high-brightness white LED array, installed at the front end of the base frame, providing an initial diverging beam; the variable aperture 102 is installed in front of the lighting relay lens 107, which can realize the switching of lighting modes; the lighting relay lens 107 is composed of a one-piece aspherical lens, located 20mm behind the LED light source 101, and is used to converge the diverging light to the main aperture plane, so as to achieve a beam compression ratio greater than 2:1 and form a uniform light spot with a diameter of 20mm.
[0088] The optical path subsystem 200 is used to converge the light of the target type illumination mode along a preset refracting optical path to the sample;
[0089] The sample optical path subsystem 200 includes a transparent sample tray 201 and a second right-angle folding prism 202. The sample tray 201 uses a Z-axis translation stage supported by a gear guide rail, integrating a quartz glass substrate and an adsorption groove to fix small transparent samples with a diameter of 5-20mm. Dynamic adjustment perpendicular to the optical path direction is achieved by manually turning a knob, thereby completing the system focusing. The second right-angle folding prism 202 is installed on the rear side of the sample tray 201 for optical path reversal, thereby reducing the working distance in the vertical direction. The reflective surface of the second right-angle folding prism 202 is coated with an AR film with a reflectivity greater than 99%. The working distance WD is calculated using the formula WD = L1 + L2, where L1 is the distance from the sample to the prism and L2 is the distance from the camera to the prism. When the measured WD = 150mm, L1 = 110mm, reducing the longitudinal dimension of the system by 42% and reducing the space occupied by approximately 200mm compared to the traditional direct optical path.
[0090] Imaging subsystem 300 is used to image the contact lens sample based on light penetrating the sample;
[0091] The imaging subsystem 300 includes a telecentric lens 301 and an industrial camera 302. The telecentric lens 301 is designed to be telecentric and is installed behind the second right-angle folding prism 202. It is used to eliminate perspective distortion and magnification error, and ensure consistent imaging from the edge to the center of the sample. The industrial camera 302 uses a Sony IMX264 CMOS image sensor with a pixel size of 3.45μm, a resolution of 2464×2056, and 5 million pixels. It is connected to the telecentric lens 301 via a C-Mount interface. The exposure time is adjustable to less than 10ms, and it supports high frame rate acquisition greater than 30fps, achieving an object-space resolution of 3.45μm / 0.55≈6.27μm.
[0092] Display subsystem 400 is used to display images of contact lens samples and measurement options;
[0093] The display subsystem 400 includes an embedded image processing host and a touch screen. The embedded image processing host is based on an ARM series processor and integrates a contour measurement algorithm and an AI defect detection engine for real-time image processing, enabling 15× magnification via a digital magnification link and a screen resolution of approximately 0.1mm. The touch screen is an industrial-grade touchscreen with a resolution of 2440×1920, supports a cross-platform UI, is installed at the host output, and provides multi-scale observation with 0.1-10× zoom and one-click measurement functions, with a pixel-physical mapping error of less than ±0.01mm.
[0094] The verification subsystem is used to verify the presence and clarity of contact lens sample images.
[0095] The interactive control subsystem is used to extract the positioning features of the contact lens sample image when performing lens verification and clarity verification, and respond to the measurement options selected by the external user in the current control round. Based on the positioning features, it performs measurement processing on the contact lens sample image to obtain the measurement results of the current round, and displays the contact lens sample image with the measurement results of the current control round marked by the display subsystem. The measurement options of the current control round are determined based on the contact lens sample image with the measurement results marked by the previous control round. The measurement options include length measurement, angle measurement, area measurement, and defect extraction.
[0096] The aforementioned verification subsystem and interactive control subsystem are both integrated into the image processing host.
[0097] Figure 2 shows the main optical path configuration in one embodiment of this application. This main optical path configuration, as shown in Figure 2, is the key path to achieving compact, high-resolution imaging. Based on the cascaded design of the illumination subsystem 100, it ensures continuous transmission from the light source to the image. The optical path begins with the high-brightness white LED array of the LED light source 101, mounted at the front of the base, providing an initial diverging beam. It then passes through a variable aperture 102, which switches the illumination mode by changing the aperture assembly module. This system is located in front of the illumination relay lens 107, ensuring a soft and uniform beam. The diverging beam enters the illumination relay lens 107, where a one-piece aspherical lens is placed 20mm behind the LED light source 101, converging the beam onto the sample plane to form a uniform spot with a diameter of 20mm.
[0098] The light spot is transmitted along the optical axis to the sample optical path subsystem 200, enters the sample tray 201, and fixes a small transparent sample with a diameter of 5-20 mm on a quartz glass substrate and an adsorption groove. Dynamic focusing is achieved by the gear guide rail of the Z-axis translation stage. After the beam penetrates the sample, it reaches the second right-angle folding prism 202, performing a 90° optical path reversal, thereby reducing the longitudinal dimension of the system by 42% and saving approximately 200 mm of space. The folded parallel beam directly enters the imaging subsystem 300, and is finally captured into a digital image by the industrial camera 302 via the telecentric lens 301. The characteristic of this optical path configuration is that the single folding design combined with the efficient convergence of the aspherical lens forms a simple serial link, significantly reducing the system size and facilitating product application.
[0099] Figure 3 is an optimized optical path configuration diagram in one embodiment of this application. As shown in Figure 3, the optimized lighting subsystem further includes a light source aperture 103, a collimating lens 104, a relay lens 105, and a first right-angle folding prism 106 arranged coaxially in sequence between the LED light source and the variable aperture. The light source aperture 103 is used to limit the emission angle of the LED light source 101. The collimating lens 104 is used to convert the light output from the light source aperture 103 into parallel light. The relay lens 105 is used to transmit the parallel light to the first right-angle folding prism 106. The first right-angle folding prism 106 is used to refract the horizontal light to the vertical variable aperture 102.
[0100] The optimized optical path configuration employs a dual-aperture setup, including a light source aperture 103 located near the light source and a variable aperture 102. The light source aperture 103 controls the effective light source size, determining the numerical aperture of the illumination; the variable aperture 102 controls the illumination mode switching, and the two work together to achieve independent adjustment of illumination parameters.
[0101] Multi-stage lens system: Collimating lens 104 converts the divergent light emitted by LED light source 101 into a parallel beam, ensuring efficient light energy transmission. Relay lens 105 further optimizes the beam characteristics and forms a conjugate imaging relationship with collimating lens 104, projecting the light source image onto the sample plane.
[0102] Dual-folding optical path design: The system includes two right-angled folding prisms. The first folding prism 106 is located behind the relay mirror 105, realizing the folding of the primary optical path; the second folding prism 202 is located behind the sample, completing the secondary folding. This dual-folding design compresses the overall height of the system by more than 50%, achieving a more compact structure.
[0103] In this application, the variable aperture achieves multi-mode illumination through a pull-out structure or a mechanical structure. Different light field modes can be switched using different photolithography components. For example, a transparent aperture in the middle can achieve point light source illumination, a fully transparent aperture can achieve bright field illumination, and an annular aperture can achieve dark field illumination.
[0104] Figure 4 is a schematic diagram of a variable aperture shown in one embodiment of this application. In Figure 4, the variable aperture is in point light source illumination mode, bright field light source illumination mode and dark field light source illumination mode (ring illumination) from left to right.
[0105] Figure 5 is a schematic diagram of point light source illumination in one embodiment of this application. As shown in Figure 5, the focused light spot generates a sharp edge profile through diffraction projection after passing through the sample, which is particularly suitable for measuring the base arc radius. These schematic diagrams use arrows to mark the optical path and feature enhancement regions, verifying the flexibility and superiority of the method.
[0106] Optical Principles and Design: Point light source illumination utilizes a focused spot positioned near the focal plane to output collimated rays (divergence angle < ±2°), as shown in the figure. The dashed ellipse represents the projection area of the beam after passing through the sample. The light source is a high-brightness LED or laser diode, which forms a highly directional beam after being processed by a collimating lens. The sample is placed in the optical path, and the imaging system captures the diffracted or scattered light passing through the sample, highlighting high-contrast features at the edges.
[0107] Technical Features: Due to its extremely small field of view, the point light source provides high-contrast imaging, making it particularly suitable for detecting the edge contours or minute geometric features of contact lenses. The low divergence of the collimated light makes it insensitive to sample position (image quality is maintained even with a deviation of <±1mm), but the brightness is relatively low (<50cd / m²), requiring longer exposure times or increased gain to improve the signal-to-noise ratio. The spot position must be precisely calibrated to the focal plane, with a deviation of <0.1mm to avoid defocusing.
[0108] Application scenarios: Suitable for high-precision edge detection or diffraction feature analysis, especially when it is necessary to quantify edge smoothness (micron-level surface defects), but its ability to detect internal defects is limited.
[0109] Figure 6 is a schematic diagram of a bright field light source illumination in one embodiment of this application. As shown in Figure 6, the full-surface transmission imaging effect is displayed after the sample is illuminated by a large area surface light source, highlighting defects such as internal bubbles.
[0110] Optical Principles and Design: Bright-field illumination employs a large-area surface light source (the light field diameter typically exceeds the sample's field of view, such as 20mm or more). A vertically or near-vertically incident beam (incident angle <10°) illuminates the sample surface, as shown in the figure. The light is uniformly distributed downwards and, after passing through the sample, is captured by the imaging system. The light beam output from the light source is processed by a diffuser lens to ensure light intensity uniformity >95%, forming a basic light field characteristic similar to Kohler illumination. The sample is placed on the stage, and the light passes through the transparent sample to create a full-field illumination imaging effect. The dashed ellipse represents the projection area of the beam on the imaging plane.
[0111] Technical features: This mode provides highly uniform illumination, making it suitable for detecting internal defects in samples (such as bubbles and impurities). However, because the incident light direction is close to the imaging optical path, the edges of transparent samples may become too bright or disappear due to refraction or scattering.
[0112] Application scenarios: Suitable for comprehensive scanning of the internal structure of contact lenses, especially excellent in detecting internal defects or uniformity defects in samples, but has limited ability to distinguish minor edge defects (such as scratches).
[0113] Figure 7 is a schematic diagram of a dark field light source illumination in one embodiment of this application. As shown in Figure 7, the local bright area formed by the bottom ring light source is depicted, the scattered light at the edge of the sample is prominent, and the micron-level scratches are clearly presented, which is suitable for edge smoothness evaluation.
[0114] Optical Principles and Design: Dark-field illumination employs a low-angle incident light source (such as a bottom-mounted ring light source). The light illuminates the sample surface at an angle (typically 15°-30°), as shown in the figure. The dashed lines represent the beam converging laterally to the sample edge and causing scattering. The light source forms a ring-shaped LED array, and the beam is focused by a condenser lens to create a localized bright area. The imaging system captures only the scattered light, rather than directly reflected light, thus highlighting sample edges or uneven surface areas against a dark background.
[0115] Technical features: This mode enhances the scattered signal by suppressing direct light, and the edge contrast can reach >25%, making it particularly suitable for detecting edge defects (such as 5μm scratches or microcracks) in tiny transparent samples.
[0116] Application scenarios: Suitable for edge contour measurement of contact lenses (accuracy ±0.02mm) or surface defect detection. Especially in dark field mode, the diffraction enhancement effect can improve the defect recognition rate to over 90%, making it particularly suitable for industrial quality control.
[0117] The digital projection measurement system for detecting tiny transparent samples disclosed in this application not only provides the aforementioned hardware-level imaging system, but also integrates multiple functions, such as touchscreen-based panning, zooming, measurement, feature localization, and AI-based defect extraction.
[0118] Figure 8 is a schematic diagram of the image operation interaction flow in one embodiment of this application. As shown in Figure 8, the flow begins with the user touching the screen. The system captures a "pointer press" event and records the precise coordinates of the touch point (stored as a Point type). Subsequently, the system checks whether the touch point is located in a menu area, such as the top menu bar (80 pixels high) or the bottom status bar (40 pixels high). If the touch occurs in these menu areas, the event is ignored to prevent accidental triggering of menu functions and ensure that only image-related operations are processed. If the touch point is located in the image area, the system records the point and further determines the number of currently active touch points to determine the interaction mode. If there is only one touch point, the system enters "single-finger mode" to prepare for image translation operations, such as dragging the image to reposition it. If two touch points are detected, the system enters "two-finger mode" to prepare for zoom operations (such as pinch gestures). If there are more than two touch points, the system assigns different subsequent actions to different multi-touch actions. This classification process ensures that touch input is efficient and reliable, supports up to 10-point touch recognition, and maintains low latency (less than 16 milliseconds) to achieve a smooth experience of 60 frames per second. The menu protection mechanism enhances the user experience by preventing accidental triggering of menu controls, making the system more intuitive and accurate in image navigation and measurement tasks.
[0119] The single-finger mode allows users to smoothly move an image view on the screen. The process begins with the user dragging a single finger within the image area, putting the system in "single-finger mode." The system calculates the difference between the current touch position and the previously recorded position to derive a movement vector, handling only significant movements (thresholds exceeding 0.1 pixels) to filter out minor jitter or noise. This vector is then applied to the image's transformation matrix, adjusting the image's X and Y coordinates so that the image follows the finger's movement in real time, resulting in a smooth dragging effect. The system updates the image position in the controls, re-rendering to reflect the new position, while simultaneously optimizing performance by checking the change threshold to avoid unnecessary redraws. If currently in measurement mode, the system synchronously updates the measurement layer to ensure that measurement labels (such as line segments or points) maintain consistent relative positions as the image moves. The coordinate system (whether edge, center, or actual coordinate mode) is also refreshed to adapt to the new image position, ensuring coordinate consistency for the measurement task. When the user lifts their finger, the process ends, and the system can optionally add an inertial scrolling effect to simulate natural gliding inertia. This panning mechanism supports high responsiveness (latency less than 16 milliseconds), meets the rendering target of 60 frames per second, and is suitable for browsing large images, providing a smooth and accurate experience.
[0120] The two-finger mode is a key feature supporting multi-scale image observation, ensuring smooth and precise zooming operations. The process begins with the system detecting two simultaneous touch points and entering "pinch mode." The system calculates the distance between the two fingers using their coordinates, establishing a baseline for the pinch gesture. The zoom center is set at the midpoint between the two fingers, ensuring the image is zoomed around the user's focus. Next, the system calculates the zoom ratio by comparing the current distance between the fingers to the initial distance and adjusts the ratio using adaptive sensitivity: when the zoom ratio is less than 0.5x, the sensitivity increases by 1.2x; between 0.5x and 2x, standard sensitivity is maintained; and between 2x and 5x, the sensitivity decreases to 0.8x or 0.6x to prevent over-scaling. The system also checks if the zoom ratio exceeds a threshold (e.g., 0.01), ignoring minor changes to avoid jitter. If the change is significant, the system performs a zoom operation: applying adaptive sensitivity, limiting the zoom range (typically 0.5x to 5x), applying the zoom transformation to the image, and updating the user interface, including the zoom slider and coordinate display, ensuring synchronized adjustment of the measurement overlay and ruler. This process maintains focus through precise zoom center calculations, supporting a real-time, lag-free zoom experience (60 frames per second), which is crucial for optical systems requiring detailed inspection and measurement.
[0121] The intelligent zoom switching mechanism supports quick switching between predefined zoom levels (0.5x, 1x, 2x) for efficient image observation. The process begins with the user clicking the zoom button on the SimpleZoomSlider control. The system first checks the current zoom level based on the ScaleMode enumeration (actual pixel 1:1 or screen fit). Based on the current magnification, the system cycles through the zoom levels in a preset order: from 1x (actual pixels) to 2x (double magnification), from 2x to 0.5x (half magnification), or from 0.5x back to 1x, forming a convenient cyclic switching mechanism. For each target zoom level, the system calculates the required zoom parameters and adaptively adjusts them in conjunction with the monitor's DPI to ensure true 1:1 pixel mapping at 1x zoom. The calculated transformation is then applied to the image, resizing it while maintaining the focus center, and optimizing performance by updating only when the zoom change is significant (exceeding 0.001). The user interface updates accordingly, including the zoom slider status, measurement overlay, and coordinate rulers (supporting edge, center, or actual coordinate modes) to maintain measurement accuracy. Finally, the system displays updated image information, such as the current zoom level and estimated measurement accuracy, providing immediate feedback. This process complements pinch zoom, offering a convenient, button-driven option for users who require quick and precise zoom adjustments, making it particularly suitable for precision observation scenarios.
[0122] The measurement and defect extraction functions of this application will be described below in conjunction with specific measurement scenarios. When using the projection measurement system of this application to perform measurement and defect extraction functions, the general process includes verification, feature extraction, interaction, and execution of the measurement function. The specific process is as follows:
[0123] (1) Verification
[0124] The verification process mainly includes lens presence verification and sharpness verification. Lens presence verification primarily checks whether the contact lens to be tested is correctly placed in the sample tray, avoiding the execution of subsequent complex and unnecessary analysis algorithms on trays that are "empty" or "severely abnormal." Sharpness verification checks the sharpness of the image. In some cases, if there are stains on the lens or it cannot focus correctly, it will affect the sharpness of the image. The verification process includes:
[0125] Are the lenses verified?
[0126] (1-1) The contact lens sample image is preprocessed to obtain a preprocessed image, wherein the preprocessing includes grayscale conversion and filtering;
[0127] (1-2) Extract contour features from the preprocessed image and match the preprocessed image with a pre-constructed empty background image to obtain the matching degree, wherein the matching is a difference operation or a normalized cross-correlation matching;
[0128] In the preprocessed image, points with abrupt changes in brightness are found using edge detection operators (such as Canny), and these points are connected to form the boundary contours of the objects.
[0129] Background matching compares the current preprocessed image with a pre-captured background image of an empty tray. This application provides difference-based matching and normalized correlation matching.
[0130] Taking difference operations as an example, difference operations directly perform pixel-level subtraction between two images: , Represents a difference image. Indicates the preprocessed image. This represents an empty background image. The obtained areas with lenses will produce a large difference. If the matching degree is extremely high (the difference value is very small or NCC is close to 1), it means that the current image is almost identical to the empty background, and it can be immediately determined as "no lens", and the process will terminate, saving a lot of computing power.
[0131] Normalized cross-correlation (NCC) calculates the similarity coefficient between two images, with values ranging from -1 to 1, where 1 indicates complete similarity. The presence of lenses reduces the overall similarity.
[0132] (1-3) Extract the sharpness and roundness of the contour features, wherein the sharpness is calculated based on the edge gradient;
[0133] On the extracted contour line, calculate the gradient magnitude (i.e., how "steep" the edge) at each contour point, and then take the average or median. A sharp contour has a high and uniform edge gradient.
[0134] (1-4) When the matching degree is greater than the preset matching degree threshold, and the contour feature contains a contour with a roundness greater than the preset roundness threshold and a sharpness greater than the preset contour sharpness threshold, it is determined whether the contact lens image has been verified by the lens.
[0135] This is a logical AND condition. It must simultaneously satisfy: ① a high degree of matching; ② the existence of an outline whose shape is sufficiently round and whose edges are sufficiently sharp.
[0136] The above process, through joint judgment based on multiple conditions, greatly reduces the probability of misjudgment based on a single feature. For example, relying solely on the matching degree might lead to being fooled by a fixed water stain on a tray; relying solely on the outline might lead to misjudging a circular stain as a lens. Combining the two increases reliability significantly.
[0137] Sharpness check
[0138] The core objective of this stage is to quantitatively evaluate the image sharpness from a global perspective of the entire imaging scene, ensuring that the optical imaging system is in optimal working condition (accurate focus, no serious smudges), and providing quality assurance for all subsequent algorithms based on image details.
[0139] (1-5) Calculate the gradient sharpness of the preprocessed image. Multi-scale Laplacian operator clarity and image entropy clarity ;
[0140] Sharpness Gradient (FTenengrad): Calculates the gradient of an image in the x and y directions based on the Sobel operator, and then sums the squares. A sharp image has rich and sharp edges, and its total gradient magnitude will be large.
[0141] Multi-scale Laplacian sharpness: The Laplacian operator is an approximation of the second derivative of an image, highlighting areas with rapidly changing gray levels. The multi-scale version applies the operator at different scales (with varying degrees of Gaussian blur) and sums the results, providing a more robust evaluation of sharpness for features of different coarseness.
[0142] Image entropy (FEntropy): Image entropy is an information theory measure that reflects the randomness (information content) of gray-level distribution in an image. ,in It represents the probability of gray level i. A well-focused image has rich texture details, a more dispersed gray level distribution, and a higher entropy value.
[0143] (1-6) Regarding the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness The sharpness of the preprocessed image is obtained by performing a weighted summation. Among them, clarity The mathematical expression is:
[0144]
[0145] In the formula, Indicates the first weight. Indicates the second weight. Indicates the third weight;
[0146] The three sharpness evaluation indicators are weighted and summed to obtain the comprehensive sharpness evaluation index. The goal is to maximize the distinguishability of the comprehensive index F across different types of sharp / blurry samples.
[0147] (1-7) When comparing the sharpness of the preprocessed image with the preset overall sharpness threshold, the contact lens image is determined to pass the sharpness check.
[0148] The above verification process first performs a fast, low-cost check (presence / absence) to filter out the most obvious non-compliance cases; then it performs a more refined and comprehensive check (clarity) to ensure input quality. This avoids "garbage in, garbage out," improving the overall system efficiency and stability.
[0149] Whether combining matching degree, circularity, and sharpness in the "presence / absence" judgment, or integrating gradient, Laplace, and entropy in the "sharpness" evaluation, both significantly improve the robustness and anti-interference ability of the system and reduce the false alarm rate and false negative rate.
[0150] (2) Localization feature extraction
[0151] After verification, the acquired images can be used in subsequent measurement and defect extraction processes. However, this application provides interactive functionality via a touchscreen, allowing staff to interact with the system and perform measurements on areas / features of interest. Therefore, it is necessary to extract localization features from the acquired images to provide a basis for staff to select areas / features of interest. The specific process includes:
[0152] (2-1) Obtain the preprocessed image output by the verification subsystem;
[0153] This process directly reuses the image output from the lens verification stage, which has already undergone grayscale conversion and filtering. This ensures data source consistency and processing efficiency.
[0154] (2-2) Extract contour features and the size of contour features from the preprocessed image, and filter out intermediate contour features whose size is greater than a preset size threshold;
[0155] Edge detection and contour finding algorithms (such as findContours) are used to identify all closed boundaries in the image. The area of the contour is then calculated as its size. Contours with a size greater than a preset threshold are retained. This threshold should be set to filter out interference such as small bubbles, tiny stains, and image noise, while retaining the main objects such as the tray structure and the lens itself.
[0156] (2-3) Calculate the roundness of the intermediate contour features, and take the intermediate contour features with roundness greater than the preset roundness threshold as the target contour features.
[0157] The principle of roundness extraction is the same as before. By setting a high roundness threshold (e.g., >0.85), only outlines with shapes that are close to circles are retained.
[0158] (2-4) Take the largest target contour feature as the container contour, and take the largest target contour feature within the container contour as the lens outer contour;
[0159] This method does not rely on fixed colors or absolute sizes, but instead uses the relative spatial and dimensional relationships between the "container and the contained object" for reasoning, making it highly adaptable and robust. The algorithm logic remains effective even when the tray is changed to a different size.
[0160] (2-5) Perform ellipse fitting on the outer contour of the lens to obtain the outer ellipse of the lens;
[0161] Because the lens may be tilted or slightly deformed, its projection is not a perfect mathematical circle. A least-squares ellipse fitting algorithm is used to fit the pixel set of the lens's outer contour to obtain an optimal ellipse equation. This ellipse represents the geometric model of the lens's outer ring.
[0162] Compared to directly using extracted pixel contours, the fitted ellipse is a smooth, continuous mathematical model that provides precise parameters such as center coordinates, major and minor axes, and tilt angles, eliminating the jaggedness and irregularities of pixel-level contours. The center of the circle is stable and unique, making it an ideal anchor point for subsequent template alignment.
[0163] (2-6) Extract the center of the outer circle ellipse of the lens, align the outer circle ellipse of the lens with the pre-constructed outer contour template of the lens based on the center, and scale the outer contour template of the lens so that the pixels in the outer contour of the lens that exceed the preset ratio value coincide with the outer contour template of the lens.
[0164] Align the center point of the pre-made lens outline template (an ideal circle) with the center point of the ellipse obtained in step (2-5) with the center point of the template marked with standard areas.
[0165] While maintaining center alignment, scale the template proportionally to achieve optimal overlap between the template outline and the actual extracted lens outline (e.g., setting a condition that more than 90% of the outline pixels fall within the tolerance range of the template outline). Record the scaling ratio. .
[0166] (2-7) Extract the printing area and optical area of the contact lens based on the overlapped lens outer contour template, and based on the scaling ratio of the lens outer contour template. Calculate the actual size corresponding to each pixel. The lens outer contour template is pre-marked with the relative positions of the outer contour, printing area, and optical area to the center, and the actual size of each pixel. for:
[0167]
[0168] In the formula, This is the reference size for each pixel of the lens outer contour template when it is not scaled.
[0169] The outer contour template of the lens is pre-marked with the relative positional relationship between the outer contour, the printing area, the optical area and the center. After the center is located, the printing area and the optical area of the contact lens can be extracted from the image based on the relative positional relationship.
[0170] There's no need to retrain or annotate functional areas for each image. The one-time template annotation knowledge can be reused for the detection of all similar lenses, greatly improving deployment efficiency.
[0171] (2-8) Based on the center of the contact lens, the outer contour of the lens, the printing area, the optical area, and the actual size corresponding to the pixel. Construct localization features.
[0172] In addition, all the key information obtained from the above steps—center point coordinates, lens outer contour (ellipse parameters), the contours of the printing area and optical area, and the pixel-to-physical size conversion factor Spixel—are encapsulated into a structured data set, namely, the positioning features.
[0173] (3) Interaction and execution measurement
[0174] In this application, interaction and measurement are performed based on the positioning features extracted above. Figure 9 is a schematic diagram of the specific process of defect extraction in one embodiment of this application. As shown in Figure 9, using an optimized ellipse fitting algorithm (especially for transparent materials), the system extracts data from the boundary points. The center of the circle is set as the centroid of the fitted circle mentioned above, and the radius is calculated by the average distance from the boundary points to the center of the circle, ensuring pixel-level accuracy. Then, based on the type of the defect, a measurement algorithm / AI-based detection algorithm is selected from the algorithm factory. The specific process is as follows:
[0175] (3-1) When the measurement option is defect extraction, the contact lens sample image is measured and processed based on the positioning features to obtain the measurement results for the current round, including:
[0176] (3-1-1) Based on the edge of the printed area and the optical area and edge, an edge extraction band is obtained;
[0177] Using the original contours of the printing and optical areas as a baseline, a strip-shaped region is formed through bidirectional offset expansion. The actual boundary contour between the printing and optical areas is extracted from this strip-shaped region.
[0178] (3-1-2) Extract contour features from the edge extraction band and filter the contour features to obtain the printing area edge contour and optical area edge contour with a roundness greater than a preset roundness threshold;
[0179] The principles of contour extraction and filtering are as described above.
[0180] (3-1-3) Perform a circularity verification algorithm on the outer contour of the lens, the edge contour of the printing area and the edge contour of the optical area to obtain the edge defect detection results; and extract defects from the contact lens sample image based on the pre-built defect extraction module to obtain the regional defect detection results of the printing area and the optical area.
[0181] In conventional testing, this application provides an image recognition algorithm based on multi-light field images and an AI-based automatic recognition algorithm. The execution process of the image recognition algorithm based on multi-light field images is as follows:
[0182] (3-1-3a-1) Generate multiple sampling rays based on the center of the contact lens, and extract the intersection points of the multiple sampling rays with the edge contour to obtain multiple contour sampling points. The edge contour is one of the outer contour of the lens, the edge contour of the printing area, and the edge contour of the optical area.
[0183] Using the center of the contact lens as the pole, equal angular intervals are formed within the range of 0° to 360° (e.g. =1°) emits 360 rays. Each ray is geometrically intersected with the target edge contour (outer edge of the lens, edge of the printed area, or edge of the optical area) to obtain the coordinates of the intersection point. Since the contours are discrete points at the pixel level, angle tolerance matching or line segment intersection algorithms are actually used.
[0184] (3-1-3a-2) Based on the center of the contact lens and multiple contour sampling points Generate multiple radii And record multiple radii length and angle and based on multiple radii length and angle Construct a radius sequence;
[0185] Calculate each intersection point The Euclidean distance to the center point is used as the radius value. Record the corresponding lengths in angular order. and angle To form an ordered sequence This sequence essentially describes the radial distance function of the contour. Furthermore, converting two-dimensional contour analysis into one-dimensional signal analysis greatly simplifies subsequent processing complexity.
[0186] (3-1-3a-3) Calculate all lengths within the radius sequence. The standard deviation is calculated to obtain the overall standard deviation; the overall standard deviation is then compared with a preset overall standard deviation threshold.
[0187] Calculate the standard deviation of all samples in the radius sequence. Standard deviation is a classic statistic for measuring the dispersion of data. For a perfect circle, all radii are equal. =0. The threshold T1 is set based on the process-allowed tolerance (e.g., 1 / 4 of the diameter tolerance). If If T1 is less than or equal to 1, the contour is directly deemed acceptable.
[0188] (3-1-3a-4) When the overall standard deviation is less than or equal to the preset overall standard deviation threshold, the outer contour of the lens is deemed to be qualified; otherwise, the first-order difference sequence of the radius sequence is calculated.
[0189] When the overall standard deviation exceeds the limit, calculate the first difference of the radius sequence. Difference operations are essentially discrete differentiation, reflecting the local rate of change of the profile. When dealing with the continuity of a circle, the last difference point is calculated. (Angle mode processing required). Sharp defects (such as burrs and notches) will cause the difference value to increase sharply because the radius changes drastically within a very small angle. Positive differences correspond to convexity (sudden increase in radius), and negative differences correspond to concavity (sudden decrease in radius), providing information on the polarity of the defect.
[0190] (3-1-3a-5) When there are N consecutive points in the first-order difference sequence whose absolute values are greater than a preset difference threshold, it is determined that the edge contour has a local abrupt defect, and based on the angle... Locate the position of the local mutation defect; otherwise, extract multiple local segments from the radius sequence based on a preset sliding window of multiple widths, and calculate the standard deviation of the radius length within the multiple local segments to obtain the multi-scale local standard deviation.
[0191] Set the difference threshold (Usually based on a statistical distribution of normal fluctuations, such as 3x MAD). Scan the difference sequence to detect whether there are N consecutive points (usually N=2~3) where the absolute value of the difference exceeds [a certain threshold]. If a defect is detected, it is identified as a localized abrupt defect, and the defect location is determined based on the angular range of these points. The number of consecutive points is related to the angular span of the defect, which can roughly estimate the size and location of the defect.
[0192] (3-1-3a-6) The multi-scale standard deviation is compared with a preset local standard deviation threshold. When the multi-scale standard deviation is greater than the preset local standard deviation threshold, it is determined that the edge contour has a local soft-edge defect, and based on the angle... Locate the position of the localized edge defect; otherwise, perform a discrete Fourier transform on the radius sequence to obtain the frequency domain sequence.
[0193] If no abrupt change is detected, the radius sequence is traversed using multiple sliding windows of different widths (e.g., 10°, 30°, 60°). The local standard deviation of the radius values within each window is calculated. Where w is the window width, The angle is the center angle of the window. With preset threshold Compare, The width is usually increased appropriately as the window size increases.
[0194] Small windows detect small-scale, gradually changing defects (such as tiny bumps), while large windows detect large-scale deformations (such as compression depressions). Local standard deviation directly measures the intensity of profile fluctuations within the neighborhood of that angle. The difference value of locally gradually changing defects may be small, but the local standard deviation will increase significantly, thus complementing the detection of abrupt defects.
[0195] (3-1-3a-7) Calculate the ratio of multiple harmonic energies to DC component energies in the frequency domain sequence, and determine whether there is a target harmonic component with a ratio greater than a preset ratio threshold. If so, determine the overall deformation type of the edge contour based on the target harmonic component. If not, determine that the edge contour has an unknown overall deformation defect.
[0196] Performing a DFT on the radius sequence yields its frequency domain representation. Calculate the energy of each harmonic. (k≥1) and DC component energy ratio Check if there is Exceeding the threshold (e.g., 0.05). If present, the overall deformation type is determined based on the harmonic order: k=2 indicates elliptical deformation, k=3 indicates triangular deformation, k=4 indicates quadrilateral deformation, etc.
[0197] Specific harmonic dominance corresponds to specific geometric deformation modes, directly pointing to the root cause of process problems (such as mold ellipticity, uneven injection pressure). Harmonic energy ratio It provides a precise numerical measure of deformation strength, facilitating the setting of objective acceptance criteria. If there are no significant harmonics but the overall standard deviation is still large, it can be classified as "irregular overall deformation," indicating that the detection model may need to be updated or non-standard process issues need to be investigated.
[0198] AI-based defect extraction algorithms include:
[0199] (3-1-3b-1) Model Training
[0200] Acquire sample images of contact lenses with defects; annotate the sample images to obtain training samples, wherein the annotation information includes defect localization boxes, defect types, and confidence levels; train an artificial neural network based on the training samples to obtain a defect detection model.
[0201] The defect detection model in this application demonstrates superior performance for various defect types, including scratches, bubbles, impurities, and printing defects. For high-precision defects such as edge deformation, breakage, and protrusions, the (3-1-a) algorithm is used for detection. For various types of low-to-medium precision defects in different areas of the contact lens, an AI model is employed for detection. In this application, a Faster R-CNN model is trained to detect defects; the Faster R-CNN model can directly output bounding boxes and categories.
[0202] (3-1-3b-2) Defect Identification
[0203] The image is input into the defect detection model to obtain the defect recognition result.
[0204] Finally, the defects extracted above are encapsulated as data: the measurement results (center, radius) and defect results (bounding box, category) are encapsulated as structured data; and the pixel-level dimensions are converted into actual physical dimensions (e.g., mm).
[0205] Results Display: The detection results (such as size values and defect locations) are displayed on the UI interface, and annotations (such as circular boundaries and defect boxes) are overlaid on the image for easy viewing by users.
[0206] (3-2) When the measurement option is length measurement, angle measurement, or area measurement, the contact lens sample image is measured and processed based on the positioning features to obtain the measurement results for the current round, including:
[0207] (3-2-1) When a measurement line or measurement closed image is received from the user input, the pixel length value is output based on the measurement line, and the actual length value is calculated based on the pixel length value and the reference size corresponding to each pixel point; or, the pixel area is output based on the measurement closed image, and the actual area is calculated based on the pixel area and the reference size corresponding to each pixel point, wherein the measurement line or measurement closed image is generated based on positioning features or user-defined generation;
[0208] (3-2-2) When the included angle graphic is received from the user input, the included angle corresponding to the included angle graphic is read and output, wherein the included angle graphic is generated based on the positioning feature or is generated by the user.
[0209] The above interaction is based on the actual size of the pixel obtained in steps (2-7). Through this conversion factor, any geometric operation in the image pixel space (drawing lines, circling areas, determining angles) can be converted into real-world physical dimensions (such as millimeters, degrees, square millimeters) in real time and with high accuracy, realizing what you see is what you measure.
[0210] For example, the system can automatically generate standard measurement patterns based on extracted features (such as the lens center, outer edge, and printing area boundary). For instance, it can automatically generate a diameter line passing through the center or select the entire optical area. Users can freely draw line segments (to measure the distance between two points) or depict a closed area (such as an irregular defect area) via the touchscreen.
[0211] Figure 10 is a schematic flowchart of a straight line measurement in one embodiment of this application. As shown in Figure 10, the process begins with the user touching the screen in measurement mode, setting the starting point of the line segment (which can be a custom starting point or an automatically picked feature point). The system initializes a straight line measurement object and uses an interpolation algorithm to precisely locate the starting point to the sub-pixel level (accuracy up to 0.01 pixels). The system displays a touch indicator, including an orange semi-transparent circle (located 60 pixels above the touch point to avoid obscuring the finger), a red precision point marker (indicating the sub-pixel position), and a real-time coordinate display, providing intuitive feedback. When the user drags their finger, the system dynamically updates the endpoint and previews the line segment in real time. The user touches (releases) the screen a second time to fix the endpoint (which can be a custom endpoint or an automatically picked feature point), again precisely locating it to the sub-pixel level. The system then calculates the line segment length, derives the pixel distance using the Euclidean distance formula between the starting and ending points, and then uses a calibrated... Converted to physical dimensions (e.g., millimeters). Accuracy verification ensures measurement errors are within ±0.01 millimeters, and error analysis ensures reliability. The final measurement results are displayed on the overlay, including line segments, labels, and accuracy estimates. Users can choose to save or repeat the measurement.
[0212] Figure 11 is a schematic flowchart of circular measurement in one embodiment of this application. As shown in Figure 11, the process begins with the user dragging their finger to define or select a circular area in circular measurement mode. When defining a circular area, the system tracks the boundary points in real time. Utilizing an optimized ellipse fitting algorithm (especially for transparent materials), the system extracts data from the boundary points and uses a three-point circle determination algorithm to calculate the center and radius using the least squares method, achieving sub-pixel accuracy. The center is defined as the centroid of the fitted circle, and the radius is calculated using the average distance from the boundary points to the center, ensuring pixel-level accuracy. The diameter is doubled by the radius and converted to physical units (e.g., millimeters, calibrated based on the measurement factor). Subsequently, the system calculates the circumference (π multiplied by the diameter) and area (π multiplied by the square of the radius), providing complete geometric information. The measurement result is displayed on the measurement layer as an annotated arc, including the diameter, circumference, area, and accuracy estimate (repeatability up to ±0.005 mm). The process integrates AI-driven edge detection to optimize boundary point selection and multi-point calibration to ensure accuracy under different conditions, making it particularly suitable for complex measurements of optical components or transparent materials. At the end of the process, users can save the results or perform additional verification to ensure reliability in sophisticated applications.
[0213] This application provides a wealth of measurement tools and processing logic for multi-round measurements. Each round of measurement requests can be generated based on the measurement markers output from the previous round. Below, this embodiment uses a specific scenario to illustrate the operator's role in multi-round measurements of an irregular defect:
[0214] Round 1: Initial identification and marking of defective areas
[0215] The operator receives a suspected defect (such as an irregular blemish) extracted from the AI model on the touchscreen. Using a custom closed region tool, the operator roughly outlines the defect (such as a polygon).
[0216] The system calculates and displays the pixel area of the closed region he drew, and then... This is converted to an actual area (e.g., 0.02 square millimeters). Simultaneously, the system records this enclosed area as "Measurement Mark 1" and displays it on the image.
[0217] Round Two: Measuring the maximum size of the defect
[0218] The operator felt that knowing only the area was not enough; they also wanted to know the location of the defect and its maximum span (longest diameter).
[0219] Choose to use the custom line segment tool to draw the longest line segment within the defect area (from one side of the defect to the other). Since the defect shape is irregular, manual drawing may be inaccurate. Therefore, it can utilize the closed region obtained in the previous round (measurement mark 1) to generate the longest line segment. The system can provide the function of generating measurements based on the previous round of marks. For example, it can automatically calculate the minimum bounding rectangle of the closed region and then take the longer side of the rectangle as the measurement line segment; or calculate the longest chord within the region (by calculating the maximum distance between any two points within the region).
[0220] After the system generates this line segment, it calculates the actual length of the line segment (e.g., 0.2 mm).
[0221] Then, select angle measurement and distance measurement. First, construct a line segment using the center of the smallest bounding rectangle as the starting point and the pre-extracted center of the contact lens as the ending point. Calculate the distance between the line segments and extract the angle between the line segment and the preset baseline. Represent the defect coordinates using the angle and distance.
[0222] Each round of measurements can generate new measurements based on the measurement markers from the previous round (such as closed areas, line segments, points, etc.). In this way, operators can progressively deepen their analysis without having to start from scratch each time.
[0223] The system needs to record the measurement requests, measurement markers, and measurement results for each round, and be able to backtrack and modify them at any time. This embodiment demonstrates the flexibility and power of the multi-round measurement capabilities of this application: from initial discovery to gradual deepening, each round can utilize information from the previous round, making the measurements increasingly accurate and the information increasingly rich.
[0224] This application discloses a digital projection measurement system for the inspection of tiny transparent samples. This system achieves distortion-free full-field imaging through dual telecentric lenses, and combines multi-mode illumination with a folding optical path design to ensure accurate detection of micron-level defects (such as scratches and bubbles) and geometric parameters (such as diameter and base arc). Simultaneously, it achieves system compactness and automated operation, significantly improving detection accuracy, efficiency, and reliability. Furthermore, the projection measurement system integrates multiple algorithms, enabling multi-round measurements. Each round's measurement request can be generated based on the measurement marks output from the previous round, allowing for flexible and high-precision automated measurement of sample images.
[0225] This application also provides a digital projection measurement method for detecting tiny transparent samples, including:
[0226] The contact lens sample image is acquired based on a preset digital projection system, wherein the digital projection system includes an illumination subsystem for providing an illumination mode of the target type, an optical path subsystem for converging the light of the illumination mode of the target type along a preset reflective optical path to the sample, an imaging subsystem for imaging based on the light penetrating the sample to obtain the contact lens sample image, and a display subsystem for displaying the contact lens sample image and measurement options.
[0227] The presence and clarity of the contact lens sample images were verified.
[0228] During lens verification and clarity verification, the positioning features of the contact lens sample image are extracted. In response to the measurement options selected by the external user in the current control round, the contact lens sample image is measured based on the positioning features to obtain the measurement results of the current round. The contact lens sample image with the measurement results of the current control round is displayed based on the display subsystem. The measurement options of the current control round are determined based on the contact lens sample image with the measurement results of the previous control round. The measurement options include length measurement, angle measurement, area measurement, and defect extraction.
[0229] This application discloses a digital projection measurement method for detecting tiny transparent samples. This method achieves distortion-free full-field imaging through dual telecentric lenses, combined with multi-mode illumination and a folding optical path design, ensuring accurate detection of micron-level defects (such as scratches and bubbles) and geometric parameters (such as diameter and base arc). Simultaneously, it achieves system compactness and automated operation, significantly improving detection accuracy, efficiency, and reliability. Furthermore, the projection measurement system integrates multiple algorithms, enabling multi-round measurements. Each round's measurement request can be generated based on the measurement marks output from the previous round, allowing for flexible and high-precision automated measurement of sample images.
[0230] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0231] The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory so that the terminal performs any of the methods in this embodiment.
[0232] As will be understood by those skilled in the art, the computer-readable storage medium described in this embodiment allows for the implementation of all or part of the steps in the above method embodiments by computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0233] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic terminal performs the steps of the above method.
[0234] In this embodiment, the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0235] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0236] In the above embodiments, although the present application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. The embodiments of the present application are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims.
[0237] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A digital projection measurement system for detecting tiny transparent samples, characterized in that, include: The system includes: an illumination subsystem for providing illumination modes for a target type, including point light source illumination, bright field illumination, and dark field illumination; an optical path subsystem for converging the light from the target type illumination modes along a preset reflective optical path onto the sample; an imaging subsystem for imaging based on the light penetrating the sample to obtain an image of the contact lens sample; a display subsystem for displaying the contact lens sample image and measurement options; a verification subsystem for verifying the presence and clarity of the contact lens sample image; and an interactive control subsystem for controlling the interaction between the lens and the sample. With or without verification and clarity verification, the positioning features of the contact lens sample image are extracted, and in response to the measurement options selected by the external user in the current control round, the contact lens sample image is measured based on the positioning features to obtain the measurement results of the current round. The contact lens sample image with the measurement results of the current control round is displayed based on the display subsystem. The measurement options of the current control round are determined based on the contact lens sample image with the measurement results of the previous control round. The measurement options include length measurement, angle measurement, area measurement, and defect extraction.
2. The digital projection measurement system for detecting tiny transparent samples according to claim 1, characterized in that, The illumination subsystem includes an LED light source, a variable aperture for limiting the light emitted by the LED light source to provide multiple illumination modes, and an illumination relay lens for projecting the light output by the variable aperture onto the imaging subsystem; the LED light source, the variable aperture, and the illumination relay lens are arranged coaxially in sequence.
3. The digital projection measurement system for detecting tiny transparent samples according to claim 2, characterized in that, The illumination subsystem further includes a light source aperture, a collimating lens, a relay lens, and a first right-angle reflecting prism arranged coaxially in sequence between the LED light source and the variable aperture. The light source aperture is used to limit the emission angle of the LED light source. The collimating lens is used to convert the light output from the light source aperture into parallel light. The relay lens is used to transmit the parallel light to the first right-angle reflecting prism. The first right-angle reflecting prism is used to refract the horizontal light to the variable aperture in the vertical direction. The optical path subsystem includes a transparent sample tray and a second right-angle reflecting prism. Light from the illumination relay lens passes through the sample tray and is refracted by the second right-angle reflecting prism to the imaging subsystem in the horizontal direction. The received light of the imaging subsystem is parallel to and opposite in direction to the output light of the collimating lens.
4. The digital projection measurement system for detecting tiny transparent samples according to claim 1, characterized in that, The process of verifying the presence and sharpness of the contact lens sample image includes: preprocessing the contact lens sample image to obtain a preprocessed image, wherein the preprocessing includes grayscale conversion and filtering; extracting contour features from the preprocessed image and matching the preprocessed image with a pre-constructed empty background image to obtain a matching degree, wherein the matching is a difference operation or normalized cross-correlation matching; extracting the sharpness and roundness of the contour features, wherein the sharpness is calculated based on edge gradient; determining that the contact lens sample image passes the lens presence verification when the matching degree is greater than a preset matching degree threshold and the contour features contain contours with roundness greater than a preset roundness threshold and sharpness greater than a preset contour sharpness threshold; and calculating the gradient sharpness of the preprocessed image. Multi-scale Laplacian operator clarity and image entropy clarity ; regarding the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness The sharpness of the preprocessed image is obtained by performing a weighted summation. Among them, clarity The mathematical expression is: In the formula, Indicates the first weight. Indicates the second weight. The third weight is indicated; when the sharpness of the preprocessed image is compared with the preset overall sharpness threshold, the sharpness of the contact lens sample image is determined to pass the sharpness check.
5. The digital projection measurement system for detecting tiny transparent samples according to claim 1, characterized in that, Extracting the positioning features of the contact lens sample image includes: acquiring a preprocessed image output by a verification subsystem; extracting contour features and their dimensions from the preprocessed image, and filtering out intermediate contour features whose dimensions are greater than a preset size threshold; calculating the roundness of the intermediate contour features, and using intermediate contour features with roundness greater than a preset roundness threshold as target contour features; using the largest target contour feature as the container contour, and using the largest target contour feature within the container contour as the lens outer contour; performing ellipse fitting on the lens outer contour to obtain an outer ellipse; extracting the center of the lens outer ellipse, aligning the lens outer ellipse with a pre-constructed lens outer contour template based on the center, and scaling the lens outer contour template so that pixels exceeding a preset ratio in the lens outer contour coincide with the lens outer contour template; extracting the printing area and optical area of the contact lens based on the overlapped lens outer contour template, and based on the scaling ratio of the lens outer contour template... Calculate the actual size corresponding to each pixel. The lens outer contour template is pre-marked with the relative positions of the outer contour, printing area, and optical area to the center, and the actual size of each pixel. for: In the formula, This refers to the reference size of each pixel in the lens outer contour template when it is not scaled; based on the center of the contact lens, the lens outer contour, the printing area, the optical area, and the actual size of each pixel. Construct localization features.
6. A digital projection measurement system for detecting tiny transparent samples according to claim 5, characterized in that, When the measurement option is defect extraction, the contact lens sample image is measured and processed based on the positioning features to obtain the measurement result of the current round, including: expanding the edge of the printed area and the edge of the optical area to obtain an edge extraction band; extracting contour features from the edge extraction band and filtering the contour features to obtain the edge contours of the printed area and the optical area with a roundness greater than a preset roundness threshold; performing a roundness verification algorithm on the outer contour of the lens, the edge contour of the printed area, and the edge contour of the optical area to obtain edge defect detection results; and extracting defects from the contact lens sample image based on a pre-built defect detection model to obtain regional defect detection results for the printed area and the optical area; and constructing the measurement result of the current round based on the edge defect detection results and the regional defect detection results.
7. A digital projection measurement system for detecting tiny transparent samples according to claim 6, characterized in that, A circularity verification algorithm is performed on the outer contour of the lens, the edge contour of the printed area, and the edge contour of the optical area to obtain edge defect detection results. This includes generating multiple sampling rays based on the center of the contact lens and extracting the intersection points of the multiple sampling rays with the edge contour to obtain multiple contour sampling points. The edge contour is one of the outer contour of the lens, the edge contour of the printing area, and the edge contour of the optical area; based on the center of the contact lens and multiple contour sampling points. Generate multiple radii And record multiple radii length and angle and based on multiple radii length and angle Construct a radius sequence; calculate all lengths within the radius sequence. The standard deviation is calculated to obtain the overall standard deviation; the overall standard deviation is compared with a preset overall standard deviation threshold; if the overall standard deviation is less than or equal to the preset overall standard deviation threshold, the outer contour of the lens is deemed qualified; otherwise, the first-order difference sequence of the radius sequence is calculated; if there are N consecutive points in the first-order difference sequence whose absolute values are greater than the preset difference threshold, the edge contour is deemed to have a local abrupt defect, and based on the angle... Locate the position of the local abrupt defect; otherwise, extract multiple local segments from the radius sequence based on preset sliding windows of various widths, and calculate the standard deviation of the radius length within each local segment to obtain a multi-scale local standard deviation; compare the multi-scale local standard deviation with a preset local standard deviation threshold; if the multi-scale local standard deviation is greater than the preset local standard deviation threshold, determine that the edge contour has a local gentle edge defect, and determine the location based on the angle. Locate the position of the local edge defect; otherwise, perform a discrete Fourier transform on the radius sequence to obtain a frequency domain sequence; calculate the ratio of various harmonic energies to DC component energy in the frequency domain sequence, and determine whether there is a target harmonic component with a ratio greater than a preset ratio threshold. If so, determine the overall deformation type of the edge contour based on the target harmonic component; otherwise, determine that the edge contour has an unknown overall deformation defect.
8. A digital projection measurement system for detecting tiny transparent samples according to claim 6, characterized in that, The training method for the defect detection model includes: acquiring sample images of contact lenses with defects; annotating the sample images of contact lenses to obtain training samples, wherein the annotation information includes defect localization boxes, defect types, and confidence levels; and training an artificial neural network based on the training samples to obtain the defect detection model.
9. A digital projection measurement system for detecting tiny transparent samples according to claim 5, characterized in that, When the measurement option is length measurement, angle measurement, or area measurement, the contact lens sample image is measured based on the positioning features to obtain the measurement result for the current round. This includes: when a measurement line or measurement closed image is received from the user, a pixel length value is output based on the measurement line, and the actual length value is calculated based on the pixel length value and the reference size corresponding to each pixel; or, a pixel area is output based on the measurement closed image, and the actual area is calculated based on the pixel area and the reference size corresponding to each pixel. The measurement line or measurement closed image is generated based on the positioning features or user-defined. When an angle graphic is received from the user, the angle corresponding to the angle graphic is read and output. The angle graphic is generated based on the positioning features or user-defined.
10. A digital projection measurement method for detecting tiny transparent samples, characterized in that, include: A contact lens sample image is acquired based on a preset digital projection system. The digital projection system includes an illumination subsystem for providing a target type illumination mode, a light path subsystem for converging the light from the target type illumination mode along a preset reflective light path onto the sample, an imaging subsystem for imaging based on the light penetrating the sample to obtain a contact lens sample image, and a display subsystem for displaying the contact lens sample image and measurement options. The contact lens sample image undergoes lens presence / absence verification and sharpness verification. During lens presence / absence verification and sharpness verification, the positioning features of the contact lens sample image are extracted. In response to the external user's selection of measurement options in the current control round, the positioning features are used to perform measurement processing on the contact lens sample image to obtain the measurement result of the current round. The display subsystem then displays a contact lens sample image with the measurement result marker of the current control round. The measurement options for the current control round are determined based on the contact lens sample image with the measurement result marker of the previous control round. These measurement options include length measurement, angle measurement, area measurement, and defect extraction.
Citation Information
Patent Citations
Contact lens flaw detection method and system based on image recognition
CN119206358A
Digital probe edge flaw detection method and system based on machine vision
CN121304566A