Image processing method, electronic equipment and storage medium
By performing grayscale processing and vascular analysis on fundus images, combined with optic disc location and fitting curves, the problems of high cost and low accuracy in fundus image classification were solved, achieving more efficient image classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGYU KANGJIAN INNOVATION MEDICAL TECH CHENGDU CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-05-01
AI Technical Summary
Current technologies for classifying fundus images are costly and have low accuracy, which affects the model's ability to distinguish between different images.
By performing grayscale processing on fundus images, the target location of the optic disc is determined, and the image is segmented based on the relationship between brightness values and pixels. Combining blood vessel density and fitting curves, multiple classification results are generated, and the image is ultimately determined to be either the left or right eye.
It reduces the classification cost of fundus images and improves classification accuracy and efficiency.
Smart Images

Figure CN121963279A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to an image processing method, electronic device, and storage medium. Background Technology
[0002] The fundus refers to the tissue in the posterior part of the retina, and changes in physiological state in the early stages of disease are reflected in the fundus. Furthermore, some ophthalmic diseases can have different effects on the two eyes; therefore, distinguishing between left and right eye fundus images is extremely important for predicting fundus diseases. Currently, neural network models are often used to differentiate between left and right eye images. However, the high cost of acquiring fundus images as training data makes it difficult to provide sufficient training resources for neural network models, resulting in poor model training performance and affecting the model's classification accuracy. Summary of the Invention
[0003] This application discloses an image processing method, electronic device, and storage medium, which solves the technical problems of high classification cost and low classification accuracy of fundus images in related technologies.
[0004] This application provides an image processing method, the method comprising: performing grayscale processing on a fundus image to obtain a grayscale image, wherein the retina in the fundus image includes the optic disc; determining the relationship between corresponding brightness values and pixels based on the grayscale image to determine the target position of the optic disc; and determining a first classification result of the fundus image based on the target position, wherein the first classification result includes a left eye image and a right eye image.
[0005] In some embodiments of this application, the method further includes: dividing the grayscale image into a first image and a second image based on a preset median line in the grayscale image; if the target position is determined to be in the first image, determining the fundus image as the left eye image; if the target position is determined to be in the second image, determining the fundus image as the right eye image.
[0006] In some embodiments of this application, determining the target position of the display based on the relationship between the corresponding brightness value and the pixel based on the grayscale image includes: constructing a brightness histogram based on the relationship between the grayscale level of the grayscale image and the number of pixels; determining the target pixel based on a preset brightness threshold and the brightness value corresponding to the brightness histogram; and using the position of the target pixel in the grayscale image as the target position of the display.
[0007] This application also provides an image processing method, the method comprising: extracting blood vessels from a fundus image to obtain a blood vessel image; dividing the blood vessel image into a third image and a fourth image; calculating a first parameter of the pixel corresponding to the blood vessel in the third image and a second parameter of the pixel corresponding to the blood vessel in the fourth image; and determining a second classification result of the fundus image based on the first parameter and the second parameter, the second classification result including a left eye image and a right eye image.
[0008] In some embodiments of this application, the method further includes: obtaining the third image and the fourth image based on the median of the vascular image.
[0009] In some embodiments of this application, the first parameter is a first quantity, the second parameter is a second quantity, and the method further includes: if the first quantity is greater than the second quantity, determining the fundus image as the left eye image; if the first quantity is less than the second quantity, determining the fundus image as the right eye image.
[0010] In some embodiments of this application, the first parameter is a first density, the second parameter is a second density, and the method further includes: if the first density is greater than the second density, determining the fundus image as the left eye image; if the first density is less than the second density, determining the fundus image as the right eye image.
[0011] This application also provides an image processing method, the method comprising: determining a region map based on the target position of the optic disc in a fundus image; extracting blood vessels from the region map and fitting the pixels corresponding to the blood vessels using a fitting function to generate a corresponding fitting curve; and determining a third classification result of the fundus image based on the fitting curve, the third classification result including a left eye image and a right eye image.
[0012] In some embodiments of this application, the fitting function includes multiple candidate fitting functions, and the method further includes: fitting the pixel points corresponding to the blood vessel according to the multiple candidate functions to generate multiple candidate curves; and taking the curve with the smallest mean square error among the multiple candidate curves as the fitting curve.
[0013] In some embodiments of this application, the fitting curve is open and extends in a direction away from the optic disc. The step of determining the third classification result of the fundus image based on the fitting curve includes: if the curve extension direction of the fitting curve is a first direction, determining the fundus image as the left eye image; if the curve extension direction of the fitting curve is a second direction, determining the fundus image as the right eye image.
[0014] This application also provides an image processing method, the method comprising: generating a first classification result based on the optic disc in a fundus image; generating a second classification result based on blood vessels in the fundus image; if the first classification result does not match the second classification result, generating a third classification result based on a fitting curve corresponding to the blood vessels; determining a target classification result based on the first classification result, the second classification result and the third classification result, wherein the target classification result includes a left eye image and a right eye image.
[0015] In some embodiments of this application, determining the target classification result based on the first classification result, the second classification result, and the third classification result includes: if the first classification result matches the third classification result and the second classification result does not match the third classification result, determining the target classification result based on the first classification result or the third classification result; if the second classification result matches the third classification result and the first classification result does not match the third classification result, determining the target classification result based on the second classification result or the third classification result.
[0016] In some embodiments of this application, generating a first classification result based on the optic disc in a fundus image includes: performing grayscale processing on the fundus image to obtain a grayscale image, wherein the retina in the fundus image includes the optic disc; determining the target position of the optic disc according to the luminance histogram corresponding to the grayscale image; dividing the grayscale image into a first image and a second image based on a preset median line in the grayscale image; if the target position is determined to be in the first image, determining the fundus image as the left eye image; if the target position is determined to be in the second image, determining the fundus image as the right eye image.
[0017] In some embodiments of this application, the second classification result generated based on the blood vessels in the fundus image includes: extracting blood vessels from the fundus image to obtain a blood vessel image; dividing the blood vessel image into a third image and a fourth image; calculating a first parameter of the pixels corresponding to the blood vessels in the third image and a second parameter of the pixels corresponding to the blood vessels in the fourth image, wherein the first parameter is a first quantity or a first density, and the second parameter is a second quantity or a second density; if the first quantity is greater than the second quantity, or the first density is greater than the second density, the fundus image is determined to be the left eye image; if the first quantity is less than the second quantity, or the first density is less than the second density, the fundus image is determined to be the right eye image.
[0018] In some embodiments of this application, generating a third classification result based on the fitting curve corresponding to the blood vessel includes: determining a region map according to the target position of the optic disc in the fundus image; extracting blood vessels from the region map and fitting the pixel points corresponding to the blood vessels using a fitting function to generate a corresponding fitting curve, wherein the fitting curve is open and extends in a direction away from the optic disc; if the curve extension direction of the fitting curve is a first direction, the fundus image is determined to be the left eye image; if the curve extension direction of the fitting curve is a second direction, the fundus image is determined to be the right eye image.
[0019] This application also provides an electronic device, which includes a processor and a memory, wherein the processor is used to implement the image processing method by executing a computer program stored in the memory.
[0020] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the image processing method described above.
[0021] In the image processing method provided in this application, the target position of the optic disc is determined by determining the relationship between the corresponding brightness value and the pixel point through the grayscale image, and then the first classification result of the fundus image is determined based on the target position, which can reduce the classification cost of fundus images and improve classification efficiency. Attached Figure Description
[0022] Figure 1 This is a flowchart of an image processing method provided in an embodiment of this application.
[0023] Figure 2 This is a schematic diagram of a grayscale image provided in an embodiment of this application.
[0024] Figure 3 This is a smoothed image provided in the embodiments of this application.
[0025] Figure 4 This is a schematic diagram of the target location provided in the embodiments of this application.
[0026] Figure 5 This is a schematic diagram illustrating the division between the first image and the second image provided in the embodiments of this application.
[0027] Figure 6 This is a flowchart of an image processing method provided in another embodiment of this application.
[0028] Figure 7 These are vascular images provided in the embodiments of this application.
[0029] Figure 8 This is a schematic diagram showing the division of the third and fourth images provided in the embodiments of this application.
[0030] Figure 9 This is a flowchart of an image processing method provided in another embodiment of this application.
[0031] Figure 10 This is a region map provided in the embodiments of this application.
[0032] Figure 11 This is a schematic diagram of multiple candidate curves provided in the embodiments of this application.
[0033] Figure 12 This is a flowchart of an image processing method provided in another embodiment of this application.
[0034] Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0035] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.
[0036] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0037] To address the technical problems of high classification cost and low classification accuracy in related technologies for fundus images, this application provides an image processing method, electronic device, and storage medium that can reduce the classification cost and improve the classification accuracy of fundus images. Specific embodiments are described below.
[0038] Figure 1 This is a flowchart of an image processing method provided in one embodiment of this application, applied in an electronic device. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.
[0039] Step S101: Perform grayscale processing on the fundus image to obtain a grayscale image.
[0040] In some embodiments of this application, the fundus image refers to an image of the posterior part of the retina. The fundus image is used to display the retina, which includes the optic disc. Fundus images are typically color images. For ease of subsequent processing, the fundus image can be processed into a grayscale image, such as... Figure 2 The image shown is a schematic diagram of a grayscale image provided in an embodiment of this application. Grayscale images can reduce the complexity of subsequent image processing and preserve the structural information of fundus images.
[0041] In addition, to reduce the impact of noise on grayscale images, a Gaussian filter can be used to smooth the grayscale image, resulting in a smoothed image, such as... Figure 3 The image shown is a smoothed image provided in an embodiment of this application. A Gaussian filter can effectively remove random noise and smooth image details.
[0042] Step S102: Determine the relationship between the corresponding brightness value and pixel points based on the grayscale image to determine the target position of the viewing disc.
[0043] In some embodiments of this application, after determining a grayscale image or a smoothed image, the relationship between the brightness value corresponding to the grayscale image or the smoothed image and the pixel points can be determined, thereby determining the position of the display disc.
[0044] In some embodiments of this application, determining the target location of the optic disc corresponding to a grayscale image is taken as an example. A luminance histogram is constructed based on the relationship between the grayscale levels and the number of pixels in the grayscale image. The luminance histogram displays the number of pixels at each grayscale level in the grayscale image, thus providing an overview of the image's brightness distribution. Typically, the optic disc region appears as a brighter area in fundus images, therefore corresponding to brighter grayscale values in the histogram. After constructing the luminance histogram, the target pixel is determined based on a preset luminance threshold and the luminance values corresponding to the luminance histogram. Specifically, in the luminance histogram, pixels with luminance values greater than or equal to the luminance threshold can be used as target pixels.
[0045] Since different fundus images may differ, the brightness threshold can be dynamically set according to each fundus image; this application does not impose any limitations on this. The position of the target pixel in the grayscale image is used as the target position of the optic disc. For example... Figure 4 The position M shown is the target position of the view disk in the grayscale image.
[0046] Step S103: Determine the first classification result of the fundus image based on the target location.
[0047] In some embodiments of this application, the first classification result includes the left eye image and the right eye image. To determine the first classification result of the fundus image, a median line is drawn in the grayscale image. Figure 5 As shown, the grayscale image is divided into a first image and a second image using the median line. If the target location is in the first image, the fundus image is determined to be the left eye image. If the target location is in the second image, the fundus image is determined to be the right eye image. Figure 5As shown, position M is the target position of the viewing disk in the grayscale image, and position M is located in the first image, then as follows: Figure 5 The fundus image shown is for the left eye.
[0048] In the embodiments of this application, the target position of the optic disc is determined by determining the relationship between the corresponding brightness value and the pixel point through the grayscale image, and then the first classification result of the fundus image is determined based on the target position, which can reduce the classification cost of fundus images and improve classification efficiency.
[0049] Figure 6 This is a flowchart of an image processing method provided in another embodiment of this application, applied in an electronic device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0050] Step S601: Extract blood vessels from the fundus image to obtain a blood vessel image.
[0051] In some embodiments of this application, the fundus image refers to an image of the posterior inner retina. To facilitate subsequent processing, blood vessels in the fundus image can be extracted to obtain a vascular image. In one example, the fundus image can be processed to obtain a grayscale image (e.g., ...). Figure 2 (As shown). Furthermore, to reduce the impact of noise on grayscale images, a Gaussian filter can be used to smooth the grayscale image, resulting in a smoothed image (such as...). Figure 3 (As shown). The smoothed image is binarized to separate the blood vessels from the background, resulting in a binarized image, which is then used as the blood vessel image. (See figure). Figure 7 The image shown is a blood vessel image provided in an embodiment of this application.
[0052] In addition, edge detection or structural information detection can be performed on smooth images to obtain vascular images. This application does not limit the method of obtaining vascular images.
[0053] Step S602: Divide the blood vessel image into a third image and a fourth image.
[0054] In some embodiments of this application, to facilitate subsequent analysis of the vascular images, the vascular image can be divided into a third image and a fourth image using a median line. For example... Figure 8 The image shown is a schematic diagram illustrating the division of the third and fourth images provided in an embodiment of this application.
[0055] Step S603: Calculate the first parameter of the pixel corresponding to the blood vessel in the third image and the second parameter of the pixel corresponding to the blood vessel in the fourth image.
[0056] In some embodiments of this application, such as Figure 8As shown, after determining the third and fourth images, the first number of pixels corresponding to blood vessels in the third image can be calculated as the first parameter. The second number of pixels corresponding to blood vessels in the fourth image can be calculated as the second parameter.
[0057] In some other embodiments of this application, the first density of the pixels corresponding to the blood vessels in the third image can be calculated as the first parameter, and the second density of the pixels corresponding to the blood vessels in the fourth image can be calculated as the second parameter.
[0058] Step S604: Determine the second classification result of the fundus image based on the first parameter and the second parameter.
[0059] In some embodiments of this application, since the density and distribution of blood vessels in the left and right eyes differ, the classification of the fundus image as a left-eye image or a right-eye image can be determined by counting the number of pixels or the density of blood vessels. The second classification result includes both left-eye and right-eye images. A first parameter represents a first quantity, and a second parameter represents a second quantity. If the first quantity is greater than the second quantity, the fundus image is determined to be a left-eye image. If the first quantity is less than the second quantity, the fundus image is determined to be a right-eye image.
[0060] In some embodiments of this application, the first parameter represents a first density, and the second parameter represents a second density. If the first density is greater than the second density, the fundus image is determined to be a left eye image. If the first density is less than the second density, the fundus image is determined to be a right eye image.
[0061] In the embodiments of this application, by counting the number and density of pixels in blood vessels, it is possible to effectively determine whether a fundus image belongs to the left or right eye, thereby reducing the classification cost of fundus images and improving classification efficiency.
[0062] Figure 9 This is a flowchart of an image processing method provided in another embodiment of this application, applied in an electronic device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0063] Step S901: Determine the region map based on the target location of the optic disc in the fundus image.
[0064] In some embodiments of this application, a relatively large number of blood vessels are generally distributed around the optic disc. A region map can be determined by identifying the target location of the optic disc in a fundus image. The region map is used to display the distribution of the optic disc and the blood vessels surrounding it, such as... Figure 10 The diagram shown is a region map provided in an embodiment of this application.
[0065] Step S902: Extract blood vessels from the region map and use a fitting function to fit the pixel points corresponding to the blood vessels to generate the corresponding fitting curve.
[0066] In some embodiments of this application, the fitting function includes multiple candidate fitting functions, such as a cubic polynomial: Fifth-degree polynomial: Gaussian function: Logarithmic function: , where x is the pixel of the blood vessel.
[0067] In some embodiments of this application, the region map is processed by vascular (e.g.) Figure 10 Extracting the white area shown, we obtain the pixels corresponding to blood vessels in the region image. We then fit the pixels corresponding to blood vessels using multiple candidate functions to generate multiple candidate curves, such as... Figure 11 The diagram illustrates multiple candidate curves provided in an embodiment of this application. A fitted curve is determined from these candidate curves. In one example, the candidate curve with the smallest mean square error is selected and used as the fitted curve. In another example, any candidate curve can be used as the fitted curve. Alternatively, the fitted curve can be determined from multiple candidate curves based on the user's selection.
[0068] Step S903: Determine the third classification result of the fundus image based on the fitted curve.
[0069] In some embodiments of this application, the third classification result includes a left-eye image and a right-eye image. The fitted curve can be a parabola, and the fitted curve is open and extends in a direction away from the optic disc. If the direction of extension of the fitted curve is a first direction, the fundus image is determined to be a left-eye image; wherein, the first direction can be a horizontal direction to the right. If the direction of extension of the fitted curve is a second direction, the fundus image is determined to be a right-eye image, wherein, the second direction can be a horizontal direction to the left. Figure 11 If the direction of the fitted curve shown is the second direction, then the fundus image is the right eye image.
[0070] In the embodiments of this application, a fitting curve is formed by fitting the pixels of the region map, and the third classification result of the fundus image is determined based on the fitting curve, which can reduce the classification cost of fundus images and improve the classification accuracy.
[0071] Figure 12 This is a flowchart of an image processing method provided in another embodiment of this application, applied in an electronic device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0072] Step S1201: Generate a first classification result based on the optic disc in the fundus image.
[0073] In some embodiments of this application, a fundus image is processed to obtain a grayscale image, wherein the retina in the fundus image includes the optic disc; the target position of the optic disc is determined according to the brightness histogram corresponding to the grayscale image; based on a preset median line in the grayscale image, the grayscale image is divided into a first image and a second image; if the target position is determined to be in the first image, the fundus image is determined to be the left eye image; if the target position is determined to be in the second image, the fundus image is determined to be the right eye image. Furthermore, a detailed description of step S1201 can be found in [reference needed]. Figure 1 The embodiments shown will not be described again here.
[0074] Step S1202: The second classification result is based on the blood vessel generation in the fundus image.
[0075] In some embodiments of this application, blood vessels are extracted from a fundus image to obtain a blood vessel image; the blood vessel image is divided into a third image and a fourth image; a first parameter of the pixels corresponding to the blood vessels in the third image and a second parameter of the pixels corresponding to the blood vessels in the fourth image are calculated, where the first parameter is a first quantity or a first density, and the second parameter is a second quantity or a second density; if the first quantity is greater than the second quantity, or the first density is greater than the second density, the fundus image is determined to be a left eye image; if the first quantity is less than the second quantity, or the first density is less than the second density, the fundus image is determined to be a right eye image. Furthermore, a detailed description of step S1202 can also be found in... Figure 6 The embodiments shown will not be described again here.
[0076] Step S1203: If the first classification result does not match the second classification result, generate a third classification result based on the fitting curve corresponding to the blood vessel.
[0077] In some embodiments of this application, if the first classification result indicates that the fundus image is a left eye image and the second classification result indicates that the fundus image is a right eye image, then the first classification result and the second classification result do not match. If the first classification result and the second classification result do not match, then a third classification result is generated based on the fitted curve corresponding to the blood vessels.
[0078] In some embodiments of this application, generating a third classification result based on the fitting curve corresponding to blood vessels includes: determining a region map based on the target position of the optic disc in the fundus image; extracting blood vessels from the region map and fitting the pixels corresponding to the blood vessels using a fitting function to generate a corresponding fitting curve, wherein the fitting curve is open and extends in a direction away from the optic disc; if the extension direction of the fitting curve is a first direction, the fundus image is determined to be a right eye image; if the extension direction of the fitting curve is a second direction, the fundus image is determined to be a left eye image. Furthermore, a detailed description of generating a third classification result based on the fitting curve corresponding to blood vessels can also be found in... Figure 9 The embodiments shown will not be described again here.
[0079] Step S1204: Determine the target classification result based on the first classification result, the second classification result, and the third classification result.
[0080] In some embodiments of this application, if the first classification result matches the third classification result, and the second classification result does not match the third classification result, the target classification result is determined based on either the first or third classification result. If the second classification result matches the third classification result, and the first or third classification result does not match the third classification result, the target classification result is determined based on either the second or third classification result. In some embodiments of this application, the target classification result is determined by multiple methods, which not only reduces the classification cost of fundus images, but also improves the classification accuracy and precision.
[0081] Figure 13 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. For example... Figure 13 As shown, the electronic device includes a memory 1301 and a processor 1302. The memory 1301 may be the internal memory of the electronic device 13, that is, a memory built into the electronic device 13. In other embodiments, the memory 1301 may also be the external memory of the electronic device 13, that is, a memory externally connected to the electronic device 13.
[0082] In some embodiments, the memory 1301 is used to store program code and various data, and to enable high-speed and automatic access to programs or data during the operation of the electronic device 13.
[0083] The memory 1301 may include random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0084] In one embodiment, the processor 1302 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor itself may be any other conventional processor.
[0085] If the program code and various data in the memory 1301 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments, such as image processing methods, can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), etc.
[0086] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application. The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device. In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the electronic device, etc.
[0087] It is understood that the module division described above is a logical functional division, and there may be other division methods in actual implementation. Furthermore, the functional modules in the various embodiments of this application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The integrated modules described above can be implemented in hardware or in a combination of hardware and software functional modules.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. An image processing method, characterized in that, The method includes: A grayscale image is obtained by performing grayscale processing on a fundus image, wherein the retina in the fundus image includes the optic disc; Based on the grayscale image, the relationship between the corresponding brightness value and the pixel is determined, and the target position of the display disc is determined. A first classification result of the fundus image is determined based on the target location, and the first classification result includes the left eye image and the right eye image.
2. The image processing method according to claim 1, characterized in that, The method further includes: Based on the preset median line in the grayscale image, the grayscale image is divided into a first image and a second image; If the target location is determined to be in the first image, the fundus image is determined to be the left eye image; If the target location is determined to be in the second image, the fundus image is determined to be the right eye image.
3. The image processing method according to claim 1, characterized in that, The step of determining the relationship between the corresponding brightness value and pixel points based on the grayscale image to determine the target position of the viewing disc includes: A brightness histogram is constructed based on the relationship between the gray levels and the number of pixels in the grayscale image. The target pixel is determined based on the preset brightness threshold and the brightness value corresponding to the brightness histogram. The position of the target pixel in the grayscale image is taken as the target position of the visual disc.
4. An image processing method, characterized in that, The method includes: Vascular images are obtained by extracting blood vessels from fundus images; The blood vessel image is divided into a third image and a fourth image; Calculate the first parameter of the pixel corresponding to the blood vessel in the third image, and the second parameter of the pixel corresponding to the blood vessel in the fourth image; Based on the first parameter and the second parameter, a second classification result of the fundus image is determined, the second classification result including the left eye image and the right eye image.
5. The image processing method according to claim 4, characterized in that, The method further includes: The third and fourth images are obtained based on the median line of the vascular image.
6. The image processing method according to claim 4, characterized in that, The first parameter is a first quantity, the second parameter is a second quantity, and the method further includes: If the first number is greater than the second number, the fundus image is determined to be the left eye image; If the first quantity is less than the second quantity, the fundus image is determined to be the right eye image.
7. The image processing method according to claim 4, characterized in that, The first parameter is a first density, the second parameter is a second density, and the method further includes: If the first density is greater than the second density, the fundus image is determined to be the left eye image; If the first density is less than the second density, the fundus image is determined to be the right eye image.
8. An image processing method, characterized in that, The method includes: Determine the region map based on the target location of the optic disc in the fundus image; Blood vessels are extracted from the region map, and the corresponding pixel points of the blood vessels are fitted using a fitting function to generate a corresponding fitting curve. The third classification result of the fundus image is determined based on the fitted curve, and the third classification result includes the left eye image and the right eye image.
9. The image processing method according to claim 8, characterized in that, The fitting function includes multiple candidate fitting functions, and the method further includes: Multiple candidate curves are generated by fitting the pixel points corresponding to the blood vessels with the multiple candidate functions; The curve with the smallest mean square error among the multiple candidate curves is taken as the fitted curve.
10. The image processing method according to claim 8, characterized in that, The fitted curve is open and extends in a direction away from the optic disc. Determining the third classification result of the fundus image based on the fitted curve includes: If the direction of the extension of the fitted curve is the first direction, the fundus image is determined to be the left eye image; If the direction of the curve extension of the fitted curve is the second direction, the fundus image is determined to be the right eye image.
11. An image processing method, characterized in that, The method includes: The first classification result is generated based on the optic disc in the fundus image; The second classification result based on the angiogenesis in the fundus image; If the first classification result does not match the second classification result, a third classification result is generated based on the fitting curve corresponding to the blood vessel. Based on the first classification result, the second classification result, and the third classification result, a target classification result is determined, which includes the left eye image and the right eye image.
12. The image processing method according to claim 11, characterized in that, Determining the target classification result based on the first classification result, the second classification result, and the third classification result includes: If the first classification result matches the third classification result, and the second classification result does not match the third classification result, the target classification result is determined based on the first classification result or the third classification result. If the second classification result matches the third classification result, and the first classification result does not match the third classification result, the target classification result is determined based on the second classification result or the third classification result.
13. The image processing method according to claim 11, characterized in that, The generation of the first classification result based on the optic disc in the fundus image includes: The fundus image is processed to obtain a grayscale image, wherein the retina in the fundus image includes the optic disc; The target position of the viewing disc is determined based on the brightness histogram corresponding to the grayscale image; Based on the preset median line in the grayscale image, the grayscale image is divided into a first image and a second image; If the target location is determined to be in the first image, the fundus image is determined to be the left eye image; If the target location is determined to be in the second image, the fundus image is determined to be the right eye image.
14. The image processing method according to claim 11, characterized in that, The second classification result generated based on the blood vessels in the fundus image includes: Blood vessels are extracted from the fundus image to obtain a blood vessel image; The blood vessel image is divided into a third image and a fourth image; Calculate the first parameter of the pixel corresponding to the blood vessel in the third image and the second parameter of the pixel corresponding to the blood vessel in the fourth image, wherein the first parameter is a first quantity or a first density and the second parameter is a second quantity or a second density; If the first quantity is greater than the second quantity, or the first density is greater than the second density, the fundus image is determined to be the left eye image; If the first quantity is less than the second quantity, or the first density is less than the second density, the fundus image is determined to be the right eye image.
15. The image processing method according to claim 11, characterized in that, The generation of a third classification result based on the fitted curve corresponding to the blood vessel includes: Determine the region map based on the target location of the optic disc in the fundus image; Blood vessels are extracted from the region map, and the corresponding pixel points of the blood vessels are fitted using a fitting function to generate a corresponding fitting curve. The fitting curve is open and extends in a direction away from the optic disc. If the direction of the extension of the fitted curve is the first direction, the fundus image is determined to be the left eye image; If the direction of the curve extension of the fitted curve is the second direction, the fundus image is determined to be the right eye image.
16. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the image processing method as described in any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the image processing method as described in any one of claims 1 to 15.