mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 20:03:15 +08:00
Fixes issue #206 JSON garbage results
This commit is contained in:
@@ -114,9 +114,7 @@ namespace alpr
|
|||||||
|
|
||||||
AlprFullDetails response;
|
AlprFullDetails response;
|
||||||
|
|
||||||
response.results.epoch_time = getEpochTimeMs();
|
int64_t start_time = getEpochTimeMs();
|
||||||
response.results.img_width = img.cols;
|
|
||||||
response.results.img_height = img.rows;
|
|
||||||
|
|
||||||
// Fix regions of interest in case they extend beyond the bounds of the image
|
// Fix regions of interest in case they extend beyond the bounds of the image
|
||||||
for (unsigned int i = 0; i < regionsOfInterest.size(); i++)
|
for (unsigned int i = 0; i < regionsOfInterest.size(); i++)
|
||||||
@@ -159,6 +157,10 @@ namespace alpr
|
|||||||
config->setCountry(config->loaded_countries[i]);
|
config->setCountry(config->loaded_countries[i]);
|
||||||
AlprFullDetails sub_results = analyzeSingleCountry(img, grayImg, warpedRegionsOfInterest);
|
AlprFullDetails sub_results = analyzeSingleCountry(img, grayImg, warpedRegionsOfInterest);
|
||||||
|
|
||||||
|
sub_results.results.epoch_time = start_time;
|
||||||
|
sub_results.results.img_width = img.cols;
|
||||||
|
sub_results.results.img_height = img.rows;
|
||||||
|
|
||||||
aggregator.addResults(sub_results);
|
aggregator.addResults(sub_results);
|
||||||
}
|
}
|
||||||
response = aggregator.getAggregateResults();
|
response = aggregator.getAggregateResults();
|
||||||
|
Reference in New Issue
Block a user