필터 지우기
필터 지우기

How to improve optic disc removal code?

조회 수: 6 (최근 30일)
Sidra Aleem
Sidra Aleem 2018년 5월 11일
답변: Image Analyst 2019년 5월 22일
I want to perform optic disc removal as a step for doing diabetic retinopathy grading. The code is working fine, but for some of the images the result is not what is expected. Below is the code I am using for optic disc removal. By following a paper I am creating meshgrid and then finding the x-y cordinates that corresponds to maximum intensity values (as optic disc has the highest intenstiyintensity in retinal images). After that, I am creating a circle of radius 45 around the brightest point. I used "diaretdb0 database" for testing. Out of 126 images, the result for 8 image is wrong. Below is the code.
retina = imread('Input_Image.png');
retinaGband = retina(:,:,2); %Green Chanel extraction
retinaGband = imresize(retinaGband,[512 512]);
mask = imread('fmask.tif'); %mask
mask = imresize(mask,size(retinaGband));
%%Histogram Equalization
heImage = adapthisteq(retinaGband,'clipLimit',0.02,'Distribution','rayleigh');
% Mask the image.
heImage = heImage .* uint8(mask);
med2 = medfilt2(heImage);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
[imageSizeX, imageSizeY] = size(med2);
[x, y] = meshgrid(1:imageSizeX, 1:imageSizeY); %meshgrid creation
[r, c] = find(med2 == max(med2(:))); %finding max values row and column wise
centerX = max(r); %x-cordniate with max intensity value
centerY = max(c); % y-cordinate with max intensity value
radius = 45;
circlePixels = (x - centerY).^2 ...
+ (y - centerX).^2 <= radius.^2;
circlePixels = imcomplement(circlePixels);
%%masking
mask1 = med2 .* uint8(circlePixels);
figure,imshow(mask1);
The below image shows the ouput with wrongly identified optic disc.
The actual optic disc portion to be exculded is highlighted in green circle in the image to show what was expected. Below is the input image for the wrong output.
  댓글 수: 1
dalia hamam
dalia hamam 2019년 5월 21일
could u please send me the photo of the mask u used in your code?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2019년 5월 22일
Find algorithms in papers listed here in Vision Bibliography

카테고리

Help CenterFile Exchange에서 Optics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by