How do I compile C code using a point tracker object and the step function?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Tracking and Motion Estimation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!