mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 04:36:50 +08:00
Update detectormorph.cpp
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user