Mean filter + Gaussian smoothing + median filter + anisotropic filtering

Source: Internet
Author: User

51CTO Explanation:
Mean value filter: http://book.51cto.com/art/201504/474128.htm
Gaussian Smoothing: http://book.51cto.com/art/201504/474129.htm
Median filter: http://book.51cto.com/art/201504/474130.htm
Anisotropic filtering: http://book.51cto.com/art/201504/474131.htm

Demo Address:
Mean value filter: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageConvolve/
Gaussian Smoothing: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageGaussianSmooth/
Median filter: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageHybridMedian2D/
Anisotropic filtering: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageAnisotropicDiffusion2D/

Mean filter Key code:

  vtksmartpointer<vtkimageconvolve> convolvefilter =
    vtksmartpointer<vtkimageconvolve>::new ();
  Convolvefilter->setinputconnection (Source->getoutputport ());
  Double Kernel[9] = {1,1,1,1,1,1,1,1,1};
  CONVOLVEFILTER->SETKERNEL3X3 (kernel);
  Convolvefilter->update ();

Effect Diagram:

Gaussian smoothing Key code:

  vtksmartpointer<vtkimagegaussiansmooth> Gaussiansmoothfilter = 
    vtksmartpointer< Vtkimagegaussiansmooth>::new ();
  Gaussiansmoothfilter->setinputconnection (Source->getoutputport ());
  Gaussiansmoothfilter->update ();

Effect Diagram:

Median filter Key code:

  vtksmartpointer<vtkimagehybridmedian2d> Hybridmedian =
    vtksmartpointer<vtkimagehybridmedian2d>:: New ();
  Hybridmedian->setinputconnection (Reader->getoutputport ());

Effect Diagram:

Anisotropic filtering Key code:

  vtksmartpointer<vtkimageanisotropicdiffusion2d> diffusion =
    vtksmartpointer< Vtkimageanisotropicdiffusion2d>::new ();
  Diffusion->setinputconnection (Reader->getoutputport ());
  Diffusion->setnumberofiterations (iterations);
  Diffusion->setdiffusionthreshold (threshold);
  Diffusion->update ();

Effect Diagram:

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.