RGB information about a specific point in a image

2 views (last 30 days)
Is there a command that would give me the information about the color (RGB) of an specific point in an image? A command that I would insert the coordinates of the point and would give back something like RGB = [165 59 46], for example.

Accepted Answer

Chad Greene
Chad Greene on 4 Nov 2015
Edited: Chad Greene on 4 Nov 2015
To get the RGB of row 30, column 45,
I = imread('pears.png');
squeeze(I(30,45,:))
Or to get the values by mouse click you can use colorpicker.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!