Skip to content

Instantly share code, notes, and snippets.

@ShivendraAgrawal
Created April 30, 2014 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShivendraAgrawal/20606039e38024def577 to your computer and use it in GitHub Desktop.
Save ShivendraAgrawal/20606039e38024def577 to your computer and use it in GitHub Desktop.
function [] = automatic_select()
count = 0;
imageFiles = dir('*.jpg');
nFiles = length(imageFiles);
white_counts = zeros(nFiles);
for i = 1 : nFiles
count = count + 1;
currentFileName = imageFiles(i).name;
disp(currentFileName);
white_counts(count) = shivendra(currentFileName);
disp(white_counts(count));
disp(count);
end
count = 0;
for i = 2 : nFiles
count = count + 1;
currentFileName = imageFiles(i).name;
if (~(white_counts(i) > white_counts(i-1) && white_counts(i) > white_counts(i+1)))
delete(currentFileName);
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment