Filter löschen
Filter löschen

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

45 Ansichten (letzte 30 Tage)
Boomadevi R
Boomadevi R am 10 Dez. 2014
Kommentiert: Star Strider am 10 Dez. 2014
i want to convert 3d to 2d image.i searched lot.but i am getting correct ans.help me

Antworten (1)

Star Strider
Star Strider am 10 Dez. 2014
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 Kommentare
Image Analyst
Image Analyst am 10 Dez. 2014
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 am 10 Dez. 2014
Thank you, IA. I forgot about that option.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Modify Image Colors finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by