forked from sergeyk/selective_search_ijcv_with_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlobBestOverlap.m
More file actions
27 lines (22 loc) · 751 Bytes
/
BlobBestOverlap.m
File metadata and controls
27 lines (22 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function [scores index] = BlobBestOverlap(gtBlobs, testBlobs)
% [scores index] = BlobBestOverlap(gtBlobs, testBlobs)
%
% Get overlap scores (Pascal-wise) for test blobs
%
% groundTruthBlob: ground truth blobs
% test: Test blobs
%
% scores: Highest overlap scores for each test blob.
% index: Index for each test blob which ground truth blob
% is best
%
% Jasper Uijlings - 2013
numTarget = length(gtBlobs);
numTest = length(testBlobs);
scoreM = zeros(numTest, numTarget);
for i=1:numTest
for j=1:numTarget
scoreM(i,j) = PascalOverlapBlob(gtBlobs{j}, testBlobs{i});
end
end
[scores index] = max(scoreM, [], 2);