Hi
I have got the histogram of Y channel of YCrCb
the output after drawing with this code
int hist_w = 512; int hist_h = 400;
int bin_w = cvRound( (double) hist_w/histSize );
Mat histImage( hist_h, hist_w, CV_8UC3, Scalar( 0,0,0) );
normalize(b_hist, b_hist, 0, histImage.rows, NORM_MINMAX, -1, Mat());
// Draw for each channel
for( int i = 1; i < histSize; i++ )
{
line( histImage, Point( bin_w*(i-1), hist_h - cvRound(b_hist.at(i-1)) ) , Point( bin_w*(i), hist_h - cvRound(b_hist.at(i)) ), Scalar( 255, 0, 0), 2, 8, 0 );
}
is :
[Output](http://postimg.org/image/qzyy0ci93/)
I want to draw it like this :
[another drawing ](http://postimg.org/image/ycaowq3v9/)
↧