mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 01:16:50 +08:00
fixed assertion in gpu detector
This commit is contained in:
@@ -53,7 +53,15 @@ namespace alpr
|
|||||||
{
|
{
|
||||||
|
|
||||||
Mat frame_gray;
|
Mat frame_gray;
|
||||||
cvtColor( frame, frame_gray, CV_BGR2GRAY );
|
|
||||||
|
if (frame.channels() > 2)
|
||||||
|
{
|
||||||
|
cvtColor( frame, frame_gray, CV_BGR2GRAY );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frame.copyTo(frame_gray);
|
||||||
|
}
|
||||||
|
|
||||||
vector<PlateRegion> detectedRegions;
|
vector<PlateRegion> detectedRegions;
|
||||||
for (int i = 0; i < regionsOfInterest.size(); i++)
|
for (int i = 0; i < regionsOfInterest.size(); i++)
|
||||||
|
Reference in New Issue
Block a user