how can i find the center of the 3 circles in this plot?
1 回表示 (過去 30 日間)
古いコメントを表示
how can i find the center of the 3 circles in the plot I am attaching?
this is the code I used to plot it:
clear
clc
close all
format bank
I = imread('image.tif');
figure;
imcontour(I,3)
6 件のコメント
Simon Chan
2021 年 7 月 9 日
centroids = cat(1,stats.Centroid);
figure(1)
imshow(im);
hold on;
plot(centroids(:,1),centroids(:,2),'r+')
採用された回答
Matt J
2021 年 7 月 9 日
編集済み: Matt J
2021 年 7 月 9 日
A=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/678708/Screen%20Shot%202021-07-08%20at%205.37.33%20PM.png');
BW=bwpropfilt(all(imbinarize(A),3),'Area',3);
T=regionprops('table', BW,'Centroid')
imshow(A);
for i=1:3
drawpoint('Position',T{i,1},'Color','r');
end
3 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!