Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

When inserting an image into MATLAB, how do you read the n-by-3 array for pixels?

1 visualizzazione (ultimi 30 giorni)
I have read the article on finding pixels, and I am not sure how to read the 3 by 3 array after pressing return.

Risposte (1)

KALYAN ACHARJYA
KALYAN ACHARJYA il 19 Giu 2019
Modificato: KALYAN ACHARJYA il 19 Giu 2019
When Matlab read the image, it now matrix having elements value (Pixel Value) and spatial co-ordinates (x,y) that is position of rows and column.
For RGB Image having three planes R,G and B, therefor pixel values also having three values in each pixel location
(x,y) gives the spatial codinates and R,G,B gives corresponding values of that pixels
If you are interested to know the R component pixel value of 4,3 pixel position, then
red_values=image(4,3,1);
%Similarly for green.^2 and blue last digit shouls be 3
% You can also extract the complete plane
Requested to read the link for better undestanding.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by