OK lens offset quantitative detection method and system based on corneal topography map
Through multi-stage image processing and feature fusion technology, the problems of large errors and low efficiency in the detection of offset of OK lenses are solved, and high-precision, automated and standardized detection is achieved, adapted to different lighting and motion blur scenes, and data support for clinical tracking is provided.
Patent Information
- Application Number
- CN202510491301.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-08-19
AI Technical Summary
The prior art has problems such as large subjective error, low efficiency, inability to achieve standardization and insufficient anti-interference ability in the detection of OK lens offset, which is difficult to meet clinical needs.
Multi-stage image processing and feature fusion technology are adopted, including corneal topographic map area interception, HSV color space conversion, multi-modal feature extraction of scleral boundaries and lens markers, and the offset is calculated in combination with dynamic standardization coefficients to achieve high-precision and automated detection.
It realizes high-precision quantitative detection of the offset of the OK lens lens, with the error reduced to ±0.02mm, the detection time shortened to less than 5 seconds, and has the ability to resist light and motion blur interference, and the output structured report supports clinical tracking.
Smart Images

Figure HDA0005365666560000011 
Figure HDA0005365666560000012 
Figure HDA0005365666560000013
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical intelligent offset quantification of OK lens, and relates to a method and system for quantitative detection of OK lens offset based on corneal topography. Background Art
[0002] As a non-surgical means of correcting myopia, orthokeratology lenses (OK lenses) temporarily change the corneal curvature by wearing them at night, and have become an important tool for the prevention and control of myopia in adolescents. However, its correction effect and safety are highly dependent on the accuracy of the lens wearing position. As the core medical imaging basis for evaluating the wearing effect of OK lenses, corneal topography is an image of the corneal surface curvature distribution obtained by non-invasive optical imaging technology, which intuitively reflects the corneal morphological characteristics in the form of color coding or contour lines. During the OK lens fitting and review process, corneal topography is not only used to analyze changes in corneal curvature, but also indirectly reflects the offset state of the lens relative to the center of the cornea by comparing specific marks with natural anatomical structures. However, due to the imaging characteristics of corneal topography and the complexity of clinical applications, its data processing and feature extraction face multiple technical challenges.
[0003] Traditional clinical detection methods mainly rely on doctors' manual observation and analysis of corneal topography: doctors need to manually locate the pupil center and use experience to determine the relative position of the OK lens edge and the corneal-scleral boundary to estimate the offset. This method has significant subjectivity and efficiency bottlenecks. Studies have shown that the offset assessment of the same image by different doctors can vary by up to ±0.3mm, while the clinical safety threshold usually requires an error of ≤0.1mm. In addition, a single test takes up to several minutes, and the results are mostly qualitative descriptions (such as "mild offset"), lacking numerical standards, making it difficult to support personalized lens adjustment and long-term efficacy tracking. Although some studies in recent years have attempted to introduce image processing technology to achieve automated detection, existing solutions still have obvious defects: most algorithms rely only on a single feature (such as color or boundary) and are easily affected by image noise. For example, it is easy to misdetect when the color mark of the OK lens overlaps with the corneal reflection, and relying solely on the boundary contour makes it difficult to distinguish between the natural corneal texture and the lens edge. Furthermore, existing technologies fail to address standardization, directly outputting pixel-level offset distances without considering individual differences in the cornea's physical dimensions (e.g., corneal diameter ranges from 10-13mm). This results in the actual offset represented by the same pixel distance varying by over 30% across patients. The algorithm also suffers from insufficient robustness, being sensitive to image quality variations such as uneven lighting and motion blur, and failing to account for differences in marking design across different brands of OK lenses, limiting its generalization capabilities.
[0004] Against this backdrop, the field urgently needs an innovative solution that balances medical rigor with the efficiency of computer vision. By leveraging multi-stage image processing and feature fusion technology, we systematically address the limitations of traditional methods, enabling high-precision, standardized, and fully automated detection of orthokeratology lens offset, providing reliable technical support for myopia prevention and control. Summary of the Invention
[0005] The present invention proposes a method and system for quantitatively detecting the offset of OK lenses based on corneal topography, which uses computer vision technology to achieve high-precision and standardized offset calculation, solving the problems of low efficiency and large errors in manual detection.
[0006] The core steps of the present invention are as follows:
[0007] S1: Image preprocessing and feature enhancement;
[0008] S2: boundary feature extraction and key point positioning;
[0009] S3: lens position detection and spatial registration;
[0010] S4: offset calculation and result output;
[0011] In the above solution, step S1 includes:
[0012] S11: Corneal topography area interception
[0013] Input corneal topography (resolution ≥ 1280 × 1024), with pupil center (x c ,y c ) as the reference, cut off the lower half area (the height is 50% of the original image), and exclude the interference of the upper eyelid and iris texture.
[0014] S12: HSV color space conversion
[0015] Convert the image from RGB to HSV space, separate the brightness (V channel) and chroma (H and S channels), and enhance feature discrimination.
[0016] S13: Multimodal Feature Extraction
[0017] White scale boundary extraction:
[0018] Set the threshold: H∈[0,180], S∈[0,30], V∈[200,255] to extract the high brightness area;
[0019] Red and green lens artificial marking:
[0020] The out-of-focus ring and non-treatment area were manually marked using the labelme program;
[0021] Dynamic brightness compensation: according to the average brightness V of the imageavg Adjust the V channel threshold.
[0022] In the above solution, step S2 includes:
[0023] S21: Sclera boundary key point detection
[0024] (1) Perform Canny edge detection on the binary mask and sample along the contour with a step size of 0.1 pixel;
[0025] (2) Calculate the Euclidean distance from each point to the pupil center, fit the local extreme value through the sliding window (width 5 pixels), and determine the left and right boundary points P L (x L ,y L ), P R (x R ,y R ).
[0026] S22: Dynamic normalization coefficient calculation
[0027] (1) Measure the horizontal diameter of the cornea D pixel =x R -x L (pixel units);
[0028] (2) Fitting the physical mapping formula based on clinical data: k = 11.5D pixel (The default corneal diameter is 11.5 mm) In the above scheme, step S3 includes:
[0029] S31: Color mutation point location
[0030] (1) Scan the edges of the red and green areas vertically to calculate the color gradient
[0031] (2) The mutation point is defined as the position where the gradient first exceeds the threshold Tg=30, which is recorded as the edge point C of the left and right lenses. L (x cl ,y cl ), C R (x cr ,y cr ).
[0032] S32: Geometric consistency verification
[0033] Constraints: Horizontal Span: |X cr -X cl |∈[0.2D pixel ,0.4 Dpixel If the detection is abnormal, the threshold relaxation or manual review prompt will be triggered.
[0034] In the above solution, step S4 includes:
[0035] S41: Multi-dimensional offset calculation
[0036] Horizontal offset:
[0037] ΔX=|X L -X cl |+|X R -X cl |
[0038] Physical unit conversion:
[0039] D X =k·ΔX (unit: mm, keep two decimal places)
[0040] S42: Visualization and Report Generation
[0041] Overlay annotations on the original image:
[0042] (1) Red / green highlighted lens edge;
[0043] (2) The white dotted line marks the scleral boundary;
[0044] (3) The arrow indicates the offset direction and value;
[0045] (4) Output a structured report (PDF / CSV) containing offset, confidence, and corneal diameter parameters.
[0046] Beneficial effects
[0047] The quantitative detection method for Orthokeratology lens offset proposed in this paper achieves significant breakthroughs in detection accuracy, efficiency, anti-interference ability, and clinical value by integrating computer vision, multimodal feature analysis, and dynamic standardization technology. The specific beneficial effects are as follows:
[0048] 1. High precision and improved objectivity
[0049] Traditional manual detection relies on the doctor's visual estimation, which is affected by subjective experience and image scaling. The offset assessment error is as high as ±0.3mm, while the clinical safety threshold requires an error of ≤±0.1mm. The present invention reduces the boundary positioning error from ±1.5 pixels to ±0.3 pixels (physical error ±0.02mm) through multimodal feature fusion (corneal scleral boundary and OK lens color marking) and sub-pixel positioning technology (bilinear interpolation algorithm). Combined with the dynamic normalization coefficient (dynamically adjusting the physical conversion parameters according to the corneal diameter), the systematic error caused by individual corneal size differences is eliminated.
[0050] 2. Full process automation and efficient processing
[0051] Traditional manual detection takes 3-5 minutes per test and cannot be processed in batches. The present invention uses an end-to-end automated pipeline design (pupil center positioning takes 0.2 seconds, multi-threaded parallel computing), and a single test takes less than 5 seconds, supporting batch processing of hundreds of data. Hardware compatibility optimization (CPU / GPU hybrid acceleration) ensures real-time operation on low-configuration devices (such as NVIDIA GTX 1050), and the detection time for 4K ultra-high-definition images (4096×2160) is only 8 seconds, which increases efficiency by 40 times. In addition, the preset parameter library is compatible with mainstream devices such as Pentacam and Orbscan, and a user-defined interface is open. For the green mark H channel offset problem, the threshold range can be adjusted to [25,75] without modifying the core algorithm.
[0052] 3. Anti-interference robustness in complex scenarios
[0053] To address interference from tear film reflections and eyelash occlusion in corneal topography (traditional algorithms have a false detection rate exceeding 30%), this invention improves stability through layered noise suppression and dynamic parameter adjustment. In the preprocessing stage, the lower half of the image is captured to eliminate 70% of eyelash projection interference, and the luminance noise is separated in the HSV color space. In the feature extraction stage, reflection artifacts are eliminated through connected domain analysis and spatial constraints (only candidate points in the lower half of the area are retained). In the dynamic parameter adjustment strategy, the white boundary V threshold is automatically lowered (from 200 to 180) for low-light images, and motion-blurred images trigger super-resolution reconstruction (SRGAN model).
[0054] 4. Clinical standardization and data-driven value
[0055] Traditional qualitative descriptions cannot quantitatively track the deviation trend, while the present invention outputs structured data (horizontal / vertical deviation, corneal diameter, confidence score) to support database integration and long-term follow-up analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 : Overall flow chart of the present invention.
[0057] Figure 2a : Original corneal topography image; Figure 2b The result after cutting off the lower half of the original corneal topography image and extracting the white scale boundary; Figure 2c is the HSV segmentation result.
[0058] Figure 3a is a schematic diagram of boundary key point positioning, Figure 3b This is a schematic diagram of the location of the lens mutation point.
[0059] Figure 4 : Visualization interface of offset calculation results. DETAILED DESCRIPTION
[0060] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.
[0061] The process of the present invention is as follows Figure 1 As shown in the figure, after obtaining the corneal topography, the image is first preprocessed. The specific processing process is as follows:
[0062] S1: Image preprocessing
[0063] S11: Corneal topography area
[0064] like Figure 2a The original image of corneal topography is shown, and the input corneal topography is intercepted (resolution
[0065] ≥1280×1024), pupil center (x c ,y c ) as the reference, cut off the lower half area (the height is 50% of the original image), and exclude the interference of the upper eyelid and iris texture.
[0066] S12: HSV color space conversion
[0067] Convert the image from RGB to HSV space, separate the brightness (V channel) and chroma (H and S channels), and enhance feature discrimination.
[0068] S13: Multimodal Feature Extraction
[0069] White scale boundary extraction:
[0070] Set the threshold: H∈[0,180], S∈[0,30], V∈[200,255], extract the high brightness area; cut off the lower half and perform white scale boundary extraction, the result is as follows Figure 2b shown.
[0071] Red and green lens artificial marking:
[0072] The out-of-focus ring and non-treatment area were manually marked using the labelme program;
[0073] Dynamic brightness compensation: according to the average brightness V of the image avg Adjust the V channel threshold. The HSV segmentation result after processing is as follows Figure 2c shown.
[0074] After image preprocessing is completed, key coordinates are located on the preprocessed image. The specific steps are as follows:
[0075] S2 image key coordinate positioning:
[0076] S21: Sclera boundary key point detection
[0077] (1) Perform Canny edge detection on the binary mask and sample along the contour with a step size of 0.1 pixel;
[0078] (2) Calculate the Euclidean distance from each point to the pupil center, fit the local extreme value through the sliding window, and determine the left and right boundary points P L (x L ,y L ), P R (x R ,y R ). Figure 3a It is a schematic diagram of boundary key point positioning. Figure 3b This is a schematic diagram of the location of the lens mutation point.
[0079] S22: Dynamic normalization coefficient calculation
[0080] (3) Measure the horizontal diameter of the cornea D pixel =x R -x L (pixel units);
[0081] Fitting physical mapping formula based on clinical data: k = 11.5D pixel (Default corneal diameter 11.5mm)
[0082] After completing the key coordinate positioning, the offset calculation is performed. The specific process is as follows:
[0083] S3 segments the color area and locates the mutation point
[0084] S31: Color mutation point location
[0085] (1) Scan the edges of the red and green areas vertically to calculate the color gradient
[0086] (2) The mutation point is defined as the position where the gradient first exceeds the threshold Tg = 30, which is recorded as the edge point C of the left and right lenses. L (x cl ,y cl ), C R (x cr ,y cr ).
[0087] S32: Geometric consistency verification
[0088] Constraints: Horizontal Span: |X cr -X cl |∈[0.2D pixel ,0.4 Dpixel If the detection is abnormal, the threshold relaxation or manual review prompt will be triggered.
[0089] S33 multi-dimensional offset calculation
[0090] Horizontal offset:
[0091] ΔX=|X L -X cl |+|X R -X cl |
[0092] Physical unit conversion:
[0093] D X =k·ΔX (unit: mm, keep two decimal places)
[0094] S34 Visualization and Report Generation
[0095] Overlay annotations on the original image:
[0096] (1) Red / green highlighted lens edge;
[0097] (2) The white dotted line marks the scleral boundary;
[0098] (3) The arrow indicates the offset direction and value;
[0099] (4) Output a structured report (PDF / CSV) containing offset, confidence, and corneal diameter parameters.
[0100] Through the above method, a detection system is constructed. The system consists of an image acquisition module for connecting to a corneal topographer and acquiring raw images; a data processing module integrating a multi-threaded computing engine to perform preprocessing, feature extraction, and offset calculation in parallel; a visualization module for superimposing boundary and lens marking information on the raw image; a report generation module for outputting a structured report containing offset values, confidence scores, and corneal parameters; and a computer-readable storage medium.
[0101] The data processing module preferably supports GPU acceleration, is compatible with NVIDIA GTX 1050 and above graphics cards, and has a built-in parameter library to adapt to the image format differences of mainstream corneal topographers such as Pentacam, Orbscan, and Medmont.
Claims
1. A method for quantitatively detecting orthokeratology lens offset based on machine learning, characterized in that: The following steps are involved: S1. Obtain a corneal image of the patient using a corneal topographer. First, preprocess the image, including intercepting a portion of the image based on the pupil center and converting the image to the HSV color space to separate luminance and chromaticity information. S2: Extract corneal and scleral boundary features. White highlight areas are extracted by setting an HSV threshold range, and sub-pixel positioning technology is used to determine the coordinates of key points on the left and right boundaries. Furthermore, dynamic thresholds are set in HSV space to segment the color regions for the red and green marked areas of the OK lens. The color gradient is scanned vertically to locate the lens edge mutation point. S3. Based on the horizontal distance difference between the boundary key point and the lens mutation point, combined with the normalization coefficient dynamically calculated by the corneal diameter, the pixel distance is converted into the actual physical offset, and a structured report containing the horizontal offset value and visual annotation is output.
2. The method according to claim 1, characterized in that The HSV threshold setting includes: for the white sclera boundary, setting the hue H to 0-180, the saturation S to 0-30, and the lightness V to 200-255; for the red mark, setting H to a dual interval threshold of 0-10 and 160-180 and S greater than 50; for the green mark, setting H to 35-85 and S greater than 50, and dynamically adjusting the V channel threshold according to the average brightness of the image to adapt to different lighting conditions.
3. The method according to claim 1, characterized in that The sub-pixel positioning technology specifically includes: performing Canny edge detection on the binary mask, sampling along the contour with a step size of 0.1 pixel, determining the boundary key points by fitting the local extreme values through a sliding window, and improving the coordinate accuracy to the 0.01 pixel level through a bilinear interpolation algorithm.
4. The method according to claim 1, wherein The standardization coefficient is calculated by measuring the pixel value of the horizontal corneal diameter, and using the ratio of the default corneal physical diameter of 11.5 mm to the current pixel diameter as a coefficient in combination with a clinical statistical model to achieve individualized physical quantity conversion.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
6. A detection system for implementing the method according to any one of claims 1 to 5, comprising: An image acquisition module, used for connecting to a corneal topographer and acquiring raw images; Data processing module, which integrates a multi-threaded computing engine to perform preprocessing, feature extraction and offset calculation in parallel; A visualization module is used to overlay the boundary and lens marking information on the original image; A report generation module that outputs a structured report including an offset value, a confidence score, and corneal parameters, characterized in that it uses the computer-readable storage medium described in claim 5.
7. The system according to claim 6, characterized in that The data processing module supports GPU acceleration, is compatible with NVIDIA GTX 1050 and above graphics cards, and has a built-in parameter library to adapt to the image format differences of mainstream corneal topographers such as Pentacam, Orbscan, and Medmont.
Citation Information
Cited By
Aided design method and system for orthokeratology lens based on big data
CN121234781A
Big data-based orthokeratology lens aided design method and system
CN121234781B