How to change background color of the fundus image with the average value of the fundus background in MATLAB, the average level of the background, three random areas (each area is 50* 50) inside the fi eld of the view.
Here or two images (a) and (b), I want to remove "black ring" in background of image (a) and replace with with the average value of the fundus background in MATLAB, the average level of the background, three random areas (each area is 50* 50) inside the field of the view.
Download and run the attached script 'colorFundus.m'. I tested with the sample image 'test.jpg'. You must add both files in the same directory to work.
This should do what you need for a generic image, just add it to the directory and change the 'filename' variable at line 2 accordingly. If it does not work, please tell me what went wrong.