Hello, currently i have these two Images:
and
What i am desperately trying to do is to get rid of most of the vessels (mainly in the lagre bright spot).
The first Image is my Mask, and it's binary. The second Image is an RBG Image.
I already looked through the Documentation and did some research in the Forums and on Google, but I did not find any possibility I can use to solve my problem.
What I then tried was:
n=0;for i=1:size(vessels_to_remove,1); for j=1:size(vessels_to_remove,2); if vessels_to_remove(i,j)==1; n=n+1; img_original(i,j)=img_original(i,j-n); else n=0; end endend
I am running throug all Rows and Colums and check whether the Mask is white. If so I increase n by one to remember where the last non-white pixel was. Then i set the value current pixel of the RBG image to the value of the remembered pixel. The result is not what i expected. I wanted the vessels to dissapear, by setting their pixels to the values of their neighbours.
Somehow this weird alpha-mixed image comes out for me if I use the code from above:
Thank you very much in advance.
Best Answer