My points tracker are too sensitive (how to fix it)

2 vues (au cours des 30 derniers jours)
Arnaud Tullio
Arnaud Tullio le 2 Nov 2017
Hello, I would like to track 2 simple circles.
Before the code below I determine the centers of my 2 points (corresponding to barycentre1 & barycentre2 in my code).
The huge probleme is that my points tracker are too sensible. For example, when a brutal changement of luminosity occurs in my video (which is in real time), the positions of my points change and the trackers stop (I think it's because of the MaxBidirectionnalError which goes over 70).
My question is that : How can I change my code to avoid this problem? How can I change the sensibility of my tracking?
The second extra point is that when I compile the programm are there a difference beetween the coordinates of my points with the snapshot and in the video? I mean, if I have a point with the coordinates [100 450] in my snapshot, will the coordinates in my video will be the same after compiling ? (Because sometimes I observe this problem...)
Thanks for your answer.
% Capture one frame
videoFrame = getsnapshot(vid);
videoPlayer = vision.DeployableVideoPlayer('Name','Acquisition en cours...');
% Create point tracker
pointTracker = vision.PointTracker('MaxBidirectionalError',70);
initialize(pointTracker,[barycentre1 ; barycentre2],videoFrame);
runloop=1;
while runloop
frame=getsnapshot(vid);
point = step(pointTracker,frame);
% define the marker
out = insertMarker(frame,point,'+','Color','green');
% Display the video
step(videoPlayer,out);
drawnow update
if ~isOpen(videoPlayer)
break
end
end
release(pointTracker);
end
  2 commentaires
Stephen23
Stephen23 le 2 Nov 2017
I suspect "sensible" in the title should be "sensitive":
Arnaud Tullio
Arnaud Tullio le 2 Nov 2017
Exactly, sorry...

Connectez-vous pour commenter.

Réponses (1)

Zeinab Moradi
Zeinab Moradi le 7 Mai 2021
it is my problem too,
vision.pointtracker can not track after a while
could you please help??!!

Community Treasure Hunt

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

Start Hunting!

Translated by