Created
March 12, 2017 02:13
-
-
Save hackintoshrao/cc96ecb010b6ccf6ae8848f2da479a40 to your computer and use it in GitHub Desktop.
Separating the layers of the image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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