Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created August 26, 2016 20:14
Show Gist options
  • Save juniorhero/220b0ba056168490805a7b69ddae7fa0 to your computer and use it in GitHub Desktop.
Save juniorhero/220b0ba056168490805a7b69ddae7fa0 to your computer and use it in GitHub Desktop.
a=imread('Jellyfish.jpg');
figure,imshow(a)
R=a(:,:,1);
G=a(:,:,2);
B=a(:,:,3);
% figure,imshow(R)
%figure,imshow(G)
% figure,imshow(B)
subplot(2,2,1)
imshow(a)
subplot(2,2,2)
imshow(R)
subplot(2,2,3)
imshow(G)
subplot(2,2,4)
imshow(B)
g=.30*R+.58*G+.11*B
figure,imshow(g)
func=rgb2gray(a)
figure,imshow(func)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment