opencv形态学操作

morphologyEx
void Demo_1(int, void*)
{
    cvtColor(img1, img_gray1, COLOR_BGR2GRAY);
    //二值化
    threshold(img_gray1, img2, 0, 255, THRESH_BINARY | THRESH_OTSU);
    imshow(win2,img2);

    //形态学操作
    Mat kernel1 = getStructuringElement(MorphShapes::MORPH_RECT, Size(3, 3), Point(-1, -1));
    morphologyEx(img2, img3, MORPH_OPEN, kernel1, Point(-1, -1));
    imshow(win3,img3);
    
}

opencv形态学操作

 

 

 

 

##################

opencv形态学操作

上一篇:Vue报错Cannot read property 'split' of undefined


下一篇:B2018 题解