Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Naomi Penelope
Naomi Penelope am 9 Jul. 2021
Kommentiert: Naomi Penelope am 9 Jul. 2021
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 Kommentare
Naomi Penelope
Naomi Penelope am 9 Jul. 2021
thank you!. how can I plot this three points?
Simon Chan
Simon Chan am 9 Jul. 2021
centroids = cat(1,stats.Centroid);
figure(1)
imshow(im);
hold on;
plot(centroids(:,1),centroids(:,2),'r+')

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 9 Jul. 2021
Bearbeitet: Matt J am 9 Jul. 2021
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 Kommentare
Matt J
Matt J am 9 Jul. 2021
I did plot them.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by