How do I separate a concatenated image?

I had a lena image P of size m*n and I extracted the 3 components R, G, and B each of size m*n. Then I stitched the 3 components using horzcat() function and got an image PS of size m*3n. And I performed cat map operations and get the image Prt of size m*3n. Now I need to extract or separate 3 components each of size m*n. That is, I need to separate the entire matrix as 3 columns as first 256 columns to R next 256 to G etc... How can i do this?

 채택된 답변

Image Analyst
Image Analyst 2017년 12월 17일

0 개 추천

Try this:
R = Prt(:, 1:m);
G = Prt(:, m+1:2*m)
B = Prt(:, 2*m+1:end);

댓글 수: 1

Sneha
Sneha 2017년 12월 18일
Thank you for the reply and it works as i need.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

질문:

2017년 12월 17일

댓글:

2017년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by