mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 18:22:48 +08:00
Update detectormorph.cpp
This commit is contained in:
@@ -64,20 +64,17 @@ namespace alpr
|
|||||||
imshow("Threshold Detector", img_threshold);
|
imshow("Threshold Detector", img_threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Mat circularElement = getStructuringElement(cv::MORPH_ELLIPSE, Size(5, 5));
|
Mat circularElement = getStructuringElement(cv::MORPH_ELLIPSE, Size(5, 5));
|
||||||
morphologyEx(img_threshold, img_open2, CV_MOP_OPEN, circularElement, cv::Point(-1, -1));
|
morphologyEx(img_threshold, img_open2, CV_MOP_OPEN, circularElement, cv::Point(-1, -1));
|
||||||
Mat rectElement = getStructuringElement(cv::MORPH_RECT, Size(20, 4));
|
Mat rectElement = getStructuringElement(cv::MORPH_RECT, Size(20, 4));
|
||||||
morphologyEx(img_open2, img_threshold, CV_MOP_CLOSE, rectElement, cv::Point(-1, -1));
|
morphologyEx(img_open2, img_threshold, CV_MOP_CLOSE, rectElement, cv::Point(-1, -1));
|
||||||
|
|
||||||
|
|
||||||
if (config->debugShowImages)
|
if (config->debugShowImages)
|
||||||
{
|
{
|
||||||
imshow("Close", img_threshold);
|
imshow("Close", img_threshold);
|
||||||
waitKey(0);
|
waitKey(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Find contours of possibles plates
|
//Find contours of possibles plates
|
||||||
vector< vector< Point> > contours;
|
vector< vector< Point> > contours;
|
||||||
findContours(img_threshold,
|
findContours(img_threshold,
|
||||||
|
Reference in New Issue
Block a user