mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 05:00:54 +08:00
detection max width and height were being improperly treated as a fraction rather than a percent
This commit is contained in:
@@ -98,8 +98,10 @@ vector<PlateRegion> RegionDetector::doCascade(Mat frame)
|
|||||||
timespec startTime;
|
timespec startTime;
|
||||||
getTime(&startTime);
|
getTime(&startTime);
|
||||||
|
|
||||||
|
float maxWidth = ((float) w) * (config->maxPlateWidthPercent / 100.0f) * this->scale_factor;
|
||||||
|
float maxHeight = ((float) h) * (config->maxPlateHeightPercent / 100.0f) * this->scale_factor;
|
||||||
Size minSize(config->minPlateSizeWidthPx * this->scale_factor, config->minPlateSizeHeightPx * this->scale_factor);
|
Size minSize(config->minPlateSizeWidthPx * this->scale_factor, config->minPlateSizeHeightPx * this->scale_factor);
|
||||||
Size maxSize(w * config->maxPlateWidthPercent * this->scale_factor, h * config->maxPlateHeightPercent * this->scale_factor);
|
Size maxSize(maxWidth, maxHeight);
|
||||||
|
|
||||||
plate_cascade->detectMultiScale( frame, plates, config->detection_iteration_increase, config->detectionStrictness,
|
plate_cascade->detectMultiScale( frame, plates, config->detection_iteration_increase, config->detectionStrictness,
|
||||||
0,
|
0,
|
||||||
|
Reference in New Issue
Block a user