[b758a2]: / matlab / plot_detections.m

Download this file

19 lines (15 with data), 427 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
function plot_detections(imageFile, csvFile, threshold)
A = imread(imageFile);
results = csvread(csvFile);
% cut results off at the threshold
for i=1:size(results,1)
if results(i,3) < threshold
results = results(1:i-1,:);
break
end
end
% mark detections
for i=1:size(results,1)
A = insertShape(A, 'FilledCircle', [results(i,2) results(i,1) 10], 'Opacity', 1);
end
imwrite(A,'detections.bmp')