%SCRIPT_RebuildNegativeBBoxsInParts
%
%intent:  take the negative bboxs, which were generated in fragments
%  and create one complete negative bbox list.
%

%ntodo = 07;
%filetemplate = 'negative_car_bbox_fragment%.2d.mat';
%ntodo = 7;
%filetemplate = 'negative_pedestrian_bbox_fragment%.2d.mat';
ntodo = 1;
filetemplate = 'negative_bicycle_bbox_fragment%.2d.mat';
saveroot = '/cbcl/scratch01/bileschi/PrecomputedFeatures/StreetScenes/AppearanceDetector'

nBBoxs = [];
nIdxs = [];
for i = 1:ntodo
  load(fullfile(saveroot,sprintf(filetemplate,i)));
  %-->nBBoxs_fragment, nIdxs_fragment;
  nBBoxs = [nBBoxs;nBBoxs_fragment];
  nIdxs = [nIdxs,nIdxs_fragment];
end
%save('NegativePedestrianBBoxs','nBBoxs','nIdxs');
save('NegativeBicycleBBoxs','nBBoxs','nIdxs');
