How do I compile C code using a point tracker object and the step function?

1 回表示 (過去 30 日間)
Daniel Leib
Daniel Leib 2017 年 4 月 18 日
I'm having a bit of trouble compiling a point tracker to c code for later use in another project; the function to be compiled is below. I pass it a video and the initial positions of points, then track using a point tracker as normal. Runs fine in MATLAB. When I go to compile, I get this error, which I think means that the outcome of step() isn't predictable: Dimension 1 is fixed on the left-hand side but varies on the right ([1 x :?] ~= [:? x :?]).
How do I deal with this?
Thanks!
function [trackedPoints] = trackPoints(v,firstPoints)
pt = vision.PointTracker;
[aa bb cc dd] = size(v);
initialize(pt,firstPoints,v(:,:,:,1));
trackedPoints = struct('points',firstPoints,'validity',true,'score',1);
for i = 1:dd
frame = v(:,:,:,i);
[trackedPoints(i).points, trackedPoints(i).validity, trackedPoints(i).score] = step(pt,frame);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeTracking and Motion Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by