When inserting an image into MATLAB, how do you read the n-by-3 array for pixels?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I have read the article on finding pixels, and I am not sure how to read the 3 by 3 array after pressing return.
Answers (1)
KALYAN ACHARJYA
on 19 Jun 2019
Edited: KALYAN ACHARJYA
on 19 Jun 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
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!