creat mask from random border lines for time frame cropping
이전 댓글 표시
Hi all,
I want to crop the maximum rectangle area in image 'frame' as the red rec. in image 'frame1'. I am looking to have a mask from this image for another images, means I am looking for coordinates of the red frame. The red frame has to keep the original image x, y ratio.
Thanks, HM


답변 (1개)
Image Analyst
2015년 10월 11일
0 개 추천
This is not that well defined. What if you have a hairline black line meandering from the upper left corner down into the lower right quadrant? What would be the inner bounding box then? Why does the mask need to be a perfect rectangle anyway? Maybe you can just use what you got and call imclose() or bwconvhull(), and then shrink it a few layers by calling imerode().
댓글 수: 4
Hassan
2015년 10월 11일
Image Analyst
2015년 10월 11일
I don't think you're envisioning all the possibilities for a robust solution. Unlike the outer bounding box, there are many, many possible inner bounding boxes, even if you require that it encompass the centroid. So how do you pick one? Just think about it some - think up lots of possible different boundary shapes - and you'll realize what I'm saying.
ali hammood
2017년 10월 3일
hi follow this link https://www.mathworks.com/help/images/examples/detecting-a-cell-using-image-segmentation.html
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!