RGB information about a specific point in a image

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

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)

Categories

Find more on Display Image in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!