How to show given x,y position on image frame?

2 ビュー (過去 30 日間)
vimal gayan
vimal gayan 2019 年 5 月 24 日
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 件)

カテゴリ

Help Center および File ExchangeSurfaces, Volumes, and Polygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by