In article <firstname.lastname@example.orgYaTP>,
pangzi <email@example.com> wrote:
>Im a freshman to Matlab, so could any1 tell me if MATLAB could reads
>the colors on every pixel of a image and returns the values to a
Yes. Matlab has three representations for images: "intensity",
"indexed", and "truecolor". Intensity images are grayscale images:
each matrix entry directly reads off the gray luminence.
Indexed images are "pseudocolor" images: each matrix entry
is an index into an N x 3 colortable, so you can find the
pixel colour by indexing the colortable with the matrix value.
Truecolor images, also known in Matlab as RGB images,
are N x M x 3 matrices, in which the colour components for
pixel (I,J) are the matrix at (I,J,:): in this case you just
look up the colour values directly in the image matrix.
The command to read an image is imread(). You may have to
examine the size of the returned matrix in order to determine
what kind of image it is.
Programming is what happens while you're busy making other plans.