Automatically crop the edge detected area of an image
11 views (last 30 days)
Show older comments
after detect the edge by canny edge edge detector how can i crop the edge detected area of the image?
1 Comment
SHOBA MOHAN
on 21 Dec 2017
Hi, Please refer this link, it will be helpful for you. https://www.mathworks.com/matlabcentral/answers/337751-crop-the-irrelevant-part-of-the-image?s_tid=answers_rc1-2_p2_MLT
Answers (1)
Image Analyst
on 21 Dec 2017
Try imcrop(). I can't say more than that because you forgot to attach your image.
5 Comments
Image Analyst
on 22 Dec 2017
Your badly-named edge is an image, not a bounding box. Don't call your image edge since that's a built-in function. You can call bwconvhull() to get a single blob from all the edges and then use regionprops(binaryImage, 'BoundingBox') to find the bounding box that you can then pass in to imcrop(). Write back if you have trouble.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!