Operation on RGB Images

I have applied the security algo on Grayscale images which were converted to Grayscale from RGB.Now if want to operation directly on RGB image How can I separate the R,G & B components & merge at the end.
Thanks

 채택된 답변

Pugazhendhi
Pugazhendhi 2012년 2월 1일

0 개 추천

The following steps will help you split RGB and merge them again.
I = imread('RGB.jpg');
%RGB split
R=I(:,:,1);
G=I(:,:,2);
B=I(:,:,3);
%merge RGB channels
RGB1=cat(3,R,G,B);

추가 답변 (1개)

Sukuchha
Sukuchha 2012년 2월 1일

0 개 추천

read your image with imread and extract RGB with indexing.
I= imread('your_pic')
R = I(:,:,1);
G = I(:,:,2);
B= I(:,:,3);

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2012년 2월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by