I work with the image of the retina, I am currently sending a wavelet, but I noticed that I have two problems:
- Optical disk that makes me image noise
- And the circle bounding the retina
The original image is as follows

My plan is to set the lower part of the tone of the optical disk so as not to lose the details of the blood vessels of the retina (I place the code with which I played, but still do not understand, because I know the tone of the optical disk and how to set it on the image without changes in blood vessels)
And in relation to the outer circle of the retina, I donโt know what you recommend to me (I donโt know about masks, I would be grateful if they had to consult my literature)
c = [242 134 72];% Background to change thresh = 50; A = imread('E:\Prueba.jpg'); B = zeros(size(A)); Ar = A(:,:,1); Ag = A(:,:,2); Ab = A(:,:,3); Br = B(:,:,1); Bg = B(:,:,2); Bb = B(:,:,3); logmap = (Ar > (c(1) - thresh)).*(Ar < (c(1) + thresh)).*... (Ag > (c(2) - thresh)).*(Ag < (c(2) + thresh)).*... (Ab > (c(3) - thresh)).*(Ab < (c(3) + thresh)); Ar(logmap == 1) = Br(logmap == 1); Ag(logmap == 1) = Bg(logmap == 1); Ab(logmap == 1) = Bb(logmap == 1); A = cat(3 ,Ar,Ag,Ab); imshow(A);
kindly asked question How do I change the background color of an image?
I get the following

I need an image like this when the optical disc does not cause me noise when segmenting the retinal blood vessels.

I want to be a uniform background ... and only veins are perceived
I continued to work and got the following image. As you can understand, the optical disk removes some parts of the blood vessels (veins) that are above it, so I require the removal or uniform full bottom of the image.
