I have an image and want to make a rectangle around black part which is in the middle of image.
3 ビュー (過去 30 日間)
古いコメントを表示
I have an image and want to make a rectangle around black part which is in the middle of image.
0 件のコメント
回答 (2 件)
Dishant Arora
2014 年 6 月 23 日
Go for connected component labelling and check out for bounding boxes parameter, plot it. For more information check out this demo by image analyst Image Segmentation Tutorial ("BlobsDemo")
Image Analyst
2014 年 6 月 23 日
What are you starting with? A gray scale image, or that binary image? If you have that binary image, you might want to call imclose() to connect some regions together, then call bwareaopen() to get rid of small noise regions, Then call regionprops and get the centroids and bounding boxes. Find the centroid closest to the center of the image and extract only that one with ismember.
9 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!