%SCRIPT_FindC2Corruptions
%
%intent: it was noted that a particular type of corruption was affecting the c2 jpeg outputs.  The signature
%of this error is that the minimum value of the first 70 s2 responses is less than .01 in abs val.

Root = '/cbcl/scratch01/bileschi/PrecomputedFeatures/StreetScenes/c2/car_ObjSpecificS2Centroid_70x5/';
%Root = '/cbcl/scratch01/bileschi/PrecomputedFeatures/StreetScenes/c2/NaturalS2Centroids_70x5/';
t = clock;
Corrupts = [];
for i = 1:3547
  fn = fullfile(Root, sprintf('%.5d',i),'C2_Data__JW3DM_Headder.mat');
  load(fn);%--> JPEGHead;
  a = abs(JPEGHead.mins(1:70));
  if(max(a) < .01)
    Corrupts(end+1) = i;
    fprintf('%d                                            \n',Corrupts(end));
  end;
  e = clock;
  tpi = etime(e,t)/i;
  fprintf('%d of %d, %f mins to go\r',i,3547,(tpi*(3547-i))/60);
end
save('Corrputs.mat','Corrupts');