フィルターのクリア

how to find different features of objects

2 ビュー (過去 30 日間)
Abo
Abo 2015 年 5 月 14 日
コメント済み: Image Analyst 2015 年 5 月 14 日
in this binary image there are some objects in x-y coordinate, I want to find the biggest object and its centroid (x,y). how can I do that?

採用された回答

Image Analyst
Image Analyst 2015 年 5 月 14 日
See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It finds the centroids of a bunch of circles.
Then, see my attached demo that will find the largest or smallest N blobs in a binary image.
  2 件のコメント
Abo
Abo 2015 年 5 月 14 日
thank you very much for your answer, I've used this method before, for selecting the biggest object but I cannot to find centre of that one. you know the biggest object is ellipse not circle.
Image Analyst
Image Analyst 2015 年 5 月 14 日
There are several ways. For example, you can first call my function that returns only the largest blob. Then you can call bwlabel() and regionprops().
%----------------------------------------------------------
% Extract the largest area using our custom function ExtractNLargestBlobs().
biggestBlob = ExtractNLargestBlobs(binaryImage, numberToExtract);
%---------------------------------------------------------
labeledImage = bwlabel(biggestBlob);
measurements = regionprops(labeledImage, 'Centroid');
centroid = measurements(1).Centroid;
I think maybe you looked only at the ExtractNLargestBlobs demo and did not look at the demo in my File Exchange - they are different. I attach both here.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by