Removed modal image drawing (used for debugging)

This commit is contained in:
Matt Hill
2014-10-19 20:55:28 -04:00
parent a10e65631c
commit 7038d0b9e5
5 changed files with 10 additions and 15 deletions

View File

@@ -109,8 +109,6 @@ void LicensePlateCandidate::recognize()
pipeline_data->textLines.push_back(newLines[i]); pipeline_data->textLines.push_back(newLines[i]);
Mat debugImg = pipeline_data->textLines[0].drawDebugImage(pipeline_data->crop_gray);
drawAndWait(&debugImg);
if (config->debugTiming) if (config->debugTiming)
{ {

View File

@@ -478,11 +478,14 @@ TextLineCollection::TextLineCollection(PipelineData* pipelineData) {
findCenterVertical(); findCenterVertical();
// Center Vertical Line // Center Vertical Line
if (pipelineData->config->debugPlateCorners)
{
Mat debugImage = Mat::zeros(pipelineData->crop_gray.size(), CV_8U); Mat debugImage = Mat::zeros(pipelineData->crop_gray.size(), CV_8U);
line(debugImage, this->centerHorizontalLine.p1, this->centerHorizontalLine.p2, Scalar(255,255,255), 2); line(debugImage, this->centerHorizontalLine.p1, this->centerHorizontalLine.p2, Scalar(255,255,255), 2);
line(debugImage, this->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2); line(debugImage, this->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2);
drawAndWait(&debugImage); displayImage(pipelineData->config, "Plate Corner Center lines", debugImage);
}
} }
// Returns 1 for above, 0 for within, and -1 for below // Returns 1 for above, 0 for within, and -1 for below

View File

@@ -219,7 +219,6 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data)
} }
cleanCharRegions(pipeline_data->thresholds, pipeline_data->charRegions); cleanCharRegions(pipeline_data->thresholds, pipeline_data->charRegions);
drawAndWait(&pipeline_data->thresholds[0]);
if (config->debugTiming) if (config->debugTiming)
{ {

View File

@@ -167,12 +167,8 @@ void CharacterAnalysis::analyze()
vector<Point> linePolygon = tempTextLines[i].linePolygon; vector<Point> linePolygon = tempTextLines[i].linePolygon;
pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon)); pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon));
cout << "Test1" << endl;
Mat debugImage = pipeline_data->textLines[i].drawDebugImage(bestThreshold); Mat debugImage = pipeline_data->textLines[i].drawDebugImage(bestThreshold);
cout << "Test2" << endl;
drawAndWait(&debugImage);
} }
cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl; cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl;
@@ -522,7 +518,6 @@ bool CharacterAnalysis::isPlateInverted()
{ {
Mat charMask = getCharacterMask(); Mat charMask = getCharacterMask();
drawAndWait(&charMask);
Scalar meanVal = mean(bestThreshold, charMask)[0]; Scalar meanVal = mean(bestThreshold, charMask)[0];

View File

@@ -204,7 +204,7 @@ vector<Point> LineFinder::getBestLine(const TextContours contours, vector<CharPo
if (bestScore < 0) if (bestScore < 0)
return bestStripe; return bestStripe;
if (true) if (pipeline_data->config->debugCharAnalysis)
{ {
cout << "The winning score is: " << bestScore << endl; cout << "The winning score is: " << bestScore << endl;
// Draw the winning line segment // Draw the winning line segment
@@ -215,7 +215,7 @@ vector<Point> LineFinder::getBestLine(const TextContours contours, vector<CharPo
cv::line(tempImg, topLines[bestScoreIndex].p1, topLines[bestScoreIndex].p2, Scalar(0, 0, 255), 2); cv::line(tempImg, topLines[bestScoreIndex].p1, topLines[bestScoreIndex].p2, Scalar(0, 0, 255), 2);
cv::line(tempImg, bottomLines[bestScoreIndex].p1, bottomLines[bestScoreIndex].p2, Scalar(0, 0, 255), 2); cv::line(tempImg, bottomLines[bestScoreIndex].p1, bottomLines[bestScoreIndex].p2, Scalar(0, 0, 255), 2);
drawAndWait(&tempImg); displayImage(pipeline_data->config, "Winning lines", tempImg);
} }
Point topLeft = Point(0, topLines[bestScoreIndex].getPointAt(0) ); Point topLeft = Point(0, topLines[bestScoreIndex].getPointAt(0) );