Fix bug in CPU detector when provided an already grayscale image[C

This commit is contained in:
Matt Hill
2015-04-08 17:32:30 -04:00
parent 1b27ad3d83
commit 081863faff

View File

@@ -49,13 +49,14 @@ namespace alpr
{
Mat frame_gray;
if (frame.channels() > 2)
{
cvtColor( frame, frame_gray, CV_BGR2GRAY );
}
else
{
frame_gray = frame;
frame.copyTo(frame_gray);
}