How can i extract desired image from an image?
1 回表示 (過去 30 日間)
古いコメントを表示
In the attached figure, I have to extract the visible part (i.e. rectangular eye part) in order to have focused eye region. I have tried imcrop function and it does what I need. But everytime i have to select the image co-ordinates. I want to do it automatically, like MATLAB itself sense the co-ordinates and extract that focused eye part. I mean there might be some algorithm which can vanish the black part and extract visible one. anybody have idea, how to do it?
cr1=imcrop(fmr_ext1,[500.5 388.5 85 117]);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152079/image.jpeg)
0 件のコメント
採用された回答
Image Analyst
2015 年 11 月 22 日
You can get the bounding box and then use crop:
measurements = regionprops(grayImage>0, 'BoundingBox');
croppedImage = imcrop(grayImage, measurements.BoundingBox);
7 件のコメント
Image Analyst
2015 年 11 月 22 日
See my own function, attached, written before they came out with bwareafilt().
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing and Computer Vision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!