%SCRIPT_GenerateContextData_AtAppearanceLocations_TrueSem

HelpTextInfo = help('SCRIPT_GenerateContextData_AtAppearanceLocations');
load /cbcl/scratch01/bileschi/EzContext/ContextDetector/TrainingData/Locs/PositionImage_060_080.mat
%-->PositionImage_060_080
PositionImage = PositionImage_060_080;
clear PositionImage_060_080;
Appearance_Template = 'SobelAppearanceTrainData6_%s';
Template = '/cbcl/scratch01/bileschi/EzContext/LayerImgs1200_TrueMask_6Pool/Lay1200_%.5d.mat';
ons = GetSSObjectNames;
%for i = [1,2,3,8,9]
for i = [Which]
   obj = ons{i};
   load(sprintf(Appearance_Template, obj));%-->ExtractedLocations, etc.
   X = SampleCtxFeaturesAtLocations(Template, ExtractedLocations,PositionImage);
   savename = sprintf('ContextFeatsAtApprLocs6_TrueMask_%s.mat',obj);
   save(savename,'X','y','HelpTextInfo');
end
