Info
此问题已关闭。 请重新打开它进行编辑或回答。
When inserting an image into MATLAB, how do you read the n-by-3 array for pixels?
1 次查看(过去 30 天)
显示 更早的评论
I have read the article on finding pixels, and I am not sure how to read the 3 by 3 array after pressing return.
0 个评论
回答(1 个)
KALYAN ACHARJYA
2019-6-19
编辑:KALYAN ACHARJYA
2019-6-19
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
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!