Update detectormorph.cpp

This commit is contained in:
LordF
2015-02-23 12:58:25 -03:00
committed by Matt Hill
parent 19ef04e7b1
commit 7c90a599f0

View File

@@ -64,20 +64,17 @@ namespace alpr
imshow("Threshold Detector", img_threshold);
}
Mat circularElement = getStructuringElement(cv::MORPH_ELLIPSE, Size(5, 5));
morphologyEx(img_threshold, img_open2, CV_MOP_OPEN, circularElement, cv::Point(-1, -1));
Mat rectElement = getStructuringElement(cv::MORPH_RECT, Size(20, 4));
morphologyEx(img_open2, img_threshold, CV_MOP_CLOSE, rectElement, cv::Point(-1, -1));
if (config->debugShowImages)
{
imshow("Close", img_threshold);
waitKey(0);
}
//Find contours of possibles plates
vector< vector< Point> > contours;
findContours(img_threshold,