mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 06:56:49 +08:00
Removed modal image drawing (used for debugging)
This commit is contained in:
@@ -109,8 +109,6 @@ void LicensePlateCandidate::recognize()
|
||||
pipeline_data->textLines.push_back(newLines[i]);
|
||||
|
||||
|
||||
Mat debugImg = pipeline_data->textLines[0].drawDebugImage(pipeline_data->crop_gray);
|
||||
drawAndWait(&debugImg);
|
||||
|
||||
if (config->debugTiming)
|
||||
{
|
||||
|
@@ -478,11 +478,14 @@ TextLineCollection::TextLineCollection(PipelineData* pipelineData) {
|
||||
findCenterVertical();
|
||||
// Center Vertical Line
|
||||
|
||||
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->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2);
|
||||
|
||||
drawAndWait(&debugImage);
|
||||
if (pipelineData->config->debugPlateCorners)
|
||||
{
|
||||
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->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2);
|
||||
|
||||
displayImage(pipelineData->config, "Plate Corner Center lines", debugImage);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns 1 for above, 0 for within, and -1 for below
|
||||
|
@@ -219,7 +219,6 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data)
|
||||
}
|
||||
|
||||
cleanCharRegions(pipeline_data->thresholds, pipeline_data->charRegions);
|
||||
drawAndWait(&pipeline_data->thresholds[0]);
|
||||
|
||||
if (config->debugTiming)
|
||||
{
|
||||
|
@@ -167,12 +167,8 @@ void CharacterAnalysis::analyze()
|
||||
vector<Point> linePolygon = tempTextLines[i].linePolygon;
|
||||
pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon));
|
||||
|
||||
|
||||
cout << "Test1" << endl;
|
||||
Mat debugImage = pipeline_data->textLines[i].drawDebugImage(bestThreshold);
|
||||
|
||||
cout << "Test2" << endl;
|
||||
drawAndWait(&debugImage);
|
||||
}
|
||||
|
||||
cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl;
|
||||
@@ -522,7 +518,6 @@ bool CharacterAnalysis::isPlateInverted()
|
||||
{
|
||||
Mat charMask = getCharacterMask();
|
||||
|
||||
drawAndWait(&charMask);
|
||||
|
||||
Scalar meanVal = mean(bestThreshold, charMask)[0];
|
||||
|
||||
|
@@ -204,7 +204,7 @@ vector<Point> LineFinder::getBestLine(const TextContours contours, vector<CharPo
|
||||
if (bestScore < 0)
|
||||
return bestStripe;
|
||||
|
||||
if (true)
|
||||
if (pipeline_data->config->debugCharAnalysis)
|
||||
{
|
||||
cout << "The winning score is: " << bestScore << endl;
|
||||
// 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, 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) );
|
||||
|
Reference in New Issue
Block a user