mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 10:50:52 +08:00
Separated the "segment" function call
This commit is contained in:
@@ -39,8 +39,6 @@ namespace alpr
|
||||
|
||||
//CharacterRegion charRegion(img, debug);
|
||||
|
||||
timespec startTime;
|
||||
getTimeMonotonic(&startTime);
|
||||
|
||||
if (pipeline_data->plate_inverted)
|
||||
bitwise_not(pipeline_data->crop_gray, pipeline_data->crop_gray);
|
||||
@@ -54,6 +52,13 @@ namespace alpr
|
||||
cout << "Segmenter: inverted: " << pipeline_data->plate_inverted << endl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CharacterSegmenter::segment() {
|
||||
|
||||
timespec startTime;
|
||||
getTimeMonotonic(&startTime);
|
||||
|
||||
if (this->config->debugCharSegmenter)
|
||||
{
|
||||
displayImage(config, "CharacterSegmenter Thresholds", drawImageDashboard(pipeline_data->thresholds, CV_8U, 3));
|
||||
@@ -209,6 +214,8 @@ namespace alpr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
CharacterSegmenter::~CharacterSegmenter()
|
||||
{
|
||||
|
||||
|
@@ -48,6 +48,8 @@ namespace alpr
|
||||
CharacterSegmenter(PipelineData* pipeline_data);
|
||||
virtual ~CharacterSegmenter();
|
||||
|
||||
void segment();
|
||||
|
||||
int confidence;
|
||||
|
||||
|
||||
|
@@ -155,6 +155,7 @@ namespace alpr
|
||||
void TesseractOcr::segment(PipelineData* pipeline_data) {
|
||||
|
||||
CharacterSegmenter segmenter(pipeline_data);
|
||||
segmenter.segment();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user