美文网首页
2019-07-13(day033_Laplacian():实现

2019-07-13(day033_Laplacian():实现

作者: 雨住多一横 | 来源:发表于2019-07-13 09:51 被阅读0次

    c++

    #include"all.h"
    using namespace std;
    using namespace cv;
    
    void MyClass::day033() {
        Mat img = read(PATH + "images\\test.jpg");
        imshow("input", img);
    
        Mat dst, blured;
        GaussianBlur(img, blured, Size(3, 3), 0);
        imshow("GuassianBlured", blured);
    
        Laplacian(blured, dst, CV_32F, 1, 1.0, 127.0, BORDER_DEFAULT);
        convertScaleAbs(dst, dst);
    
        imshow("result", dst);
    
        waitKey(0);
    }
    

    c++中新知识点:
    Laplacian():实现Laplacian梯度挖掘,此处用该方法挖掘GaussianBlur模糊后的图像的梯度。

    相关文章

      网友评论

          本文标题:2019-07-13(day033_Laplacian():实现

          本文链接:https://www.haomeiwen.com/subject/ldrpkctx.html