mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-16 18:50:39 +08:00
Checking detection region against mask before allowing it through
This commit is contained in:
@@ -141,7 +141,20 @@ namespace alpr
|
||||
allRegions[i].y = allRegions[i].y + offset_y;
|
||||
}
|
||||
|
||||
vector<PlateRegion> orderedRegions = aggregateRegions(allRegions);
|
||||
// Check the rectangles and make sure that they're definitely not masked
|
||||
vector<Rect> regions_not_masked;
|
||||
for (unsigned int i = 0; i < allRegions.size(); i++)
|
||||
{
|
||||
if (detector_mask.mask_loaded)
|
||||
{
|
||||
if (!detector_mask.region_is_masked(allRegions[i]))
|
||||
regions_not_masked.push_back(allRegions[i]);
|
||||
}
|
||||
else
|
||||
regions_not_masked.push_back(allRegions[i]);
|
||||
}
|
||||
|
||||
vector<PlateRegion> orderedRegions = aggregateRegions(regions_not_masked);
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user