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

1 visualización (últimos 30 días)
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

Respuestas (0)

Categorías

Más información sobre Tracking and Motion Estimation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by