Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Created March 12, 2017 02:13
Show Gist options
  • Select an option

  • Save hackintoshrao/cc96ecb010b6ccf6ae8848f2da479a40 to your computer and use it in GitHub Desktop.

Select an option

Save hackintoshrao/cc96ecb010b6ccf6ae8848f2da479a40 to your computer and use it in GitHub Desktop.
Separating the layers of the image.
# read the image.
img = imread('bicycle.png');
# display the image
imshow(img);
# check size of the image.
disp(size(img)); % check size
# separate out the red channel.
img_red = img(: ,:, 1);
# display the image with the red channel.
imshow(img_red);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment