Corneal topographic map feature point extraction method and system based on Gabor filtering and sub-pixels
Through Gabor filtering and subpixel edge positioning technology, the problem of noise interference and incomplete feature point extraction in corneal topographic map is solved, and high-precision and high-integrity feature point extraction is achieved, which is suitable for corneal topographic map and other image processing fields.
Patent Information
- Application Number
- CN202510398437.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-08-12
AI Technical Summary
The prior art has problems such as noise interference, insufficient edge detection accuracy and incomplete feature point extraction in corneal topographic maps, especially in the case of poor image quality or uneven light, resulting in insufficient detection results and incomplete feature point extraction.
Using Gabor filtering and subpixel-based methods, the subpixel-level corneal topographic map feature points are extracted through image preprocessing, calculation of main direction field and frequency field, even symmetric Gabor filter filtering, edge coarse positioning and subpixel edge fine positioning, combined with the least squares method and cubic spline interpolation algorithm.
It improves edge detection accuracy and the accuracy of feature point extraction, realizes subpixel-level feature point positioning, ensures that feature points can be accurately extracted under complex conditions, and improves the accuracy of corneal topographic map analysis.
Smart Images

Figure CN120472181A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ophthalmic image processing, and in particular to a method and system for extracting corneal topography feature points based on Gabor filtering and sub-pixel. Background Art
[0002] Corneal topography, borrowing concepts from topography, reflects the morphology of the corneal surface. Corneal topography analyzes the entire cornea, presenting the corneal curvature as a topographic map. Existing techniques use Gaussian filtering to reduce noise, but in situations with poor image quality or uneven lighting, noise can still interfere with edge definition, particularly at the corneal periphery, leading to inaccurate detection results. Even with Gaussian filtering, some detail can be lost, especially in complex edge contours. Furthermore, Gaussian filtering smoothes the image, removing noise but also blurring subtle features at the corneal periphery, reducing edge clarity, especially in complex edge contours. Furthermore, feature point extraction relies on binarization and morphological operations (erosion, opening, and closing), but in situations with poor image quality or uneven lighting, these operations may not accurately extract all corneal feature points. Especially in situations with complex corneal periphery or texture details, morphological operations can overlook subtle feature points, resulting in incomplete feature point extraction. In addition, the use of polar coordinate transformation may cause image details to be lost during the conversion process, further affecting the integrity of feature point extraction. Summary of the Invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for extracting feature points from corneal topography based on Gabor filtering and sub-pixel, which can adapt to circular structures of different directions and frequencies and quickly and accurately fit the circular contours in corneal topography.
[0004] The first technical solution adopted by the present invention is: a method for extracting feature points of corneal topography based on Gabor filtering and sub-pixel, comprising the following steps:
[0005] Based on the corneal topography, the original image is collected and preprocessed to obtain the image after data standardization;
[0006] Obtain the main direction field and frequency field of the image after data standardization, and perform image filtering through an even-symmetric Gabor filter to obtain a circular feature image;
[0007] The circular feature image is sequentially subjected to edge coarse location extraction and sub-pixel edge fine location extraction to obtain sub-pixel corneal topography image feature points.
[0008] Furthermore, the step of collecting original images based on the corneal topography and performing image preprocessing to obtain a data-standardized image specifically includes:
[0009] The original image is acquired through corneal topography and a circular mask is generated;
[0010] Perform mask operation between the original image and the circular mask to extract the target area of the image and obtain the image after mask operation;
[0011] Normalizing the image after mask operation to obtain a normalized mask operation image;
[0012] Divide the normalized mask operation image to generate several sub-image blocks;
[0013] Obtain the mean and standard deviation values of several sub-image blocks and merge them separately to obtain the mean matrix and standard deviation matrix of the image;
[0014] According to the mean matrix and the standard deviation matrix of the image, the standard deviation normalization calculation is performed on the normalized mask operation image to obtain the image after data standardization.
[0015] Furthermore, the step of obtaining the main direction field and frequency field of the image after data normalization and performing image filtering processing using an even-symmetric Gabor filter to obtain a circular ring feature image specifically includes:
[0016] Acquire the main direction field of the image after data standardization and the frequency field of the image after data standardization;
[0017] Generate in advance several groups of even-symmetric Gabor filters with directions uniformly changing from 0° to 180°;
[0018] Based on the main direction field of the image after data normalization, the even-symmetric Gabor filter with the closest direction is selected, and the frequency field of the image after data normalization is input into the selected even-symmetric Gabor filter to perform image filtering to obtain an image mask with circular ring features;
[0019] Mask calculation is performed on the image mask with the ring feature and the image after the mask operation to obtain the ring feature image.
[0020] Furthermore, the step of obtaining the main direction field of the image after data standardization and the frequency field of the image after data standardization specifically includes:
[0021] The horizontal gradient and vertical gradient of the image after data normalization are obtained through the Sobel operator;
[0022] According to the horizontal gradient and vertical gradient of the image after data standardization, the horizontal direction field and the vertical direction field are obtained and integrated to obtain the preliminary main direction field of the image after data standardization;
[0023] Performing smoothing and denoising on the preliminary main direction field of the image after data standardization to obtain the main direction field of the image after data standardization;
[0024] Based on the data-normalized image, calculate the grayscale projection change curve in the vertical main direction and obtain the average pixel distance between the peak points of the curve;
[0025] The frequency corresponding to the grayscale projection change curve is calculated according to the average pixel distance between the peak points of the curve, and the frequency field of the image after data standardization is obtained.
[0026] Furthermore, the step of sequentially performing coarse edge location extraction and sub-pixel fine edge location extraction on the annular feature image to obtain sub-pixel corneal topography image feature points specifically includes:
[0027] The Canny edge extraction algorithm is used to perform rough edge location extraction on the circular feature image to obtain a rough edge image.
[0028] Performing contour recognition and extraction on the roughly positioned edge image to obtain a number of contour feature information, wherein the contour feature information includes coordinate point information of a circular ring;
[0029] Sorting the contour feature information in ascending order of contour area, and deleting coordinate points whose contour area is smaller than a preset threshold, to obtain a sorted contour data information array;
[0030] Extract the contour elements from the sorted contour data information array, and perform sub-pixel edge fine positioning to obtain the sub-pixel level circular contour;
[0031] The sub-pixel level circular contour is subjected to outlier filtering and interpolation processing to obtain the sub-pixel level corneal topography image feature points.
[0032] Furthermore, the step of extracting the contour elements from the sorted contour data information array and performing sub-pixel edge fine positioning to obtain the sub-pixel level circular contour specifically includes:
[0033] Based on the sorted contour data information array, the coordinate information of the edge points in the contour is extracted, and the gradient in the target neighborhood is selected for surface fitting to construct a gradient surface fitting function;
[0034] The coefficients of the gradient surface fitting function are solved through the facet model to construct the Hessian matrix;
[0035] Determine the eigenvalue and eigenvector based on the Hessian matrix, wherein the eigenvalue is used to determine whether it is a valid edge point, and the eigenvector is used to determine the offset direction of the sub-pixel point;
[0036] If the eigenvalue is less than zero, the sub-pixel coordinate offset of the coordinate information of the edge point corresponding to the eigenvalue is obtained, and correction is performed along the direction of the eigenvector to obtain the sub-pixel level circular contour.
[0037] Furthermore, the step of filtering abnormal points and performing interpolation processing on the sub-pixel level circular contour to obtain sub-pixel level corneal topography image feature points specifically includes:
[0038] The sub-pixel level circular contour is fitted with an ellipse by the least square method to obtain the coordinates of the ellipse center;
[0039] Get the distance between the coordinates of the ellipse center and the coordinates of the edge points in the contour to get the distance array;
[0040] Obtain the mean and standard deviation of the distance array, and delete the erroneous points in the sub-pixel circular contour based on the preset error point judgment conditions to obtain the filtered contour array;
[0041] The angle corresponding to each group of contour points in the filtered contour array is obtained, and the angles are sequentially connected end to end and subjected to cubic spline interpolation processing to obtain sub-pixel corneal topography image feature points.
[0042] Furthermore, the expression of the preset error point judgment condition is specifically as follows:
[0043] distance(i)>mean dist +2*std dist
[0044] In the above formula, distance(i) represents the error point judgment condition, mean dist Represents the mean of the distance array, std dist Represents the standard value of the distance array, and i represents the i-th contour point.
[0045] The second technical solution adopted by the present invention is: a corneal topography feature point extraction system based on Gabor filtering and sub-pixel, comprising:
[0046] The first module is used to collect original images based on corneal topography and perform image preprocessing to obtain data-standardized images;
[0047] The second module is used to obtain the main direction field and frequency field of the image after data standardization, and perform image filtering through an even-symmetric Gabor filter to obtain a circular feature image;
[0048] The third module is used to perform coarse edge location extraction and sub-pixel fine edge location extraction on the circular feature image in sequence to obtain sub-pixel corneal topography image feature points.
[0049] The beneficial effects of the method and system of the present invention are as follows: the present invention collects original images based on corneal topography and performs image preprocessing, further obtains the main direction field and frequency field of the image after data standardization, and performs image filtering processing through an even-symmetric Gabor filter to obtain a circular ring feature image. Combined with the application of multiple groups of Gabor filters, the noise in the image is removed more accurately and effectively, so that the algorithm can adapt to circular ring structures of different directions and frequencies, and retain the true circular ring features, ensuring that feature points can be accurately extracted under various complex situations. Finally, the circular ring feature image is subjected to coarse edge positioning extraction and sub-pixel edge fine positioning extraction in sequence to obtain sub-pixel corneal topography image feature points. Through the sub-pixel edge positioning technology, the positioning accuracy of the feature points is improved to the sub-pixel level, which significantly improves the accuracy of edge detection and the accuracy of feature point extraction, and quickly and accurately fits the circular ring contour in the corneal topography. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of the steps of the corneal topography feature point extraction method based on Gabor filtering and sub-pixel of the present invention;
[0051] Figure 2 This is a structural block diagram of a corneal topography feature point extraction system based on Gabor filtering and sub-pixel according to the present invention;
[0052] Figure 3 1 is a schematic diagram of an algorithm flow for extracting corneal topography feature points based on Gabor filtering and sub-pixel analysis provided by a specific embodiment of the present invention;
[0053] Figure 4 is a schematic diagram of an image after data standardization provided by a specific embodiment of the present invention;
[0054] Figure 5 is a schematic diagram of an image grayscale projection curve provided by a specific embodiment of the present invention;
[0055] Figure 6 It is a schematic diagram of the effect of segmenting circular ring features using Gabor filtering provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0057] First, it's important to note that corneal topography, borrowed from topography, reflects the morphology of the corneal surface. Corneal topography analyzes the entire cornea, presenting the corneal curvature in a topographical manner. In clinical practice, corneal topography is frequently used to diagnose corneal astigmatism and keratoconus, achieving an accuracy rate exceeding 95% for early-stage keratoconus diagnosis. Furthermore, corneal topography is used for preoperative evaluation and postoperative efficacy assessment during refractive surgery, guiding clinical procedures. Corneal topography is a computer-processed pseudo-color image, capturing three-dimensional information about corneal shape changes within a two-dimensional image. Creating a corneal topography map requires first acquiring a corneal placido image and extracting its feature points. The corneal radius of curvature is then calculated and restored based on the placido rings. The refractive power is then calculated to create the corneal topography map.
[0058] In the prior art, corneal images are captured using a Placido disk, with four small lights in the center of the disk assisting with positioning. The image is then preprocessed, including normalization and Gaussian filtering, to reduce noise and enhance image quality. The image center is then found through grayscale conversion and ROI region extraction, and the image is converted to polar coordinates for morphological processing and Gaussian filtering. Top-hat and black-hat transformations are then used to enhance features, and the results are subtracted to highlight the target area. The processed image is then converted back to Cartesian coordinates, and the corneal region is extracted using the variance method. Finally, feature points on the corneal edge and Placido circle are extracted through morphological processing, histogram equalization, and adaptive binarization.
[0059] Alternatively, the center of the concentric circles is determined using a regional image and the image is converted to the polar coordinate domain. Next, a morphological small-scale square structure operator is used for pre-filtering, and the effects of lighting are removed using a black TOP-HAT transform. Erosion and opening operations are then used to extract the principal directions of the texture lines, and closing operations are used to compensate for data lost due to the influence of inner eyelashes. Finally, through polar coordinate transformation and morphological processing, a complete circular edge detection result is obtained, meeting the accuracy requirements for subsequent parameter calculations.
[0060] However, the existing technology has problems such as image noise interference, insufficient edge detection accuracy, and incomplete feature point extraction in complex images of corneal topography.
[0061] Based on this, the embodiment of the present invention utilizes the frequency selectivity and direction selectivity of the Gabor filter to effectively remove noise from the image and retain the circular structure in the corneal topography. Through the sub-pixel edge positioning technology, the accuracy of edge detection is further improved, so that the positioning of feature points reaches the sub-pixel level. In order to ensure that the extracted feature points are accurate and complete, the algorithm uses the least squares method to perform ellipse fitting to accurately depict the contour of the circular ring in the corneal topography, and at the same time combines the mean and standard deviation to filter outliers and eliminate interference points. In addition, the cubic spline interpolation algorithm is used to interpolate the feature points within a 360-degree range, ensuring that each angle has a corresponding feature point, thereby improving the integrity of the feature point extraction. Overall, the present invention can effectively solve the problems of blurred edges and incomplete feature point extraction in the prior art, provide high-precision and high-integrity feature point extraction results, and can provide more accurate data support for ophthalmic diagnosis and other image processing fields.
[0062] Reference Figure 1 The present invention provides a method for extracting feature points from corneal topography based on Gabor filtering and sub-pixel, the method comprising the following steps:
[0063] S100, collecting original images based on the corneal topography and performing image preprocessing to obtain a data-normalized image;
[0064] Specifically, the original image is acquired through corneal topography and a circular mask is generated; a mask operation is performed between the original image and the circular mask to extract the target area of the image and obtain the image after the mask operation; the image after the mask operation is normalized to obtain a normalized mask operation image; the normalized mask operation image is divided to generate several sub-image blocks; the mean and standard deviation values of several sub-image blocks are obtained and merged respectively to obtain the mean matrix of the image and the standard deviation matrix of the image; based on the mean matrix of the image and the standard deviation matrix of the image, the standard deviation normalization calculation is performed on the normalized mask operation image to obtain the image after data standardization.
[0065] In this embodiment, the original image collected by corneal topography is I(x,y), the image width is width, the height is height, and the image center coordinates are Generate a circular mask M with the center of the image as the center and radius r = max(width, height) circ (x, y), perform mask operation with the original image to extract the main area of the image I roi (x,y), its expression is:
[0066] I roi (x),y)=I(x,y)*M circ (x,y)
[0067] For the image I after masking operation roi (x, y) is first normalized, and the data is scaled to between 0 and 1 to obtain I norm (x, y), then a neighborhood of size a*a is set, and I norm (x, y) is divided into sub-image blocks I block (i, m), where n, m = 1, 2, 3, …, a (a < width, a < height), calculate the mean mean(i) and standard deviation std(i) of each sub-image block I block (n, m), where i = 1, 2, …, N (N represents the number of sub-image blocks), and the means and standard deviations of the sub-image blocks are merged respectively to obtain the image mean matrix I mean (x, y) and the standard deviation matrix I std (x, y), and according to the two parameter matrices, I norm (x, y) is subjected to standard deviation normalization calculation to obtain the image I after data standardization stdn (x, y), as Figure 4 shown
[0068] Among them, the expression of the standard deviation normalization calculation is specifically as follows:
[0069]
[0070] In the above formula, I mean (x, y) represents the image mean matrix, I std (x, y) represents the image standard deviation matrix, I stdn (x, y) represents the image after data standardization, I block (n, m) represents the sub-image block
[0071] S200. Obtain the main direction field and frequency field of the image after data standardization, and perform image filtering processing through an even-symmetric Gabor filter to obtain an annular feature image;
[0072] S210. Obtain the main direction field of the image after data standardization and the frequency field of the image after data standardization;
[0073] Specifically, the horizontal gradient and vertical gradient of the image after data standardization are obtained by the Sobel operator; the horizontal direction field and the vertical direction field are obtained according to the horizontal gradient and the vertical gradient of the image after data standardization and are integrated to obtain the preliminary main direction field of the image after data standardization; the preliminary main direction field of the image after data standardization is smoothed and denoised to obtain the main direction field of the image after data standardization; based on the image after data standardization, the grayscale projection change curve in the vertical main direction is calculated, and the average pixel distance between the peak points of the curve is obtained; the frequency corresponding to the grayscale projection change curve is calculated according to the average pixel distance between the peak points of the curve to obtain the frequency field of the image after data standardization.
[0074] In this embodiment, the normalized image I stdn (x, y) block to calculate its direction field θ(x, y) and frequency field f(x, y). The specific calculation method is as follows: Calculate the horizontal gradient G of the sub-graph through the Sobel operator x and vertical gradient G y , and then calculate the horizontal field V x (n,m) and vertical field V y (n,m), we get the main direction field V(n,m), which is expressed as:
[0075]
[0076] Due to the influence of image noise, it is necessary to smooth and denoise the main direction field to obtain the smoothed direction field V s (n, m); the image frequency field is obtained by calculating the grayscale projection change curve of each sub-image block in the direction perpendicular to its main direction. In the corneal topography image, the grayscale projection change curve of the placido ring area is approximately a set of discrete signals of sinusoidal waveforms, such as Figure 5 As shown, calculate the average pixel distance dist(i) between the peak points of the curve, and then calculate the frequency corresponding to the curve Where i = 1, 2, ..., N (N represents the number of sub-image blocks), thereby obtaining the image frequency field f (x, y).
[0077] S220, pre-generate a plurality of groups of even-symmetric Gabor filters with directions uniformly varying from 0° to 180°;
[0078] S230, based on the main direction field of the image after data normalization, selecting an even-symmetric Gabor filter with the closest direction, and inputting the frequency field of the image after data normalization into the selected even-symmetric Gabor filter to perform image filtering to obtain an image mask with a circular ring feature;
[0079] S240 , performing mask calculation on the image mask having the ring feature and the image after the mask calculation to obtain a ring feature image.
[0080] In this embodiment, 60 sets of even-symmetric Gabor filters with uniform direction changes from 0° to 180° are pre-generated, with a size of 27*27. According to the characteristics of frequency selectivity and direction selectivity of Gabor filter, the direction field V corresponding to the sub-image block is firstly s (n, m) selects the Gabor filter with the closest direction, and then inputs the sub-image block and its corresponding frequency field f(x, y) into the selected Gabor filter to perform image filtering, which can effectively remove unnecessary noise and retain the true circular structure of the image, and obtain the image mask I that extracts the circular feature. seg (x,y), and I roi (x, y) performs mask operation to remove the image background and noise, and obtains the circular feature image I feat (x,y) Figure 6 shown.
[0081] The expression of even-symmetric Gabor filter is:
[0082]
[0083] in,
[0084] S300 , performing edge coarse location extraction and sub-pixel edge fine location extraction on the circular ring feature image in sequence to obtain sub-pixel corneal topography image feature points.
[0085] S310, performing rough edge location extraction on the ring feature image using a Canny edge extraction algorithm to obtain a rough edge image;
[0086] S320, performing contour recognition and extraction on the roughly positioned edge image to obtain a number of contour feature information, wherein the contour feature information includes coordinate point information of a circular ring;
[0087] S330, sorting the contour feature information in ascending order of contour area, and deleting coordinate points whose contour areas are smaller than a preset threshold, to obtain a sorted contour data information array;
[0088] In this embodiment, the image I feat (x, y) performs Canny edge extraction algorithm to extract the edge coarse positioning and obtain the coarse positioning edge image I re (x, y) and horizontal gradient information d x And the vertical gradient information d y, and use the edge image to perform contour recognition and extraction. Each contour contains the coordinate point information of a circular ring, and sorts them in order from small to large contour area. Delete the coordinate points with contour area less than 100, and obtain the sorted contour data information array Cont. Each element in the array contains the coordinate point information of a circular ring edge, and the circular ring edge data is arranged in order from inside to outside.
[0089] S340, extracting contour elements from the sorted contour data information array, and performing sub-pixel edge fine positioning to obtain a sub-pixel level circular contour;
[0090] Specifically, based on the sorted contour data information array, the coordinate information of the edge points in the contour is extracted, and the gradient in the target neighborhood is selected for surface fitting to construct a gradient surface fitting function; the coefficients of the gradient surface fitting function are solved through the facet model to construct a Hessian matrix; according to the Hessian matrix, the eigenvalue and eigenvector are determined, the eigenvalue is used to determine whether it is a valid edge point, and the eigenvector is used to determine the offset direction of the sub-pixel point; if the eigenvalue is less than zero, the sub-pixel coordinate offset of the coordinate information of the edge point corresponding to the eigenvalue is obtained, and correction is performed along the direction of the eigenvector to obtain a sub-pixel circular contour.
[0091] In this embodiment, the contour elements in Cont are extracted in sequence, and sub-pixel edge positioning is performed on each group of contour elements. The specific process is as follows: based on the coordinate information of each edge point in the contour, the gradient in a 3*3 neighborhood around it is selected for surface fitting, namely:
[0092] f(x,y)=a0+a1x+a2y+a3x 2 +a4xy+a5y 2
[0093] The five coefficients a0, a1, a2, a3, a4, and a5 in the polynomial are calculated through the facet model, and the corresponding Hessian matrix is constructed based on this. Then, the eigenvalue λ and eigenvector v of the matrix are calculated by the characteristic equation |H-λI|=0, where I is the unit matrix, and the eigenvalue λ represents the curvature information of the matrix, which is used here to determine whether it is a valid edge point. The larger eigenvalue corresponds to the direction of faster change in the image. The eigenvector v represents the main direction of the matrix, that is, the direction of the normal line of the image edge, which is used to determine the offset direction of the sub-pixel point. If the eigenvalue λ of the coarse edge point is less than 0, it means that the coordinates of the edge point need to be corrected. Then, the sub-pixel coordinate offset t is calculated. In the neighborhood of the current pixel, the maximum or minimum value of the gradient change is found along the eigenvector v (that is, the normal direction of the edge). The specific calculation method is as follows:
[0094] Along the direction of the eigenvector (tn x ,tn y ), expand the quadratic model in the t direction, and its expression is:
[0095] f(tn x ,tn y )=a0+a1tn x +a2tn y +a3tn x 2 +a4tn x n y +a5tn y 2
[0096] Taking the derivative with respect to t and setting it to 0, we get the equation:
[0097]
[0098] Solve the equation to get t, and correct the original coordinates (x, y), that is:
[0099] x new =x+t*n x
[0100] y new =y+t*n y
[0101] In the above formula, (x new ,y new ) is the coordinate after sub-pixel correction.
[0102] S350 , performing outlier filtering and interpolation processing on the sub-pixel level circular contour to obtain sub-pixel level corneal topography image feature points.
[0103] Specifically, an ellipse is fitted to the sub-pixel circular contour by the least squares method to obtain the coordinates of the center of the ellipse; the distance between the coordinates of the center of the ellipse and the coordinates of the edge points in the contour is obtained to obtain a distance array; the mean and standard deviation of the distance array are obtained, and the erroneous points in the sub-pixel circular contour are deleted in combination with the preset erroneous point judgment conditions to obtain a filtered contour array; the angles corresponding to each group of contour points in the filtered contour array are obtained, and the end-to-end connections and cubic spline interpolation processing are performed in sequence to obtain the sub-pixel corneal topography image feature points.
[0104] In this embodiment, after performing sub-pixel edge fine positioning on the coordinate points of each contour, the sub-pixel contour array Count of each circular edge of the image is obtained. subSince we want to extract the feature points corresponding to each ring in the 360° direction of the ring, and exclude some erroneous points caused by the influence of eyelashes and other factors that cause the ring to break, we need to filter outliers and interpolate each group of sub-pixel ring contours. The specific operations are as follows:
[0105] First, perform ellipse fitting on each set of contour points using the least squares method to obtain the coordinates of the center of the fitted ellipse (x c ,y c ), and calculate the distance from each point to the center of the ellipse, get the distance array distance, and calculate the mean mean of the array dist and standard deviation std dist , if distance(i)>mean dist +2*std dist , then the i-th point is judged as an error point, and it is deleted to obtain the contour array Count after filtering filt .
[0106] Then calculate the contour array Count according to the center of the ellipse fitted by each set of contour points filt The angle corresponding to each set of contour points in the range is from 0° to 360°, and the coordinate data are connected end to end to form a ring data. According to these known data point coordinates and the corresponding angles, cubic spline interpolation is performed to interpolate and calculate the coordinates (x) corresponding to each integer angle in the range of 0° to 360°. r ,y r ), thereby realizing the extraction of sub-pixel corneal topography image feature points.
[0107] In summary, if Figure 3As shown, embodiments of the present invention effectively extract feature points from corneal topography by combining Gabor filtering and sub-pixel edge location technology. Gabor filters, with their frequency and direction selectivity, effectively remove noise from images while preserving the circular structure in corneal topography. Sub-pixel edge location technology further improves edge detection accuracy, enabling feature point location accuracy to reach sub-pixel levels, significantly enhancing the accuracy of feature point extraction. During corneal topography acquisition, images are often subject to interference from factors such as noise and eyelash occlusion. By performing standard deviation normalization on image blocks, calculating the direction and frequency fields, and designing multiple sets of Gabor filters, the present invention effectively removes noise and interference from images. This allows the algorithm to adapt to circular structures of varying directions and frequencies while preserving the true circular structure, ensuring accurate feature point extraction in a variety of complex situations. Ellipse fitting using the least squares method can quickly and accurately fit the contours of circular rings in corneal topography. By calculating the distance from each point to the center of the ellipse and filtering outliers using the mean and standard deviation, interfering points can be effectively eliminated. In addition, the cubic spline interpolation algorithm enables feature point interpolation within a 360-degree range, ensuring that each angle has a corresponding coordinate point, further improving the integrity and accuracy of feature point extraction. Sub-pixel edge positioning technology improves the positioning accuracy of feature points to the sub-pixel level. This high-precision positioning not only improves the accuracy of corneal topography analysis but also provides a more accurate data foundation for subsequent corneal curvature calculations and corneal morphology analysis, helping to improve the accuracy of ophthalmic diagnoses.
[0108] Furthermore, the feature point extraction algorithm provided by this invention is not only applicable to corneal topography analysis but can also be extended to other similar image processing fields, such as fingerprint recognition and iris recognition. Its high precision, robustness, and automation make it promising for broad application in fields such as medical image processing and biometric recognition.
[0109] Therefore, the embodiments of the present invention have the following differences compared to the prior art:
[0110] 1) Combining Gabor filters with sub-pixel edge localization technology for feature point extraction in corneal topography. Gabor filters, with their frequency and direction selectivity, effectively remove image noise while preserving the circular structure in corneal topography. Sub-pixel edge localization technology further enhances edge detection precision, locating feature points at the sub-pixel level and significantly improving the accuracy of feature point extraction. Furthermore, this technical solution is not only applicable to corneal topography but can also be extended to other image processing fields requiring high-precision edge detection, such as fingerprint recognition and iris recognition.
[0111] 2) By dividing the image into blocks and calculating the direction and frequency fields for each block separately, the local characteristics of the ring structure in the corneal topography can be more accurately described. This method effectively solves the problem of irregular ring shapes in complex images, provides a reliable data foundation for subsequent feature point extraction, and improves the robustness of feature point extraction.
[0112] 3) Using the least squares method, an ellipse is fitted to the coordinate points extracted from each ring edge. Outliers are filtered out by combining the fitted center, mean, and standard deviation of each ring. This effectively eliminates erroneous points caused by eyelash occlusion or noise interference, while also accounting for the fact that the coordinates of the center of each ring may vary. This method not only improves the accuracy of subsequent feature point extraction but also provides an effective solution for eliminating interference in complex images.
[0113] 4) A cubic spline interpolation algorithm is used to interpolate feature points, ensuring that every angle within a 360-degree range has a corresponding coordinate point, thereby achieving complete extraction of corneal topography feature points. This method not only improves the continuity of feature point extraction, significantly enhancing the completeness and accuracy of feature point extraction, but also provides a more accurate data foundation for subsequent corneal curvature calculation and morphological analysis.
[0114] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0115] 1) By normalizing the image blocks by standard deviation and calculating the direction field and frequency field, combined with the application of multiple groups of Gabor filters, the noise in the image can be removed more accurately and effectively. This enables the algorithm to adapt to circular structures of different directions and frequencies while retaining the true circular features, ensuring that feature points can be accurately extracted in various complex situations.
[0116] 2) Least squares ellipse fitting is used to quickly and accurately fit the contours of the circular rings in corneal topography. By calculating the distance from each point to the center of the ellipse and combining the mean and standard deviation to filter outliers, interference points can be effectively eliminated. Thirdly, a cubic spline interpolation algorithm can interpolate feature points within a 360-degree range, ensuring that each angle has a corresponding coordinate point, further improving the integrity and accuracy of feature point extraction.
[0117] 3) Using sub-pixel edge localization technology, the positioning accuracy of feature points is improved to the sub-pixel level, significantly enhancing the precision of edge detection and the accuracy of feature point extraction. The feature point extraction algorithm provided by this invention is not only suitable for corneal topography analysis but also has broad application in other image processing fields, such as fingerprint recognition and iris recognition. Its high precision, high robustness, and automation make it promising for broad application in medical image processing, biometric recognition, and other fields.
[0118] Reference Figure 2 , a corneal topography feature point extraction system based on Gabor filtering and sub-pixel, including:
[0119] The first module 201 is used to collect original images based on corneal topography and perform image preprocessing to obtain data-normalized images;
[0120] The second module 202 is used to obtain the main direction field and frequency field of the image after data normalization, and perform image filtering processing using an even-symmetric Gabor filter to obtain a circular feature image;
[0121] The third module 203 is used to perform edge coarse location extraction and sub-pixel edge fine location extraction on the annular feature image in sequence to obtain sub-pixel corneal topography image feature points.
[0122] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0123] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for extracting corneal topography feature points based on Gabor filtering and sub-pixel, characterized in that: The following steps are involved: Based on the corneal topography, the original image is collected and preprocessed to obtain the image after data standardization; Obtain the main direction field and frequency field of the image after data standardization, and perform image filtering through an even-symmetric Gabor filter to obtain a circular feature image; The circular feature image is sequentially subjected to edge coarse location extraction and sub-pixel edge fine location extraction to obtain sub-pixel corneal topography image feature points.
2. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 1, characterized in that: The step of collecting original images based on the corneal topography and performing image preprocessing to obtain a data-standardized image specifically includes: The original image is acquired through corneal topography and a circular mask is generated; Perform mask operation between the original image and the circular mask to extract the target area of the image and obtain the image after mask operation; Normalizing the image after mask operation to obtain a normalized mask operation image; Divide the normalized mask operation image to generate several sub-image blocks; Obtain the mean and standard deviation values of several sub-image blocks and merge them separately to obtain the mean matrix and standard deviation matrix of the image; According to the mean matrix and the standard deviation matrix of the image, the standard deviation normalization calculation is performed on the normalized mask operation image to obtain the image after data standardization.
3. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 2, characterized in that: The step of obtaining the main direction field and frequency field of the image after data normalization, and performing image filtering processing using an even-symmetric Gabor filter to obtain a circular ring feature image specifically includes: Acquire the main direction field of the image after data standardization and the frequency field of the image after data standardization; Generate in advance several groups of even-symmetric Gabor filters with directions uniformly changing from 0° to 180°; Based on the main direction field of the image after data normalization, the even-symmetric Gabor filter with the closest direction is selected, and the frequency field of the image after data normalization is input into the selected even-symmetric Gabor filter to perform image filtering to obtain an image mask with circular ring features; Mask calculation is performed on the image mask with the ring feature and the image after the mask operation to obtain the ring feature image.
4. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 3, characterized in that: The step of obtaining the main direction field of the image after data standardization and the frequency field of the image after data standardization specifically includes: The horizontal gradient and vertical gradient of the image after data normalization are obtained through the Sobel operator; According to the horizontal gradient and vertical gradient of the image after data standardization, the horizontal direction field and the vertical direction field are obtained and integrated to obtain the preliminary main direction field of the image after data standardization; Performing smoothing and denoising on the preliminary main direction field of the image after data standardization to obtain the main direction field of the image after data standardization; Based on the data-normalized image, calculate the grayscale projection change curve in the vertical main direction and obtain the average pixel distance between the peak points of the curve; The frequency corresponding to the grayscale projection change curve is calculated according to the average pixel distance between the peak points of the curve, and the frequency field of the image after data standardization is obtained.
5. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 4, characterized in that: The step of sequentially performing coarse edge location extraction and sub-pixel fine edge location extraction on the circular feature image to obtain sub-pixel corneal topography image feature points specifically includes: The Canny edge extraction algorithm is used to perform rough edge location extraction on the circular feature image to obtain a rough edge image. Performing contour recognition and extraction on the roughly positioned edge image to obtain a number of contour feature information, wherein the contour feature information includes coordinate point information of a circular ring; Sorting the contour feature information in ascending order of contour area, and deleting coordinate points whose contour area is smaller than a preset threshold, to obtain a sorted contour data information array; Extract the contour elements from the sorted contour data information array, and perform sub-pixel edge fine positioning to obtain the sub-pixel level circular contour; The sub-pixel level circular contour is subjected to outlier filtering and interpolation processing to obtain the sub-pixel level corneal topography image feature points.
6. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 5, characterized in that: The step of extracting the contour elements from the sorted contour data information array and performing sub-pixel edge fine positioning to obtain the sub-pixel level circular contour specifically includes: Based on the sorted contour data information array, the coordinate information of the edge points in the contour is extracted, and the gradient in the target neighborhood is selected for surface fitting to construct a gradient surface fitting function; The coefficients of the gradient surface fitting function are solved through the facet model to construct the Hessian matrix; Determine the eigenvalue and eigenvector based on the Hessian matrix, wherein the eigenvalue is used to determine whether it is a valid edge point, and the eigenvector is used to determine the offset direction of the sub-pixel point; If the eigenvalue is less than zero, the sub-pixel coordinate offset of the coordinate information of the edge point corresponding to the eigenvalue is obtained, and correction is performed along the direction of the eigenvector to obtain the sub-pixel level circular contour.
7. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 6, characterized in that: The step of filtering abnormal points and performing interpolation processing on the sub-pixel level circular contour to obtain sub-pixel level corneal topography image feature points specifically includes: The sub-pixel level circular contour is fitted with an ellipse by the least square method to obtain the coordinates of the ellipse center; Get the distance between the coordinates of the ellipse center and the coordinates of the edge points in the contour to get the distance array; Obtain the mean and standard deviation of the distance array, and delete the erroneous points in the sub-pixel circular contour based on the preset error point judgment conditions to obtain the filtered contour array; The angle corresponding to each group of contour points in the filtered contour array is obtained, and the angles are sequentially connected end to end and subjected to cubic spline interpolation processing to obtain sub-pixel corneal topography image feature points.
8. The method for extracting corneal topography feature points based on Gabor filtering and sub-pixel according to claim 7, characterized in that: The expression of the preset error point judgment condition is specifically as follows: distance(i)>mean dist +2*std dist In the above formula, distance(i) represents the error point judgment condition, mean dist Represents the mean of the distance array, std dist Represents the standard value of the distance array, and i represents the i-th contour point.
9. A corneal topography feature point extraction system based on Gabor filtering and sub-pixel, characterized in that: Includes the following modules: The first module is used to collect original images based on corneal topography and perform image preprocessing to obtain data-standardized images; The second module is used to obtain the main direction field and frequency field of the image after data standardization, and perform image filtering through an even-symmetric Gabor filter to obtain a circular feature image; The third module is used to perform coarse edge location extraction and sub-pixel fine edge location extraction on the circular feature image in sequence to obtain sub-pixel corneal topography image feature points.