| Retinal image is one of the important tools for doctor to diagnosis the diseases,including diabetes,hypertension and cardiovascular diseases.Clinicians can accurately diagnose the disease by obtaining high-quality retinal images.However,retinal image would be affected by the non-ideal imaging conditions in the process of retinal image acquisition,including stray light,ghost image,distortion,motion blur and noise.There are some problems with poor quality retinal images,such as low contrast,uneven brightness distribution and color difference of retina.This thesis aims to solve the problems of low brightness,poor contrast,blur of vascular network,and retinal color deviation through image processing technology.The main works are as follows:(1)Analyze the comparison of grayscale images in the two color spaces of RGB and HSV.It is found that the information of retinal image can be extracted effectively in the HSV color space.The conversion of image in RGB and HSV color space is realized.And Find Contours and Flood Fill are used to obtain the retinal region of grayscale retinal image.(2)An enhancement algorithm based on the combination of mathematical morphology and histogram matching is proposed.Firstly,the grayscale retinal image is enhanced by top cap transform and bottom cap transform.Then the image is further enhanced by histogram matching algorithm.After analyzing the single mapping and group mapping laws of histogram matching,an improved histogram matching law based on group mapping law is proposed.It reduces the quantization error between the processed image histogram and target image histogram.(3)Configuring opencv under Qt Creator by Cmake.The joint programming of Qt and opencv is realized.The library functions of opencv are called to enhance the color retinal image,including color space conversion,filtering,obtaining the region of interest,morphological image processing and histogram processing.Finally,the software program is compiled,and the graphical interface is established for the program.The results of the experiment show that the algorithm can significantly enhance the color retinal image.It is convenient for clinicians to diagnose ophthalmic diseases.Compared with the group mapping matching laws,the histogram similarity between the enhanced image and the target retina image is effectively improved. |