I have performed Morphological Operation on the original gray eye image (imgSrc) to locate the eyelashes part by following code.
seClosing = strel('disk', 5); //perform closing
closeImg = imclose(imgSrc,seClosing);
midImg = closeImg - imgSrc; //Subtract original image from closed image
binaryImg = midImg > 30; //perform binarization with threshold 30
figure,imshow(binaryImg);title('Binarized Image');
seDilate = strel('disk',1); //perform dilation
dialateImg = imdilate(binaryImg,seDilate);
I need to isolate detected part of the dialatedImg from the Original Color image(part inside of the circle) keeping remaining part as well as (part outside the circle). I have also try by converting it to double but it is not getting the results.
Take look at the Dilated Image and The image from which i need to subtract detected part.