OpenCV (c + +) image processing (Imgproc module)

Source: Internet
Author: User
Tags types of filters

Reference:
1, https://docs.opencv.org/3.2.0/
2. https://github.com/opencv/opencv/Image Processing (imgproc module) images Smoothing

In this tutorial, you will learn how to use the OPENCV function to apply various linear filters to smooth the image, for example: Cv::blur cv::gaussianblur cv::medianblur cv::bilateralfilter theoretical Smoothing, Also known as Blur, is a simple, commonly used image processing operation. There are many reasons for smoothing. In this tutorial, we will focus on smoothing to reduce noise (other uses will be seen in the tutorials below). To perform a smooth operation, we will apply a filter to the image. The most common type of filter is linear, where the output pixel value (i.e. g (i,j) g (I,J)) is determined as the weighted sum of the input pixel value (i.e. F (i+k,j+l) f (i +k,j + L)):
G (I,j) g (i,j) =∑k,lf (i+k,j+l) H (k,l) \sum_{k,l} f (I+k, J+l) H (k,l)
H (k,l) H (k,l) is called the kernel, it is just the coefficient of the filter.
The filter can be visualized as a sliding coefficient window on the image. There are many types of filters, here we will mention the most commonly used: normalized Box Filter is the simplest filter. Each output pixel is the average of its kernel neighbors (all of which contribute with equal weight) the kernel is as follows:
K k = 1kwidth⋅kheight \dfrac{1}{k_{width} \cdot k_{height}}⎡⎣⎢⎢⎢⎢⎢⎢11. 111..111..1...............111

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.