mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 07:16:56 +08:00
Fixed issue for plate detection when using empty ROI
This commit is contained in:
@@ -81,8 +81,6 @@ namespace alpr
|
||||
timespec startTime;
|
||||
getTime(&startTime);
|
||||
|
||||
if (regionsOfInterest.size() == 0)
|
||||
regionsOfInterest.push_back(cv::Rect(0, 0, img.cols, img.rows));
|
||||
|
||||
AlprFullDetails response;
|
||||
|
||||
@@ -218,6 +216,11 @@ namespace alpr
|
||||
|
||||
if (config->debugGeneral && config->debugShowImages)
|
||||
{
|
||||
for (unsigned int i = 0; i < regionsOfInterest.size(); i++)
|
||||
{
|
||||
rectangle(img, regionsOfInterest[i], Scalar(0,255,0), 2);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < response.plateRegions.size(); i++)
|
||||
{
|
||||
rectangle(img, response.plateRegions[i].rect, Scalar(0, 0, 255), 2);
|
||||
@@ -494,4 +497,5 @@ namespace alpr
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user