This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
if(activeTracks(tid) == 0)
activeTracks(tid) = 1;
trackingHist(tid).tid = TID(n);
trackingHist(tid).allocationTime = targetFrameNum;
trackingHist(tid).tick = 1;
trackingHist(tid).posIndex = 1;
trackingHist(tid).histIndex = 1;
trackingHist(tid).sHat(1,:) = S(:,n);
trackingHist(tid).pos(1,:) = S(1:2,n);
trackingHist(tid).hPlotTrack = plot(trackingAx, S(1,n), S(2,n), '.-', 'color', colors(mod(tid,length(colors))+1));
trackingHist(tid).hPlotCentroid = plot(trackingAx, S(1,n), S(2,n), 'o', 'color', colors(mod(tid,length(colors))+1));
datafhist(frameNum).targetS=S(1:2,n);
else
activeTracks(tid) = 1;
trackingHist(tid).tick = trackingHist(tid).tick + 1;
trackingHist(tid).histIndex = trackingHist(tid).histIndex + 1;
if(trackingHist(tid).histIndex > 1000)
trackingHist(tid).histIndex = 1;
end
trackingHist(tid).sHat(trackingHist(tid).histIndex,:) = S(:,n);
trackingHist(tid).ec(trackingHist(tid).histIndex,:) = EC(:,n);
trackingHist(tid).posIndex = trackingHist(tid).posIndex + 1;
if(trackingHist(tid).posIndex > 100)
trackingHist(tid).posIndex = 1;
end
trackingHist(tid).pos(trackingHist(tid).posIndex,:) = S(1:2,n);
if(trackingHist(tid).tick > 100)
set(trackingHist(tid).hPlotTrack, 'XData', [trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,1); trackingHist(tid).pos(1:trackingHist(tid).posIndex,1)], ...
'YData',[trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,2); trackingHist(tid).pos(1:trackingHist(tid).posIndex,2)]);
targetpos(:,1)=[trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,1); trackingHist(tid).pos(1:trackingHist(tid).posIndex,1)];
targetpos(:,2)=[trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,2); trackingHist(tid).pos(1:trackingHist(tid).posIndex,2)];
targetposnew=targetpos.';
else
set(trackingHist(tid).hPlotTrack, 'XData', trackingHist(tid).pos(1:trackingHist(tid).posIndex,1), ...
'YData',trackingHist(tid).pos(1:trackingHist(tid).posIndex,2));
1.I want to know the meaning of above code.
2.I can't understand it and I want to know the meaning of trackingHist(tid).posIndex, trackingHist(tid).tick and activeTracks(tid) .
3.set(trackingHist(tid).hPlotTrack, 'XData', [trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,1); trackingHist(tid).pos(1:trackingHist(tid).posIndex,1)], ...
'YData',[trackingHist(tid).pos(trackingHist(tid).posIndex+1:end,2); trackingHist(tid).pos(1:trackingHist(tid).posIndex,2)]);
I want to know the meaning of the code
Hello,
I assume that you are using some version of the people tracking demo on IWR1642 (as your post is tagged with IWR1642). I would recommend you to first understand the output data format, the various values that it contains and how the fields are encapsulated in the TLV (Type, Length, Value) format. The data format is explained in the user guide for the corresponding demo.
Please also look at the resources mentioned in the following threads:
IWR1642BOOST: How to Modify Config File For Gtrack Parameters
IWR1642BOOST: Understanding fHistRT MATLAB data
We do not have a user guide for the GUI code so you will need to understand the code and adapt / re-use it as needed.
Regards
-Nitin