检测青光眼照片中的椭圆

时间:2015-11-18 15:47:57

标签: matlab image-processing ellipse model-fitting drawellipse

对于青光眼诊断,通常确定“杯盘比”,其比较视盘(VDD)和视杯(VCD)的直径。光盘可见为圆形红色特征(红色通道),光学杯显示为黄色圆圈(绿色通道)。如何计算光盘和光学杯之间的直径比?

我能够通过canny边缘检测来检测光盘,但我还没有找到一种计算杯盘比的方法。我怎么能这样做?

原始图片:

enter image description here

VDD和VCD:

enter image description here

1 个答案:

答案 0 :(得分:2)

我不熟悉你提到的条款。请检查以下代码是否适合您。

clc; clear all;

img = imread('vu4TL.jpg');

imgr = img(:,:,1);
imshow(imgr);
imgrb = im2bw(imgr,.99);

se = strel('disk',2);
imgrbc = imclose(imgrb,se);

[cr, rr] = imfindcircles(imgrbc,[4 100],'ObjectPolarity', ...
    'bright','Sensitivity',0.92);

imgr = img(:,:,2);
imgrb = im2bw(imgr,.99);

se = strel('disk',2);
imgrbc = imclose(imgrb,se);

[cg, rg] = imfindcircles(imgrbc,[4 100],'ObjectPolarity', ...
    'bright','Sensitivity',0.92);

imshow(img);
hr = viscircles(cr,rr);
hb = viscircles(cg,rg);

cdr = rr/rg;

fprintf('\ncdr = %f\n', cdr);

答案:

cdr = 2.225866

输出图片:

enter image description here