How do I compile C code using a point tracker object and the step function?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Tracking and Motion Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!