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 个)

类别

Help CenterFile Exchange 中查找有关 Tracking and Motion Estimation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by