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
- Mean Filter
- Weighted Average Filter
- Median Filter
- Min Filter
- 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
Comments
Post a Comment