Filter Images and Videos


In the image process the image filtering is a neighborhood operation in which the value of any given pixel in the output image is determined by applying a certain algorithm to the pixel values ​​in the vicinity of the corresponding input pixel. This technique is commonly used to smooth, sharpen and detect edges of images and videos.


Filtering:
 neighborhood operation 
 pixel
algorithm to the pixel values ​​in the vicinity of the corresponding input pixel.
smooth, sharpen and detect edges of images and videos.

Example Algorithms 


  1. Mean Filter
  2. Weighted Average Filter
  3. Median Filter
  4. Min Filter
  5. Max Filter










































Inbuilt functions:
blur : function
blur(image, image_blurred_with_3x3_kernel, Size(3, 3));
blur(image, image_blurred_with_5x5_kernel, Size(5, 5));

        String window_name = "The Guitar";
String window_name_blurred_with_3x3_kernel = "The Guitar Blurred with 3 x 3 Kernel";
String window_name_blurred_with_5x5_kernel = "The Guitar Blurred with 5 x 5 Kernel";

// Create windows with above names
namedWindow(window_name);
namedWindow(window_name_blurred_with_3x3_kernel);
namedWindow(window_name_blurred_with_5x5_kernel);

// Show our images inside the created windows.
imshow(window_name, image);
imshow(window_name_blurred_with_3x3_kernel, image_blurred_with_3x3_kernel);
imshow(window_name_blurred_with_5x5_kernel, image_blurred_with_5x5_kernel);


Gaussian Filter
Errode


Dilation and Erosion



Comments

Popular posts from this blog

OpenCV Programming 1

Opencv Drawing Functions