Added config option to bypass detection.

If detection is bypassed, OpenALPR assumes the region provided is already a likely plate region
This commit is contained in:
Matt Hill
2014-12-27 21:40:09 -05:00
parent 5d75ae2990
commit e01919dd3e
4 changed files with 21 additions and 2 deletions

View File

@@ -104,7 +104,21 @@ namespace alpr
}
// Find all the candidate regions
response.plateRegions = plateDetector->detect(img, regionsOfInterest);
if (config->skipDetection == false)
{
response.plateRegions = plateDetector->detect(img, regionsOfInterest);
}
else
{
// They have elected to skip plate detection. Instead, return a list of plate regions
// based on their regions of interest
for (unsigned int i = 0; i < regionsOfInterest.size(); i++)
{
PlateRegion pr;
pr.rect = cv::Rect(regionsOfInterest[i]);
response.plateRegions.push_back(pr);
}
}
queue<PlateRegion> plateQueue;
for (unsigned int i = 0; i < response.plateRegions.size(); i++)