Method, device and electronic equipment for calculating retinal blood vessel branching angles
By binarizing the retinal fundus image and converting the coordinate system, the retinal blood vessel branching angle is accurately calculated, which solves the problem of the inability to accurately calculate the retinal blood vessel branching angle in the existing technology and supports the assessment of the human eye condition.
Patent Information
- Application Number
- CN202111320203.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2041-11-09
AI Technical Summary
The existing technology lacks a solution to accurately calculate the branching angles of retinal blood vessels in the human eye.
By acquiring retinal fundus images and performing binarization processing, the optic disc center and two target branch vessels are determined, and the retinal vessel branch angles are calculated using black and white images in a two-dimensional and polar coordinate system.
It achieves accurate calculation of retinal blood vessel branching angles and supports the assessment of human eye conditions.
Smart Images

Figure CN113951813B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and electronic equipment for calculating retinal blood vessel branching angles. Background Art
[0002] Fundus cameras belong to the field of medical imaging and are used to capture retinal fundus images for subsequent processing and observation. Because the blood vessels in the fundus are the only ones in the human body that can be directly observed from the surface, images captured by fundus cameras can be used to examine the condition of the optic nerve, retina, choroid, and refractive media, thereby determining the condition of the human eye.
[0003] When determining the state of the human eye, it is generally necessary to calculate the angle between the two main branches of the retinal blood vessels, that is, the retinal blood vessel branching angle. However, there is currently a lack of solutions that can accurately calculate the retinal blood vessel branching angle of the human eye. Summary of the Invention
[0004] The present invention provides a method, device and electronic equipment for calculating the retinal blood vessel branching angle, which can accurately calculate the blood vessel bifurcation angle of the human retina.
[0005] The present invention provides a method for calculating retinal blood vessel branching angles, comprising:
[0006] Acquiring a retinal fundus image and performing binarization processing on the retinal fundus image to obtain a black and white image;
[0007] determining the center point of the optic disc based on the black and white image, and determining two target branch blood vessels of the retina based on the black and white image;
[0008] Based on the optic disc center point and the two target branch vessels, the retinal blood vessel branching angles are obtained.
[0009] According to the method for calculating retinal blood vessel branch angles provided by the present invention, determining the optic disc center point based on the black-and-white image includes:
[0010] determining an optic disc based on the black and white image;
[0011] A target pixel point position in the video disc is determined, and a center point of the video disc is determined based on the target pixel point position in the video disc.
[0012] According to the method for calculating retinal blood vessel branch angles provided by the present invention, determining the optic disc based on the black-and-white image includes:
[0013] Traversing the black and white image based on a preset first traversal window; wherein the first traversal window is a circular window;
[0014] The area with the largest concentration of target pixels in the first traversal window is used as the optic disc.
[0015] According to the method for calculating retinal blood vessel branch angles provided by the present invention, determining the optic disc center point based on the target pixel point position in the optic disc includes:
[0016] Creating a two-dimensional coordinate system on the black-and-white image;
[0017] In the two-dimensional coordinate system, the position of the center point of the optic disc is calculated based on the following formula:
[0018]
[0019] Among them, x p 、y p are the horizontal and vertical coordinates of the center point of the optic disc, are the average values of the horizontal coordinates and the vertical coordinates of all target pixels in the black and white image, respectively. i 、y i are the horizontal coordinate and vertical coordinate of the i-th target pixel point in the black and white image respectively.
[0020] According to the method for calculating retinal blood vessel branch angles provided by the present invention, two target branch blood vessels of the retina are determined based on the black and white image:
[0021] Creating a polar coordinate system based on the center point of the optic disc;
[0022] In the polar coordinate system, rotating a preset second traversal window to traverse the black and white image to determine two target branch blood vessels;
[0023] The second traversal window is a triangle, and the vertices of the triangle coincide with the center point of the video disc.
[0024] According to the method for calculating retinal blood vessel branch angles provided by the present invention, in the polar coordinate system, rotating the preset second traversal window to traverse the black and white image to determine two target branch blood vessels, the method includes:
[0025] In the polar coordinate system, the preset second traversal window is rotated to traverse the black and white image, and the two regions with the most target pixels in the second traversal window are respectively used as two target branch blood vessels.
[0026] The present invention also provides a retinal blood vessel branch angle calculation device, comprising:
[0027] An image processing module is used to obtain a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image;
[0028] a feature determination module, configured to determine the center point of the optic disc based on the black and white image, and to determine two target branch vessels of the retina based on the black and white image;
[0029] The angle calculation module is used to obtain the retinal blood vessel branching angle based on the optic disc center point and the two target branch blood vessels.
[0030] The present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described methods for calculating retinal vessel branch angles are implemented.
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for calculating retinal vessel branching angles.
[0032] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for calculating retinal vessel branching angles.
[0033] The retinal blood vessel branch angle calculation method, device and electronic device provided by the present invention binarize the retinal fundus image to obtain a corresponding black and white image; and based on the black and white image, the target branch vessels corresponding to the optic disc center point and the retinal blood vessels can be determined, thereby accurately calculating the retinal blood vessel branch angle. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 This is one of the flow charts of the method for calculating the retinal blood vessel branch angle provided by the present invention;
[0036] Figure 2 is a black and white image corresponding to the retinal blood vessel branch angle calculation method provided by the present invention;
[0037] Figure 3 is a schematic diagram of an optic disc in a black and white image provided by the present invention;
[0038] Figure 4It is a schematic diagram of dividing a black and white image provided by the present invention into four areas;
[0039] Figure 5 2 is a schematic structural diagram of a retinal blood vessel branch angle calculation device provided by the present invention;
[0040] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0042] The following combination Figures 1-6 The present invention describes a method, device and electronic device for calculating retinal blood vessel branching angles.
[0043] like Figure 1 As shown, the present invention provides a method for calculating retinal blood vessel branch angles, comprising:
[0044] Step 110: Acquire a retinal fundus image, and perform binarization processing on the retinal fundus image to obtain a black and white image.
[0045] It is understandable that binarization of the retinal fundus image is a process of setting the grayscale values of pixels on the retinal fundus image to 0 or 255, making the entire retinal fundus image appear distinctly black or white.
[0046] Step 120: Determine the center point of the optic disc based on the black-and-white image, and determine two target branch vessels of the retina based on the black-and-white image.
[0047] It is understandable that statistical analysis can be performed on the pixels in the black and white image to determine the corresponding optic disc center point and the two target branch blood vessels of the retina.
[0048] Step 130: Obtain retinal blood vessel branching angles based on the optic disc center point and the two target branch vessels.
[0049] It can be understood that the retinal vessel branching angle is the angle between two target branch vessels corresponding to the retinal vessel at the center point of the optic disc.
[0050] In some embodiments, determining the center point of the optic disc based on the black and white image includes:
[0051] determining an optic disc based on the black and white image;
[0052] A target pixel point position in the video disc is determined, and a center point of the video disc is determined based on the target pixel point position in the video disc.
[0053] It's understandable that because the eyeball is a near-sphere and the fundus camera isn't positioned vertically, the center of the optic disc isn't simply equivalent to its geometric center. Therefore, it's necessary to read the locations of all target pixels in the optic disc and perform statistical analysis on them to determine the optic disc center.
[0054] It should be noted that the target pixel is also the pixel corresponding to the blood vessel. Further, in a black and white image, the target pixel can be a white pixel.
[0055] The black and white image corresponding to the retinal fundus image is as follows Figure 2 As shown, the optic disc in the black and white image is Figure 3 As shown, Figure 3 The black circle area shown in the figure is the optic disc, and the center point of the black circle area is the center point of the optic disc.
[0056] In some embodiments, determining the optic disc based on the black and white image comprises:
[0057] Traversing the black and white image based on a preset first traversal window; wherein the first traversal window is a circular window;
[0058] The area with the largest concentration of target pixels in the first traversal window is used as the optic disc.
[0059] It is understandable that the first traversal window can be a circular window of preset size. By reading the positions of all target pixels in the first traversal window and using a clustering method, the relative center position of the optic disc, that is, the center point position of the optic disc, can be determined.
[0060] The area within the first traversal window with the highest concentration of target pixels is defined as the optic disc. Specifically, during the process of traversing the black-and-white image using the first traversal window, the concentration of target pixels within the first traversal window may vary. If, at a certain point in time, the concentration of target pixels within the first traversal window reaches the highest concentration during the traversal process, the area within the first traversal window at that point in time is defined as the optic disc.
[0061] like Figure 3 As shown, the black and white image is traversed from the upper left corner to the lower right corner of the black and white image, and the area with the maximum white pixel concentration in the black background within a specific window of the black and white image is determined as the root of the vascular tree or the optic disc.
[0062] Use the properties of a circle to color the vascular tree or optic disc root in a black and white image and determine the location of the optic disc. Set a circle with a center of (x1, y1) and a radius of r, and color the vascular tree or optic disc root within the circle. The area with the highest concentration of colored points can be determined as the optic disc area.
[0063] In some embodiments, determining the center point of the optic disc based on the position of the target pixel point in the optic disc includes:
[0064] Creating a two-dimensional coordinate system on the black-and-white image;
[0065] In the two-dimensional coordinate system, the position of the center point of the optic disc is calculated based on the following formula:
[0066]
[0067] Among them, x p 、y p are the horizontal and vertical coordinates of the center point of the optic disc in the two-dimensional coordinate system, are the average values of the horizontal coordinates and the average values of the vertical coordinates of all target pixels in the black and white image in the two-dimensional coordinate system, x i 、y i are respectively the horizontal coordinate and vertical coordinate of the i-th target pixel point in the black and white image in the two-dimensional coordinate system.
[0068] It is understood that the above calculation formula uses a clustering approach to determine the position of the optic disc center. When calculating the position of the optic disc center based on the above formula, a two-dimensional coordinate system must first be constructed. The coordinate origin of the two-dimensional coordinate system can be the optic disc center. The coordinate system can be established with the horizontal direction of the black and white image as the X-axis and the vertical direction of the black and white image as the Y-axis.
[0069] In some embodiments, determining two target branch vessels of the retina based on the black-and-white image includes:
[0070] Creating a polar coordinate system based on the center point of the optic disc;
[0071] In the polar coordinate system, the preset second traversal window is rotated to traverse the black and white image to determine two target branch blood vessels.
[0072] The second traversal window is a triangle, and the vertices of the triangle coincide with the center point of the video disc.
[0073] It is understandable that the center point of the video disc can be a pole of the polar coordinate system. The second traversal window is a triangular shape, ie a shape consisting of three sides. The second traversal window can be an isosceles triangle window or a fan-shaped window.
[0074] The angle between the first side and the second side of the second traversal window is 2-5 degrees, for example, 3 degrees, and the intersection point of the first side and the second side coincides with the extreme point.
[0075] The length of the second traversal window is one-third to two-thirds of the width of the grayscale image, for example, one-half, to avoid selecting blood vessel branches that are too far away.
[0076] In some embodiments, rotating a preset second traversal window in the polar coordinate system to traverse the black and white image to determine two target branch vessels includes:
[0077] In the polar coordinate system, the preset second traversal window is rotated to traverse the black and white image, and the two regions with the most target pixels in the second traversal window are respectively used as two target branch blood vessels.
[0078] It can be understood that we connect the relative center position of the optic disc (ie, the center point of the optic disc) and all white pixels outside the optic disc (ie, blood vessels), and simultaneously calculate the slope of the straight line between the two points (ie, the vector direction).
[0079] In the polar coordinate system, based on the aforementioned second traversal window, traversal is performed counterclockwise, starting at 0 degrees, with the vertical direction of the black-and-white image as the 0-degree direction. The location with the most white pixels within the second traversal window is identified as the location of the main retinal vessel, i.e., the target retinal branch vessel.
[0080] The angle of the straight line connecting the center of the target branch vessel and the center of the optic disc is taken as the slope of the vessel. The slope of the straight line is calculated as follows:
[0081]
[0082] Among them, x p 、y p are the horizontal and vertical coordinates of the center point of the optic disc in the two-dimensional coordinate system, and x and y are the horizontal and vertical coordinates of the corresponding center of the target branch blood vessel in the two-dimensional coordinate system.
[0083] Further, if Figure 4 As shown, the black and white image can be divided into four regions along polar coordinates. The positions and slopes of the major retinal vessels are found in regions 2 and 4, respectively. For example, in region 2, the scan starts at 0 degrees and the slope is calculated starting at 1.5 degrees. In each region of the black and white image, the vertical direction is the 0-reading direction.
[0084] The angle tanθ between the two target branch vessels of the retina is calculated as follows:
[0085]
[0086] Among them, if |L1-L2|≥180 ° , an error message can be returned. L1 is the slope of the line connecting the center of the first target branch vessel and the center of the optic disc in the two-dimensional coordinate system. L2 is the slope of the line connecting the center of the second target branch vessel and the center of the optic disc in the two-dimensional coordinate system. "·" represents the dot product operation.
[0087] In summary, the method for calculating the retinal blood vessel branching angle provided by the present invention includes: obtaining a retinal fundus image and binarizing the retinal fundus image to obtain a black and white image; determining the center point of the optic disc based on the black and white image, and determining two target branching blood vessels of the retina based on the black and white image; obtaining the retinal blood vessel branching angle based on the optic disc center point and the two target branching blood vessels.
[0088] The retinal vessel branching angle calculation method provided by the present invention binarizes the retinal fundus image to produce a corresponding black-and-white image. Based on this black-and-white image, the optic disc center and the target retinal vessel branches corresponding to the retinal vessels can be determined, and the retinal vessel branching angles can be calculated. The retinal vessel branching angles can be used to determine the state of the human eye.
[0089] For example, the retinal blood vessels of patients with severe myopia are generally straighter, and the angle between the two main branch blood vessels in the middle is smaller. This is because the axial length of patients with myopia is generally higher. The elongated axial length straightens the blood vessels, which ultimately leads to a smaller angle between the two main branch blood vessels in the middle.
[0090] The following describes the retinal blood vessel branch angle calculation device provided by the present invention. The retinal blood vessel branch angle calculation device described below and the retinal blood vessel branch angle calculation method described above can be referenced to each other.
[0091] like Figure 5 As shown, the retinal blood vessel branch angle calculation device 500 provided by the present invention includes: an image processing module 510, a feature determination module 520 and an angle calculation module 530.
[0092] The image processing module 510 is used to obtain a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image.
[0093] The feature determination module 520 is configured to determine the center point of the optic disc based on the black and white image, and to determine two target branch vessels of the retina based on the black and white image.
[0094] The angle calculation module 530 is configured to obtain the retinal blood vessel branching angle based on the optic disc center point and the two target branch vessels.
[0095] In some embodiments, the feature determination module 520 includes: a first determination unit and a second determination unit.
[0096] The first determining unit is configured to determine a video disc based on the black-and-white image.
[0097] The second determining unit is configured to determine a target pixel point position in the video disc, and determine a center point of the video disc based on the target pixel point position in the video disc.
[0098] In some embodiments, the first determining unit includes: a first traversing unit and a video disc determining unit.
[0099] The first traversal unit is used to traverse the black and white image based on a preset first traversal window; wherein the first traversal window is a circular window.
[0100] The optic disc determining unit is configured to select an area with the largest target pixel concentration in the first traversal window as the optic disc.
[0101] In some embodiments, the second determining unit includes: a first coordinate system creating unit and a optic disc center calculating unit.
[0102] The first coordinate system creating unit is used to create a two-dimensional coordinate system on the black and white image;
[0103] The optic disc center calculation unit is used to calculate the position of the optic disc center point in the two-dimensional coordinate system based on the following formula:
[0104]
[0105] Among them, x p 、y p are the horizontal and vertical coordinates of the center point of the optic disc, are the average values of the horizontal coordinates and the vertical coordinates of all target pixels in the black and white image, respectively. i 、y i are the horizontal coordinate and vertical coordinate of the i-th target pixel point in the black and white image respectively.
[0106] In some embodiments, the feature determination module 520 further includes: a second coordinate creation unit and a traversal calculation unit.
[0107] The second coordinate creation unit is used to create a polar coordinate system based on the center point of the video disc.
[0108] The traversal calculation unit is used to rotate a preset second traversal window in the polar coordinate system to traverse the black and white image and determine two target branch blood vessels.
[0109] The second traversal window is a triangle, and the vertices of the triangle coincide with the center point of the video disc.
[0110] In some embodiments, the traversal calculation unit includes: a second traversal unit and an angle calculation unit.
[0111] The second traversal unit is configured to rotate a preset second traversal window in the polar coordinate system to traverse the black-and-white image, and respectively use two regions with the most target pixels in the second traversal window as two target branch blood vessels.
[0112] The angle calculation unit is used to determine the angles between the two target branch blood vessels and the center point of the optic disc based on the positions of the retinal blood vessels and the position of the center point of the optic disc.
[0113] The electronic device, computer program product, and storage medium provided by the present invention are described below. The electronic device, computer program product, and storage medium described below can be referenced in correspondence with the retinal vessel branch angle calculation method described above.
[0114] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the retinal blood vessel branch angle calculation method, which includes:
[0115] Step 110: Acquire a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image;
[0116] Step 120: determining the center point of the optic disc based on the black and white image, and determining two target branch vessels of the retina based on the black and white image;
[0117] Step 130: Obtain retinal blood vessel branching angles based on the optic disc center point and the two target branch vessels.
[0118] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0119] In another aspect, the present invention further provides a computer program product, comprising a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the retinal vessel branch angle calculation method provided by the above methods, the method comprising:
[0120] Step 110: Acquire a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image;
[0121] Step 120: determining the center point of the optic disc based on the black and white image, and determining two target branch vessels of the retina based on the black and white image;
[0122] Step 130: Obtain retinal blood vessel branching angles based on the optic disc center point and the two target branch vessels.
[0123] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program is implemented to perform the retinal vessel branch angle calculation method provided by the above methods, the method comprising:
[0124] Step 110: Acquire a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image;
[0125] Step 120: determining the center point of the optic disc based on the black and white image, and determining two target branch vessels of the retina based on the black and white image;
[0126] Step 130: Obtain retinal blood vessel branching angles based on the optic disc center point and the two target branch vessels.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for calculating retinal blood vessel branching angles, characterized in that: include: Acquiring a retinal fundus image and performing binarization processing on the retinal fundus image to obtain a black and white image; determining the center point of the optic disc based on the black and white image, and determining two target branch blood vessels of the retina based on the black and white image; Obtaining retinal blood vessel branching angles based on the optic disc center point and the two target branch vessels; Determining two target branch vessels of the retina based on the black-and-white image includes: Creating a polar coordinate system based on the center point of the optic disc; In the polar coordinate system, rotating a preset second traversal window to traverse the black and white image to determine two target branch blood vessels; The second traversal window is a triangle, and the vertex of the triangle coincides with the center point of the visual disk; the angle between the first side and the second side of the second traversal window is 2-5 degrees, and the intersection of the first side and the second side coincides with the vertex; the length of the second traversal window is one-third to two-thirds of the width of the grayscale image; In the polar coordinate system, rotating a preset second traversal window to traverse the black and white image to determine two target branch vessels, including: In the polar coordinate system, rotating a preset second traversal window to traverse the black and white image, and taking two areas with the most target pixels in the second traversal window as two target branch blood vessels respectively; The angle tanθ between two target branch vessels is calculated as follows: If |L1-L2| ≥ 180°, an error message is returned; L1 is the slope of the straight line connecting the center of the first target branch vessel and the center of the optic disc in the two-dimensional coordinate system, and L2 is the slope of the straight line connecting the center of the second target branch vessel and the center of the optic disc in the two-dimensional coordinate system.
2. The method for calculating retinal blood vessel branching angles according to claim 1, wherein: Determining the center point of the optic disc based on the black and white image includes: determining an optic disc based on the black and white image; A target pixel point position in the video disc is determined, and a center point of the video disc is determined based on the target pixel point position in the video disc.
3. The method for calculating retinal blood vessel branching angles according to claim 2, wherein: The step of determining the optic disc based on the black and white image comprises: Traversing the black and white image based on a preset first traversal window; wherein the first traversal window is a circular window; The area with the largest concentration of target pixels in the first traversal window is used as the optic disc.
4. The method for calculating retinal blood vessel branching angles according to claim 2, wherein: The determining of the center point of the optic disc based on the position of the target pixel point in the optic disc comprises: Creating a two-dimensional coordinate system on the black-and-white image; In the two-dimensional coordinate system, the position of the center point of the optic disc is calculated based on the following formula: Among them, x p 、y p are the horizontal and vertical coordinates of the center point of the optic disc, are the average values of the horizontal coordinates and the vertical coordinates of all target pixels in the black and white image, respectively. i 、y i are the horizontal coordinate and vertical coordinate of the i-th target pixel point in the black and white image respectively.
5. A retinal blood vessel branch angle calculation device, characterized in that: include: An image processing module is used to obtain a retinal fundus image and perform binarization processing on the retinal fundus image to obtain a black and white image; a feature determination module, configured to determine the center point of the optic disc based on the black and white image, and to determine two target branch vessels of the retina based on the black and white image; an angle calculation module, configured to obtain a retinal blood vessel branching angle based on the optic disc center point and the two target branch vessels; The feature determination module further includes: a second coordinate creation unit and a traversal calculation unit; A second coordinate creation unit, configured to create a polar coordinate system based on the center point of the optic disc; a traversal calculation unit, configured to rotate a preset second traversal window in the polar coordinate system to traverse the black and white image and determine two target branch blood vessels; The second traversal window is a triangle, and the vertex of the triangle coincides with the center point of the visual disk; the angle between the first side and the second side of the second traversal window is 2-5 degrees, and the intersection of the first side and the second side coincides with the vertex; the length of the second traversal window is one-third to two-thirds of the width of the grayscale image; The traversal calculation unit is specifically used for: In the polar coordinate system, rotating a preset second traversal window to traverse the black and white image, and taking two areas with the most target pixels in the second traversal window as two target branch blood vessels respectively; The angle tanθ between two target branch vessels is calculated as follows: If |L1-L2| ≥ 180°, an error message is returned; L1 is the slope of the straight line connecting the center of the first target branch vessel and the center of the optic disc in the two-dimensional coordinate system, and L2 is the slope of the straight line connecting the center of the second target branch vessel and the center of the optic disc in the two-dimensional coordinate system.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for calculating retinal blood vessel branching angles according to any one of claims 1 to 4 are implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for calculating retinal blood vessel branching angles according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for calculating retinal blood vessel branching angles according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Fundus retina blood vessel recognition and quantification method, device and equipment and storage medium
CN111340789A