I have an image of an eye. I wanted to detect and crop the conjunctival region. How should I go about this?

5 次查看(过去 30 天)

回答(1 个)

Image Analyst
Image Analyst 2016-8-27
Try imfreehand(). Demo attached.
  2 个评论
Medha Sharma
Medha Sharma 2016-8-28
编辑:Image Analyst 2016-8-28
Thanks for your consideration. I tried out your code with my image set. This is the message I obtained:
Warning: Image is too big to fit on screen; displaying at 13%
> In images.internal.initSize (line 71)
In imshow (line 309)
In sol (line 38)
Error using iptassert (line 19)
Size of I doesn't match size information found in the first input argument.
Error in regionprops>ParseInputs (line 1224)
iptassert(isequal(sizeImage,size(I)), ...
Error in regionprops (line 205)
[I,requestedStats,officialStats] = ParseInputs(imageSize, argOffset, varargin{:});
Error in sol (line 66)
measurements = regionprops(binaryImage, img, ...
Basically, my aim was to somehow identify and crop out the conjunctival region from the image of an eye and then obtain the RGB intensities of the cropped out region. Could this be accomplished by any other means?
Image Analyst
Image Analyst 2016-8-28
The first is just a warning that says it's shrinking your image to fit it onto the screen. You can ignore that warning.
The second one is where it tried to do regionprops to compute the area or something. It was expecting to have a gray scale image and you probably passed it the full color image. You can either do that on the 3 color channels one at a time, or you can somehow create a gray scale image, or simply just don't use regionprops. I'm not really sure what you want after you hand-draw the region. Do you want a smaller image where it has just the bounding box of the small region you traced? Or do you want to mask out (blacken) the area of your image outside the region you traced?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Eye Tracking 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by