diff --git a/modules/objdetect/src/softcascade.cpp b/modules/objdetect/src/softcascade.cpp index 684433608..dcdf2633a 100644 --- a/modules/objdetect/src/softcascade.cpp +++ b/modules/objdetect/src/softcascade.cpp @@ -283,7 +283,7 @@ struct ChannelStorage // convert to luv cv::Mat luv; - cv::cvtColor(colored, luv, CV_RGB2Luv); + cv::cvtColor(colored, luv, CV_BGR2Luv); // split to 3 one channel matrix std::vector splited, luvs; @@ -300,7 +300,7 @@ struct ChannelStorage // convert to grey cv::Mat grey; - cv::cvtColor(colored, grey, CV_RGB2GRAY); + cv::cvtColor(colored, grey, CV_BGR2GRAY); // get derivative cv::Mat df_dx, df_dy, mag, angle; @@ -371,7 +371,7 @@ struct ChannelStorage float get(const int x, const int y, const int channel, const cv::Rect& area) const { CV_Assert(channel < HOG_LUV_BINS); - const cv::Mat m = hog[channel]; + const cv::Mat& m = hog[channel]; dprintf("feature box %d %d %d %d ", area.x, area.y, area.width, area.height); dprintf("get for channel %d\n", channel); @@ -731,9 +731,6 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector