How to extract values from array

3 ビュー (過去 30 日間)
vimal gayan
vimal gayan 2019 年 5 月 23 日
コメント済み: vimal gayan 2019 年 5 月 24 日
I am trying to track 3 points of a moving video.First i insert those points and while video playing i want track those points path using x & y values.
num_frame=1; ex_points = {};
while ~isDone(videoFileReader)
frame = videoFileReader();
[points,validity] = tracker(frame);
ex_points{num_frame} = points;
out = insertMarker(frame,points(validity, :),'+','size',10);
% Where position is for one or more disconnected lines, an M-by-4 matrix, where each four-element vector [x1, y1, x2,y2], describe a line with endpoints, [x1 y1] and [x2 y2].
videoPlayer(out);
num_frame = num_frame+1;
end
I able to store the values in to array,
ex_points{num_frame} = points;
then i try to print one record using below code,
disp(hist_points{5});
the result was like below,
w.PNG
How can i get values seperately from this reslut??
I need result like each point x and y value seprately,In above image show 3 points at a one time.

採用された回答

dpb
dpb 2019 年 5 月 23 日
disp(hist_points{5}(1)); % for first element in cell 5
Read up in the documentation on cell arrays about dereferencing.
  1 件のコメント
vimal gayan
vimal gayan 2019 年 5 月 24 日
Thanks,It works.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by