OpenCV Questions and Answers – Types of Filters and Channel

This set of OpenCV Multiple Choice Questions & Answers (MCQs) focuses on “Types of Filters and Channel”.

1. Which of the following is TRUE about channel mixing?
a) Channel mixing is a simple technique for remapping colors
b) Channel mixing is a simple technique for capturing frame of the video
c) Channel mixing is a simple technique for removing audio from video
d) Channel mixing is a simple technique for remapping audio
View Answer

Answer: a
Explanation: Channel Mixing is simple technique for remapping colors. It is a simple technique or method that allows us to change the color of any element from the image to any other color under the color range provided.

2. Which of them is NOT a blurring technique in OpenCV?
a) Averaging
b) Gaussian Filtering
c) Median Filtering
d) Mode Filtering
View Answer

Answer: d
Explanation: Mode Filtering is not a blurring technique provided by OpenCV. Averaging, Median filtering, Gaussian filtering and Bilateral filtering are the techniques that are provided by OpenCV for blurring or smoothing the image.

3. Which OpenCV method or function is used for Median Filtering?
a) cv2.medianBlur()
b) cv2.medianFilter()
c) cv2.mediansmooth()
d) cv.bilateralBlur()
View Answer

Answer: a
Explanation: cv2.medianBlur() function is used for Median Filtering. Cv2.medianBlur() computes the median of all the pixels under the kernel window and the central pixel is replaced with this median value. The kernel size must be a positive odd integer.

advertisement

4. A High Pass Filter helps in removing noise or blurring the image.
a) True
b) False
View Answer

Answer: b
Explanation: A Low pass filter (LPF) helps in removing noise from the image or blurring the image, while A high Pass Filter helps in finding edges in an image. Low pass filters attenuate the high frequency, while High Pass Filter attenuates the low frequency.

5. Which OpenCV method or function is used for Averaging Blur Filtering technique?
a) cv2.blurfilter()
b) cv2.averageblur()
c) cv2.blur()
d) cv2.bluraverage()
View Answer

Answer: c
Explanation: cv2.blur() is the function used for averaging Blur Filtering technique. It is done convolving the image with a normalized box filter. It simply takes the average of all the pixels under kernel area and replaces the central element with this average.

6. Bilateral Filtering preserves the edges in the image while removing the noise from the image.
a) True
b) False
View Answer

Answer: a
Explanation: Bilateral Filtering technique is highly effective at noise removal while preserving the edges. The operation performed by bilateral filtering are slower compared to other filters. The Bilateral filter also uses a Gaussian filter in the space domain.

7. Which OpenCV method or function is used for Gaussian Filtering technique?
a) cv2.GaussianBlur()
b) cv2.Gaussian()
c) cv2.GaussianFilter()
d) cv2.Boxfilter()
View Answer

Answer: a
Explanation: cv2.GaussianBlur() is the OpenCV method used for Gaussian Filtering. It uses a Gaussian Kernel. We specify the width and the height of the kernel which should be positive and odd. Gaussian filtering is highly effective in removing Gaussian noise from the image.

8. Which of the following statement is correct about kernel in OpenCV?
a) Kernel is also known as convolution matrix in OpenCV
b) Kernel is also known as Filtering matrix in OpenCV
c) Kernel is also Known as Normalized matrix in OpenCV
d) Kernel is also known as Mixing Matrix in OpenCV
View Answer

Answer: a
Explanation: Kernel is also known as convolution matrix in OpenCV. Kernel or convolution matrix mixes up or convolutes the pixels in the region. Kernel is a set of weights, which determine how each output pixel is calculated from a neighborhood of input pixels.

9. Which OpenCV function is used to remove Salt and pepper noise from the image?
a) Median Filtering
b) Averaging
c) Bilateral Filtering
d) Gaussian Filtering
View Answer

Answer: a
Explanation: Median Filtering is the best function to remove Salt and pepper noises from the image. Median Filtering is a non- linear filtering method. Instead of using a product or sum of neighborhood pixel values, Median filter computes a median value of the region.
advertisement

10. Which OpenCV method or function is used for Bilateral Filtering technique?
a) cv2.bilateral()
b) cv2.bilateralFilter()
c) cv2.boxbilateral()
d) cv2.bilateralbox()
View Answer

Answer: b
Explanation: cv2.bilateralFilter() is the method or function used for Bilateral Filtering. Bilateral Filtering is a highly effective technique for noise removal from the image, while preserving the edges or sharpness of the image.

Sanfoundry Global Education & Learning Series – OpenCV.

To practice all areas of OpenCV, here is complete set of Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.