Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %ler a imagem
- imagem = imread('nome_arquivo.jpg')
- %%numero de linhas, colunas e canais
- [rows, cols, channels] = size(imagem)
- for i = 1:rows
- for j = 1:cols
- red(i,j) = imagem(i,j,1);
- green(i,j) = imagem(i,j,2);
- blue(i,j) = imagem(i,j,3);
- end
- end
- subplot(2,2,1)
- imshow(imagem)
- subplot(2,2,2)
- imshow(red)
- subplot(2,2,3)
- imshow(green)
- subplot(2,2,4)
- imshow(blue)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement