A corneal curvature calculation method and related device

By acquiring multiple frames of low-quality eye images while the target object moves, performing bright spot detection and ellipse parameter fitting, the computing power requirement for high-precision corneal curvature calculation is met, achieving high-precision calculation with low computing power.

CN118383714BActive Publication Date: 2025-09-26BRIGHTVIEW MEDICAL TECHNOLOGIES (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410671402.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-09-26
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Existing technologies require high-quality, high-resolution eye images when calculating corneal curvature, which requires high computing power and makes it difficult to achieve high-precision calculations with low computing power.

Method used

By acquiring multiple frames of low-quality and low-resolution eye images while the target object moves back and forth, bright spot detection, ellipse fitting and area curve fitting are performed to determine the horizontal coordinate of the minimum bright spot area, and the corneal curvature is calculated using the ellipse parameters at this location.

Benefits of technology

High-precision corneal curvature calculation is achieved under low-quality and low-resolution eye image conditions, reducing the computing power required for calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118383714B_ABST
    Figure CN118383714B_ABST
Patent Text Reader

Abstract

The present application provides a corneal curvature calculation method and related device, which are applied to the field of image processing technology. By performing bright spot detection on each frame of eye image, multiple bright spots that meet a preset number range in each frame of eye image are quickly located, and the bright spot center point of each bright spot in each frame of eye image and the bright spot area of ​​each frame of eye image are further determined. At the same time, by performing curve fitting on the bright spot areas of multiple frames of eye images acquired during movement, the horizontal coordinate corresponding to the minimum bright spot area in the fitted curve is determined. Since the location with the minimum bright spot area during movement is the location with the best image quality, the corneal curvature is calculated using the ellipse parameters at this location. Even if the eye image is a low-quality, low-resolution image, high-precision angular curvature calculation can be achieved. At the same time, since the eye image used to calculate the corneal curvature is a low-quality, low-resolution image, the required computing power is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and more specifically, to a corneal curvature calculation method and related devices. Background Art

[0002] The cornea is one of the eye's primary optical media. Corneal curvature refers to the curvature of the corneal surface. Corneal curvature affects the focusing and refraction of light. Proper corneal curvature ensures that light entering the eye is correctly focused on the retina, thus ensuring clear vision. Calculating corneal curvature can assess corneal health and assist in the diagnosis of eye diseases.

[0003] Calculating corneal curvature using bright spot reflection points is a common ophthalmic measurement technique. This technique uses light spots reflected from the corneal surface to obtain information about the cornea's shape and curvature. However, this technology currently requires processing high-quality, high-resolution eye images, which requires significant computing power. Summary of the Invention

[0004] In view of this, the present application provides a corneal curvature calculation method and related devices, which realize low-computing-power, high-precision corneal curvature calculation based on low-quality eye images.

[0005] In order to achieve the above-mentioned invention objectives, the specific technical solutions provided by this application are as follows:

[0006] The first aspect of the present application provides a method for calculating corneal curvature, comprising:

[0007] Acquiring multiple frames of eye images of the target object with reflected light spots while the target object moves back and forth along the shooting direction;

[0008] Performing bright spot detection on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range;

[0009] Determine the bright spot center point of each bright spot in each frame of the eye image;

[0010] Performing ellipse fitting on the bright spot center point of each frame of the eye image to obtain ellipse parameters of each frame of the eye image;

[0011] Calculate the area of ​​each bright spot to obtain the bright spot area of ​​each frame of eye image;

[0012] Performing curve fitting on the bright spot areas of multiple frames of eye images, and determining the abscissa corresponding to the minimum value of the bright spot area in the fitted curve;

[0013] Linear fitting is performed on the major axis value and the minor axis value in the ellipse parameters of the multiple frames of eye images, and the target major axis value and the target minor axis value are obtained according to the horizontal coordinates in the fitting results, which are used to calculate the corneal curvature.

[0014] A second aspect of the present application provides a corneal curvature calculation device, comprising:

[0015] An image acquisition unit, configured to acquire multiple frames of eye images of the target object with reflected light spots while the target object moves back and forth along a shooting direction;

[0016] a bright spot detection unit, configured to perform bright spot detection on each frame of the eye image, and obtain a plurality of bright spots in each frame of the eye image that meet a preset number range;

[0017] A bright spot center point determination unit, used to determine the bright spot center point of each bright spot in each frame of the eye image;

[0018] an ellipse parameter calculation unit, configured to perform ellipse fitting on the bright spot center point of each frame of the eye image to obtain the ellipse parameters of each frame of the eye image;

[0019] A bright spot area calculation unit, used to calculate the area of ​​each bright spot and obtain the bright spot area of ​​each frame of the eye image;

[0020] A minimum bright spot determination unit is used to perform curve fitting on the bright spot areas of multiple frames of eye images, and determine the abscissa corresponding to the minimum value of the bright spot area in the fitted curve;

[0021] The corneal curvature calculation unit is used to perform linear fitting on the major axis value and the minor axis value in the ellipse parameters of multiple frames of eye images, and obtain the target major axis value and the target minor axis value according to the horizontal coordinate in the fitting results, which are used to calculate the corneal curvature.

[0022] The present application discloses a corneal curvature calculation method and related device. After acquiring multiple frames of eye images of a target object with reflected light spots while the target object moves back and forth along a shooting direction, the method then performs bright spot detection on each frame of the eye image to quickly locate multiple bright spots within a preset number range in each frame of the eye image, and further determines the bright spot center point and bright spot area of ​​each bright spot in each frame of the eye image. Simultaneously, a curve fitting is performed on the bright spot areas of the multiple frames of eye images acquired during the movement process to determine the horizontal coordinate corresponding to the minimum bright spot area in the fitted curve. Since the location with the minimum bright spot area during the movement is the location with the best image quality, the corneal curvature is calculated using the ellipse parameters at that location. This allows high-precision angular curvature calculation to be achieved even for low-quality, low-resolution eye images. Furthermore, since the eye images used to calculate the corneal curvature are low-quality, low-resolution images, the required computing power is relatively low. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0024] Figure 1 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application;

[0025] Figure 2 A schematic flow chart of a corneal curvature calculation method disclosed in an embodiment of the present application;

[0026] Figure 3 A schematic flow chart of a bright spot detection method disclosed in an embodiment of the present application;

[0027] Figure 4 A schematic flow chart of a method for determining the center point of a bright spot disclosed in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of an image block disclosed in an embodiment of the present application;

[0029] Figure 6 A schematic diagram of an effective pixel area disclosed in an embodiment of the present application;

[0030] Figure 7 This is a schematic diagram of the multi-scale refinement process disclosed in the embodiment of this application;

[0031] Figure 8 This is a flow chart of the bright spot center point ellipse fitting method disclosed in an embodiment of the present application;

[0032] Figure 9 This is a flow chart of the circumferential minor axis correction method disclosed in an embodiment of the present application;

[0033] Figure 10 Schematic diagram of the process of the bright spot area curve fitting method disclosed in the embodiment of the present application;

[0034] Figure 11 This is a flow chart of the major-minor axis straight line fitting method disclosed in an embodiment of the present application;

[0035] Figure 12 This is a schematic structural diagram of a corneal curvature calculation device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following describes the embodiments of the present application in conjunction with the accompanying drawings. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.

[0037] The present application can be applied to the field of eye image processing technology, and can be, but is not limited to, applied to electronic devices with image processing functions, such as eye detection devices. The product form of the electronic device is described below.

[0038] Figure 1 A structural diagram of an electronic device 100 is provided. Figure 1 As shown, the electronic device includes a bus 101, a processor 102, a communication interface 103, and a memory 104. The processor 102, the memory 104, and the communication interface 103 communicate with each other via the bus 101.

[0039] The bus 101 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 1 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0040] The processor 102 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0041] The memory 104 may include volatile memory, such as random access memory (RAM). The memory 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0042] The memory 104 may be used to store software codes related to the corneal curvature calculation method, and the processor 102 may execute the steps of the corneal curvature calculation method of the chip, and may also schedule other units to implement corresponding functions.

[0043] It should be understood that the above-mentioned electronic device 100 can be a centralized or distributed device, and the processor in the above-mentioned electronic device 100 can be a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0044] See also Figure 2 , Figure 2 This is a flowchart of a method for calculating corneal curvature provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, a corneal curvature calculation method provided in an embodiment of the present application uses the above-mentioned electronic device 100, and the operating system of the electronic device 100 can be a low-computing-power Raspberry Pi operating system. The corneal curvature calculation method provided in this embodiment can include steps 201 to 207, and these steps are described in detail below.

[0045] 201: Acquire multiple frames of eye images of the target object with reflected light spots while the target object moves back and forth along a shooting direction;

[0046] The target object is the object whose corneal curvature is to be calculated, which may be a human or an animal.

[0047] For example, a target subject is on a mobile platform. The mobile platform is first controlled to move the target subject's pupil center to the target point. The target subject's pupil is facing a light source, such as an LED (Light Emitting Diode), so that the target cornea displays a reflected light spot. The target subject's pupil center can be detected using any existing detection method. An image capture device is then controlled to move back and forth along the shooting direction from the target point. During this movement, multiple frames of the target subject's eye images with reflected light spots are captured.

[0048] The image acquisition device used to acquire the eye image of the target object may be a low-resolution image acquisition device, which obtains a low-quality, low-resolution eye image.

[0049] 202: Performing bright spot detection on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range;

[0050] Exemplarily, bright spot detection is performed based on the grayscale value of the eye image.

[0051] The target subject's cornea displays reflected light spots with the aid of a light source. Typically, the light source is an LED light. For example, the LED lights are arranged in a regular quadrilateral or hexagonal pattern. To achieve high-precision corneal curvature calculation based on low-quality eye images, this embodiment requires a sufficient number of reflected light spots. Furthermore, since the cornea is typically an elliptical surface rather than a simple sphere, the light spots must be fitted to form an ellipse. Ellipse fitting requires at least six points, so the number of bright spots must be no less than six.

[0052] Exemplarily, the preset number range is greater than or equal to 6 and less than or equal to the number of LED lights.

[0053] If the number of bright spots detected in the eye image is not within the preset number range, the eye image is considered invalid and needs to be acquired again.

[0054] 203: Determine the bright spot center point of each bright spot in each frame of the eye image;

[0055] For example, in order to achieve the purpose of calculating corneal curvature with low computing power, this embodiment first calculates the centroid of the bright spot. The centroid of the bright spot is calculated by processing only the image blocks within a certain range centered on the bright spot. The calculation amount of the centroid is small. Then, the centroid of the bright spot is refined and corrected to obtain the center point of the bright spot.

[0056] For example, the centroid of the bright spot is first calculated, and then the contour detection method is used to refine and correct the centroid. The interfering bright spots are eliminated according to the geometric characteristics of the reflected light spot to improve the accuracy of the calculated contour, determine the contour range of the light spot, and then correct the centroid of the light spot based on the contour range of the light spot to further improve the accuracy.

[0057] For example, the centroid of the bright spot is first calculated, and then the contour detection method is used to refine and correct the centroid. The interfering bright spots are eliminated according to the geometric characteristics of the reflected light spot, the accuracy of the calculated contour is improved, the contour range of the light spot is determined, and then the centroid of the light spot is corrected using a multi-scale method. Multi-scale is to iteratively correct the center point of the light spot using gradually reduced image blocks. Here, the aforementioned light spot contour range can be used for calculation to avoid adjacent light spots affecting each other's calculation.

[0058] 204: Performing ellipse fitting on the bright spot center point of each frame of the eye image to obtain ellipse parameters of each frame of the eye image;

[0059] The ellipse parameters include: major axis value, minor axis value, two foci and axis angle, where the axis angle is the angle between the major axis and the horizontal axis.

[0060] 205: Calculate the area of ​​each bright spot to obtain the bright spot area of ​​each frame of the eye image;

[0061] For example, for each frame of the eye image, an accurate bright spot can be screened out in the process of determining the center point of the bright spot. Based on this, the contour of the bright spot is detected to obtain the maximum area corresponding to each bright spot. The average of the maximum areas corresponding to all bright spots is the bright spot area of ​​the frame of the eye image.

[0062] 206: Performing curve fitting on the bright spot areas of the multiple frames of eye images, and determining the abscissa corresponding to the minimum value of the bright spot area in the fitted curve;

[0063] The bright spot area of ​​multiple frames of eye images can be represented by a sequence. An element (ai, i) in the sequence indicates that the bright spot area of ​​the i-th frame of the eye image is ai. Based on this sequence, we can only determine which frame of the eye image has the smallest bright spot area, which is not precise enough.

[0064] To obtain a more precise minimum area, a curve fitting is performed on the bright spot area of ​​multiple frames of eye images, resulting in a curve whose horizontal axis represents the position of the eye image in the shooting direction and the vertical axis represents the bright spot area. It should be noted that the horizontal axis corresponding to the minimum bright spot area value in the fitted curve is more precise than that of the integer frames before fitting, and can be refined to decimals, such as 3.2.

[0065] 207: Perform linear fitting on the major axis value and the minor axis value in the ellipse parameters of the multiple frames of eye images, and obtain the target major axis value and the target minor axis value according to the horizontal coordinate in the fitting results, for calculating the corneal curvature.

[0066] Since the horizontal coordinate is obtained by curve fitting the bright spot area of ​​multiple frames of eye images, in order to accurately obtain the target major axis value and target minor axis value corresponding to the horizontal coordinate, it is also necessary to perform linear fitting on the major axis value and minor axis value in the ellipse parameters of the multiple frames of eye images, so as to obtain the target major axis value and target minor axis value corresponding to the horizontal coordinate.

[0067] Substitute the target long axis value and target short axis value corresponding to the abscissa into the following corneal curvature calculation formula:

[0068] R1=(longAxis-b) / k;

[0069] R2=(shortAxis-b) / k;

[0070] Among them, b and k are corneal curvature calculation parameters, which are obtained by fitting multiple sets of calibration values, longAxis is the long axis value, and shortAxis is the short axis value.

[0071] R1 represents the principal curvature radius of the cornea (i.e., principal curvature), which is the curvature radius of the anterior surface of the cornea in the horizontal direction.

[0072] R2 represents the minor curvature radius of the cornea (i.e., minor curvature), which is the radius of curvature in the direction perpendicular to R1.

[0073] These two parameters are often used as important indicators for assessing corneal morphology and refractive status. For example, in corneal topography, the values ​​of R1 and R2 can be used to calculate the radius of curvature and morphology of the cornea, and thus assess whether there is corneal refractive error.

[0074] The present application discloses a method for calculating corneal curvature. After acquiring multiple frames of eye images of a target object with reflected light spots while the target object moves back and forth along a shooting direction, the method then performs bright spot detection on each frame of the eye image to quickly locate multiple bright spots within a preset number range in each frame of the eye image, and further determines the bright spot center point and bright spot area of ​​each bright spot in each frame of the eye image. Simultaneously, curve fitting is performed on the bright spot areas of the multiple frames of eye images acquired during the movement process to determine the horizontal coordinate corresponding to the minimum bright spot area in the fitted curve. Since the point with the minimum bright spot area during the movement process is the point with the best image quality, the corneal curvature is calculated using the ellipse parameters at that point. This allows high-precision angular curvature calculation to be achieved even if the eye image is a low-quality, low-resolution image. Furthermore, since the eye image used to calculate the corneal curvature is a low-quality, low-resolution image, the required computing power is relatively low.

[0075] The following examples illustrate the specific implementation of each step in the above embodiment.

[0076] See also Figure 3 In the first embodiment described above, step 202 is to perform bright spot detection on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range. A possible implementation method includes the following steps 301-303.

[0077] 301: Performing morphological processing on each frame of the eye image to obtain multiple frames of images generated during the morphological processing, where the morphological processing includes at least two of reduction processing, dilation processing, and erosion processing;

[0078] The purpose of performing morphological processing on the eye image to generate multiple frames of images is to replace the pixel value of the midpoint of the eye image with the minimum value and / or maximum value within the corresponding range. The bright spot becomes larger after the dilation processing, and becomes smaller after the erosion processing, which facilitates the subsequent comparison of the pixel values ​​of the midpoint of the multiple frames of images and quickly identifies the bright spot.

[0079] This embodiment does not limit the order and number of times of the reduction process, the expansion process, and the erosion process in the morphological processing.

[0080] Exemplarily, a method for performing morphological processing on an eye image includes the following steps 3011-3014:

[0081] 3011: For each frame of the eye image, reduce the eye image to obtain a first image imageNew;

[0082] For example, the length and width of the eye image are reduced to half of the original size.

[0083] At the same time, to ensure that scaling does not affect the quality of the bright spot, the scaling method is: taking the new point (i, j) in the first image as an example, its pixel value is equal to the maximum value of (i×2, j×2), (i×2+1, j×2), (i×2, j×2+1), and (i×2+1, j×2+1) in the original eye image.

[0084] 3012: Using a first elliptical filter kernel, dilate the first image imageNew to obtain a second image imageMax7;

[0085] The first elliptical filter kernel may be 7×7.

[0086] 3013: dilate the first image imageNew using a second elliptical filter kernel to obtain a third image imageMax3;

[0087] The second elliptical filter kernel may be 3×3.

[0088] 3014: Use a third elliptical filter kernel to perform erosion processing on the first image imageNew to obtain a fourth image imageMin5.

[0089] The third elliptical filter kernel may be 5×5.

[0090] 302: Compare pixel values ​​of points in the multiple frames of image to obtain a first candidate point set consisting of multiple bright spot candidate points;

[0091] This embodiment does not limit the method for comparing the pixel values ​​of the midpoints of the multiple frames of images.

[0092] Take the example of the multiple frames of images including the first image, the second image, the third image, and the fourth image. The first image is obtained by reducing the eye image, the second image is obtained by dilating the first image using a first elliptical filter kernel, the third image is obtained by dilating the first image using a second elliptical filter kernel, and the fourth image is obtained by corroding the first image using a third elliptical filter kernel, where the first elliptical filter kernel is larger than the second elliptical filter kernel. A possible implementation of step 302 includes the following steps 3021-3023:

[0093] 3021: Subtract the fourth image from the second image to obtain a fifth image imageSub;

[0094] The second image is the image after dilation processing, and the bright spot becomes larger. The fourth image is the image after erosion processing, and the bright spot becomes smaller. Subtracting the two can highlight the bright spot.

[0095] 3022: For any point, if the pixel value imageMax7(i, j) of the point in the second image is equal to the pixel value imageNew(i, j) of the point in the first image, and the pixel value imageMax7(i, j) of the point in the second image is greater than a first threshold thresh1, and the pixel value imageSub(i, j) of the point in the fifth image is greater than a second threshold thresh2, and the pixel value imageMin5(i, j) of the point in the fourth image is less than a third threshold thresh3, calculate the mean value (meanValue) of the pixels within a first preset range centered on the point. If the mean value (meanValue) is less than a fourth threshold thresh4, determine the point as a bright spot candidate.

[0096] Among them, the first preset range can select the filter kernel size corresponding to imageMin5.

[0097] That is to say, the bright spot candidate points need to meet the following two conditions:

[0098] Condition 1: imageMax7(i,j) == imageNew(i,j)

[0099] and imageMax7(i,j)> thresh1

[0100] and imageSub(i,j)>thresh2

[0101] and imageMin5(i,j)< thresh3;

[0102] Condition 2: meanValue < thresh4.

[0103] Among them, in condition 1, imageMax7(i,j)==imageNew(i,j) means that the pixel value after dilation processing corresponding to the bright spot candidate point should be a maximum value;

[0104] imageMax7(i,j)>thresh1 indicates that the brightness of the bright spot candidate point is high, and its pixel value should also be greater than the set first threshold;

[0105] imageSub(i,j)> thresh2 means that the pixel value of the bright spot candidate point after dilation processing and the pixel value after erosion processing should be greater than the set second threshold;

[0106] imageMin5(i,j)< thresh3 means that the pixel value of the bright spot candidate point after corrosion processing should be a minimum value.

[0107] Condition 2 aims to remove interfering reflected light spots. Interfering light spots may exist, perhaps from large areas of light. In this case, even after erosion, the average pixel value within the set range of the interfering light spots will still be large. However, the range of the actual light spot is limited, so after erosion, the area of ​​the light spot will inevitably decrease, making the average pixel value within the range below the set threshold.

[0108] 3023: If the number of bright spot candidate points is not less than the fifth threshold, determine the bright spot candidate point set as the first candidate point set.

[0109] Exemplarily, the fifth threshold is 6.

[0110] If the number of bright spot candidate points is less than the fifth threshold, that is, less than the number of LED lights, then the bright spot detection is invalid.

[0111] 303: Divide the first candidate point set into multiple second candidate point sets based on the distances between the bright spot candidate points in the first candidate point set, and determine the bright spots corresponding to each of the second candidate point sets, wherein the number of the second candidate point sets is within a preset number range.

[0112] Exemplarily, a possible implementation of step 303 includes the following steps 3031-3033:

[0113] 3031: For any candidate point in the first candidate point set, if the distance between the candidate point and other candidate points in the first candidate point set is less than or equal to the sixth threshold, add the candidate point and the candidate points that meet the threshold condition to the candidate point set P, and determine a target range with all candidate points in the candidate point set P as the center and the seventh threshold as the radius. Add the candidate points in the first candidate point set that are within the target range to the candidate point set P until the number of candidate points in the candidate point set P remains unchanged. Return to the step of adding any candidate point in the first candidate point set and the candidate points that meet the threshold condition to the candidate point set if the distance between the candidate point and other candidate points in the first candidate point set is less than or equal to the sixth threshold, until all candidate points in the first candidate point set are added to the corresponding candidate point set.

[0114] 3032: If the number of candidate point sets is not less than the fifth threshold, determine each candidate point set as the second candidate point set;

[0115] If the number of the candidate point set is less than the fifth threshold, that is, less than the number of LED lights, it means that the selection of the candidate point set is invalid.

[0116] 3033: Determine the coordinate mean of all candidate points in each of the second candidate point sets as the coordinate of the corresponding bright spot candidate point.

[0117] It should also be noted that the coordinates of the bright spot candidate points are the coordinates of the bright spots. After obtaining the bright spot candidate points, the coordinates of each bright spot candidate point need to be multiplied by 2 to restore the coordinate points in the original eye image size.

[0118] The following is an introduction to a possible implementation of step 203 in the first embodiment: determining the bright spot center point of each bright spot in each frame of the eye image. Figure 4 For each frame of eye image, the following steps 401-407 are specifically included:

[0119] 401: Processing the multiple bright spots using a centroid method to obtain the centroids of the multiple bright spots;

[0120] Exemplarily, first, within a second preset range centered on the bright spot (i.e., the bright spot candidate point obtained in step 3033), a first image block is acquired, and Gaussian filtering (a 3×3 Gaussian filter kernel with a sigma of 1.0 may be used) is performed on the first image block to obtain a second image block. Then, the centroid coordinates of the second image block are calculated, and finally, the centroid coordinates of the second image block are restored to the coordinates in the original eye image, thereby obtaining the first sub-pixel coordinates of the centroid of the bright spot.

[0121] This embodiment provides two methods for calculating the centroid coordinates of the second image block for illustration.

[0122] Method 1

[0123] Use interpolation to enlarge the second image block by 10 times, and then calculate the centroid coordinates according to the following formula:

[0124]

[0125] Method 2

[0126] The centroid coordinates are calculated using the following formula:

[0127]

[0128] In the above two methods, centerx and centery are the horizontal and vertical coordinates of the center of mass coordinates; block is the second image block, block(i, j) represents the coordinates of the midpoint of the second image block, method one is the enlarged image block, and method two does not require enlargement; width and height are the width and height of the second image block; totalWeight is the sum of the weights, which can be understood as an intermediate variable.

[0129] Compared with method 1, method 2 does not require enlarging the image block and has lower computational complexity.

[0130] 402: Selecting, based on the centroids of the multiple bright spots, multiple target bright spots that meet the geometric characteristics of the reflected light spots from the multiple bright spots;

[0131] Because LED lights are generally distributed in regular shapes, such as regular hexagons, regular octagons, regular dodecagons, etc., the bright spots theoretically correspond one-to-one with the LED lights. However, there may be some interference points that are not filtered out. On this basis, the screening conditions are set according to the geometric characteristics of the reflected light spots corresponding to the LED lights:

[0132] If the distance difference between consecutive points (i.e., the centroids of the above-mentioned bright spots) is within a certain range, the vector angles corresponding to two consecutive points change clockwise or counterclockwise, and the change angle is within a certain range, etc., the group of points that meets the conditions is selected from these bright spots according to the screening conditions as the correct bright spots (the number must be less than or equal to the number of LED lights), that is, the target bright spots.

[0133] It should be noted that the number of target bright spots must be greater than or equal to 6 before subsequent operations can be performed.

[0134] 403: Processing the centroid of the target bright spot using a fitting method to obtain a center point of the bright spot to be corrected;

[0135] Exemplarily, first, a third image block within a third preset range centered on the centroid of the target bright spot is obtained in the eye image, and the third image block is interpolated and amplified to obtain a fourth image block (e.g., interpolated and amplified 3 times); then, the fourth image block is binarized using the Otsu method to obtain multiple connected domain contours; then, the target contour with the largest area and closest to the centroid of the target bright spot is determined from the multiple connected domain contours, and the contour boundary coordinates of the target contour are obtained; then, an ellipse is fitted on the contour boundary coordinates of the target contour to obtain the coordinates of the center point of the ellipse; finally, the coordinates of the center point of the ellipse are converted into coordinates in the eye image to obtain the second sub-pixel level coordinates of the center point of the bright spot to be corrected.

[0136] 404: Obtain an image block within a preset range centered around the center point of the bright spot to be corrected;

[0137] Exemplarily, first, a fifth image block within a fourth preset range centered on the center point of the bright spot to be corrected is obtained from the eye image, and the fifth image block is interpolated and amplified to obtain a sixth image block (e.g., interpolated and amplified 5 times); then, the sixth image block is continuously dilated twice (e.g., using an elliptical dilation kernel of 3×3 size for dilation) to obtain a seventh image block; finally, an eighth image block within the fifth preset range centered on the center point of the bright spot to be corrected is obtained from the seventh image block.

[0138] After step 404, the calculation can be divided into two branches, one branch for calculating the bright spot area, and the other branch for calculating the bright spot center point.

[0139] Among them, the method for calculating the bright spot area includes: using the Otsu method to binarize the eighth image block to obtain multiple connected domain contours, each corresponding to a bright spot; determining the connected domain contour with the largest area among the multiple connected domain contours as the bright spot with the largest area, and taking the average of the maximum areas corresponding to all bright spots in the eye image as the bright spot area of ​​the eye image of that frame.

[0140] 405: Divide each pixel in the image block into n*m small pixels, and the pixel values ​​of the small pixels are the same as those of the pixels before the division;

[0141] After the two sub-pixel refinement operations (i.e., steps 401 and 403), the center of the bright spot to be corrected is already a floating-point number, such as (101.0864, ​​66.5896). The following implementation implements a more accurate sub-pixel refinement calculation. A circle is best, but this may be time-consuming. To save computing power and speed up calculations, the following processing is based on a square.

[0142] Each pixel in the image block is divided into n×m small pixels, where n and m are natural numbers greater than 0, and for example, can be 10×10.

[0143] 406: For edge pixels of the image block, a valid pixel area is screened out by dividing small pixels;

[0144] Taking the above preset range of 63×63 as an example, except for the pixels in the edge part which use more accurate calculation, the pixels in the other parts are processed as 10×10 small pixels.

[0145] For edge pixels, such as the pixel (70.0864, ​​35.5896) corresponding to the upper left corner, the second floating point is rounded to (70.1, 35.6), so it actually corresponds to (10-1) × (10-6) = 36 small pixels; the pixel corresponding to the lower right corner is (132.0864, ​​97.5896), which is rounded to (132.1, 97.6), so it actually corresponds to 9×4 small pixels.

[0146] If the coordinates of the center point of the bright spot to be corrected are (1.22, 1.41), the corresponding Figure 5 The 3×3 matrix shown splits the upper left corner pixel into 10×10 small pixels. Figure 6 The matrix shown. Figure 5 The pixel corresponding to the upper left corner is (0.22, 0.41), which is rounded to (0.2, 0.4). Therefore, Figure 5 The actual effective pixel area in the upper left corner is Figure 6 The darkest fill area in the image (counting starts at 0).

[0147] 407: Calculate the coordinates of the center point of the bright spot to be corrected according to the effective pixel area of ​​the edge pixel and the small pixel areas of the remaining pixels in the image block.

[0148] The calculation formula for the coordinates of the bright spot center point is as follows:

[0149]

[0150] Where a and b are the values ​​of the x- and y-coordinates, rounded to the first floating-point value after rounding off the second floating-point digit. lenx and leny represent the number of pixels in the x and y directions that can be retrieved for this coordinate, respectively. weight is the total weight corresponding to the current coordinate, sumx and sumy are the cumulative counts in the x and y directions for the current coordinate, totalWeightX and totalWeightY are the total weights in the x and y directions, respectively. centerx and centery are the coordinates of the center of mass calculated using the corresponding weights.

[0151] Furthermore, the bright spot center point to be corrected may be subjected to multi-scale refinement processing. Multi-scale processing refers to gradually reducing the image block to further improve the accuracy of the final bright spot center point.

[0152] Specifically, after step 407, the method further includes: after obtaining the center point of the bright spot to be corrected, returning to step 404 to execute: obtaining an image block within a preset range centered on the center point of the bright spot to be corrected, and iteratively correcting the center point of the bright spot to be corrected until the number of iterative corrections reaches a preset value, wherein the preset range in each iterative correction is smaller than the preset range in the previous iterative correction.

[0153] For example, Figure 7 As shown, the preset value of the number of iterative corrections is 3, and the preset range of the first iterative correction corresponds to Figure 7 The red box in the figure shows the center of the bright spot as a red dot. The preset range of the second iteration correction corresponds to Figure 7 The orange box in the figure shows the center of the bright spot, and the preset range of the third iteration correction corresponds to Figure 7 The yellow box in the figure shows the center of the bright spot, which is a yellow dot.

[0154] A possible implementation of step 204 in the first embodiment is described below: performing ellipse fitting on the bright spot center points of each frame of the eye image to obtain ellipse parameters of each frame of the eye image.

[0155] See also Figure 8 A possible implementation of step 204 in the first embodiment above specifically includes the following steps 501-505 for each frame of eye image:

[0156] 501: performing ellipse fitting on the center point of the bright spot to obtain ellipse parameters of each frame of the eye image, the ellipse parameters including: major axis value, minor axis value, two focal points, and axis angle;

[0157] The least squares method can be used to fit an ellipse to the center of the bright spot.

[0158] 502: For each bright spot center point, calculate the sum of the distances between the bright spot center point and the two focal points, and calculate the absolute value of the difference between the sum of the distances and the major axis value;

[0159] 503: Determine whether the absolute value of the difference is greater than an eighth threshold;

[0160] If the absolute value of the difference is greater than the eighth threshold, execute 504: correct the position of the bright spot center point, and return to execute step 501;

[0161] Exemplarily, correcting the position of the bright spot center point includes: calculating a vector angle between the bright spot center point and the ellipse center, maintaining this angle unchanged, and if the bright spot center point is outside the ellipse, fine-tuning it a certain distance toward the ellipse center; otherwise, fine-tuning it a certain distance away from the ellipse center; the fine-tuning distance depends on the absolute value of the difference disSub, and exemplarily, the fine-tuning distance is disSub×0.4.

[0162] If the absolute value of the difference is not greater than the eighth threshold, execute 505: obtain the ellipse parameters of each frame of the eye image.

[0163] Until the absolute value of the difference between the sum of the distances from all the bright spot centers to the two focal points and the major axis is no greater than an eighth threshold.

[0164] Furthermore, considering that when acquiring multiple frames of eye images with reflected light spots of the target object, the image does not move up and down, left and right, but only moves forward and backward, in this case, the axis angle of the ellipse fitted by the bright spot does not change much and is relatively stable. Therefore, after obtaining the ellipse parameters of each frame of the eye image, the axis angle in the ellipse parameters of each frame of the eye image can also be used to correct the major axis value and minor axis value of each frame of the eye image. Please refer to Figure 9 , specifically including steps 601-603:

[0165] 601: Divide the axis angles in the ellipse parameters of the multiple frames of eye images into at least one axis angle set, where the absolute difference between any two axis angles in the axis angle set is less than a ninth threshold;

[0166] Exemplarily, the axial angles in the ellipse parameters of multiple frames of eye images are divided into at least one axial angle set, and the division standard is: taking the axial angle corresponding to a frame of eye image A as an example, if the absolute difference between the axial angles of the remaining frames of eye image B and it is less than the ninth threshold, then the axial angle of B is added to the axial angle set corresponding to A (added with replacement).

[0167] 602: Determine the axis angle set with the largest number of axis angles as a target axis angle set, and determine the average axis angle of the target axis angle set as a target corrected axis angle;

[0168] 603: Correct the long axis value and the short axis value of each frame of the eye image using the target correction axis angle.

[0169] Specifically, the target corrected axial angle is taken as the axial angle obtained after ellipse fitting. Based on this, the axial angle has been determined, and then ellipse fitting is performed on the bright spot center point of each frame of the eye image to obtain the corrected major axis value and the corrected minor axis value.

[0170] A possible implementation of step 206 in the first embodiment described above, namely, performing curve fitting on the bright spot areas of multiple frames of eye images and determining the abscissa corresponding to the minimum bright spot area value in the fitted curve, is described below.

[0171] See also Figure 10 A possible implementation of step 206 in the first embodiment above specifically includes the following steps 701-703:

[0172] 701: Performing a first curve fitting on the bright spot areas of the multiple frames of eye images to obtain a fitted bright spot area of ​​each frame of the eye image;

[0173] It should be noted that before the first curve fitting, the horizontal coordinates of multiple frames of eye images need to be processed. The initial horizontal coordinate is the frame number of the eye image, counting from the initial position (i.e., the target point in the previous article). The horizontal coordinate of the first frame of the eye image is 1, the horizontal coordinate of the second frame of the eye image is 2, and so on.

[0174] Considering that the corneal curvature is calculated for different target objects or the corneal curvature is calculated for the same target object multiple times, the total number of frames of the eye image collected by moving a fixed distance back and forth is not fixed. Therefore, there is a certain error in this initial horizontal coordinate. Assuming the total number of frames is m, the horizontal coordinate is adjusted to i×a, where i<=m and a=100 / m.

[0175] 702: Determine a bright spot area fitting error based on the bright spot area of ​​each frame of the eye image and the bright spot area after fitting;

[0176] The bright spot area fitting error includes at least one of an error mean and an error standard deviation.

[0177] 703 : Performing a second curve fitting on the bright spot area after fitting, for which the bright spot area fitting error satisfies the first preset condition, and determining the abscissa corresponding to the minimum value of the bright spot area in the fitted curve.

[0178] Illustratively, the bright spot area after fitting whose bright spot area fitting error meets the first preset condition is the bright spot area after fitting corresponding to the absolute difference between the bright spot area after fitting and the error mean being less than a preset number of error standard deviations (the preset number may be 3).

[0179] Exemplarily, the horizontal coordinate increases by 0.1 from 1 to 100 each time to obtain the bright spot area corresponding to each horizontal coordinate in the curve after the second curve fitting, thereby determining the horizontal coordinate corresponding to the minimum value of the bright spot area, which is recorded as finalIndex.

[0180] The following is an introduction to a possible implementation method of step 207 in the first embodiment described above: performing linear fitting on the major axis values ​​and minor axis values ​​in the ellipse parameters of multiple frames of eye images, and obtaining the target major axis value and target minor axis value in the fitting results according to the horizontal coordinates.

[0181] See also Figure 11 A possible implementation of step 207 in the first embodiment above specifically includes the following steps 801-805:

[0182] 801: performing linear fitting on the major axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain the fitted major axis value of each frame of eye image, and performing linear fitting on the minor axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain the fitted minor axis value of each frame of eye image;

[0183] Specifically, before fitting the major axis value and the minor axis value, the horizontal coordinate is processed in the same manner as the horizontal coordinate before fitting the bright spot area.

[0184] Furthermore, considering the increase in speed and jitter caused by motor activation when moving and capturing eye images, the first 5%-10% of the data can be eliminated from multiple frames of eye images.

[0185] 802: Determine a long axis value fitting error based on the long axis value of each frame of the eye image and the long axis value after fitting, and determine a short axis value fitting error based on the short axis value of each frame of the eye image and the short axis value after fitting;

[0186] The major axis value fitting error includes at least one of an error mean and an error standard deviation.

[0187] Similarly, the minor axis value fitting error includes at least one of an error mean and an error standard deviation.

[0188] 803: If the fitting error of the major axis value meets the second preset condition, the major axis value is corrected; if the fitting error of the minor axis value meets the third preset condition, the minor axis value is corrected;

[0189] For example, the second preset condition for the long axis value fitting error is that the absolute difference between the error between the fitted long axis value and the long axis value and the error mean is greater than the error standard deviation. A corresponding correction method is to add a first preset ratio of the error to the long axis value, such as 40% of the error between the long axis value and the fitted long axis value.

[0190] For example, the minor axis fitting error satisfies the third preset condition when the absolute difference between the error between the fitted minor axis value and the minor axis value and the error mean is greater than the error standard deviation. A corresponding correction method is to add a second preset ratio of the error to the minor axis value, such as 40% of the error between the minor axis value and the fitted minor axis value.

[0191] 804: performing mean filtering on the corrected major axis value and minor axis value respectively;

[0192] The range of the mean filter is half of the total number of frames. The effective range of the major and minor axes, len, is one-fifth of the total number of frames.

[0193] 805: Perform linear fitting again on the long-axis value and short-axis value after mean filtering corresponding to the eye image within a preset range before and after the horizontal coordinate corresponding to the minimum value of the bright spot area in the fitted curve. In the fitting result, determine that the long-axis value corresponding to the horizontal coordinate is the target long-axis value, and determine that the short-axis value corresponding to the horizontal coordinate is the target short-axis value.

[0194] Exemplarily, the filtered major and minor axis values ​​within the range of ±len frames centered at round(finalIndex) are obtained, and then a straight line fitting is performed on the major and minor axis values ​​within the range (the horizontal axis remains unchanged), where round represents a rounding function.

[0195] Based on the corneal curvature calculation method disclosed in the above embodiment, this embodiment correspondingly discloses a corneal curvature calculation device, see Figure 12 , the device comprises:

[0196] An image acquisition unit 901 is configured to acquire multiple frames of eye images of a target object with reflected light spots while the target object moves back and forth along a shooting direction;

[0197] The bright spot detection unit 902 is used to perform bright spot detection on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range;

[0198] A bright spot center point determination unit 903 is used to determine the bright spot center point of each bright spot in each frame of the eye image;

[0199] an ellipse parameter calculation unit 904, configured to perform ellipse fitting on the bright spot center point of each frame of the eye image to obtain the ellipse parameters of each frame of the eye image;

[0200] The bright spot area calculation unit 905 is used to calculate the area of ​​each bright spot to obtain the bright spot area of ​​each frame of the eye image;

[0201] A minimum bright spot determination unit 906 is configured to perform curve fitting on the bright spot areas of multiple frames of eye images, and determine the horizontal coordinate corresponding to the minimum value of the bright spot area in the fitted curve;

[0202] The corneal curvature calculation unit 907 is used to perform linear fitting on the major axis value and minor axis value in the ellipse parameters of multiple frames of eye images, and obtain the target major axis value and target minor axis value according to the horizontal coordinate in the fitting results, which are used to calculate the corneal curvature.

[0203] In a possible implementation, the bright spot detection unit 902 includes:

[0204] a morphological processing subunit, configured to perform morphological processing on each frame of the eye image to obtain multiple frames of images generated during the morphological processing, wherein the morphological processing includes at least two of reduction processing, expansion processing, and erosion processing;

[0205] a pixel value comparison subunit, configured to compare pixel values ​​of points in the multiple frames of image to obtain a first candidate point set consisting of a plurality of bright spot candidate points;

[0206] a bright spot determination subunit, configured to divide the first candidate point set into a plurality of second candidate point sets based on the distances between the respective bright spot candidate points in the first candidate point set, and determine the bright spot corresponding to each of the second candidate point sets, wherein the number of the second candidate point sets is within a preset number range.

[0207] In a possible implementation, the multiple image frames include a first image, a second image, a third image, and a fourth image; the first image is obtained by reducing an eye image, the second image is obtained by dilating the first image using a first elliptical filter kernel, the third image is obtained by dilating the first image using a second elliptical filter kernel, and the fourth image is obtained by eroding the first image using a third elliptical filter kernel, where the first elliptical filter kernel is larger than the second elliptical filter kernel.

[0208] The pixel value comparison subunit is specifically configured to subtract the fourth image from the second image to obtain a fifth image; for any point, if the pixel value of the point in the second image is equal to the pixel value of the point in the first image, and the pixel value of the point in the second image is greater than a first threshold, and the pixel value of the point in the fifth image is greater than a second threshold, and the pixel value of the point in the fourth image is less than a third threshold, calculate the pixel mean within a first preset range centered on the point; if the pixel mean is less than the fourth threshold, determine the point as a bright spot candidate point; if the number of bright spot candidate points is not less than the fifth threshold, determine the bright spot candidate point set as the first candidate point set.

[0209] In one possible implementation, the bright spot center point determination unit 903 is specifically configured to process multiple bright spots using a centroid method for each frame of the eye image to obtain the centroids of the multiple bright spots; screen out multiple target bright spots that meet the geometric characteristics of the reflected light spots from the multiple bright spots based on the centroids of the multiple bright spots; process the centroids of the target bright spots using a fitting method to obtain the center point of the bright spot to be corrected; obtain an image block within a preset range centered on the center point of the bright spot to be corrected; divide each pixel in the image block into n×m small pixels, and the pixel values ​​of the small pixels are the same as those of the pixels before the division, and n and m are natural numbers greater than 0; for edge pixels of the image block, screen out valid pixel areas using the divided small pixels; and calculate the coordinates of the center point of the bright spot to be corrected based on the valid pixel areas of the edge pixels and the small pixel areas of the remaining pixels in the image block.

[0210] In a possible implementation, the bright spot center point determining unit 903 is further configured to, after calculating the coordinates of the bright spot center point to be corrected based on the effective pixel area of ​​the edge pixels and the small pixel areas of the remaining pixels in the image block, return to the step of obtaining an image block within a preset range centered on the bright spot center point to be corrected, and iteratively correct the bright spot center point to be corrected until the number of iterative corrections reaches a preset value, wherein the preset range in each iterative correction is smaller than the preset range in the previous iterative correction.

[0211] In one possible implementation, the ellipse parameter calculation unit 904 is specifically configured to perform ellipse fitting on the bright spot center point for each frame of the eye image to obtain ellipse parameters for each frame of the eye image, where the ellipse parameters include: a major axis value, a minor axis value, two focal points, and an axial angle; for each bright spot center point, calculate the sum of the distances between the bright spot center point and the two focal points, and calculate the absolute value of the difference between the sum of the distances and the major axis value; if the absolute value of the difference is greater than an eighth threshold, correct the position of the bright spot center point, and return to the step of performing ellipse fitting on the bright spot center point to obtain ellipse parameters for each frame of the eye image, until the absolute value of the difference between the sum of the distances between all the bright spot centers and the two focal points and the major axis is no greater than the eighth threshold.

[0212] In a possible implementation, the corneal curvature calculation device further includes:

[0213] The ellipse parameter correction unit is used to correct the long axis value and short axis value of each frame of eye image using the axis angle in the ellipse parameter of each frame of eye image, specifically:

[0214] Dividing the axis angles in the ellipse parameters of the multiple frames of eye images into at least one axis angle set, wherein the absolute difference between any two axis angles in the axis angle set is less than a ninth threshold;

[0215] Determine the axis position angle set with the largest number of axis position angles as a target axis position angle set, and determine the axis position angle mean of the target axis position angle set as a target corrected axis position angle;

[0216] The target correction axis angle is used to correct the long axis value and the short axis value of each frame of the eye image.

[0217] In one possible implementation, the minimum bright spot determination unit 906 is specifically configured to perform a first curve fitting on the bright spot areas of multiple frames of eye images to obtain a fitted bright spot area for each frame of the eye image; determine a bright spot area fitting error based on the bright spot area and the fitted bright spot area for each frame of the eye image; perform a second curve fitting on the fitted bright spot area for which the bright spot area fitting error meets a first preset condition, and determine, in the fitted curve, the abscissa corresponding to the minimum value of the bright spot area.

[0218] In one possible implementation, the corneal curvature calculation unit 907 is specifically configured to perform linear fitting on the major axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain a fitted major axis value of each frame of eye image, and perform linear fitting on the minor axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain a fitted minor axis value of each frame of eye image; determine a major axis value fitting error based on the major axis value and the fitted major axis value of each frame of eye image, and determine a minor axis value fitting error based on the minor axis value and the fitted minor axis value of each frame of eye image; If the long axis value fitting error meets the second preset condition, the long axis value is corrected; if the short axis value fitting error meets the third preset condition, the short axis value is corrected; mean filtering is performed on the corrected long axis value and short axis value respectively; linear fitting is performed again on the long axis value and short axis value after mean filtering corresponding to the eye image within the preset range before and after the horizontal coordinate, and in the fitting result, the long axis value corresponding to the horizontal coordinate is determined to be the target long axis value, and the short axis value corresponding to the horizontal coordinate is determined to be the target short axis value.

[0219] The present application discloses a corneal curvature calculation device. After acquiring multiple frames of eye images of a target object with reflected light spots while the target object moves back and forth along a shooting direction, the device performs bright spot detection on each frame of the eye image to quickly locate multiple bright spots in each frame of the eye image that meet a preset number range, and further determines the bright spot center point of each bright spot in each frame of the eye image and the bright spot area of ​​each frame of the eye image. At the same time, by performing curve fitting on the bright spot areas of the multiple frames of eye images acquired during the movement, the horizontal coordinate corresponding to the minimum bright spot area in the fitted curve is determined. Since the location with the minimum bright spot area during the movement is the location with the best image quality, the corneal curvature is calculated using the ellipse parameters at that location. Even if the eye image is a low-quality, low-resolution image, high-precision angular curvature calculation can be achieved. At the same time, since the eye image used to calculate the corneal curvature is a low-quality, low-resolution image, the required computing power is relatively low.

[0220] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the corneal curvature calculation method described in any one of the implementation methods in the above embodiments.

[0221] An embodiment of the present application also provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the corneal curvature calculation method described in any one of the implementation methods in the above embodiments.

[0222] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0223] The above-mentioned embodiments can be combined arbitrarily. For the above description of the disclosed embodiments, the features recorded in each embodiment in this specification can be replaced or combined with each other, so that professional and technical personnel in this field can implement or use this application.

[0224] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for calculating corneal curvature, characterized in that: include: Acquiring multiple frames of low-quality and low-resolution eye images of the target object with reflected light spots while the target object moves back and forth along the shooting direction; Performing bright spot detection on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range; Determine the bright spot center point of each bright spot in each frame of the eye image; Performing ellipse fitting on the bright spot center point of each frame of the eye image to obtain ellipse parameters of each frame of the eye image; Calculate the area of ​​each bright spot to obtain the bright spot area of ​​each frame of eye image; Performing curve fitting on the bright spot areas of multiple frames of eye images, and determining the abscissa corresponding to the minimum value of the bright spot area in the fitted curve; Linear fitting is performed on the major axis value and the minor axis value in the ellipse parameters of the multiple frames of eye images, and the target major axis value and the target minor axis value are obtained according to the horizontal coordinates in the fitting results, which are used to calculate the corneal curvature.

2. The corneal curvature calculation method according to claim 1, wherein: The bright spot detection is performed on each frame of the eye image to obtain a plurality of bright spots in each frame of the eye image that meet a preset number range, including: For each frame of the eye image, morphological processing is performed on the eye image to obtain multiple frames of images generated in the morphological processing process, where the morphological processing includes at least two of reduction processing, expansion processing, and erosion processing; Comparing pixel values ​​of points in the multiple frames of image to obtain a first candidate point set consisting of a plurality of bright spot candidate points; The first candidate point set is divided into multiple second candidate point sets according to the distance between each bright spot candidate point in the first candidate point set, and the bright spot corresponding to each second candidate point set is determined, wherein the number of the second candidate point sets is within a preset number range.

3. The corneal curvature calculation method according to claim 2, characterized in that: The multiple frames of images include a first image, a second image, a third image, and a fourth image; the first image is obtained by reducing an eye image, the second image is obtained by dilating the first image using a first elliptical filter kernel, the third image is obtained by dilating the first image using a second elliptical filter kernel, and the fourth image is obtained by eroding the first image using a third elliptical filter kernel, where the first elliptical filter kernel is larger than the second elliptical filter kernel; the pixel values ​​of the midpoints of the multiple frames of images are compared to obtain a first candidate point set consisting of multiple bright spot candidate points, including: subtracting the fourth image from the second image to obtain a fifth image; For any point, if the pixel value of the point in the second image is equal to the pixel value of the point in the first image, the pixel value of the point in the second image is greater than a first threshold, the pixel value of the point in the fifth image is greater than a second threshold, and the pixel value of the point in the fourth image is less than a third threshold, the mean value of pixels within a first preset range centered on the point is calculated. If the mean value of pixels is less than a fourth threshold, the point is determined as a bright spot candidate. If the number of bright spot candidate points is not less than the fifth threshold, the bright spot candidate point set is determined as the first candidate point set.

4. The corneal curvature calculation method according to claim 1, wherein: Determining the bright spot center point of each bright spot in each frame of the eye image includes: For each frame of eye image, multiple bright spots are processed using the centroid method to obtain the centroids of the multiple bright spots; According to the centroids of the multiple bright spots, multiple target bright spots that meet the geometric characteristics of the reflected light spots are screened out from the multiple bright spots; Processing the centroid of the target bright spot using a fitting method to obtain the center point of the bright spot to be corrected; Obtain an image block within a preset range centered at the center point of the bright spot to be corrected; Each pixel in the image block is divided into n×m small pixels, and the pixel values ​​of the small pixels are the same as the pixels before division, and n and m are natural numbers greater than 0; For the edge pixels of the image block, the effective pixel area is filtered out by dividing the small pixels; The coordinates of the center point of the bright spot to be corrected are calculated according to the effective pixel area of ​​the edge pixel and the small pixel areas of the remaining pixels in the image block.

5. The corneal curvature calculation method according to claim 4, characterized in that: After calculating the coordinates of the center point of the bright spot to be corrected based on the effective pixel area of ​​the edge pixel and the small pixel areas of the remaining pixels in the image block, the method further includes: Return to the step of obtaining an image block within a preset range centered on the center point of the bright spot to be corrected, and iteratively correct the center point of the bright spot to be corrected until the number of iterative corrections reaches a preset value, wherein the preset range in each iterative correction is smaller than the preset range in the previous iterative correction.

6. The corneal curvature calculation method according to claim 1, characterized in that: Ellipse fitting is performed on the bright spot center point of each frame of the eye image to obtain the ellipse parameters of each frame of the eye image, including: For each frame of the eye image, an ellipse fitting is performed on the center point of the bright spot to obtain the ellipse parameters of each frame of the eye image, where the ellipse parameters include: a major axis value, a minor axis value, two focal points, and an axis angle; For each bright spot center point, calculate the sum of the distances between the bright spot center point and the two focal points, and calculate the absolute value of the difference between the sum of the distances and the major axis value; If the absolute value of the difference is greater than the eighth threshold, the position of the bright spot center is corrected, and the process returns to the step of performing ellipse fitting on the bright spot center to obtain ellipse parameters for each frame of the eye image, until the absolute value of the difference between the sum of the distances from all bright spot centers to the two focal points and the major axis is no greater than the eighth threshold.

7. The corneal curvature calculation method according to claim 1, characterized in that: After obtaining the ellipse parameters of each frame of eye image, it also includes: The long axis value and short axis value of each frame of eye image are corrected using the axis angle in the ellipse parameters of each frame of eye image, specifically: Dividing the axis angles in the ellipse parameters of the multiple frames of eye images into at least one axis angle set, wherein the absolute difference between any two axis angles in the axis angle set is less than a ninth threshold; Determine the axis position angle set with the largest number of axis position angles as a target axis position angle set, and determine the axis position angle mean of the target axis position angle set as a target corrected axis position angle; The target correction axis angle is used to correct the long axis value and the short axis value of each frame of the eye image.

8. The corneal curvature calculation method according to claim 1, characterized in that: The step of performing curve fitting on the bright spot areas of the multiple frames of eye images and determining the abscissa corresponding to the minimum value of the bright spot area in the fitted curve includes: Performing a first curve fitting on the bright spot area of ​​multiple frames of eye images to obtain the fitted bright spot area of ​​each frame of eye image; Determine the bright spot area fitting error based on the bright spot area of ​​each frame of eye image and the bright spot area after fitting; A second curve fitting is performed on the bright spot area after fitting, for which the bright spot area fitting error meets the first preset condition, and in the fitted curve, the abscissa corresponding to the minimum value of the bright spot area is determined.

9. The corneal curvature calculation method according to claim 1, characterized in that: The step of performing linear fitting on the major axis values ​​and minor axis values ​​in the ellipse parameters of the multiple frames of eye images, and obtaining target major axis values ​​and target minor axis values ​​according to the horizontal coordinates in the fitting results, comprises: Performing linear fitting on the major axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain the fitted major axis value of each frame of eye image, and performing linear fitting on the minor axis values ​​in the ellipse parameters of the multiple frames of eye images to obtain the fitted minor axis value of each frame of eye image; Determining a long axis value fitting error based on the long axis value of each frame of the eye image and the long axis value after fitting, and determining a short axis value fitting error based on the short axis value of each frame of the eye image and the short axis value after fitting; If the fitting error of the major axis value meets the second preset condition, the major axis value is corrected; if the fitting error of the minor axis value meets the third preset condition, the minor axis value is corrected; Perform mean filtering on the corrected major axis value and minor axis value respectively; Linear fitting is performed again on the long axis value and short axis value after mean filtering corresponding to the eye image within a preset range before and after the horizontal coordinate. In the fitting result, the long axis value corresponding to the horizontal coordinate is determined to be the target long axis value, and the short axis value corresponding to the horizontal coordinate is determined to be the target short axis value.

10. A corneal curvature calculation device, characterized in that: include: An image acquisition unit, configured to acquire multiple frames of low-quality and low-resolution eye images of the target object with reflected light spots while the target object moves back and forth along a shooting direction; a bright spot detection unit, configured to perform bright spot detection on each frame of the eye image, and obtain a plurality of bright spots in each frame of the eye image that meet a preset number range; A bright spot center point determination unit, used to determine the bright spot center point of each bright spot in each frame of the eye image; an ellipse parameter calculation unit, configured to perform ellipse fitting on the bright spot center point of each frame of the eye image to obtain the ellipse parameters of each frame of the eye image; A bright spot area calculation unit, used to calculate the area of ​​each bright spot and obtain the bright spot area of ​​each frame of the eye image; A minimum bright spot determination unit is used to perform curve fitting on the bright spot areas of multiple frames of eye images, and determine the abscissa corresponding to the minimum value of the bright spot area in the fitted curve; The corneal curvature calculation unit is used to perform linear fitting on the major axis value and the minor axis value in the ellipse parameters of multiple frames of eye images, and obtain the target major axis value and the target minor axis value according to the horizontal coordinate in the fitting results, which are used to calculate the corneal curvature.

Citation Information

Patent Citations

  • Cornea measurement method and system based on digital speckles, storage medium and processor

    CN117598659A

  • Distance-compensated measuring device for topographic and keratometric measurements of the eye

    DE102014210787A1