How can i get RGB value if i have position(x,y)
Ältere Kommentare anzeigen
if i have position of image(pixel) . How can i get RGB value of this position?
Akzeptierte Antwort
Weitere Antworten (2)
Andrew Fowler
am 21 Jan. 2012
Since RGB images are really 3D matrices, you can use the squeeze command :
pixelRGB = squeeze(yourImage(x,y,:));
Sukuchha
am 22 Jan. 2012
use function impixel if you have image processing toolbox
P = impixel(RGB,c,r)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!