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