필터 지우기
필터 지우기

how to convert 3d(512x512x3) image into 2d?

조회 수: 45 (최근 30일)
Boomadevi R
Boomadevi R 2014년 12월 10일
댓글: Star Strider 2014년 12월 10일
i want to convert 3d to 2d image.i searched lot.but i am getting correct ans.help me

답변 (1개)

Star Strider
Star Strider 2014년 12월 10일
It actually is 2D. Each pixel is represented by three colour channels, which is where the third dimension arises. To convert it to a 2D matrix, use the rgb2gray function.
  댓글 수: 2
Image Analyst
Image Analyst 2014년 12월 10일
Or extract just one of the color channels.
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
Each one of those channel images is a grayscale (monochrome) image. Which you do just depends on what you plan on doing with the 2D gray scale image.
Star Strider
Star Strider 2014년 12월 10일
Thank you, IA. I forgot about that option.

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

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by