mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 03:46:59 +08:00
Increased max width for segmentation
This commit is contained in:
@@ -160,7 +160,6 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data)
|
|||||||
cout << " -- Character Segmentation Create and Score Histograms Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
cout << " -- Character Segmentation Create and Score Histograms Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ColorFilter colorFilter(img, charAnalysis->getCharacterMask());
|
|
||||||
vector<Rect> candidateBoxes = getBestCharBoxes(pipeline_data->thresholds[0], allBoxes, medianCharWidth);
|
vector<Rect> candidateBoxes = getBestCharBoxes(pipeline_data->thresholds[0], allBoxes, medianCharWidth);
|
||||||
|
|
||||||
if (this->config->debugCharSegmenter)
|
if (this->config->debugCharSegmenter)
|
||||||
@@ -287,7 +286,7 @@ vector<Rect> CharacterSegmenter::getHistogramBoxes(VerticalHistogram histogram,
|
|||||||
|
|
||||||
vector<Rect> CharacterSegmenter::getBestCharBoxes(Mat img, vector<Rect> charBoxes, float avgCharWidth)
|
vector<Rect> CharacterSegmenter::getBestCharBoxes(Mat img, vector<Rect> charBoxes, float avgCharWidth)
|
||||||
{
|
{
|
||||||
float MAX_SEGMENT_WIDTH = avgCharWidth * 1.55;
|
float MAX_SEGMENT_WIDTH = avgCharWidth * 1.65;
|
||||||
|
|
||||||
// This histogram is based on how many char boxes (from ALL of the many thresholded images) are covering each column
|
// This histogram is based on how many char boxes (from ALL of the many thresholded images) are covering each column
|
||||||
// Makes a sort of histogram from all the previous char boxes. Figures out the best fit from that.
|
// Makes a sort of histogram from all the previous char boxes. Figures out the best fit from that.
|
||||||
|
Reference in New Issue
Block a user