mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 00:02:52 +08:00
Added negative width/height checking to expandedRegion
This commit is contained in:
@@ -46,7 +46,11 @@ namespace alpr
|
||||
expandedRegion.width = maxX - expandedRegion.x;
|
||||
if (expandedRegion.y + expandedRegion.height > maxY)
|
||||
expandedRegion.height = maxY - expandedRegion.y;
|
||||
|
||||
if (expandedRegion.width < 0)
|
||||
expandedRegion.width = 0;
|
||||
if (expandedRegion.height < 0)
|
||||
expandedRegion.height = 0;
|
||||
|
||||
return expandedRegion;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user