Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
How to plot result on my own image and not in x y plot with Points2circle ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Can any one tell me how can i apply this code to my 1000*1000 image in a way that the results
appear on my image knowing that the results presented on XY plot fits my image (I prepared all
inputs)
Here is an Example of execution below:
%EXAMPLE
load('main3.mat')%contains a vector ending_pts
px=ending_pts(:,1)
py=ending_pts(:,2)
xyr = points2circle([px(:) py(:)]) ;
% create circle
t = linspace(0,2*pi,100) ;
xc = xyr(1) + xyr(3) * cos(t) ; yc = xyr(2) + xyr(3) * sin(t) ;
% make lines connecting center and points
x00 = [xyr([1 1 1]) ; px.' ; xyr([1 1 1])] ;
y00 = [xyr([2 2 2]) ; py.' ; xyr([2 2 2])] ;
% plot it nicely
h = plot(x00(:),y00(:),'k-', ... % connect center to points
px([1:3 1]),py([1:3 1]),'b:', ... % triangle
xc,yc,'r-', ... % circle
xyr(1),xyr(2),'r.', ... % center
px,py,'bo' ... % the three points
) ;
legend(h([5 3 4]),{'Points','Circle','Center'}) ;
axis square
Here is the source folder
below the image where i want to apply this Function "Points2circle" with red are ending_pts
Any ideas please!
Help is much appreciated
thx
1 commentaire
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!