Premature infant retinopathy detection method and device, storage medium and electronic equipment
Through automated image analysis and boundary line extraction, combined with angle and distance measurement, the method of identifying retinopathy in premature infants has solved the subjectivity and image quality dependence of traditional detection methods, improved the accuracy and efficiency of diagnosis, and achieved early stage Identify and standardize detection.
Patent Information
- Application Number
- CN202411026256.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional retinopathy detection methods for premature infants rely on doctors’ subjective judgments, have poor diagnostic consistency and are sensitive to image quality, which affects diagnostic accuracy.
Through automated image analysis methods, the fundus images of premature infants are obtained, the target boundary area between the vascular area and the avascular area is determined, the boundary line is extracted, and the ridge area and the fiber proliferation area are combined according to the angle and distance of the boundary line. The presence of retinopathy in premature infants is detected and staged.
It improves the accuracy and consistency of detection, reduces the error of human subjective judgment, can identify signs of ROP in the early stage of the lesion, realizes early diagnosis, and reduces unnecessary treatment for non-ROP patients.
Smart Images

Figure CN119184611A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for detecting retinopathy of prematurity, a storage medium and an electronic device. Background Art
[0002] Retinopathy of Prematurity (ROP) is an eye disease that mainly affects premature and low birth weight infants and can lead to severe visual impairment or even blindness.
[0003] Traditional ROP detection methods rely on the subjective judgment of doctors, and there is a problem of poor diagnostic consistency between different doctors. For doctors with less experience, they may not be able to accurately identify lesions. In addition, traditional detection methods rely heavily on the quality of fundus images, and poor image quality will further affect the accuracy of diagnosis. Summary of the invention
[0004] In view of this, embodiments of the present application provide a method and device for detecting retinopathy of prematurity, a storage medium, and an electronic device.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting retinopathy of prematurity, comprising: acquiring a fundus image of a target premature infant; if the fundus image contains a local avascular area, determining a target boundary area between the vascular area and the avascular area in the fundus image; determining boundary areas on both sides of the target boundary area, and performing boundary line extraction on the boundary area to obtain two target boundary lines; when the angle between the two target boundary lines is greater than or equal to the target angle, determining that the detection result of the fundus image is not retinopathy of prematurity; when the angle between the two target boundary lines is less than the target angle, determining that the detection result of the fundus image is retinopathy of prematurity.
[0006] In combination with the first aspect, in certain implementations of the first aspect, after determining that the detection result of the fundus image is retinopathy of prematurity, the method also includes: calculating the distance between two target boundary lines; if the distance between the two target boundary lines is greater than or equal to the target distance, determining that there is a ridge area between the two target boundary lines; if there is no vascular centerline in the ridge area, determining that the retinopathy of prematurity is stage II retinopathy of prematurity.
[0007] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: if there is a vascular centerline in the ridge area, determining whether there is a target fiber proliferation area in the fundus image; if there is no target fiber proliferation area in the fundus image, determining that the retinopathy of prematurity is stage III retinopathy of prematurity; if there is a target fiber proliferation area in the fundus image, determining that the retinopathy of prematurity is stage IV retinopathy of prematurity.
[0008] In combination with the first aspect, in certain implementations of the first aspect, determining whether there is a target fiber proliferation area in the fundus image includes: performing grayscale transformation on the fundus image to obtain a grayscale image corresponding to the fundus image; performing threshold segmentation on the grayscale image based on a first threshold range to obtain a first candidate area, the first candidate area does not include an optic disc area; determining a second candidate area having an area larger than the target area within the first candidate area; if there is no vascular area within the second candidate area, determining the second candidate area to be the target fiber proliferation area, and further determining that there is a target fiber proliferation area in the fundus image; if there is a vascular area within the second candidate area, determining that the second candidate area is not the target fiber proliferation area, and further determining that there is no target fiber proliferation area in the fundus image.
[0009] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: if the fundus image contains a global avascular area, and there is a target fiber proliferation area in the fundus image, determining that the retinopathy of prematurity is stage V retinopathy of prematurity.
[0010] In combination with the first aspect, in certain implementations of the first aspect, after determining that the detection result of the fundus image is retinopathy of prematurity, the method also includes: calculating the distance between two target boundary lines; if the distance between the two target boundary lines is less than the target distance, determining that the retinopathy of prematurity is stage I retinopathy of prematurity.
[0011] In combination with the first aspect, in certain implementations of the first aspect, determining the boundary areas on both sides of the target boundary area includes: performing a gradient transformation on the fundus image to obtain a gradient image corresponding to the fundus image; determining a third candidate area corresponding to the position of the target boundary area in the gradient image; performing threshold segmentation on the third candidate area based on a second threshold range to obtain a fourth candidate area; selecting two selected areas within the fourth candidate area whose area is larger than the target area and whose area width is smaller than the target width; and determining the two selected areas as the boundary areas on both sides of the target boundary area.
[0012] In combination with the first aspect, in certain implementations of the first aspect, the method for determining the angle between two target boundary lines includes: calculating the angle between each target boundary line and the horizontal line; and determining the angle between the two boundary lines based on the angle between each target boundary line and the horizontal line.
[0013] In a second aspect, an embodiment of the present application provides a device for detecting retinopathy of prematurity, comprising: an acquisition module for acquiring a fundus image of a target premature infant; a first determination module for determining a target boundary area between a vascular area and avascular area in the fundus image if the fundus image contains a local avascular area; a second determination module for determining boundary areas on both sides of the target boundary area, and performing boundary line extraction on the boundary area to obtain two target boundary lines; a third determination module for determining that the detection result of the fundus image is not retinopathy of prematurity when the angle between the two target boundary lines is greater than or equal to the target angle; and a fourth determination module for determining that the detection result of the fundus image is retinopathy of prematurity when the angle between the two target boundary lines is less than the target angle.
[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program for executing the method for detecting retinopathy of prematurity described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; the processor is used to execute the method for detecting retinopathy of prematurity described in the first aspect.
[0016] In this application, through automated image analysis and boundary line extraction, more accurate and consistent ROP detection can be provided, the error of human subjective judgment can be reduced, and the detection efficiency can be improved. In addition, this scheme can identify signs of ROP in the early stages of the lesion, thereby achieving early diagnosis, which is crucial for the treatment of ROP and the prevention of visual impairment. Secondly, by measuring the angle between the two target boundary lines, it is possible to detect whether it is retinopathy of prematurity. If the test results show that the angle is greater than or equal to the target angle, unnecessary treatment of non-ROP patients can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1 Shown is a flow chart of a detection method provided in one embodiment of the present application.
[0019] Figure 2 Shown is a schematic flow chart of a detection method provided in another embodiment of the present application.
[0020] Figure 3 Shown is a flow chart of a detection method provided in yet another embodiment of the present application.
[0021] Figure 4 Shown is a flow chart of a detection method provided in yet another embodiment of the present application.
[0022] Figure 5 The figure is a schematic diagram of a process for determining whether a target fiber value-added region exists, provided in one embodiment of the present application.
[0023] Figure 6 The figure is a schematic diagram of a process of determining boundary areas on both sides of a target boundary area provided by an embodiment of the present application.
[0024] Figure 7 The figure is a schematic diagram of a process for determining the angle between two target boundary lines provided in one embodiment of the present application.
[0025] Figure 8 Shown is a schematic structural diagram of a device for detecting retinopathy of prematurity provided in one embodiment of the present application.
[0026] Fig. 9 Shown is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] Figure 1 FIG. 1 is a flow chart of a detection method provided in an embodiment of the present application. Figure 1 As shown, the method includes the following steps.
[0029] Step S110, acquiring a fundus image of the target premature infant;
[0030] Fundus images, also called retinal images or fundus photography, are images of the back of the eye (i.e., the retina) obtained through special photographic techniques. Such images are very important for diagnosing and monitoring various eye diseases, including retinopathy of prematurity, diabetic retinopathy, glaucoma, macular degeneration, etc.
[0031] In actual situations, if it is determined that the fundus image contains a local avascular region, step S120 is executed.
[0032] Local avascular areas refer to the absence of blood vessels in certain parts of the retina despite the presence of vascular distribution in the fundus image. In the context of ROP, local avascular areas are a key feature of the lesion and are associated with abnormal vascular growth and retinal dysplasia.
[0033] Exemplarily, edge detection algorithms, threshold segmentation, blood vessel tracking algorithms, etc. may be used to detect whether blood vessels exist in the fundus image, and then determine whether the fundus image contains a local avascular area.
[0034] Step S120 , determining a target boundary region between a region with blood vessels and a region without blood vessels in the fundus image.
[0035] The target demarcation zone refers to the transition zone between the vascular and avascular areas of the retina. It marks the end point of normal vascular growth and the starting point of abnormal vascular proliferation. Therefore, it is very important in the pathological characteristics of ROP.
[0036] In step S110, after determining whether there are blood vessels in the fundus image, the blood vessel area and the non-blood vessel area in the image are further separated to obtain the target boundary area. In this embodiment, the target boundary area can be determined by threshold segmentation, region growing, clustering algorithm and other methods.
[0037] Step S130, determining the boundary areas on both sides of the target boundary area, and extracting boundary lines from the boundary areas to obtain two target boundary lines.
[0038] Specifically, each side of the border region indicates the end point of normal growth of retinal blood vessels and the starting point of possible abnormal blood vessel growth. In fundus image analysis, borderline extraction can help identify and represent the center path of the border region.
[0039] Exemplarily, morphological operations, such as opening and closing operations, can be used to extract the boundary lines of the boundary area; or, a distance transform is performed on the binary image, and then the boundary lines of the boundary area are extracted by threshold processing. It should be noted that in the process of boundary line extraction, the complete boundary line may be closed, forming a ring structure. Therefore, it is necessary to remove the endpoints of the complete boundary line so as to divide these closed boundary lines into two independent boundary lines to more accurately represent the center path of the target boundary area. Exemplarily, in addition to removing the endpoints, it is also necessary to remove a certain size of area at the end of the boundary line to eliminate interference caused by image boundary effects or blood vessel branches.
[0040] Step S140: When the angle between the two target boundary lines is greater than or equal to the target angle, it is determined that the detection result of the fundus image is not retinopathy of prematurity.
[0041] Specifically, if the angle between the two target boundary lines is greater than or equal to the target angle, the two target boundary lines are considered to be non-parallel, and therefore, the detection result of the fundus image is determined to be not retinopathy of prematurity. Exemplarily, the target angle is 30°.
[0042] Step S150: When the angle between the two target boundary lines is smaller than the target angle, it is determined that the detection result of the fundus image is retinopathy of prematurity.
[0043] Correspondingly, if the angle between the two target boundary lines is smaller than the target angle, the two target boundary lines are considered to be parallel. At this time, it is determined that the detection result of the fundus image is retinopathy of prematurity.
[0044] In this embodiment, more accurate and consistent ROP detection is provided through automated image analysis and boundary line extraction, reducing errors in human subjective judgment and improving detection efficiency. In addition, this solution can identify signs of ROP in the early stages of the lesion, thereby achieving early diagnosis, which is crucial for the treatment of ROP and the prevention of visual impairment. Secondly, by measuring the angle between the two target boundary lines, whether it is retinopathy of prematurity is detected. This quantitative method is more helpful in standardizing the detection process. If the test results show that the angle is greater than or equal to the target angle, unnecessary treatment of non-ROP patients can be further reduced.
[0045] Figure 2 FIG. 1 is a flow chart of a detection method provided by another embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 2 The embodiment shown is described below in detail. Figure 2 The embodiment shown and Figure 1 The differences and similarities between the illustrated embodiments are not described in detail.
[0046] like Figure 2 As shown, in this embodiment, after determining that the detection result of the fundus image is retinopathy of prematurity, the following steps are also included.
[0047] Step S210, calculating the distance between two target boundary lines.
[0048] Exemplarily, the extracted target boundary line is digitized and represented as a set of two-dimensional coordinate points, which are distributed along the target boundary line. Then, reference points for calculating the distance are determined on the two target boundary lines. These reference points can be endpoints on the target boundary line, or points at specific intervals on the target boundary line. If the boundary line is horizontal or inclined, the distance between them can be estimated by calculating the vertical distance between the reference points. Alternatively, the Euclidean distance between the two points is calculated, that is, the square root of the sum of the squares of the coordinate differences of the two points in two-dimensional space. Alternatively, the point on one target boundary line closest to the other target boundary line is found, and the distance between these closest points is calculated.
[0049] Exemplarily, when calculating the distance between two target boundary lines, the two target boundary lines may be divided into a plurality of small segments, and the distance between the endpoints of each segment is calculated, and then the minimum value or average value of these distances is taken.
[0050] Step S220: If the distance between the two target boundary lines is less than the target distance, it is determined that the retinopathy of prematurity is stage I retinopathy of prematurity.
[0051] It is understandable that in the early stage of ROP, the target boundary area between the vascular area and the avascular area is relatively close, so the distance between the two target boundary lines is short. As the lesion progresses, this distance may increase due to abnormal vascular proliferation. Therefore, in this embodiment, when the distance between the two target boundary lines is less than the target distance, it can be determined as stage I retinopathy of prematurity.
[0052] For example, the target distance is used as a threshold for judging stage 1 retinopathy of prematurity, which requires comprehensive consideration of multiple factors, including clinical data and statistical analysis results.
[0053] This step provides an objective indicator for the diagnosis of ROP by quantitatively measuring the distance between the border lines, which helps to reduce the error of subjective judgment and improve the accuracy of diagnosis. By setting the target distance, it helps to distinguish different stages of ROP, especially to identify earlier stage I lesions. At the same time, the automated image analysis and distance measurement in this step can significantly improve the efficiency of the screening and diagnosis process, especially when a large number of cases need to be processed.
[0054] Figure 3FIG. 1 is a flow chart of a detection method provided by another embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 3 The embodiment shown is described below in detail. Figure 3 The embodiment shown and Figure 1 The differences and similarities between the illustrated embodiments are not described in detail.
[0055] like Figure 3 As shown, in this embodiment, if the fundus image contains a global avascular area, the method further includes step S310.
[0056] Step S310: If there is a target fiber proliferation area in the fundus image, it is determined that the retinopathy of prematurity is stage V retinopathy of prematurity.
[0057] The global avascular area refers to the lack of blood vessels throughout the retina. Under normal circumstances, retinal blood vessels start from the optic disc, extend to the peripheral area, cover the entire retina, and provide nutrients and oxygen to the retina. However, in some pathological conditions, retinal blood vessels may be underdeveloped or abnormal, resulting in no blood vessel coverage in some areas. Target fibrous proliferation areas refer to areas of abnormal fibrous tissue proliferation in the retina, which are related to the severe stage of the lesion. Specifically, fibrous proliferation areas usually have certain texture and grayscale features, and the fundus image can be segmented based on these features to determine whether the fundus image contains the target fibrous proliferation area.
[0058] In other embodiments, the presence of a target fiber proliferation region in the fundus image indicates that the retinopathy of prematurity is determined to be stage IV retinopathy of prematurity, wherein the method for determining stage IV retinopathy of prematurity can be found in Figure 4 Corresponding embodiments. That is, based on the determination of stage IV retinopathy of prematurity, if the fundus image contains a global avascular area, it can be further determined as stage V retinopathy of prematurity.
[0059] In this step, by identifying the global avascular area in the fundus image, possible ROP lesions can be detected early, providing an opportunity for early intervention. The identification of the target fibroproliferative area is more helpful in accurately determining the stage of ROP, especially for the detection of the severe stage of stage V.
[0060] Figure 4 FIG. 1 is a flow chart of a detection method provided by another embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 4 The embodiment shown is described below in detail. Figure 4 The embodiment shown and Figure 1 The differences and similarities of the illustrated embodiments are not described in detail.
[0061] like Figure 4 As shown, in this embodiment, after determining that the detection result of the fundus image is retinopathy of prematurity, the following steps are also included.
[0062] Step S410, calculating the distance between two target boundary lines.
[0063] As mentioned earlier, you can use Figure 2 The method in the illustrated embodiment calculates the distance between two target boundary lines.
[0064] Step S420: If the distance between the two target boundary lines is greater than or equal to the target distance, it is determined that there is a ridge region between the two target boundary lines.
[0065] The vascular pattern in the retina normally radiates outward from the optic disc, whereas in ROP, abnormal blood vessel growth results in a demarcation between avascular and vascular areas (i.e., the target demarcation zone).
[0066] In the early stages of ROP, ridges form at the boundaries between avascular and vascular areas due to abnormal blood vessel growth and retinal development, and the presence of ridges usually indicates that the lesion is progressing.
[0067] In this step, the characteristics of the lesion can be quantitatively evaluated by measuring the distance between the two target boundary lines. If this distance is greater than or equal to a certain target distance, there is enough space in the demarcation area for ridge formation.
[0068] Step S430: If there is no blood vessel centerline in the ridge region, it is determined that the retinopathy of prematurity is stage II retinopathy of prematurity.
[0069] The vessel centerline usually refers to the central axis of the vessel, which represents the direction and path of the vessel. In the fundus image, the vessel centerline extends along the length of the vessel.
[0070] In the early stages of ROP, the abnormal blood vessel growth has not yet formed a distinct vascular network, so no clear vascular centerline can be observed. The absence of vascular centerlines in the ridge area is a feature of stage II ROP, indicating that the lesion is in the early stage of vascular proliferation and the vessels have not yet formed a deep network. This detection criterion helps to accurately assess the stage of the lesion and formulate an appropriate monitoring and treatment plan.
[0071] Step S440: If there is a blood vessel centerline in the ridge region, it is determined whether there is a target fiber proliferation region in the fundus image.
[0072] Accordingly, after confirming the presence of the blood vessel centerline in the ridge region, it is next determined whether or not a target fibrous proliferation region exists in the fundus image.
[0073] Fibrous proliferation refers to the growth of abnormal blood vessels and fibrous tissue on the surface of the retina or into the vitreous cavity. Areas of fibrous proliferation appear as white or grayish-white patches on the retina, and these areas increase as the disease progresses.
[0074] Step S450: if the target fiber proliferation area does not exist in the fundus image, it is determined that the retinopathy of prematurity is stage III retinopathy of prematurity.
[0075] If the target fibrous proliferation area is not found in the fundus image after examination, it means that the abnormal blood vessels and fibrous tissue of the retina have not yet formed obvious proliferative plaques. The characteristics of stage 3 ROP usually include vascular dilation, tortuosity, and ridge formation in the posterior pole of the retina. At this stage, the lesion has not yet developed into extraretinal fibrous proliferation or retinal detachment.
[0076] Step S460: If the target fiber proliferation area exists in the fundus image, it is determined that the retinopathy of prematurity is stage IV retinopathy of prematurity.
[0077] If target fibrous proliferation areas are observed in fundus images, this indicates that abnormal blood vessels and fibrous tissue have begun to proliferate on the retinal surface or into the vitreous cavity. Stage IV ROP is characterized by further dilation and tortuosity of blood vessels in the posterior pole of the retina, accompanied by significant fibrous proliferation. This can lead to traction and morphological changes in the retina, and may even develop into retinal detachment.
[0078] In this embodiment, a more objective and accurate method is provided for diagnosing and staging retinopathy of prematurity by quantitatively analyzing the borderline distance and vascular features in fundus images. Identifying the presence or absence of ridge areas and vascular centerlines helps to identify lesions early so that intervention can be performed before the lesions progress to a more serious stage. By setting clear diagnostic criteria and steps, it helps to standardize the diagnostic process and reduce the differences in diagnostic results between different doctors.
[0079] Figure 5 The figure shows a flow chart of determining whether there is a target fiber value-added area provided by an embodiment of the present application. Figure 4 Based on the embodiment shown, Figure 5 The embodiment shown is described below in detail. Figure 5 The embodiment shown and Figure 4 The differences and similarities between the illustrated embodiments are not described in detail.
[0080] like Figure 5 As shown, in this embodiment, judging whether there is a target fiber proliferation area in the fundus image includes the following steps.
[0081] Step S510, performing grayscale transformation on the fundus image to obtain a grayscale image corresponding to the fundus image.
[0082] A grayscale image is a single-channel image in which each pixel has only one intensity value, usually represented as a number between 0 (black) and 255 (white).
[0083] Color images are usually stored in RGB (red, green, blue) color space. To perform grayscale conversion on fundus images, first determine how to convert from RGB color space to grayscale. For example, grayscale conversion can be achieved by weighted sum, that is, weighted sum of the red, green and blue components of each pixel of the RGB image. The most commonly used grayscale conversion formula is: Gray = 0.299R + 0.587G + 0.114B. This formula is based on the different sensitivities of the human eye to different colors, where the green component contributes the most to brightness and the blue the least.
[0084] Exemplarily, the grayscale formula is applied to each pixel in the original color fundus image to calculate the corresponding grayscale value, and a new single-channel image is created using the calculated grayscale value, which is the grayscale version of the color fundus image.
[0085] Step S520: performing threshold segmentation on the grayscale image based on a first threshold range to obtain a first candidate region.
[0086] Exemplarily, the first threshold range is 200-255, which means that only pixels with higher brightness will be selected. In the threshold segmentation process, for each pixel in the grayscale image, check whether its grayscale value is in the range of 200 to 255. If the grayscale value of the pixel is greater than or equal to 200 and less than or equal to 255, the pixel is considered to be the foreground (i.e., part of the fibroproliferative membrane candidate area). If the grayscale value of the pixel is less than 200 or greater than 255, the pixel is considered to be the background.
[0087] According to the above segmentation operation, a new binary image is generated, in which the foreground area is represented by white (usually 255) and the background area is represented by black (0).
[0088] The optic disc is a special area on the retina, which is usually shown as a brighter circular area in the fundus image. Since the optic disc area may be confused with the fibroproliferative membrane, it needs to be removed from the candidate area. For example, the position of the optic disc can be identified in advance, and this part of the area can be marked as background in the binary image.
[0089] Step S530: determining a second candidate region within the first candidate region whose area is larger than the target area.
[0090] Specifically, the area of each connected region in the first candidate region is calculated, where a connected region refers to a region composed of adjacent pixels (horizontally or vertically) with the same pixel value in a binary image. During the operation, a target area threshold is set, which is set based on previous knowledge and experimental determination to distinguish meaningful feature regions from noise.
[0091] After calculating the areas of all connected regions in the first candidate region, further screen out those regions whose areas are larger than the target area, which are defined as the second candidate regions. Furthermore, these regions are the objects of further analysis, such as lesion detection, vascular region identification, etc.
[0092] The purpose of step S530 is to narrow the scope of analysis and focus on those larger areas that are clinically significant while excluding those areas formed by noise or unimportant tiny features. In this way, the accuracy and efficiency of diagnosis can be improved.
[0093] Step S540: If there is no blood vessel region in the second candidate region, the second candidate region is determined to be a target fibrous proliferation region, and further, it is determined that there is a target fibrous proliferation region in the fundus image.
[0094] The vascular area usually refers to the normal or abnormal (such as dilated, twisted) part of the retinal blood vessels, and the fibroproliferative area usually refers to the abnormally proliferating fibrous tissue, which appears different from the blood vessels in the image.
[0095] In the second candidate region, if it is confirmed by the blood vessel recognition algorithm that there are no blood vessel features, that is, these regions do not contain blood vessel structures, then the second candidate region is considered to be the target fibrous proliferation region.
[0096] It is understood that in the late stage of ROP, abnormal fibrous tissue proliferation is one of its characteristics. If the second candidate area does not contain blood vessels and its morphology, location and distribution are consistent with the known fibrous proliferation characteristics, then these areas will be determined as target fibrous proliferation areas. Once the existence of the target fibrous proliferation area is determined in the second candidate area, it indicates that the retina in the fundus image may be affected by the lesion.
[0097] Step S550: If there is a blood vessel region in the second candidate region, it is determined that the second candidate region is not the target fibrous proliferation region, and further it is determined that there is no target fibrous proliferation region in the fundus image.
[0098] In contrast, if blood vessels are detected in the second candidate regions, these regions are not fibrous proliferation regions, which means that, in the current image analysis stage, no region meeting the fibrous proliferation characteristics has been found.
[0099] In this embodiment, threshold segmentation of the grayscale image helps to identify possible fibrous proliferation areas at an early stage, which is crucial for early intervention of diseases such as ROP. By eliminating interference from the optic disc area and vascular area, the accuracy of identifying the target fibrous proliferation area is improved. Through precise threshold segmentation and area screening, the possibility of misidentifying non-fibrous proliferation areas as target areas is reduced. At the same time, this solution provides a clear basis for judgment, which helps doctors make more accurate clinical decisions.
[0100] Figure 6 The figure shows a flow chart of determining the boundary areas on both sides of the target boundary area provided by an embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 6 The embodiment shown is described below in detail. Figure 6 The embodiment shown and Figure 1 The differences and similarities between the illustrated embodiments are not described in detail.
[0101] like Figure 6 As shown, in this embodiment, determining the boundary areas on both sides of the target boundary area includes the following steps.
[0102] Step S610, performing gradient transformation on the fundus image to obtain a gradient image corresponding to the fundus image.
[0103] Specifically, firstly, a region of interest (ROI) is extracted from the fundus image to obtain an ROI image. For example, in the fundus image, the ROI includes a specific part of the retina, such as the macula, the optic disc, etc. Extracting the ROI can reduce irrelevant information and focus on processing the image part related to lesion detection.
[0104] Furthermore, the ROI image is enhanced by histogram equalization to highlight the ROP lesion area, and then the enhanced ROI image is subjected to gradient transformation to obtain a gradient image, which highlights the edge information in the image and is helpful for subsequent image analysis and lesion detection. Among them, histogram equalization is a method for enhancing image contrast. It enhances certain features in the image by redistributing the grayscale of the image, so that the area with low contrast becomes clearer. In this embodiment, histogram equalization can highlight the lesion area, such as retinal lesions. After the histogram equalization process, the contrast of the ROI image is enhanced and the lesion area is more obvious.
[0105] Step S620: determining a third candidate region corresponding to the position of the target boundary region in the gradient image.
[0106] It is understandable that when determining the target boundary area, the gradient image is not used but is directly performed on the original fundus image, because the original image provides more accurate color and texture information, which helps to more accurately identify the boundary between the vascular and non-vascular areas.
[0107] Position correspondence means that the third candidate region and the target boundary region have the same spatial position in the image. For example, they occupy the same spatial region in the fundus image and the gradient image, or in other words, their coordinates in the two images are corresponding, so that based on the target boundary region determined in the original image, the corresponding region can be found in the gradient image for further analysis and processing.
[0108] Step S630: performing threshold segmentation on the third candidate region based on the second threshold range to obtain a fourth candidate region.
[0109] Specifically, the threshold is a brightness limit that is used to classify the pixels of an image into two categories: foreground and background. When the intensity value of a pixel is above the threshold, it is classified as foreground; when it is below the threshold, it is classified as background. This method can be used to highlight specific features in an image, such as segmenting blood vessels or lesion areas in fundus images.
[0110] Exemplarily, the second threshold range is 100-255, which may be intended to provide a certain degree of flexibility, allowing the best threshold to be dynamically selected within the range to adapt to different image conditions or features. After determining the second threshold range, each pixel in the third candidate area is classified as foreground or background based on the comparison result of its intensity value with the second threshold range. After threshold segmentation, the resulting foreground pixel set constitutes the fourth candidate area, which represents the portion of the original third candidate area that is considered to correspond to the target feature (the boundary of the target demarcation area).
[0111] Step S640: Select two selected regions in the fourth candidate region whose area is larger than the target area and whose width is smaller than the target width.
[0112] The fourth candidate region may be the boundary line of the target demarcation area, which is further screened by the set area and width thresholds to ensure that the selected region contains sufficient feature information and maintains the fineness of the boundary line, rather than a wide area, which helps to accurately locate the edge of the blood vessel or lesion. The two regions finally selected can be used for further analysis of the fundus image, such as detection, classification or tracking of lesions.
[0113] Step S650: determine the two selected areas as boundary areas on both sides of the target boundary area.
[0114] In this embodiment, the blood vessels and lesion areas in the fundus image can be more accurately identified and located through gradient transformation and threshold segmentation. Specifically, the gradient transformation helps to highlight the edge information in the image, and can improve the detection accuracy of the boundary lines on both sides of the target boundary area. Furthermore, by selecting the area whose area and width meet specific conditions as the boundary area, the boundaries on both sides of the target boundary area can be determined more accurately. The automated image processing process in this embodiment reduces manual intervention and improves the efficiency of lesion detection and analysis.
[0115] Figure 7 FIG. 1 is a flow chart of determining the angle between two target boundary lines provided by an embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 7 The embodiment shown is described below in detail. Figure 7 The embodiment shown and Figure 1 The differences and similarities between the illustrated embodiments are not described in detail.
[0116] like Figure 7 As shown, in this embodiment, the method for determining the angle between two target boundary lines includes the following steps.
[0117] Step S710, calculating the angle between each target boundary line and the horizontal line.
[0118] Exemplarily, first analyze the gradient direction of each point on the target boundary line, or use methods such as Hough transform to determine the direction of each target boundary line. Then, for each boundary line, calculate the angle between it and the horizontal line. Among them, the horizontal line refers to a line parallel to the X-axis of the image, which is perpendicular to the vertical line (Y-axis). Finally, the angle can be measured using vector dot product, cross product or directly using the angle calculation function in the image processing library.
[0119] Step S720: determining the angle between two boundary lines based on the angle between each target boundary line and the horizontal line.
[0120] After obtaining the angle of each target boundary line relative to the horizontal line, the angle between the two boundary lines can be determined by comparing the two angles. For example, if the angles of the two boundary lines are θ1 and θ2, respectively, then the angle Δθ between them is |θ1-θ2|.
[0121] This embodiment provides a method for accurately measuring the angle between boundary lines. Automated angle calculation can reduce human errors, improve the consistency and repeatability of analysis, and assist in more complex image interpretation and decision-making.
[0122] Combination of the above Figures 1 to 7 , describes in detail the detection method embodiment of the present application, and the following is combined with Figure 8 , the detection device embodiment of the present application is described in detail. It should be understood that the description of the detection method embodiment corresponds to the description of the detection device embodiment, so the part not described in detail can refer to the previous method embodiment.
[0123] Figure 8 FIG. 1 is a schematic diagram of the structure of a device for detecting retinopathy of prematurity provided in one embodiment of the present application. Figure 8 As shown, the retinopathy of prematurity detection device 80 provided in the embodiment of the present application includes:
[0124] An acquisition module 810 is used to acquire a fundus image of a target premature infant;
[0125] A first determination module 820 is configured to determine a target boundary region between a vascular region and a vascular region in the fundus image if the fundus image includes a local vascular region;
[0126] The second determination module 830 is used to determine the boundary areas on both sides of the target boundary area and extract boundary lines from the boundary areas to obtain two target boundary lines;
[0127] A third determination module 840 is used to determine that the detection result of the fundus image is not retinopathy of prematurity when the angle between the two target boundary lines is greater than or equal to the target angle;
[0128] The fourth determination module 850 is used to determine that the detection result of the fundus image is retinopathy of prematurity when the angle between the two target boundary lines is smaller than the target angle.
[0129] In this embodiment, the fourth determination module 850 is also used to calculate the distance between the two target boundary lines; if the distance between the two target boundary lines is greater than or equal to the target distance, it is determined that there is a ridge area between the two target boundary lines; if there is no vascular centerline in the ridge area, it is determined that the retinopathy of prematurity is stage II retinopathy of prematurity.
[0130] In this embodiment, the fourth determination module 850 is also used to determine whether there is a target fiber proliferation area in the fundus image if there is a vascular centerline in the ridge area; if there is no target fiber proliferation area in the fundus image, determine that the retinopathy of prematurity is stage III retinopathy of prematurity; if there is a target fiber proliferation area in the fundus image, determine that the retinopathy of prematurity is stage IV retinopathy of prematurity.
[0131] In this embodiment, the fourth determination module 850 is also used to perform grayscale transformation on the fundus image to obtain a grayscale image corresponding to the fundus image; perform threshold segmentation on the grayscale image based on a first threshold range to obtain a first candidate area, and the first candidate area does not include the optic disc area; determine a second candidate area whose area is larger than the target area within the first candidate area; if there is no vascular area in the second candidate area, determine the second candidate area as the target fiber proliferation area, and then determine that the target fiber proliferation area exists in the fundus image; if there is a vascular area in the second candidate area, determine that the second candidate area is not the target fiber proliferation area, and then determine that the target fiber proliferation area does not exist in the fundus image.
[0132] In this embodiment, the fourth determination module 850 is further used to determine that the retinopathy of prematurity is retinopathy of prematurity stage V if the fundus image contains a global avascular area and there is a target fiber proliferation area in the fundus image.
[0133] In this embodiment, the fourth determination module 850 is further used to calculate the distance between the two target boundary lines; if the distance between the two target boundary lines is less than the target distance, it is determined that the retinopathy of prematurity is stage I retinopathy of prematurity.
[0134] In this embodiment, the second determination module 830 is also used to perform a gradient transformation on the fundus image to obtain a gradient image corresponding to the fundus image; determine a third candidate area corresponding to the position of the target boundary area in the gradient image; perform threshold segmentation on the third candidate area based on the second threshold range to obtain a fourth candidate area; select two selected areas within the fourth candidate area whose area is larger than the target area and whose width is smaller than the target width; and determine the two selected areas as boundary areas on both sides of the target boundary area.
[0135] In this embodiment, the second determination module 830 is further configured to calculate the angle between each target boundary line and the horizontal line; and determine the angle between two boundary lines based on the angle between each target boundary line and the horizontal line.
[0136] Below, reference Fig. 9 To describe an electronic device according to an embodiment of the present application. Fig. 9 Shown is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
[0137] like Fig. 9 As shown, the electronic device 90 includes one or more processors 901 and a memory 902 .
[0138] The processor 901 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 90 to perform desired functions.
[0139] The memory 902 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 901 may run the program instructions to implement the detection methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as fundus images, target boundary areas, target boundary lines, angles, etc. may also be stored in the computer-readable storage medium.
[0140] In one example, the electronic device 90 may further include: an input device 903 and an output device 904 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0141] The input device 903 may include, for example, a keyboard, a mouse, etc.
[0142] The output device 904 can output various information to the outside, including fundus images, target boundary areas, target boundary lines, angles, etc. The output device 904 can include, for example, a display, a speaker, a printer, a communication network and its connected remote output devices, etc.
[0143] Of course, to simplify, Fig. 9 Only some of the components related to the present application in the electronic device 90 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 90 may also include any other appropriate components.
[0144] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the detection method according to various embodiments of the present application described above in this specification.
[0145] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0146] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the detection method according to various embodiments of the present application described above in this specification.
[0147] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0148] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0149] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0150] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0151] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0152] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for detecting retinopathy of prematurity, characterized in that: include: Acquiring fundus images of target premature infants; If the fundus image includes a local avascular area, determining a target boundary area between a vascular area and the avascular area in the fundus image; Determine the boundary areas on both sides of the target boundary area, and extract boundary lines from the boundary areas to obtain two target boundary lines; When the angle between the two target boundary lines is greater than or equal to the target angle, determining that the detection result of the fundus image is not retinopathy of prematurity; When the angle between the two target boundary lines is smaller than the target angle, it is determined that the detection result of the fundus image is retinopathy of prematurity.
2. The method for detecting retinopathy of prematurity according to claim 1, characterized in that: After determining that the detection result of the fundus image is retinopathy of prematurity, the method further includes: Calculating the distance between the two target boundary lines; If the distance between the two target boundary lines is greater than or equal to the target distance, it is determined that there is a ridge region between the two target boundary lines; If there is no vascular centerline in the ridge region, the retinopathy of prematurity is determined to be stage II retinopathy of prematurity.
3. The method for detecting retinopathy of prematurity according to claim 2, characterized in that: Also includes: If the blood vessel centerline exists in the ridge region, determining whether a target fiber proliferation region exists in the fundus image; If the target fiber proliferation area does not exist in the fundus image, determining that the retinopathy of prematurity is retinopathy of prematurity stage III; If the target fiber proliferation area exists in the fundus image, the retinopathy of prematurity is determined to be stage IV retinopathy of prematurity.
4. The method for detecting retinopathy of prematurity according to claim 3, characterized in that: The determining whether there is a target fiber proliferation area in the fundus image includes: Performing grayscale transformation on the fundus image to obtain a grayscale image corresponding to the fundus image; Performing threshold segmentation on the grayscale image based on a first threshold range to obtain a first candidate region, wherein the first candidate region does not include an optic disc region; Determine, within the first candidate area, a second candidate area whose area is larger than the target area; If there is no blood vessel region in the second candidate region, determining the second candidate region as the target fiber proliferation region, and then determining that the target fiber proliferation region exists in the fundus image; If there is a blood vessel region in the second candidate region, it is determined that the second candidate region is not the target fibrous proliferation region, and further determined that the target fibrous proliferation region does not exist in the fundus image.
5. The method for detecting retinopathy of prematurity according to any one of claims 1 to 4, characterized in that: Also includes: If the fundus image contains a global avascular area and a target fiber proliferation area exists in the fundus image, the retinopathy of prematurity is determined to be stage V retinopathy of prematurity.
6. The method for detecting retinopathy of prematurity according to any one of claims 1 to 4, characterized in that: After determining that the detection result of the fundus image is retinopathy of prematurity, the method further includes: Calculating the distance between the two target boundary lines; If the distance between the two target boundary lines is less than the target distance, it is determined that the retinopathy of prematurity is stage I retinopathy of prematurity.
7. The method for detecting retinopathy of prematurity according to any one of claims 1 to 4, characterized in that: The step of determining the boundary areas on both sides of the target boundary area includes: Performing gradient transformation on the fundus image to obtain a gradient image corresponding to the fundus image; Determining a third candidate region corresponding to the position of the target boundary region in the gradient image; Performing threshold segmentation on the third candidate region based on the second threshold range to obtain a fourth candidate region; Select two selected regions in the fourth candidate region whose area is larger than the target area and whose width is smaller than the target width; The two selected areas are determined as boundary areas on both sides of the target demarcation area.
8. The method for detecting retinopathy of prematurity according to any one of claims 1 to 4, characterized in that: The method for determining the angle between the two target boundary lines comprises: Calculating the angle between each target boundary line and the horizontal line; Based on the angle between each of the target boundary lines and the horizontal line, the angle between the two boundary lines is determined.
9. A device for detecting retinopathy of prematurity, characterized in that: include: An acquisition module, used for acquiring a fundus image of a target premature infant; A first determination module, configured to determine a target boundary area between a vascular area and avascular area in the fundus image if the fundus image includes a local avascular area; A second determination module is used to determine the boundary areas on both sides of the target boundary area, and extract boundary lines from the boundary areas to obtain two target boundary lines; A third determination module is used to determine that the detection result of the fundus image is not retinopathy of prematurity when the angle between the two target boundary lines is greater than or equal to the target angle; The fourth determination module is used to determine that the detection result of the fundus image is retinopathy of prematurity when the angle between the two target boundary lines is smaller than the target angle.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method for detecting retinopathy of prematurity as described in any one of claims 1 to 8 above.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the method for detecting retinopathy of prematurity as described in any one of claims 1 to 8 above.
Citation Information
Cited By
Method for acquiring maculopathy edema characteristics in retina image and electronic equipment
CN120107553A
