Method for automatically measuring minimum diameter of fundus macular pore based on OCT (Optical Coherence Tomography) image
By cropping and multi-step image processing of OCT images, including denoising, binarization and morphological operations, the challenge of automatic measurement of macular holes is solved, efficient and accurate automatic measurement results are achieved, and the needs of areas with insufficient medical resources are met. , has promoted the development of precise and intelligent medical care.
Patent Information
- Application Number
- CN202411134873.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The existing technology is difficult to accurately and automatically measure the minimum diameter of macular holes. Manual measurement efficiency is low and the accuracy is poor, and the demand cannot be met in underdeveloped areas of medical resources. Especially due to the low contrast of OCT images, high noise, and blurred edges of macular holes, resulting in automatic Measuring is more challenging.
By acquiring the OCT image dataset for cropping, combining image denoising, image binarization, image morphology operations and edge detection, Gaussian filtering, median filtering, and triangle method to seek global thresholds, closed operations, open operations and edge detection algorithms , automatically find and calculate the minimum Euclidean distance of macular holes.
It has achieved efficient and accurate automatic measurement of macular holes, alleviated clinical pressure, made up for the insufficient application of artificial intelligence in macular hole diseases, and promoted the development of precision medicine and intelligent medicine.
Smart Images

Figure CN119131112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to an automatic measurement method for the minimum diameter of a fundus macular hole based on an OCT image. Background Art
[0002] Macular hole (MH) refers to the localized full-thickness defect of the neuroepithelial layer of the macula. It can be divided into idiopathic and secondary macular holes according to the cause of the disease. The cause of the former is unknown, while the latter is mostly secondary to eye trauma, macular degeneration, high myopia and other diseases. Idiopathic full-thickness macular hole (IFTMH) is the loss of the full thickness of the retina from the internal limiting membrane to the retinal pigment epithelium of the fovea. It is one of the more common fundus diseases in ophthalmology. The symptoms of this disease are mainly manifested as decreased vision, visual distortion, central scotoma, and visual field defects, which have an extremely serious impact on the quality of life of patients. Vitrectomy combined with internal limiting membrane peeling is a surgical method for treating macular holes. The anatomical closure rate of MH after surgery can reach more than 90%, but its postoperative visual recovery still varies from person to person. With the update of ophthalmic examination equipment and the in-depth study of the pathogenesis, its treatment methods have also become more diversified and precise.
[0003] The size of the macular hole is defined by the minimum diameter of the full-thickness defect. Clinically, doctors measure the size of the macular hole by optical coherence tomography (OCT) scanning. The size of the macular hole before surgery is associated with the success rate of surgical anatomy, and delayed reopening (defined as the opening of a macular hole that has been closed for 6 months or longer) is also associated with the initial preoperative OCT measurement. For giant holes and refractory holes with a long course of disease, there will be varying degrees of reopening after surgery, which will have a more serious impact on the patient's vision and will also face greater risks in reoperation. Previous studies have shown that the larger the MH, the greater the risk of postoperative reopening, which has a great impact on clinical indicators such as the patient's postoperative best corrected visual acuity (BCVA) and visual acuity (VA). According to the classification of the development stage of macular holes by the International Vitreomacular Traction Research Group, the size of the minimum diameter of the macular hole is an important indicator for clinical diagnosis. Therefore, it is of great significance to accurately measure the size of the macular hole.
[0004] Clinically, doctors usually use the embedded manual caliper of ophthalmology software to manually measure the size of MH and classify and stage the macular hole based on the measurement results. However, the manual measurement method is inefficient, inaccurate, and highly dependent on the doctor's personal experience. Secondly, the current number of fundus specialists in my country is far from meeting the current public health needs, and there are few high-quality ophthalmic medical resources. Manual measurement methods cannot meet the needs of many patients in areas with underdeveloped medical resources.
[0005] At present, there are few studies on the automatic measurement of macular holes. Since the OCT images collected by the equipment usually have low contrast and high noise, and the edges of the macular holes are relatively blurred, the task of automatically measuring the size of the macular holes is very challenging. In 2023, a YOLOv7 algorithm was used to detect macular holes. The Otsu threshold segmentation was applied to the pixels in the detected bounding box to binarize the area. Eight equidistant lines were drawn in the horizontal direction in the area, and the size of the macular hole was calculated based on the number of pixels with a horizontal value of 0 in the shortest of the eight lines. However, this method can only roughly measure the minimum diameter of the macular hole in the horizontal direction, and the measured value cannot reflect the true value of the minimum diameter of the macular hole. Summary of the invention
[0006] To this end, the present invention provides an automatic measurement method for the minimum diameter of fundus macular hole based on OCT images to solve the problems raised in the background technology.
[0007] In order to achieve the above object, the present invention provides the following technical solution: a method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images, comprising:
[0008] Data preparation: Obtain a publicly available fundus macular hole OCT dataset and crop the image data so that only part of the macular hole lesion area is retained in the image, minimizing interference from other parts of the image, in preparation for image processing;
[0009] Image processing, including image denoising, image binarization, image morphological operation and edge detection; first, image denoising adopts the superposition method of Gaussian filtering in linear filtering and median filtering in nonlinear filtering, and then uses the triangle method to automatically find the global threshold, and then the denoised image is binarized according to the threshold to generate an image containing only black and white; through image morphological operation, the cyst area in the image is removed; finally, edge detection is performed to identify strong edges and weak edges in the image;
[0010] Automatic measurement, by automatically finding two contour lines in the image, automatically finding the position where the two contour lines are closest and calculating the minimum Euclidean distance between the two contours.
[0011] Preferably, the Gaussian filtering step in the linear filtering includes: a two-dimensional Gaussian function as shown in formula (1),
[0012] The Gaussian kernel generated by formula (1) will filter the image in the x and y directions;
[0013]
[0014] G(x, y) represents the value of the Gaussian function at the point (x, y); σ is the standard deviation of the Gaussian filter, which determines the width of the Gaussian function in each direction; the larger the standard deviation, the wider and smoother the Gaussian function; x and y are independent variables, indicating the position of the point in the image.
[0015] Preferably, the specific steps of automatically seeking the global threshold by the triangle method include: first calculating the gray intensity histogram of the image, assuming that the maximum peak of the histogram is close to the brightest side, then obtaining the maximum straight-line distance through the triangle, and determining the threshold according to the histogram gray level corresponding to the maximum straight-line distance.
[0016] Preferably, the morphological operation processing includes closing operation, opening operation, erosion, filling and dilation operations; the image erosion and image dilation are combined to realize the image closing operation and opening operation;
[0017] Among them, the closing operation is an operation of dilating and then corroding the image, as shown in formula (2);
[0018] Closing(A)=Erosion(Dilation(A)) (2);
[0019] A represents the input binary image or the target object of the morphological operation; Erosion represents corrosion, one of the morphological operations; Dilation represents expansion, one of the morphological operations;
[0020] The closing operation first dilates the image and then erodes it, removing small holes in the connected domain, connecting adjacent connected domains, and smoothing the edges of the contours; while the opening operation first erodes the image and then dilates it, as shown in formula (3);
[0021] Opening(A)=Dilation(Erosion(A)) (3);
[0022] The opening operation corrodes the image first and then expands it to remove noise in the image, eliminate smaller connected domains, retain larger connected domains, and smooth the boundaries of connected domains without significantly changing the area of larger connected domains; after performing morphological operations on the binary image, the smaller closed black areas are filled to eliminate the cystic structure.
[0023] Preferably, the edge detection process is divided into the following steps:
[0024] Step 1: Image denoising: Use Gaussian filtering to smooth the image and reduce the noise in the image. Generally, a 5*5 Gaussian filter is used as shown in formula (4);
[0025]
[0026] Step 2: Calculate the image gradient: Calculate the gradient direction and magnitude of the grayscale value of each pixel in the image. First, detect the edges in the x and y directions of the image using the Sobel operator, and then use formulas (5) and (6) to calculate the gradient direction θ and magnitude G, respectively. x Indicates the grayscale of the pixel in the x direction, I y Represents the grayscale of the pixel in the y direction; the Sobel operator effectively extracts the image edge through discrete differential method;
[0027]
[0028] Step 3: Non-maximum suppression: The non-maximum suppression algorithm is used to eliminate the stray response caused by edge detection. The grayscale change area is usually concentrated. The pixels with the largest grayscale gradient in the gradient direction within the local range are retained, and the others are not retained. A large part of the points can be eliminated, and the edge with multiple pixel widths can be turned into an edge with a single pixel width.
[0029] Step 4: Double threshold screening: After non-maximum suppression, there are still many possible edge points. The double threshold method is used to divide strong edges and weak edges. Pixels with grayscale gradient greater than the high threshold are retained as strong edges, and pixels with grayscale gradient less than the low threshold are removed. Pixels with grayscale gradient between the high and low thresholds are screened as weak edges; search in the neighborhood of the weak edge. If a strong edge exists, the weak edge is retained. If not, the weak edge is deleted to complete edge detection.
[0030] Preferably, the Euclidean distance is calculated as shown in formula (8):
[0031]
[0032] Among them, x1 and y1 represent the pixel coordinates of the first point, x2 and y2 represent the pixel coordinates of the second point, and d represents the Euclidean distance between two pixels.
[0033] The present invention has the following advantages:
[0034] The present invention combines image denoising, image binarization, image morphological operations, and edge detection algorithms. The algorithm has good robustness and innovation. The automatic measurement of the diameter of the macular hole has an efficient measurement process and accurate measurement results, which can relieve heavy clinical pressure. Combined with the automatic measurement results, doctors can formulate more detailed diagnosis and treatment plans for patients. The present invention makes up for the current lack of artificial intelligence technology in the application of macular hole diseases. It has a good detection effect on the edge of the macular hole contour in the vast majority of macular hole OCT data, which is of great significance for promoting the development of precision medicine, intelligent medicine, and telemedicine. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of automatic measurement of the minimum diameter of a macular hole provided in this embodiment;
[0036] Figure 2 The macular hole OCT image provided in this embodiment;
[0037] Figure 3 A schematic diagram of the principle of automatically seeking a global threshold using the triangle method provided in this embodiment;
[0038] Figure 4 A schematic diagram of the image corrosion principle provided in this embodiment;
[0039] Figure 5 A schematic diagram of the image expansion principle provided in this embodiment;
[0040] Figure 6 A schematic diagram of the closing operation principle provided in this embodiment;
[0041] Figure 7 A schematic diagram of the operation principle of the open operation provided in this embodiment;
[0042] FIG8( a ) and FIG8( b ) are respectively a binarized image and an image after morphological operation provided by this embodiment;
[0043] FIG9(a) and FIG9(b) are images after edge detection and images after automatic distance measurement provided by this embodiment;
[0044] Fig.10 A flowchart for automatic measurement of macular hole provided in this embodiment;
[0045] Fig.11 This is a diagram showing an example of automatic measurement of macular hole provided in this embodiment. DETAILED DESCRIPTION
[0046] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Refer to the instruction manual Figure 1 The embodiment provides an automatic measurement method of the minimum diameter of a fundus macular hole based on an OCT image, comprising:
[0048] 1. Data preparation
[0049] The main content of this step is to obtain the public fundus macular hole OCT data set and crop the image data so that only part of the macular hole lesion area is retained in the image, minimizing the interference of other parts of the image to prepare for image processing.
[0050] like Figure 2 The OCT image of a macular hole is shown. The lesion area of the macular hole is shown as a low reflection consistent with the vitreous cavity reflection in the OCT B-scan. The bottom surface is the exposed high-reflection retinal pigment epithelial cell (RPE) layer, and the two sides are high-reflection retinal tissue with clear edges. Above it, sometimes completely or incompletely detached tissue formed by the traction of the vitreous inner limiting membrane can be seen. Cystoid macular edema is very common in cases of macular holes. In the OCT B-scan, it appears as a uniform low-reflection cystic cavity structure with different sizes and high-reflection intervals between different tissue layers in the retina. Cropping the image data can avoid interference with subsequent image processing caused by the RPE layer, cystic cavity structure, excessive image noise, and other tissues. This step lays the foundation for edge extraction and automatic measurement of macular holes.
[0051] 2. Image processing
[0052] The main content of this step is to build an image processing algorithm, which can be divided into the following steps:
[0053] 2.1 Image Denoising
[0054] There is a lot of noise on the original OCT image, which will greatly affect the subsequent image processing effect. Choosing a suitable denoising method will be of great significance to the subsequent image processing effect. This step aims to preprocess the image and denoise the image by superimposing linear filtering and nonlinear filtering. Through experimental comparison, it is found that selecting Gaussian filtering in linear filtering and median filtering in nonlinear filtering will achieve the best preprocessing effect for the image.
[0055] The result of linear filtering is a linear combination of all pixel values. In the process of image acquisition, Gaussian noise is easily introduced, and Gaussian filtering will effectively remove this noise. The essence of Gaussian filtering is to perform a convolution operation on the image using a Gaussian kernel generated by a Gaussian function. The two-dimensional Gaussian function is shown in formula (1). The Gaussian kernel generated by the function will filter the image in the x and y directions. Where σ is the standard deviation of the Gaussian filter. The larger σ is, the wider the bandwidth of the Gaussian filter is, the better the smoothing effect on the image is, and the more blurred the image is. It is necessary to select an appropriate Gaussian kernel size and σ value to ensure that the image edges are not overly blurred while reducing noise.
[0056]
[0057] G(x,y) represents the value of the Gaussian function at the point (x,y); σ is the standard deviation of the Gaussian filter, which determines the width of the Gaussian function in each direction; the larger the standard deviation, the wider and smoother the Gaussian function; x and y are independent variables, indicating the position of the point in the image.
[0058] The result of nonlinear filtering is not obtained by linear combination of pixel values in the filter. Its operation process includes logical operations, sorting, etc. The noise after linear filtering will not be eliminated, but will exist in a softer form. At this time, nonlinear filtering is used to filter out the noise through logical judgment, which can achieve better image processing effects. The principle of median filtering is to replace the pixel value at the center of the filter with the median of all pixels within the filter range. It is a nonlinear signal processing method based on sorting statistics theory, which can effectively suppress noise. Median filtering will protect the edge information of the image very well, but it is necessary to select a suitable filter size to avoid excessive blurring of the details of the denoised image.
[0059] 2.2 Image Binarization
[0060] Binarization of the denoised image will generate an image containing only black and white. Binarization will lay the foundation for subsequent image edge extraction. The selected grayscale threshold will directly affect the effect of image binarization. According to the experimental comparison results, the triangle method is used to automatically find the global threshold. Binarization of the image based on this threshold will obtain the best binary image. This method is based on a pure geometric method to find the optimal threshold. First, the grayscale intensity histogram of the image is calculated. It is assumed that the maximum peak of the histogram is close to the brightest side. Then the maximum straight-line distance is obtained through the triangle, and the threshold is determined according to the histogram grayscale level corresponding to the maximum straight-line distance. The principle of this method is as follows Figure 3 shown.
[0061] 2.3 Image morphological operations
[0062] Since cystoid macular edema is very common in macular hole cases, the corresponding cystic cavity structure can be observed in many OCT images. In the binary image, the cystic cavity structure appears as a closed black area. This area will affect the edge extraction of the macular hole. Through image morphological operations, image components that are meaningful for expressing and describing the shape and position of the area can be extracted from the image, so that subsequent recognition work can grasp the most essential shape characteristics of the object. Therefore, performing morphological operations on the binary image to remove the cystic cavity area is of great significance for subsequent image processing.
[0063] The cystic area in the image can be effectively removed by performing closing, opening, erosion, filling, and dilation operations on the binary image in sequence.
[0064] Image erosion and dilation are basic morphological operations. During the operation, a template matrix is required, which is called a structure element. Common structure elements include cross structure elements, rectangular structure elements, and elliptical structure elements. This embodiment selects a 3*3 rectangular structure element to process the image. The connected domain of an image refers to an area consisting of pixels with the same pixel value and adjacent positions in the image. The erosion operation can remove smaller connected domains caused by noise. The principle of image erosion is as follows: Figure 4 As shown, the expansion operation is opposite to the corrosion operation, which can ensure that the area of the main area does not shrink. The principle of image expansion is as follows Figure 5 shown.
[0065] Combining image erosion and image dilation can realize image closing and opening operations. Closing operation is to dilate the image first and then erode it, as shown in formula (2). Closing operation dilates the image first and then erodes it, which can remove small holes in the connected domain, connect adjacent connected domains, and smooth the edges of the contour. The principle of closing operation is as follows: Figure 6 As shown in the figure, the opening operation is to corrode the image first and then expand it, as shown in formula (3). The opening operation corrodes the image first and then expands it, which can remove noise in the image, eliminate smaller connected domains, retain larger connected domains, and smooth the boundaries of connected domains without significantly changing the area of larger connected domains. The principle of the opening operation is as follows: Figure 7 As shown. After the above morphological operation is performed on the binary image, the smaller closed black area needs to be filled to eliminate the cystic structure. The binary image is shown in Figure 8(a), and the image after morphological operation is shown in Figure 8(b).
[0066] Closing(A)=Erosion(Dilation(A))(2)
[0067] A represents the input binary image or the target object of the morphological operation; Erosion represents corrosion, one of the morphological operations; Dilation represents expansion, one of the morphological operations;
[0068] Opening(A)=Dilation(Erosion(A))(3)
[0069] 2.4 Edge Detection
[0070] The edge of an image refers to the area where the grayscale value of a pixel in the image changes suddenly. The Canny algorithm is one of the most outstanding and commonly used edge detection algorithms. This algorithm is not easily affected by noise and can identify strong and weak edges in an image. It plays an important role in edge detection applications. The detection process of this algorithm is divided into the following four steps:
[0071] Image denoising. Noise is where the grayscale changes greatly and is easily identified as a false edge. Therefore, a Gaussian filter is used to smooth the image and reduce the noise in the image. Generally, a 5*5 Gaussian filter is used as shown in formula (4).
[0072]
[0073] Calculate the image gradient and detect possible edges. This step requires calculating the gradient direction and magnitude of the grayscale value of each pixel in the image. First, use the Sobel operator to detect the edges in the x and y directions of the image, and then use formulas (5) and (6) to calculate the gradient direction θ and magnitude G, where I x Indicates the grayscale of the pixel in the x direction, I y Represents the grayscale of the pixel in the y direction. The Sobel operator can effectively extract image edges through discrete differential methods.
[0074]
[0075] Non-maximum suppression. The non-maximum suppression algorithm can eliminate the stray response caused by edge detection. The grayscale change area is usually concentrated. The pixel with the largest grayscale gradient in the gradient direction within the local range is retained, and the others are not retained. A large part of the points can be eliminated, and the edge with multiple pixel widths can be turned into an edge with a single pixel width.
[0076] Double threshold screening. After non-maximum suppression, there are still many possible edge points. The double threshold method is applied to divide strong edges and weak edges. Pixels with grayscale gradient greater than the high threshold are retained as strong edges, and pixels with grayscale gradient less than the low threshold are removed. Pixels with grayscale gradient between the high and low thresholds are screened as weak edges. Search in the neighborhood of the weak edge. If a strong edge exists, the weak edge is retained. If not, the weak edge is deleted to complete edge detection.
[0077] The present invention combines image denoising, image binarization, image morphological operation and edge detection algorithm, and has good detection effect on the edge of macular hole contour in most macular hole OCT data. The algorithm has good robustness and innovation.
[0078] 3. Automatic measurement
[0079] The OCT image of the macular hole can be cropped by clicking the area of interest with the mouse. The algorithm will perform denoising, binarization, morphological operations, and edge detection on the image in sequence. After finding the contours of the two macular holes, the algorithm will automatically measure the minimum Euclidean distance of the macular hole contours. The process is as follows: Fig.10 shown.
[0080] The present invention has good measurement results on most images in the public macular hole data set Macular Hole Retinal OCT. The following figure shows the measurement results of some data. Fig.11 shown.
[0081] The present invention constructs an automatic measurement algorithm. The algorithm can automatically find the position where the two contour lines are closest to each other and calculate the minimum Euclidean distance between the two contours by automatically finding two contour lines in the image. The Euclidean distance is the straight-line distance between two pixels, and the calculation formula is shown in formula (8), where x and y represent pixel coordinates. The image after edge detection and the image after automatic distance measurement are shown in (a) and (b) of Figure 9.
[0082]
[0083] Among them, x1 and y1 represent the pixel coordinates of the first point, x2 and y2 represent the pixel coordinates of the second point, and d represents the Euclidean distance between two pixels.
[0084] The macula is a concave area at the posterior pole of the retina and is the most sensitive area for visual function. Macular hole (MH) is one of the more common fundus diseases in ophthalmology clinics and has a very serious impact on the patient's vision. For current MH cases, doctors usually make a diagnosis by manually measuring the size of the MH in the OCT image using the caliper provided by the software. However, the traditional diagnostic method has the following disadvantages: (1) The manual measurement method is inefficient and inaccurate, highly dependent on the doctor's personal experience, and there are human errors in the measurement process; (2) In reality, the number of fundus specialists is far from meeting the current public health needs, and there are few high-quality ophthalmic medical resources. The manual measurement method cannot meet the needs of many patients in areas with underdeveloped medical resources.
[0085] The present invention realizes the automatic measurement of the diameter of the macular hole. The measurement process is efficient and the measurement results are accurate, which can relieve the heavy clinical pressure. Combined with the automatic measurement results, doctors can formulate more detailed diagnosis and treatment plans for patients. The present invention makes up for the current lack of application of artificial intelligence technology in macular hole diseases, and is of great significance for promoting the development of precision medicine, intelligent medicine, and telemedicine.
[0086] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A method for automatically measuring the minimum diameter of fundus macular hole based on OCT images, characterized in that: include: Data preparation: Obtain a publicly available fundus macular hole OCT dataset and crop the image data so that only a portion of the macular hole lesion area is retained in the image in preparation for image processing; Image processing, including image denoising, image binarization, image morphological operation and edge detection; first, image denoising adopts the superposition method of Gaussian filtering in linear filtering and median filtering in nonlinear filtering, and then uses the triangle method to automatically find the global threshold, and then the denoised image is binarized according to the threshold to generate an image containing only black and white; through image morphological operation, the cyst area in the image is removed; finally, edge detection is performed to identify strong edges and weak edges in the image; Automatic measurement, by automatically finding two contour lines in the image, automatically finding the position where the two contour lines are closest and calculating the minimum Euclidean distance between the two contours.
2. The method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images according to claim 1, characterized in that: The Gaussian filtering steps in linear filtering include: the two-dimensional Gaussian function is shown in formula (1), The Gaussian kernel generated by formula (1) will filter the image in the x and y directions; G(x,y) represents the value of the Gaussian function at the point (x,y); σ is the standard deviation of the Gaussian filter, which determines the width of the Gaussian function in each direction; x and y are independent variables, indicating the position of the point in the image.
3. The method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images according to claim 1, characterized in that: The specific steps of automatically seeking the global threshold by the triangle method include: firstly, calculating the gray intensity histogram of the image, assuming that the maximum peak of the histogram is close to the brightest side, then obtaining the maximum straight-line distance through the triangle, and determining the threshold according to the histogram gray level corresponding to the maximum straight-line distance.
4. The method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images according to claim 1, characterized in that: Morphological operation processing includes closing operation, opening operation, erosion, filling and dilation operations; image erosion and image dilation are combined to realize image closing and opening operations; Among them, the closing operation is an operation of dilating and then corroding the image, as shown in formula (2); Closing(a)=Erosion(Dilation(A)) (2) A represents the input binary image or the target object of the morphological operation; Erosion represents corrosion, one of the morphological operations; Dilation represents expansion, one of the morphological operations; The opening operation is to corrode the image first and then expand it, as shown in formula (3); Opening(A)=Dilation(Erosion(A)) (3) After the binary image is processed by morphological operation, the smaller closed black areas are filled to eliminate the cystic structure.
5. The method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images according to claim 1, characterized in that: The edge detection process is divided into the following steps: Step 1: Image denoising: Use Gaussian filtering to smooth the image. Use a 5*5 Gaussian filter as shown in formula (4); Step 2: Calculate the image gradient: Calculate the gradient direction and magnitude of the grayscale value of each pixel in the image. First, use the Sobel operator to detect the edges in the x and y directions of the image, and then use formula (5) and formula (6) to calculate the gradient direction θ and magnitude G, respectively, where Ix represents the grayscale of the pixel in the x direction, and Iy represents the grayscale of the pixel in the y direction. The Sobel operator effectively extracts the image edge through the discrete differential method. Step 3: Non-maximum suppression: The non-maximum suppression algorithm is used to eliminate the stray response caused by edge detection; the pixel with the largest grayscale gradient in the gradient direction within the local range is retained, and the others are not retained, and the edge with multiple pixel widths is turned into an edge with a single pixel width; Step 4: Double threshold screening: After non-maximum suppression, the double threshold method is used to divide strong edges and weak edges. Pixels with grayscale gradient greater than the high threshold are retained as strong edges, and pixels with grayscale gradient less than the low threshold are removed. Pixels with grayscale gradient between the high and low thresholds are screened as weak edges; search in the neighborhood of the weak edge, if a strong edge exists, retain the weak edge, if not, delete the weak edge to complete edge detection.
6. The method for automatically measuring the minimum diameter of a fundus macular hole based on OCT images according to claim 1, characterized in that: The Euclidean distance calculation is shown in formula (8): Among them, x1 and y1 represent the pixel coordinates of the first point, x2 and y2 represent the pixel coordinates of the second point, and d represents the Euclidean distance between two pixels.
Citation Information
Patent Citations
Edge detection method of Canny operator based on high and low thresholds
CN114399522A
Edge detection method based on binary image processing
CN114677525A
Fundus OCT image recognition method based on improved neural network
CN114708187A
Canny edge detection method based on bilateral filtering and adaptive threshold
CN117853510A
Preprocessing method for performing quantitative analysis on fundus image, and storage device
US20210343006A1
Cited By
Intraocular measuring scale and measuring method for complex macular pore sealing operation
CN119970267A
Image detection method for particle pollution on surface of semiconductor wafer
CN120388015A
An image detection method for particle contamination on semiconductor wafer surface
CN120388015B
