필터 지우기
필터 지우기

how to get a colour image while reconstruction from R,G and B component.

조회 수: 1 (최근 30일)
when i try to reconstruct a colour image of size M x N, and display it using imshow command, i am getting a image in greyscale of size M x 3N. i understand the logic that 3N is because of RGB component. but how can i convert the M x 3N (greyscale image) into M x N (colour image) using matlab?
Kindly help me..!

채택된 답변

Image Analyst
Image Analyst 2015년 3월 30일
If the individual color channel images are stitched side-by-side, then extract them and turn them into a 3D color image
leftImage = grayImage(:, 1:N);
middleImage = grayImage(:, N+1:2*N);
rightImage = grayImage(:, 2*N1:3*N);
rgbImage = cat(3, leftImage, middleImage, rightImage);
imshow(rgbImage);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by