opencv3.2.0圖像處理之均值濾波blur API函數


##1.均值濾波:blur函數 ##函數原型 : void blur(InputArray src,OutArray dst,Size ksize,Point anchor=point(-1,-1),int borderType=BORDER_DEFAULT) (參數詳解同boxFilter函數) /**********新建Qt控制台程序************/ #include <QCoreApplication> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream>
using namespace std; using namespace cv; int main() { Mat srcImage=imread("Valley_logo.jpg");//讀入原圖
 namedWindow("均值濾波[原圖]"); namedWindow("均值濾波[效果圖]"); imshow("均值濾波[原圖]",srcImage); //進行均值濾波操作
 Mat dstImage; blur(srcImage,dstImage,Size(5,5)); //顯示效果圖
    imshow("均值濾波[效果圖]",dstImage); waitKey(0); return 0; }

 

                            效果圖


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM