mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 02:06:57 +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;
|
Mat frame_gray;
|
||||||
|
|
||||||
if (frame.channels() > 2)
|
if (frame.channels() > 2)
|
||||||
{
|
{
|
||||||
cvtColor( frame, frame_gray, CV_BGR2GRAY );
|
cvtColor( frame, frame_gray, CV_BGR2GRAY );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
frame_gray = frame;
|
frame.copyTo(frame_gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user