mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-05 23:26:58 +08:00
Fix bug in CPU detector when provided an already grayscale image[C
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user