Inspect image value

% At a given location (row, col):
dis(img(50, 100));

dis(img(50, :));

plot(img(50, :));
% At slice of the image:
disp(img(101:103, 201:203));

disp(size(img));
% Cropped size:
disp(size(cropped));

color planes

img = imread('fruit.png');
imshow(img);

disp(size(img));

img_red = img(:, :, 1);
imshow(img_red);

plot(img_red(150, 0));