I don't have very knowledge about digital image processing. I tried myself. If you help me, i will be very happy.
%tried 3
rgbImage = imread('C:\Users\metec\Desktop\608918.jpg');
[rows, columns, numberOfColorChannels] = size(rgbImage);
if rows >= 2048 && columns >= 1024 % check image sizes(m,n) m=rows n=columns
else
end
if rows * columns >= 2097152
else
end
[rows, columns, numberOfSubplots] = size(rgbImage);
if rows * columns >= 16 % check sub image sizes(p,p)
else
end
redChannel = rgbImage(:,:,1); % channel 1
subplot(3, 3, 2);
imshow(rgbImage);
fontSize = 10;
title('Original RGB Image', 'FontSize', fontSize)
subplot(3, 3, 4);
imshow(redChannel);
title('Red Channel', 'FontSize', fontSize)