OpenCV Gauss, median, mean, bilateral filter

Source: Internet
Author: User

#include"cv.h"#include"highgui.h"#include<iostream>using namespacestd;using namespaceCV;intMainintargcChar*argv[]) {Mat src= Imread ("misaka.jpg");        Mat DST; //the parameters are written sequentially//Gaussian filter//src: Input image//DST: Output image//size (5,5) template sizes, odd//x-Directional Variance//y-Directional VarianceGaussianblur (Src,dst,size (5,5),0,0); Imwrite ("gauss.jpg", DST); //Median filter//src: Input image//DST:: Output image//template width, oddMedianblur (SRC,DST,3); Imwrite ("med.jpg", DST); //mean value filter//src: Input image//DST: Output image//Template Size//Point ( -1,-1): The location of the smoothed points, the center of the core for negative valuesBlur (Src,dst,size (3,3), point (-1,-1)); Imwrite ("mean.jpg", DST); //Bilateral filtering//src: Input image//DST: Entering images//Filter Template Radius//color space Standard deviation//standard deviation of coordinate spaceBilateralfilter (SRC,DST,5,10.0,2.0);//There is no effect of filtering here, do not understandImwrite ("bil.jpg", DST);        Waitkey (); return 0;}

OpenCV Gauss, median, mean, bilateral filter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.