Finding overlap between two same frames tracked by different tracker with refrence to ground truth where i have date is [ X Y height and width ] of the respective bounding boxes.
1 view (last 30 days)
Show older comments
hi i have to find overlap between two frames with bounding boxes where one is ground truth and other is tracked by trackers. the data i have available is x, y, width, and height of the centroid of bounding boxes but there are multiple objects in the frame so i need to subtract everything from frame except my object and find overlapping pixels. any help regarding this will be a great breakthrough for my project. thanks
clear all;
close all;
filename = 'Test_Seq.avi';
mmReaderObj = mmreader(filename);
%[vidFrames mmReaderObj] = LoadVideoFile(filename);
numFrames = mmReaderObj.NumberOfFrames;
GroundTruth = ones(numFrames, 5);
GroundTruth(:,1) = 1:numFrames;
%GroundTruth(:,8) = 0;
n = 2;
for i = 1:numFrames
%for i = 1:1
figure(1);
imshow(read(mmReaderObj,i));
[cols rows] = ginput(n);
width = abs(cols(2)-cols(1));
height = abs(rows(2)-rows(1));
x = min(cols)+round(width/2);
y = min(rows)+round(height/2);
GroundTruth(i,2:5) = [x y width height];
frame = i
end
GroundTruth = round(GroundTruth);
WriteMat2TxtFile ('GT2.txt', GroundTruth);
this is the script i use to generate ground truth.
0 Comments
Answers (0)
See Also
Categories
Find more on Tracking and Motion Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!