How to show given x,y position on image frame?
1 次查看(过去 30 天)
显示 更早的评论
I am trying to show shape connecting 3 x,y points on image frame.
fileCount=length(Files);
middleImage=round((fileCount/2)-5);
startingImage=Files(5).name;
middleImagePOS=Files(middleImage).name;
imagename1 = fullfile(outputFolder, middleImagePOS);
originalImage = imread(imagename1);
out = insertShape(originalImage,'Line',[
ex_points{5}(1,1) ex_points{5}(1,2)
ex_points{5}(2,1) ex_points{5}(2,2)
ex_points{5}(2,1) ex_points{5}(2,2)
ex_points{5}(3,1) ex_points{5}(3,2)
ex_points{5}(3,1) ex_points{5}(3,2)
ex_points{5}(1,1) ex_points{5}(1,2)
] );
%grayImage = insertMarker(originalImage,pos,'+','Color',color,'size',20);
imshow(out);
% plot([shoulder_X elbow_x wrist_x], [shoulder_Y elbow_y wrist_y],'g');
F = getframe;
imshow(F.cdata);
ex_points{5} -> is array which include x,y value of point a,b and c.
How can i show this shape on the image which i take? if that insertShape() worked, it should show the image like below

0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surfaces, Volumes, and Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!