Circle detection for eye

Hi everyone, I am stuck with this for weeks. After I input a face image,
First: I perform the viola jones eye region detection by using the vision.CascadeObjectDetector
Second: I perform the Canny edge detection based on the eye region that was detected during the first stage.
a = imread('face.jpg');
imshow(a);
detector = vision.CascadeObjectDetector('EyePairSmall');
bbox = step(detector,a);
out = insertObjectAnnotation (a,'rectangle',bbox,'detection');
subplot(2,2,1),subimage(out);
outb = imcrop(out,bbox);
[hog1,visualization] = extractHOGFeatures(outb,'CellSize',[8 8]);
subplot(2,2,2),subimage(outb);
I = rgb2gray(outb);
BW = edge(I,'canny');
subplot(2,2,3);
imshow(BW);
After that, the image shown is like this:
May I know how can I detect the iris (circle shape) based on the output of Canny edge detection ?
As the region has will only have two circles detected, how is it possible to be implemented ?
I read about the imfindcircle before, but it doesn't work out. Might need the community helps and some guidance on this.
Much appreciated. Thank you !

2 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 11 月 18 日
Iris circle?
Teik Jin Lim
Teik Jin Lim 2019 年 11 月 19 日
Yaya. Iris circle

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2019 年 11 月 19 日

0 投票

Why are you using edge detection???
I'd first try thresholding the red channel, and if that is not robust enough, try imfindcircles().

4 件のコメント

Teik Jin Lim
Teik Jin Lim 2019 年 11 月 19 日
編集済み: Teik Jin Lim 2019 年 11 月 19 日
1. Sorry, I don get your "thresholding the red channel" meaning. Can you explain further ?
2. I tried imfindcircles(), it couldnt detect. No circle was detected.
Image Analyst
Image Analyst 2019 年 11 月 19 日
mask = rgbImage(:,:,1) < someThresholdValue; % You pick what someThresholdValue is.
Try adjusting some of the parameters to imfindcircles().
Teik Jin Lim
Teik Jin Lim 2019 年 11 月 19 日
Can you write it in complete form ? I donno what are you talking about. Too random haha.
I am new to Matlab
Image Analyst
Image Analyst 2019 年 11 月 19 日
OK, what is the name of your image? What did you call the variable?
Can you attach the cropped eye image alone? (Use imwrite()).

サインインしてコメントする。

カテゴリ

質問済み:

2019 年 11 月 18 日

コメント済み:

2019 年 11 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by