From f572827c8ad0741c24dc033bf1dc2102c907879e Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sun, 20 Sep 2015 21:12:07 -0400 Subject: [PATCH] Using correct HIstogram class name --- src/openalpr/segmentation/charactersegmenter.cpp | 6 +++--- src/openalpr/segmentation/charactersegmenter.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openalpr/segmentation/charactersegmenter.cpp b/src/openalpr/segmentation/charactersegmenter.cpp index 383c73b..9196950 100644 --- a/src/openalpr/segmentation/charactersegmenter.cpp +++ b/src/openalpr/segmentation/charactersegmenter.cpp @@ -89,7 +89,7 @@ namespace alpr fillConvexPoly(histogramMask, pipeline_data->textLines[lineidx].linePolygon.data(), pipeline_data->textLines[lineidx].linePolygon.size(), Scalar(255,255,255)); - VerticalHistogram vertHistogram(pipeline_data->thresholds[i], histogramMask); + HistogramVertical vertHistogram(pipeline_data->thresholds[i], histogramMask); if (this->config->debugCharSegmenter) { @@ -203,7 +203,7 @@ namespace alpr // Given a histogram and the horizontal line boundaries, respond with an array of boxes where the characters are // Scores the histogram quality as well based on num chars, char volume, and even separation - vector CharacterSegmenter::getHistogramBoxes(VerticalHistogram histogram, float avgCharWidth, float avgCharHeight, float* score) + vector CharacterSegmenter::getHistogramBoxes(HistogramVertical histogram, float avgCharWidth, float avgCharHeight, float* score) { float MIN_HISTOGRAM_HEIGHT = avgCharHeight * config->segmentationMinCharHeightPercent; @@ -283,7 +283,7 @@ namespace alpr histoImg.at(histoImg.rows - columnCount, col) = 255; } - VerticalHistogram histogram(histoImg, Mat::ones(histoImg.size(), CV_8U)); + HistogramVertical histogram(histoImg, Mat::ones(histoImg.size(), CV_8U)); // Go through each row in the histoImg and score it. Try to find the single line that gives me the most right-sized character regions (based on avgCharWidth) diff --git a/src/openalpr/segmentation/charactersegmenter.h b/src/openalpr/segmentation/charactersegmenter.h index 29376b0..af198e2 100644 --- a/src/openalpr/segmentation/charactersegmenter.h +++ b/src/openalpr/segmentation/charactersegmenter.h @@ -24,7 +24,7 @@ #include "constants.h" #include "binarize_wolf.h" #include "utility.h" -#include "verticalhistogram.h" +#include "histogramvertical.h" #include "config.h" #include "textdetection/textcontours.h" #include "pipeline_data.h" @@ -66,7 +66,7 @@ namespace alpr void removeSmallContours(std::vector thresholds, float avgCharHeight, TextLine textLine); - std::vector getHistogramBoxes(VerticalHistogram histogram, float avgCharWidth, float avgCharHeight, float* score); + std::vector getHistogramBoxes(HistogramVertical histogram, float avgCharWidth, float avgCharHeight, float* score); std::vector getBestCharBoxes(cv::Mat img, std::vector charBoxes, float avgCharWidth); std::vector combineCloseBoxes( std::vector charBoxes, float avgCharWidth);