Access MinFeretCoordinates data in regionprop table
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    
How can I access each circle MinFeretCoordinates?
clc;
clear;
a = imread("circlesBrightDark.png");
bw = a < 50;
imshow(bw)
title("Image with Circles")
stats = regionprops("table",bw,"Centroid","MinFeretProperties", "MajorAxisLength","MinorAxisLength")
0 件のコメント
採用された回答
  Matt J
      
      
 2023 年 11 月 26 日
        
      編集済み: Matt J
      
      
 2023 年 11 月 26 日
  
      For example,
stats{1,'MinFeretCoordinates'}
stats{2,'MinFeretCoordinates'}
stats{3,'MinFeretCoordinates'}
2 件のコメント
  Matt J
      
      
 2023 年 11 月 26 日
				The same as any other cell, e.g.,
a = imread("circlesBrightDark.png");
bw = a < 50;
stats = regionprops("table",bw,"Centroid","MinFeretProperties",...
                              "MajorAxisLength","MinorAxisLength");
fourNumbers = stats{1,6}{1}
その他の回答 (1 件)
  Walter Roberson
      
      
 2023 年 11 月 26 日
        a = imread("circlesBrightDark.png");
bw = a < 50;
imshow(bw)
title("Image with Circles")
stats = regionprops("table",bw,"Centroid","MinFeretProperties", "MajorAxisLength","MinorAxisLength")
%then
MFC = cat(3,stats.MinFeretCoordinates{:});
The result would be a 2 x 2 x N numeric array where N is the number of regions detected.
hold on; plot(squeeze(MFC(:,1,:)), squeeze(MFC(:,2,:)), 'r-')
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




