How to find average R value in an RGB image?

1 view (last 30 days)
Sivasurya J
Sivasurya J on 2 Feb 2018
Answered: Jan on 2 Feb 2018
I am trying to split the RGB image into separate colors(like R,G,B) and find the average value for each colours. Please anyone can help me... I need this code for my project

Answers (1)

Jan
Jan on 2 Feb 2018
RGB = rand(640, 480, 3);
avgRGB = mean(reshape(RGB, [], 3), 1)

Categories

Find more on Image Processing Toolbox 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!