An ophthalmic positioning method and system based on detection equipment

Through the method of color space conversion, rough segmentation and geometric feature analysis of eye images, the problem of traditional ophthalmic examination relies on experience and manual operation is solved, and efficient and accurate ophthalmic disease positioning and diagnosis are achieved.

CN119769984APending Publication Date: 2025-04-08ZHUZHOU SANSANY AIER EYE HOSPITAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411823193.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Traditional ophthalmic examination methods rely on the experience and manual operation of the doctor, resulting in inconsistent diagnosis results, low accuracy and low efficiency.

Method used

The ophthalmic positioning method based on detection equipment is adopted to automatically determine the search range of disease characteristics by performing color space conversion, coarse segmentation, clump recognition and geometric feature analysis on eye images, and the type and specific location of eye diseases are determined through pattern recognition technology.

Benefits of technology

Accurate identification and positioning of eye diseases is achieved, the accuracy and efficiency of diagnosis is improved, the work burden of medical staff is reduced, and detailed eye characteristics information can be provided to support personalized treatment plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119769984A_ABST
    Figure CN119769984A_ABST
Patent Text Reader

Abstract

The present invention provides an ophthalmic positioning method and system based on a detection device, which relates to the field of eye detection. The method comprises: performing color space conversion on the collected eye image to identify the change area in the image; automatically determining the segmentation threshold according to the change area in the image, performing rough segmentation on the image, and obtaining the roughly segmented image; calculating the area of ​​each mass in the image according to the roughly segmented image, identifying the shape features, excluding non-critical areas, and obtaining the region of interest of the key eye feature; analyzing the geometric features by calculating the minimum circumscribed rectangle of the region of interest of the key eye feature to obtain the geometric feature analysis result; performing an image analysis algorithm according to the region of interest of the key eye feature to extract the disease feature. The present invention can determine the type and specific location of the eye disease, and can also provide detailed information about the eye features, which is helpful to more comprehensively understand the patient's condition and formulate a personalized treatment plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of eye detection, and in particular to an ophthalmic positioning method and system based on detection equipment. Background Art

[0002] With the continuous advancement and innovation of medical technology, the field of ophthalmic diagnosis is facing unprecedented challenges and opportunities. Modern ophthalmology not only requires the ability to accurately identify various eye diseases, but also emphasizes the efficiency of the diagnostic process and the comfort of the patient experience. However, traditional ophthalmic examination methods, such as naked eye observation and manual measurement, are often highly dependent on the doctor's personal experience and skill level, as well as their manual operation ability.

[0003] This reliance brings about several significant problems. First, doctors’ experience levels vary, and different doctors may have different interpretations and judgments on the same case, resulting in inconsistent diagnostic results. Second, manual operations are easily affected by human factors, such as fatigue and lack of concentration, which may reduce the accuracy of diagnosis. Furthermore, traditional methods are usually cumbersome and time-consuming, and it is difficult to meet the high efficiency requirements of modern medicine. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an ophthalmic positioning method and system based on a detection device, which can not only determine the type and specific location of eye diseases, but also provide detailed information about eye characteristics, which helps to more comprehensively understand the patient's condition and formulate personalized treatment plans.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] In a first aspect, an ophthalmic positioning method based on a detection device, the method comprising:

[0007] Performing color space conversion on the collected eye images to identify the changed areas in the images;

[0008] According to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is obtained;

[0009] According to the roughly segmented image, the area of ​​each mass in the image is calculated, the shape features are identified, non-critical areas are excluded, and the region of interest of the key eye features is obtained;

[0010] By calculating the minimum bounding rectangle of the region of interest of the key eye feature, the geometric feature is analyzed to obtain a geometric feature analysis result;

[0011] Image analysis algorithms are used to extract disease signatures based on regions of interest of key ocular features;

[0012] According to the geometric feature analysis result, the search range of the disease feature is calculated by geometric shapes to determine the search range of the disease feature;

[0013] Within the search scope of disease characteristics, the type and specific location of the eye disease are determined through pattern recognition technology based on the disease characteristics to achieve disease location.

[0014] Furthermore, the collected eye image is converted into a color space to identify the changed area in the image, including:

[0015] Convert the collected eye image from the original RGB color space to the HSV color space;

[0016] According to the HSV color space, the eye change area is identified by the hue and saturation of the image to identify the change area in the image.

[0017] Furthermore, according to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is obtained, including:

[0018] According to the changed area in the image, the H, S, and V values ​​of the changed area are obtained, and the change amplitude between the HSV channel color values ​​is obtained by calculating the difference between the H, S, and V values ​​of adjacent pixels, where the H value is the hue, the S value is the saturation, and the V value is the brightness;

[0019] According to the change amplitude, a change amplitude image is generated, and the image is a three-dimensional matrix containing ΔH, ΔS, and ΔV, where ΔH, ΔS, and ΔV are the change amplitudes between adjacent pixels on the HSV channel;

[0020] For each value m in the amplitude image (m represents a different amplitude of change), the frequency of m in the image is obtained as h(m), through Calculate the normalized probability distribution of each variation value, where N is the total number of pixels in the variation image and p(m) is the normalized probability distribution;

[0021] By setting the threshold t, the variation amplitude image can be divided into two categories: below the threshold and above the threshold;

[0022] According to the two types of change amplitude images and the normalized probability distribution, Calculate the inter-class variance of the two classes, where g(t) is the inter-class variance. The larger the inter-class variance, the better the separation effect of the two classes, that is, the more appropriate the threshold selection; t is the threshold, p(m) is the normalized probability distribution, m is the different variation amplitudes, and L is the number of all possible gray levels in the image;

[0023] The segmentation threshold is determined by maximizing the inter-class variance of the two classes;

[0024] According to the segmentation threshold, the image is roughly segmented to obtain the roughly segmented image.

[0025] Furthermore, based on the roughly segmented image, the area of ​​each mass in the image is calculated, the shape features are identified, non-critical areas are excluded, and the regions of interest of key eye features are obtained, including:

[0026] According to the roughly segmented image, adjacent and similar pixel regions in the image are identified, and the images of the pixel regions are marked as clusters to achieve cluster marking;

[0027] According to the marked complete cluster, the cluster area is obtained by traversing the total number of pixels in the cluster;

[0028] The contour of each cluster is extracted through Canny edge detection to identify the cluster shape features;

[0029] The area threshold and shape threshold rules are set, and the calculated area and identified shape features are excluded from non-critical areas according to the threshold rules to obtain the region of interest of the key eye features.

[0030] Furthermore, the geometric features are analyzed by calculating the minimum bounding rectangle of the region of interest of the key eye features to obtain the geometric feature analysis results, including:

[0031] The pixel coordinates in the region of interest of key eye features are collected into a dataset, with each point represented as a two-dimensional vector [x, y];

[0032] According to the two-dimensional vector of each point, Calculate the covariance matrix of the coordinates in the point set and obtain the principal components by solving the eigenvalues ​​and eigenvectors of the covariance matrix, where N1 is the total number of points in the data set, [x i ,y i ] is the i-th point in the data set, represented as a two-dimensional vector, where x i is the x coordinate of the point, y i is the y coordinate of the point; i, j, and k are indices, and C is the covariance matrix.

[0033] The direction of the first principal component is used as the long side direction of the rectangle, and the side of the rectangle is aligned with the principal axis of the region of interest for calculating the key eye feature, so as to obtain the minimum circumscribed rectangle of the region of interest for calculating the key eye feature;

[0034] Calculate geometric features, including length, width, angle and area, based on the minimum enclosing rectangle;

[0035] According to the geometric features, the shape of the eye area is analyzed, and the areas that do not meet the conditions are excluded to obtain the geometric feature analysis results.

[0036] Furthermore, image analysis algorithms are performed based on regions of interest of key ocular features to extract disease features, including:

[0037] Locate circular or symmetrical structures in the eye by detecting radial symmetry in the image based on regions of interest for key ocular features;

[0038] According to the region of interest of key eye features, edge information in the image is extracted by edge detection algorithm to detect eye features;

[0039] According to the edge detection results, the disease feature information is obtained, and the disease feature information is fused with the disease diagnosis information to extract the disease features.

[0040] Further, according to the geometric feature analysis result, the search range of the disease feature is calculated by the geometric shape to determine the search range of the disease feature, including:

[0041] According to the geometric characteristics of the disease, a threshold value of a geometric characteristic parameter related to the disease is set;

[0042] According to the extracted geometric features and the thresholds of the geometric feature parameters, the search range of the disease features is determined according to the upper and lower limits of the thresholds to construct a search framework for disease feature extraction;

[0043] According to the search framework, disease features of local areas are extracted within the framework to optimize and adjust the search range.

[0044] In a second aspect, an ophthalmic positioning system based on a detection device comprises:

[0045] The acquisition module is used to perform color space conversion on the collected eye image to identify the changed area in the image; according to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is acquired;

[0046] The analysis module is used to calculate the area of ​​each mass in the image according to the roughly segmented image, identify the shape features, exclude non-critical areas, and obtain the region of interest of the key eye feature; analyze the geometric features by calculating the minimum circumscribed rectangle of the region of interest of the key eye feature to obtain the geometric feature analysis result;

[0047] The processing module is used to perform an image analysis algorithm based on the region of interest of key eye features to extract disease features; based on the results of the geometric feature analysis, the search range of the disease features is calculated by geometric shapes to determine the search range of the disease features; within the search range of the disease features, the type and specific location of the eye disease is determined based on the disease features through pattern recognition technology to achieve disease location.

[0048] According to a third aspect, a computing device includes:

[0049] one or more processors;

[0050] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described.

[0051] In a fourth aspect, a computer-readable storage medium stores a program, and when the program is executed by a processor, the method described is implemented.

[0052] The above solution of the present invention includes at least the following beneficial effects:

[0053] Through the fine processing and analysis of eye images, eye features can be identified more accurately, thereby improving the accuracy of eye disease diagnosis. Steps such as color space conversion, coarse segmentation, mass identification and geometric feature analysis all help to accurately extract key information; the whole process from image acquisition to disease location is automated, which greatly reduces the workload of medical staff and improves diagnostic efficiency. Functions such as automatic determination of segmentation thresholds and automatic exclusion of non-critical areas enable the system to intelligently process large amounts of data without human intervention. It can process eye images in different color spaces and has relatively low requirements for image quality, so it has strong adaptability. Whether in bright or dim environments, or in the presence of noise or distortion in the image, the system can maintain high diagnostic performance. In addition to determining the type and specific location of the disease, this method can also provide detailed information about eye features, such as mass area, shape characteristics, geometric features, etc., and integrate with other medical equipment or information systems to achieve data sharing and exchange. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a flow chart of an ophthalmic positioning method based on a detection device provided in an embodiment of the present invention.

[0055] Figure 2 It is a schematic diagram of an ophthalmic positioning system based on a detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in a form and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0057] like Figure 1 As shown, an embodiment of the present invention provides an ophthalmic positioning method based on a detection device, the method comprising the following steps:

[0058] Step 11, performing color space conversion on the collected eye image to identify the changed area in the image;

[0059] Step 12, automatically determining the segmentation threshold according to the changed area in the image, performing rough segmentation on the image, and obtaining a roughly segmented image;

[0060] Step 13, based on the roughly segmented image, calculate the area of ​​each mass in the image, identify the shape features, exclude non-critical areas, and obtain the region of interest of the key eye features;

[0061] Step 14, analyzing the geometric features by calculating the minimum circumscribed rectangle of the region of interest of the key eye feature to obtain a geometric feature analysis result;

[0062] Step 15, performing an image analysis algorithm based on the region of interest of the key eye features to extract disease features;

[0063] Step 16, according to the geometric feature analysis result, the search range of the disease feature is calculated by the geometric shape to determine the search range of the disease feature;

[0064] Step 17, within the search range of the disease characteristics, determine the type and specific location of the eye disease through pattern recognition technology based on the disease characteristics to achieve disease location.

[0065] In an embodiment of the present invention, by performing color space conversion on an eye image, the changed area in the image can be more accurately identified, the segmentation threshold is automatically determined and the image is roughly segmented, and the key information in the image can be efficiently extracted. By calculating the area of ​​each mass in the image and identifying the shape features, non-key areas can be accurately excluded, focusing on key eye features, and improving the accuracy of analysis. Calculating the minimum circumscribed rectangle of the region of interest of the key eye feature helps to analyze the geometric shape of the eye feature. Performing an image analysis algorithm based on the region of interest of the key eye feature can more accurately extract disease features and improve the accuracy of disease identification. Determining the search range of disease features through the results of geometric feature analysis can narrow the search space and improve the efficiency and accuracy of disease identification. Within the determined search range, the type and specific location of eye diseases can be accurately determined using pattern recognition technology, and the disease can be quickly located and diagnosed, which helps to detect and treat eye diseases early.

[0066] In a preferred embodiment of the present invention, the above step 11 may include:

[0067] Step 111, converting the collected eye image from the original RGB color space to the HSV color space;

[0068] Step 112, identifying the eye change area through the hue and saturation of the image according to the HSV color space, so as to identify the change area in the image.

[0069] In an embodiment of the present invention, the HSV color space is composed of three components: hue, saturation, and value (brightness). This representation method is more in line with the perception of the human visual system. Compared with the RGB color space, the HSV color space can more intuitively reflect the essential attributes of color, thereby helping to more accurately identify the eye change area. In the HSV color space, hue and saturation are separate parameters that can be adjusted and analyzed independently. By monitoring the hue and saturation changes of the eye image, it is possible to more sensitively capture subtle changes in the eye area, such as inflammation, congestion, pigmentation, etc., thereby improving the accuracy of early detection of eye diseases. The color channels in the RGB color space are highly correlated, and the changes in the three channels need to be considered simultaneously during processing. The three components of hue, saturation, and value in the HSV color space are relatively independent and can be processed and analyzed separately, which simplifies the image processing process and reduces the complexity of the algorithm. In the face of different lighting conditions, color deviations, or changes in image quality, the algorithm can still maintain a high recognition performance.

[0070] In one embodiment of the present invention, step 111 is specifically implemented as follows: read the original eye image using an image processing library, which is usually a three-dimensional array, in which each pixel is represented by the values ​​of three color channels: red (R), green (G), and blue (B). The HSV color space consists of three components: hue (H), saturation (S), and value (V). Convert RGB to HSV through the image processing library, traverse each pixel of the original image, convert its RGB value to HSV value, and store the calculated HSV value in a new three-dimensional array, which now represents the eye image in the HSV color space.

[0071] Step 112, the specific implementation process is: separate the hue (H) and saturation (S) channels from the converted HSV image, binarize the hue and saturation channels according to the characteristics of the eye image and the type of change to be identified, merge the binarization results of the hue and saturation channels to obtain a comprehensive change area map, perform morphological processing on the merged binary image, such as corrosion, expansion, opening operation or closing operation, analyze the processed binary image, and identify the white area therein, which represents the changed part in the eye image.

[0072] In a preferred embodiment of the present invention, the above step 12 may include:

[0073] Step 121, according to the changed area in the image, obtain the H, S, and V values ​​of the changed area, and obtain the change range between the HSV channel color values ​​by calculating the difference between the H, S, and V values ​​of adjacent pixels, wherein the H value is the hue, the S value is the saturation, and the V value is the brightness;

[0074] Step 122, generating a change amplitude image according to the change amplitude, wherein the image is a three-dimensional matrix including ΔH, ΔS, and ΔV, wherein ΔH, ΔS, and ΔV are the change amplitudes between adjacent pixels on the HSV channel;

[0075] Step 123, for each value m in the variation range image (m represents a different variation range), obtain the frequency of m in the image as h(m), and calculate it by Calculate the normalized probability distribution of each variation value, where N is the total number of pixels in the variation image and p(m) is the normalized probability distribution;

[0076] Step 124, setting a threshold t, the variation amplitude image can be divided into two categories: below the threshold and above the threshold;

[0077] Step 125, according to the two types of variation amplitude images and the normalized probability distribution, Calculate the inter-class variance of the two classes, where g(t) is the inter-class variance. The larger the inter-class variance, the better the separation effect of the two classes, that is, the more appropriate the threshold selection; t is the threshold, p(m) is the normalized probability distribution, m is the different variation amplitudes, and L is the number of all possible gray levels in the image;

[0078] Step 126, determining the segmentation threshold by maximizing the inter-class variance of the two classes;

[0079] Step 127, performing rough segmentation on the image according to the segmentation threshold, and obtaining a roughly segmented image.

[0080] In an embodiment of the present invention, by obtaining the H, S, and V values ​​of the change area and calculating the change amplitude between adjacent pixels, the color change in the eye image can be captured more accurately. By using the three components (hue, saturation, and brightness) in the HSV color space for comprehensive analysis, the color characteristics of the eye area can be comprehensively evaluated, which helps to understand the eye state more accurately. By calculating the normalized probability distribution of the change amplitude image and setting a threshold to divide the image into two categories, adaptive threshold setting is achieved, and the segmentation threshold can be dynamically determined according to the characteristics of the image itself, thereby improving the accuracy and flexibility of segmentation. By maximizing the inter-class variance of the two classes to determine the segmentation threshold, it can be ensured that the two classes after segmentation have the maximum separation, which helps to reduce the situation of mis-segmentation and missed segmentation, and improves the accuracy and reliability of image segmentation. The image after coarse segmentation removes a large amount of irrelevant information and highlights the key areas, thereby simplifying the subsequent image processing and analysis steps, helping to reduce the complexity and computational cost of the algorithm and improving the overall processing efficiency.

[0081] In one embodiment of the present invention, the specific implementation process of step 121-step 122 is as follows: according to the change area in the eye image identified in the previous step, determine the pixel range of the change area. For each pixel in the change area, extract its H (hue), S (saturation), and V (brightness) values ​​in the HSV color space. Traverse each pixel in the change area, and calculate the difference between the current pixel and its adjacent pixels (such as the four directions of up, down, left, and right) on the H, S, and V channels by simple numerical subtraction. Store the calculated change amplitude (i.e., the difference). Create a three-dimensional matrix for storing the change amplitude image. The size of the matrix should match the original eye image, and there are three channels, corresponding to ΔH, ΔS, and ΔV, respectively. The change amplitude values ​​calculated above are used to fill this three-dimensional matrix, and the value at each pixel position should be the average change amplitude of the pixel and its adjacent pixels on the H, S, and V channels. For pixels on the image boundary, since they do not have complete adjacent pixels, use zero filling, mirror filling, or ignore these pixels for processing.

[0082] In one embodiment of the present invention, step 123-step 127 is specifically implemented as follows: by creating a histogram, wherein each class interval corresponds to a variation amplitude value, traversing each value m (m represents different variation amplitudes) in the variation amplitude image, counting the frequency of each value appearing in the image, and using the formula above to calculate the probability distribution of each variation amplitude value after normalization, the p(m) obtained in this way represents the relative frequency of each variation amplitude value appearing in the image. According to the specific application requirements and image characteristics, a threshold t is set, and this threshold will be used in the subsequent steps to divide the variation amplitude image into two categories: below the threshold and above the threshold. By using the threshold set in step 124, the pixels in the variation amplitude image are divided into two categories: one is the pixels with a variation amplitude below the threshold, and the other is the pixels with a variation amplitude above the threshold. The inter-class variance of the two classes is calculated using the provided formula, which takes into account the variation amplitude distribution of the pixels in each class and the difference between the classes, and a suitable threshold is found by maximizing the inter-class variance so that the two classes can be separated as much as possible. By traversing all possible thresholds, the threshold that maximizes the inter-class variance is found, and this threshold will be used as the final image segmentation threshold. The original eye image or the variation amplitude image is segmented using the segmentation threshold determined in step 126, and pixels below the threshold are classified into one class, and pixels above the threshold are classified into another class. The segmented result is saved as a new image, which is the eye image after rough segmentation.

[0083] In a preferred embodiment of the present invention, the above step 13 may include:

[0084] Step 131, based on the roughly segmented image, identifying adjacent and similar pixel regions in the image, and marking the images of the pixel regions as clusters to achieve cluster marking;

[0085] Step 132, according to the marked complete cluster, obtain the cluster area by traversing the total number of pixels in the cluster;

[0086] Step 133, extracting the outline of each cluster through Canny edge detection to identify the cluster shape features;

[0087] Step 134, setting area thresholds and shape threshold rules, excluding non-critical areas from the calculated area and identified shape features according to the threshold rules, and obtaining regions of interest for critical eye features.

[0088] In an embodiment of the present invention, by finely processing the image after rough segmentation, identifying adjacent and similar pixel areas, and marking these areas as clumps, key features in the eye image can be more accurately identified and located. By calculating the area of ​​the marked clumps and extracting the contour shape features, the clumps in the eye image can be quantitatively analyzed, which can provide a more objective and accurate feature description, which is helpful for subsequent disease diagnosis and evaluation. By setting area threshold and shape threshold rules, non-critical areas, that is, those areas that are irrelevant to or interfere with the diagnosis of eye diseases, can be effectively excluded, and key eye features can be highlighted. The entire processing flow can be automated, from rough segmentation to fine processing to key feature extraction, without excessive manual intervention, which can improve processing efficiency. By extracting the area of ​​interest of key eye features, powerful auxiliary decision support can be provided for medical professionals.

[0089] In one embodiment of the present invention, the specific implementation process of step 131-step 132 is as follows: according to step 12, obtain the eye image after the rough segmentation processing, traverse each pixel of the image from left to right and from top to bottom, and for the current pixel, check whether it belongs to the same category (that is, has the same pixel value, for example, all are 255 or all are 0) as the surrounding pixels (such as four adjacent pixels above, below, left and right). If so, these adjacent pixels of the same type are regarded as a region. For each identified pixel region of the same type, it is implemented by creating a label matrix of the same size as the original image, wherein the pixels of each region correspond to a same label value in the label matrix and are assigned a unique label value. Create an area counter for each marked blob, with an initial value of 0. Traverse each pixel in the label matrix. For each pixel, according to its label value, add 1 to the area counter of the corresponding blob. In this way, after the traversal is completed, the value in the area counter of each blob represents the total number of pixels of the blob, that is, the area.

[0090] Step 133-Step 134, the specific implementation process is: apply the Canny edge detection algorithm to each marked mass, identify the edges in the image, extract the contour of the mass, and save the extracted contour information. The contour information may include the coordinates of the contour points, the length and width of the contour. According to experience or experimental data, set an area threshold, which is used to exclude non-critical areas that are too small or too large. Similarly, according to experience or experimental data, set shape-related threshold rules. For example, an aspect ratio threshold can be set to exclude areas that are too narrow or flat. Traverse all marked masses, and for each mass, check whether its area and shape characteristics meet the set threshold rules. If not, the mass is regarded as a non-critical area and excluded; if it meets, it is regarded as a region of interest for key eye features and retained.

[0091] In a preferred embodiment of the present invention, the above step 14 may include:

[0092] Step 141 , collecting pixel coordinates in the region of interest of the key eye features into a data set, with each point represented as a two-dimensional vector [x, y];

[0093] Step 142, according to the two-dimensional vector of each point, by Calculate the covariance matrix of the coordinates in the point set and obtain the principal components by solving the eigenvalues ​​and eigenvectors of the covariance matrix, where N1 is the total number of points in the data set, [x i ,y i ] is the i-th point in the data set, represented as a two-dimensional vector, where x i is the x coordinate of the point, y i is the y coordinate of the point; i, j, and k are indices, and C is the covariance matrix.

[0094] Step 143, taking the direction of the first principal component as the long side direction of the rectangle, aligning the side of the rectangle with the principal axis of the region of interest for calculating the key eye feature, and obtaining the minimum circumscribed rectangle of the region of interest for calculating the key eye feature;

[0095] Step 144, calculating geometric features including length, width, angle and area according to the minimum circumscribed rectangle;

[0096] Step 145, analyzing the shape of the eye region according to the geometric features, and excluding the regions that do not meet the conditions, so as to obtain the geometric feature analysis results.

[0097] In an embodiment of the present invention, by collecting the pixel coordinates of the region of interest and calculating its covariance matrix, the shape characteristics of these regions can be described more accurately. Principal component analysis (PCA) provides an understanding of the main direction of shape change, which helps to capture the key geometric properties of eye features. Taking the direction of the first principal component as the long side direction of the rectangle and aligning it with the principal axis of the region of interest can ensure that the minimum circumscribed rectangle can effectively surround and represent the shape of the region, thereby improving the accuracy and effectiveness of geometric feature extraction. By calculating the geometric features of the minimum circumscribed rectangle, such as aspect ratio, angle, and area, the complex eye shape can be simplified into several parameters that are easy to understand and compare, which is helpful for subsequent disease feature extraction and classification. By excluding areas that do not meet the conditions, it is possible to focus more accurately on key features related to the disease, thereby improving the accuracy of disease identification. Accurate geometric feature analysis helps doctors better understand and evaluate eye conditions and promptly detect and monitor the progression of diseases.

[0098] In one embodiment of the present invention, the specific implementation process of step 141-step 142 is as follows: for each region of interest of each key eye feature, traverse each pixel therein, record the coordinates (x, y) of each pixel in a data set, and each coordinate point is represented as a two-dimensional vector [x, y]. Initialize variables to store the sum of coordinate points and the number of points, traverse the data set, and calculate the average of the x-coordinates and y-coordinates of all points. According to the given formula, calculate the covariance matrix of the coordinate points in the data set, calculate the transpose of the difference between each point and the mean and the product of itself, and sum all points, and then divide by the total number of points. Perform eigenvalue decomposition on the covariance matrix to obtain its eigenvalues ​​and corresponding eigenvectors.

[0099] Step 143-Step 145, the specific implementation process is: select the eigenvector corresponding to the largest eigenvalue as the first principal component. This eigenvector represents the main change direction of the points in the data set. By calculating the direction of the eigenvector, the direction of the first principal component is used as the long side direction of the rectangle. According to all the points in the area of ​​interest and the determined principal component direction, the maximum and minimum projection values ​​of the points in the principal component direction are calculated to determine the four corner points of the rectangle and find the minimum circumscribed rectangle that can contain all the points. According to the boundary points of the minimum circumscribed rectangle, calculate the length and width of the rectangle. Calculate the angle between the principal component direction and the horizontal direction as the rotation angle of the rectangle. Use the length and width of the rectangle to calculate its area. Set the thresholds of geometric features such as aspect ratio and area according to the normal shape and size of the eye area.

[0100] In a preferred embodiment of the present invention, the above step 15 may include:

[0101] Step 151, locating circular or symmetrical structures in the eye by detecting radial symmetry in the image according to the region of interest of key eye features;

[0102] Step 152, extracting edge information in the image by an edge detection algorithm according to the region of interest of the key eye feature to detect the eye feature;

[0103] Step 153, obtaining disease feature information according to the edge detection result, and fusing the disease feature information with the disease diagnosis information to extract the disease feature.

[0104] In an embodiment of the present invention, by detecting radial symmetry in an image, circular or symmetrical structures in the eye, such as the pupil and iris, can be accurately located, which helps to improve the accuracy of diagnosis. By using an edge detection algorithm to extract edge information of key eye feature areas, the outline and details of the eye structure can be highlighted, which helps to more clearly observe and analyze the morphological characteristics of eye lesions. Obtaining disease feature information based on edge detection results and integrating it with known disease diagnosis information can significantly enhance the ability to recognize eye disease features, and can comprehensively utilize multiple information sources to improve the sensitivity and specificity of disease diagnosis. By accurately extracting and analyzing eye disease features, it is helpful to achieve early diagnosis and timely treatment of eye diseases. Early detection of signs of lesions and taking corresponding treatment measures can significantly improve the patient's recovery rate and quality of life. Automated image processing and analysis processes can significantly reduce the time doctors spend on manually examining and analyzing eye images, thereby improving the overall efficiency of medical services.

[0105] In one embodiment of the present invention, the specific implementation process of step 151-step 152 is as follows: necessary preprocessing is performed on the region of interest of the key eye feature, such as grayscale, noise reduction, etc. For each pixel in the region of interest, a symmetry mapping matrix of the same size as the region of interest is initialized, each pixel is traversed, and a pixel pair with a size is searched in a certain range around it (such as a circle with a set radius) with it as the center, and the value of the corresponding central pixel in the symmetry mapping matrix is ​​updated according to the number and degree of symmetry of the pixel pairs found, and the local maximum value is searched in the symmetry mapping matrix, wherein the local maximum value corresponds to the radial symmetry center in the image, and the center corresponds to the circular or symmetrical structure in the eye, such as the pupil or iris. The located symmetrical structure is verified and refined by setting a threshold and morphological operations (such as dilation and corrosion) to ensure that the detected structure conforms to the physiological characteristics of the eye. According to the characteristics of the eye image, Canny edge detection is applied to the region of interest of the key eye feature to extract the edge information in the image, and the edge detection result is subjected to necessary post-processing, such as removing noise edges, connecting broken edges, etc., to obtain a more accurate eye feature contour.

[0106] Step 153, the specific implementation process is: according to the edge detection results, the attributes of the eye features such as shape, position, size, etc. are analyzed, and the attributes are associated with specific eye diseases. According to medical knowledge and clinical experience, features related to eye diseases are extracted from the analyzed edge information, where the features include edges of abnormal shapes and eye structures in abnormal positions. Feature vectors are constructed, and the extracted disease features are fused with known disease diagnosis information using a support vector machine.

[0107] In a preferred embodiment of the present invention, the above step 16 may include:

[0108] Step 161, according to the geometric characteristics of the disease, setting the threshold of the geometric characteristic parameters related to the disease;

[0109] Step 162, according to the extracted geometric features and the thresholds of the geometric feature parameters, the search range of the disease features is determined according to the upper and lower limits of the thresholds to construct a search framework for disease feature extraction;

[0110] Step 163, based on the search framework, disease features of local areas are extracted within the framework to optimize and adjust the search range.

[0111] In an embodiment of the present invention, by setting a threshold value of a geometric feature parameter that is closely related to the disease, features related to a specific disease can be more accurately identified, which helps reduce misjudgments and missed judgments, thereby improving the accuracy of disease identification. By determining the search range based on the threshold value of the geometric feature parameter, the search space for disease features can be effectively narrowed, which can not only improve search efficiency, but also reduce unnecessary data processing and analysis work. By extracting disease features in a local area within a set search framework, disease features can be more accurately located and identified, which helps improve the accuracy and efficiency of feature extraction. By extracting and optimizing disease features, doctors can be provided with more accurate and timely medical diagnosis basis, which helps doctors develop more effective treatment plans and improve patients' treatment effects and quality of life.

[0112] In one embodiment of the present invention, the specific implementation process of step 161-step 162 is as follows: collect a large amount of image data of known eye diseases, which should include geometric feature information of eye diseases, such as lesion size, shape, position, etc. Perform in-depth analysis on the collected eye disease image data, and extract geometric feature parameters related to the disease, such as the maximum diameter, area, circumference, roundness, compactness, etc. of the lesion. According to the statistical analysis results, set a reasonable threshold range for each geometric feature parameter, and the threshold will be used for subsequent disease feature search and extraction. The threshold may include an upper limit and a lower limit to ensure that the search range is neither too broad nor too narrow. According to the set geometric feature parameter threshold, determine an initial search frame, which can be a rectangular, elliptical or other shaped area, and its size and position are determined by the upper and lower limits of the threshold range.

[0113] Step 163, the specific implementation process is: according to the characteristics of the specific eye image and the distribution of disease characteristics, the search framework is adjusted and optimized as necessary to ensure that it can cover as many potential disease feature areas as possible. Within the constructed search framework, each local area is analyzed and processed in detail, including the application of image processing techniques (such as filtering, enhancement, etc.) to highlight potential disease characteristics. Use a special feature extraction algorithm (such as texture-based feature extraction, shape-based feature extraction, etc.) to extract the disease features in each local area. The features should be able to reflect the pathological changes and clinical manifestations of eye diseases. The extracted disease features are screened and fused to remove redundant and irrelevant features, retain features that are valuable for disease diagnosis, and dynamically adjust the size and position of the search frame according to the extracted disease features and the set threshold range.

[0114] In a preferred embodiment of the present invention, the above step 17 may include:

[0115] Step 171, within the search range of the disease characteristics, according to the disease characteristics, the disease type is identified by using the convolutional neural network CNN and the residual network ResNet to obtain the disease type;

[0116] Step 172, according to the disease type in the image, identify the specific location of the disease through target detection technology (such as YOLO, Faster R-CNN, etc.) to achieve disease location.

[0117] In one embodiment of the present invention, CNN and ResNet are used to efficiently process and analyze medical images, thereby accurately identifying different types of diseases. Through target detection technology, such as YOLO or Faster R-CNN, the specific location of the disease in the image can be accurately located, which helps doctors understand the condition more accurately. The automated disease identification and location process greatly reduces the time and cost of manual analysis, allowing doctors to make diagnoses more quickly and improve diagnostic efficiency. After knowing the type and specific location of the disease, doctors can formulate treatment plans more specifically and improve treatment effectiveness. Accurate disease identification and location help improve the quality and efficiency of medical services and provide patients with a better medical experience.

[0118] In one embodiment of the present invention, the specific implementation process of step 171-step 172 is as follows: a large number of annotated eye disease images are collected from medical institutions or public databases to ensure that these images contain different types of eye diseases and specific location information of the diseases. The collected eye disease images are preprocessed, including image size normalization, grayscale, denoising, etc., the disease areas in the images are annotated, and a label file for training is generated. The label file usually includes information such as the type and location of the disease; a CNN or residual network is trained using the annotated eye disease image data set, and the eye images are classified using the CNN or residual network within the search range of the disease features according to the trained CNN or residual network to identify the types of eye diseases that may exist in the image. Then, according to the identified disease type, the YOLO target detection algorithm is used to locate the specific disease area in the image, and the bounding box coordinates or mask information are obtained to indicate the location of the disease.

[0119] like Figure 2 As shown, an embodiment of the present invention further provides an ophthalmic positioning system 20 based on a detection device, comprising:

[0120] The acquisition module 21 is used to perform color space conversion on the collected eye image to identify the changed area in the image; automatically determine the segmentation threshold according to the changed area in the image, perform rough segmentation on the image, and obtain the roughly segmented image;

[0121] The analysis module 22 is used to calculate the area of ​​each block in the image according to the roughly segmented image, identify the shape features, exclude non-critical areas, and obtain the region of interest of the key eye feature; analyze the geometric features by calculating the minimum circumscribed rectangle of the region of interest of the key eye feature to obtain the geometric feature analysis result;

[0122] The processing module 23 is used to perform an image analysis algorithm based on the region of interest of key eye features to extract disease features; based on the results of the geometric feature analysis, calculate the search range of the disease features through geometric shapes to determine the search range of the disease features; within the search range of the disease features, determine the type and specific location of the eye disease based on the disease features through pattern recognition technology to locate the disease.

[0123] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An ophthalmic positioning method based on a detection device, characterized in that: The method comprises: Performing color space conversion on the collected eye images to identify the changed areas in the images; According to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is obtained; According to the roughly segmented image, the area of ​​each mass in the image is calculated, the shape features are identified, non-critical areas are excluded, and the region of interest of the key eye features is obtained; By calculating the minimum bounding rectangle of the region of interest of the key eye feature, the geometric feature is analyzed to obtain a geometric feature analysis result; Image analysis algorithms are used to extract disease signatures based on regions of interest of key ocular features; According to the geometric feature analysis result, the search range of the disease feature is calculated by geometric shapes to determine the search range of the disease feature; Within the search scope of disease characteristics, the type and specific location of the eye disease are determined through pattern recognition technology based on the disease characteristics to achieve disease location.

2. The ophthalmic positioning method based on the detection device according to claim 1, characterized in that: Perform color space conversion on the collected eye images to identify the changed areas in the images, including: Convert the collected eye image from the original RGB color space to the HSV color space; According to the HSV color space, the eye change area is identified by the hue and saturation of the image to identify the change area in the image.

3. The ophthalmic positioning method based on the detection device according to claim 2, characterized in that: According to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is obtained, including: According to the changed area in the image, the H, S, and V values ​​of the changed area are obtained, and the change range between the HSV channel color values ​​is obtained by calculating the difference between the H, S, and V values ​​of adjacent pixels, where the H value is the hue, the S value is the saturation, and the V value is the brightness; According to the change amplitude, a change amplitude image is generated, and the image is a three-dimensional matrix containing ΔH, ΔS, and ΔV, where ΔH, ΔS, and ΔV are the change amplitudes between adjacent pixels on the HSV channel; For each value m in the variation image, m represents a different variation, and the frequency of m in the image is obtained as h(m). Calculate the normalized probability distribution of each variation value, where N is the total number of pixels in the variation image and p(m) is the normalized probability distribution; By setting the threshold t, the variation amplitude image can be divided into two categories: below the threshold and above the threshold; According to the two types of change amplitude images and the normalized probability distribution, Calculate the inter-class variance of the two classes, where g(t) is the inter-class variance. The larger the inter-class variance, the better the separation effect of the two classes, that is, the more appropriate the threshold selection; t is the threshold, p(m) is the normalized probability distribution, m is the different variation amplitudes, and L is the number of all possible gray levels in the image; The segmentation threshold is determined by maximizing the inter-class variance of the two classes; According to the segmentation threshold, the image is roughly segmented to obtain the roughly segmented image.

4. The ophthalmic positioning method based on the detection device according to claim 3, characterized in that: According to the roughly segmented image, the area of ​​each mass in the image is calculated, the shape features are identified, non-critical areas are excluded, and the region of interest of key eye features is obtained, including: According to the roughly segmented image, adjacent and similar pixel regions in the image are identified, and the images of the pixel regions are marked as clusters to achieve cluster marking; According to the marked complete cluster, the cluster area is obtained by traversing the total number of pixels in the cluster; The contour of each cluster is extracted through Canny edge detection to identify the cluster shape features; The area threshold and shape threshold rules are set, and the calculated area and identified shape features are excluded from non-critical areas according to the threshold rules to obtain the region of interest of the key eye features.

5. The ophthalmic positioning method based on the detection device according to claim 4, characterized in that: The geometric features are analyzed by calculating the minimum bounding rectangle of the region of interest of the key eye features to obtain the geometric feature analysis results, including: The pixel coordinates in the region of interest of key eye features are collected into a dataset, with each point represented as a two-dimensional vector [x, y]; According to the two-dimensional vector of each point, Calculate the covariance matrix of the coordinates in the point set and obtain the principal components by solving the eigenvalues ​​and eigenvectors of the covariance matrix, where N1 is the total number of points in the data set, [x i ,y i ] is the i-th point in the data set, represented as a two-dimensional vector, where x i is the x coordinate of the point, y i is the y coordinate of the point; i, j, and k are indices, and C is the covariance matrix. The direction of the first principal component is used as the long side direction of the rectangle, and the side of the rectangle is aligned with the principal axis of the region of interest for calculating the key eye feature, so as to obtain the minimum circumscribed rectangle of the region of interest for calculating the key eye feature; Calculate geometric features, including length, width, angle and area, based on the minimum enclosing rectangle; According to the geometric features, the shape of the eye area is analyzed, and the areas that do not meet the conditions are excluded to obtain the geometric feature analysis results.

6. The ophthalmic positioning method based on the detection device according to claim 5, characterized in that: Image analysis algorithms are used to extract disease signatures based on regions of interest of key ocular features, including: Locate circular or symmetrical structures in the eye by detecting radial symmetry in the image based on regions of interest for key ocular features; According to the region of interest of key eye features, edge information in the image is extracted by edge detection algorithm to detect eye features; According to the edge detection results, the disease feature information is obtained, and the disease feature information is fused with the disease diagnosis information to extract the disease features.

7. The ophthalmic positioning method based on the detection device according to claim 6, characterized in that: According to the results of the geometric feature analysis, the search range of the disease feature is calculated by the geometric shape to determine the search range of the disease feature, including: According to the geometric characteristics of the disease, a threshold value of a geometric characteristic parameter related to the disease is set; According to the extracted geometric features and the thresholds of the geometric feature parameters, the search range of the disease features is determined according to the upper and lower limits of the thresholds to construct a search framework for disease feature extraction; According to the search framework, disease features of local areas are extracted within the framework to optimize and adjust the search scope.

8. An ophthalmic positioning system based on a detection device, characterized in that: include: The acquisition module is used to perform color space conversion on the collected eye image to identify the changed area in the image; according to the changed area in the image, the segmentation threshold is automatically determined, the image is roughly segmented, and the roughly segmented image is acquired; The analysis module is used to calculate the area of ​​each mass in the image according to the roughly segmented image, identify the shape features, exclude non-critical areas, and obtain the region of interest of the key eye feature; analyze the geometric features by calculating the minimum circumscribed rectangle of the region of interest of the key eye feature to obtain the geometric feature analysis result; The processing module is used to perform an image analysis algorithm based on the region of interest of key eye features to extract disease features; based on the results of the geometric feature analysis, the search range of the disease features is calculated by geometric shapes to determine the search range of the disease features; within the search range of the disease features, the type and specific location of the eye disease is determined based on the disease features through pattern recognition technology to achieve disease location.

9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.