how to read the color image with combined the R,G,B component ?

1 visualización (últimos 30 días)
i have a color image like baby.tif when i use a statement as below
imData=imread('baby.tif');
in imData array R,G,B component store separate
like
imData(:,:,1)% red
:
:
imData(:,:,2) %green
:
:
:
:
imData(:,:,3) % blue
:
:
like this but i need all component combined for single pixel example for first pixel i have value for r,g,b (13,16,17) then second and so on if my image size 60*60 then to represent the color value in 60*180 size in array
  3 comentarios
preet
preet el 20 de Abr. de 2013
actually i write the color values of 1000 images in a single .txt file. so when i read that txt file its not easy to read sepratly each component for 1000 images
Image Analyst
Image Analyst el 20 de Abr. de 2013
Well . . . . don't do that! You already had the color values in the original format image files.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Abr. de 2013
reshape( permute(imData, [1 3 2]), size(imData,1), size(imData,2) * size(imData,3) )
  2 comentarios
preet
preet el 21 de Abr. de 2013
Thanx sir, as usually u r gv me ans.
Image Analyst
Image Analyst el 21 de Abr. de 2013
Actually you've only accepted one other of his answers that he spent time giving you. If what you say is true, then you should go back and accept his other answers also.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by