How Can I merge R,G,B Components of an image into a single RGB image ?

조회 수: 2 (최근 30일)
Omkar Bhanap
Omkar Bhanap 2018년 2월 21일
댓글: Omkar Bhanap 2018년 2월 23일
I am using 'V4L2 Video Capture' block for interfacing my Raspberrypi Camera with my laptop. I need a single multidimensional signal instead of three separate R, G, B components. Please suggest me any solution for this. It should be compatible with code generation. Thanks in advance.
  댓글 수: 1
Omkar Bhanap
Omkar Bhanap 2018년 2월 21일
I also tried 'cat', but it was giving me errors while using code generation.

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

답변 (1개)

KSSV
KSSV 2018년 2월 21일
R= rand(200) ;
G = rand(200) ;
B = rand(200) ;
I = cat(3,R,G,B) ;
imshow(I)

Community Treasure Hunt

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

Start Hunting!

Translated by