files = dir('*.JPG');

for k = 1:numel(files)

rgb = imread(files(k).name);

rgb = rgb(1:1800, 520:2000, :);

rgb = imresize(rgb, 0.2, 'bicubic');

imwrite(rgb, ['cropped\' files(k).name]);

end

Using this code, I am able to crop simple 8-bit image in bulk but it is not successful with 16 bit signed data.

More Gopal Krishna's questions See All
Similar questions and discussions