MATLAB Answers

0

How to get the histogram features of an RGB image? and can use it as color extraction? i want to find the mean, variance ,skewness, energy ,kurtosis, and entropy .. please help

Asked by jerome liwanag on 26 Feb 2019
Latest activity Answered by Image Analyst
on 28 Feb 2019
I have this project that need to extact the color features . I already know how to get the average RGB but i want to add more feautes .

  0 Comments

Sign in to comment.

2 Answers

Answer by Niti K
on 26 Feb 2019
 Accepted Answer

you can either convert rgb image to grayscale using rgb2gray or plot histograms for individual channel using indexing.
for example red channel for an RGB image can be accessed by I(:,:,1) where I is the rgb image.

  5 Comments

Doing this technique is better for color extraction? please enligthen me, im confused. why would you convert a colored image into gray scale if you wanna get the color features. Does it really need to convert it gray scale to get the histogram? thank you in advance
For colour extraction you could first convert the image from RGB to HSV, HSI (though that has wrapping/branch-cut issues in the hue) or Lab space. Those image formats might give more meaningful colour histograms. Also have a look at the file exchange contributions that does this task well:

Sign in to comment.


Answer by Image Analyst
on 28 Feb 2019

Not sure you really need all those, but for what it's worth, attached is my code for finding central spatial moments of an image.

  0 Comments

Sign in to comment.