Complete the code to apply a Gaussian blur to the image using OpenCV.
blurred = cv2.[1](image, (5, 5), 0)
The GaussianBlur function applies a Gaussian smoothing filter to reduce noise and detail.
Complete the code to apply a median blur with a kernel size of 5.
blurred = cv2.[1](image, 5)
The medianBlur function replaces each pixel with the median of neighboring pixels, useful for removing salt-and-pepper noise.
Fix the error in the code to apply a bilateral filter correctly.
blurred = cv2.bilateralFilter(image, [1], 75, 75)
The diameter of the pixel neighborhood should be a positive odd number like 5 for effective bilateral filtering.
Fill both blanks to create a dictionary with keys as filter names and values as their OpenCV function calls.
filters = {'gaussian': cv2.[1], 'median': cv2.[2]This dictionary maps filter names to their corresponding OpenCV functions for easy access.
Fill all three blanks to apply a bilateral filter with diameter 9, sigmaColor 75, and sigmaSpace 75.
blurred = cv2.bilateralFilter(image, [1], [2], [3])
The bilateral filter requires diameter, sigmaColor, and sigmaSpace parameters. Here diameter=9, sigmaColor=75, sigmaSpace=75.