mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 10:17:02 +08:00
Fixed incorrect character analysis time
This commit is contained in:
@@ -50,13 +50,14 @@ namespace alpr
|
|||||||
|
|
||||||
void CharacterAnalysis::analyze()
|
void CharacterAnalysis::analyze()
|
||||||
{
|
{
|
||||||
|
timespec startTime;
|
||||||
|
getTimeMonotonic(&startTime);
|
||||||
|
|
||||||
pipeline_data->clearThresholds();
|
pipeline_data->clearThresholds();
|
||||||
pipeline_data->thresholds = produceThresholds(pipeline_data->crop_gray, config);
|
pipeline_data->thresholds = produceThresholds(pipeline_data->crop_gray, config);
|
||||||
|
|
||||||
|
timespec contoursStartTime;
|
||||||
|
getTimeMonotonic(&contoursStartTime);
|
||||||
timespec startTime;
|
|
||||||
getTimeMonotonic(&startTime);
|
|
||||||
|
|
||||||
pipeline_data->textLines.clear();
|
pipeline_data->textLines.clear();
|
||||||
|
|
||||||
@@ -69,13 +70,14 @@ namespace alpr
|
|||||||
|
|
||||||
if (config->debugTiming)
|
if (config->debugTiming)
|
||||||
{
|
{
|
||||||
timespec endTime;
|
timespec contoursEndTime;
|
||||||
getTimeMonotonic(&endTime);
|
getTimeMonotonic(&contoursEndTime);
|
||||||
cout << " -- Character Analysis Find Contours Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
cout << " -- Character Analysis Find Contours Time: " << diffclock(contoursStartTime, contoursEndTime) << "ms." << endl;
|
||||||
}
|
}
|
||||||
//Mat img_equalized = equalizeBrightness(img_gray);
|
//Mat img_equalized = equalizeBrightness(img_gray);
|
||||||
|
|
||||||
getTimeMonotonic(&startTime);
|
timespec filterStartTime;
|
||||||
|
getTimeMonotonic(&filterStartTime);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < pipeline_data->thresholds.size(); i++)
|
for (unsigned int i = 0; i < pipeline_data->thresholds.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -87,9 +89,9 @@ namespace alpr
|
|||||||
|
|
||||||
if (config->debugTiming)
|
if (config->debugTiming)
|
||||||
{
|
{
|
||||||
timespec endTime;
|
timespec filterEndTime;
|
||||||
getTimeMonotonic(&endTime);
|
getTimeMonotonic(&filterEndTime);
|
||||||
cout << " -- Character Analysis Filter Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
cout << " -- Character Analysis Filter Time: " << diffclock(filterStartTime, filterEndTime) << "ms." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlateMask plateMask(pipeline_data);
|
PlateMask plateMask(pipeline_data);
|
||||||
@@ -206,7 +208,6 @@ namespace alpr
|
|||||||
this->confidence = 100 - confidenceDrainers;
|
this->confidence = 100 - confidenceDrainers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (config->debugTiming)
|
if (config->debugTiming)
|
||||||
{
|
{
|
||||||
timespec endTime;
|
timespec endTime;
|
||||||
@@ -660,4 +661,4 @@ namespace alpr
|
|||||||
return charArea;
|
return charArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user