필터 지우기
필터 지우기

how can i find the center of the 3 circles in this plot?

조회 수: 1 (최근 30일)
Naomi Penelope
Naomi Penelope 2021년 7월 9일
댓글: Naomi Penelope 2021년 7월 9일
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
Naomi Penelope
Naomi Penelope 2021년 7월 9일
thank you!. how can I plot this three points?
Simon Chan
Simon Chan 2021년 7월 9일
centroids = cat(1,stats.Centroid);
figure(1)
imshow(im);
hold on;
plot(centroids(:,1),centroids(:,2),'r+')

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
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')
T = 3×1 table
Centroid ________________ 429.22 462.43 816.62 1085.2 1118.3 428.65
imshow(A);
for i=1:3
drawpoint('Position',T{i,1},'Color','r');
end
  댓글 수: 3
Matt J
Matt J 2021년 7월 9일
I did plot them.
Naomi Penelope
Naomi Penelope 2021년 7월 9일
thank you very much

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by