1 | initial version |
code to compute HSV histogarm .
cvtColor( Frame, hsv_base, CV_BGR2HSV );
int h_bins = 50;
int s_bins = 32;
int v_bins = 10;
int histSize[] = { h_bins, s_bins, v_bins };
float h_ranges[] = { 0, 256 };
float s_ranges[] = { 0, 180 };
float v_ranges[] = { 0, 256 };
const float* ranges[] = { h_ranges, s_ranges, v_ranges };
int channels[] = { 0, 1, 2};
calcHist( &hsv_base, 1, channels, Mat(), hist_base, 3, histSize, ranges, true, false);