Separated the "segment" function call

This commit is contained in:
Matt Hill
2016-07-03 16:08:06 -04:00
parent bd41ab0cfc
commit 5eaa67749b
3 changed files with 12 additions and 2 deletions

View File

@@ -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()
{

View File

@@ -48,6 +48,8 @@ namespace alpr
CharacterSegmenter(PipelineData* pipeline_data);
virtual ~CharacterSegmenter();
void segment();
int confidence;

View File

@@ -155,6 +155,7 @@ namespace alpr
void TesseractOcr::segment(PipelineData* pipeline_data) {
CharacterSegmenter segmenter(pipeline_data);
segmenter.segment();
}