Using correct HIstogram class name

This commit is contained in:
Matt Hill
2015-09-20 21:12:07 -04:00
parent 8d765d481d
commit f572827c8a
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ namespace alpr
fillConvexPoly(histogramMask, pipeline_data->textLines[lineidx].linePolygon.data(), pipeline_data->textLines[lineidx].linePolygon.size(), Scalar(255,255,255)); 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) 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 // 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 // Scores the histogram quality as well based on num chars, char volume, and even separation
vector<Rect> CharacterSegmenter::getHistogramBoxes(VerticalHistogram histogram, float avgCharWidth, float avgCharHeight, float* score) vector<Rect> CharacterSegmenter::getHistogramBoxes(HistogramVertical histogram, float avgCharWidth, float avgCharHeight, float* score)
{ {
float MIN_HISTOGRAM_HEIGHT = avgCharHeight * config->segmentationMinCharHeightPercent; float MIN_HISTOGRAM_HEIGHT = avgCharHeight * config->segmentationMinCharHeightPercent;
@@ -283,7 +283,7 @@ namespace alpr
histoImg.at<uchar>(histoImg.rows - columnCount, col) = 255; histoImg.at<uchar>(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) // 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)

View File

@@ -24,7 +24,7 @@
#include "constants.h" #include "constants.h"
#include "binarize_wolf.h" #include "binarize_wolf.h"
#include "utility.h" #include "utility.h"
#include "verticalhistogram.h" #include "histogramvertical.h"
#include "config.h" #include "config.h"
#include "textdetection/textcontours.h" #include "textdetection/textcontours.h"
#include "pipeline_data.h" #include "pipeline_data.h"
@@ -66,7 +66,7 @@ namespace alpr
void removeSmallContours(std::vector<cv::Mat> thresholds, float avgCharHeight, TextLine textLine); void removeSmallContours(std::vector<cv::Mat> thresholds, float avgCharHeight, TextLine textLine);
std::vector<cv::Rect> getHistogramBoxes(VerticalHistogram histogram, float avgCharWidth, float avgCharHeight, float* score); std::vector<cv::Rect> getHistogramBoxes(HistogramVertical histogram, float avgCharWidth, float avgCharHeight, float* score);
std::vector<cv::Rect> getBestCharBoxes(cv::Mat img, std::vector<cv::Rect> charBoxes, float avgCharWidth); std::vector<cv::Rect> getBestCharBoxes(cv::Mat img, std::vector<cv::Rect> charBoxes, float avgCharWidth);
std::vector<cv::Rect> combineCloseBoxes( std::vector<cv::Rect> charBoxes, float avgCharWidth); std::vector<cv::Rect> combineCloseBoxes( std::vector<cv::Rect> charBoxes, float avgCharWidth);