How to use color histogram of image to extract a feature vector?
11 ビュー (過去 30 日間)
古いコメントを表示
Hi, sorry if this is a simple question but I'm new to MATLAB and was wondering if it was possible to get a vector of feature descriptors for an image by using its color histogram, producing an output similar to the format of extracting HoG or SIFT features? Thanks!
0 件のコメント
回答 (1 件)
Yash Ubale
2018 年 11 月 19 日
Hello,
HOG features are nothing but a vector of values. The size of the feature vector depends on the parameters used for extracting HOG features. Similarly, to create RGB histogram from an image, you need to set the number of bins into which the red, green and blue channels are to be divided, by default it is set to 256 if you use 'imhist'. So for an RGB image, you have to separate the three channels, which give you three feature vectors (histogram for every channel). You can instead convert the image to grayscale and then find the histogram. This will give you one feature vector.
If you want to find a way to somehow merge the three feature vectors of an RGB image, just concatenate them, or add them, depends what you need to do with them. If you want to see some examples follow the links mentioned below.
How to extract colour descriptor (set of features) from the image? - https://www.mathworks.com/matlabcentral/answers/228178-how-to-extract-colour-descriptor-set-of-features-from-the-image
How to get Color Histogram of an Image - https://www.mathworks.com/matlabcentral/answers/181624-how-to-get-color-histogram-of-an-image
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!