How can i get RGB value if i have position(x,y)
显示 更早的评论
if i have position of image(pixel) . How can i get RGB value of this position?
采纳的回答
更多回答(2 个)
Andrew Fowler
2012-1-21
Since RGB images are really 3D matrices, you can use the squeeze command :
pixelRGB = squeeze(yourImage(x,y,:));
Sukuchha
2012-1-22
use function impixel if you have image processing toolbox
P = impixel(RGB,c,r)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!