#include
#include
using namespace std;
using namespace cv;
int main(int argc, char** argv) {const char* file = "./12.png";Mat img = imread(file);cvtColor(img, img, CV_BGR2GRAY);threshold(img, img, 150, 255, THRESH_BINARY);imshow("io", img);erode(img, img, getStructuringElement(MORPH_RECT, Size(img.cols/16, 25)));dilate(img, img, getStructuringElement(MORPH_RECT, Size(25, img.rows/16)));namedWindow("img", WINDOW_NORMAL);imshow("img", img);waitKey(0);return 0;
}