OpenCV Questions and Answers – 2D Convolution

This set of OpenCV Multiple Choice Questions & Answers (MCQs) focuses on “2D Convolution”.

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

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

2. Which of these is not a blurring technique in Open Computer Vision library?
a) Mode Filtering
b) Gaussian Filtering
c) Median Filtering
d) Averaging Filtering
View Answer

Answer: a
Explanation: Mode Filtering is not a blurring technique provided by OpenCV library. Averaging, Median filtering, Gaussian filtering, Bilateral filtering are the only techniques 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 in OpenCV library. 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
advertisement

4. Which of the following is correct about convolution (Mathematically)?
a) Convolution is a mathematical operation on two functions (f and g) that produces a third function (h), which is function (f*g) expressing how the shape of one is modified by the other
b) Convolution is a mathematical operation on two functions (f and g) that shows similarity between two function
c) Convolution is a mathematical operation on two functions (f and g) that that shows difference between two function
d) Convolution is a mathematical operation on same functions (f and f) that produces a inverse of a function (f’)
View Answer

Answer: a
Explanation: A convolution is a mathematical operation on two functions (f and g) that produces a third function (h), which is function (f*g) expressing how the shape of one is modified by the other.

5. Which OpenCV library 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. The function simply takes the average of all the pixels under kernel area and replaces the central element with this average.

6. Blurring refers to averaging the pixel values within a neighborhood. This is also called a low pass filter.
a) True
b) False
View Answer

Answer: a
Explanation: Blurring refers to averaging the pixel values within a neighborhood. This is also called a low pass filter. A low pass filter is a filter that allows low frequencies and blocks higher frequencies.

7. Which effect is caused by distortion or loss of high frequency information in image?
a) Gibbs phenomenon/Ringing Effect
b) Gilbert phenomenon
c) Hobbs phenomenon
d) Shaw phenomenon
View Answer

Answer: a
Explanation: Ringing effect is the effect that is caused by distortion or loss of high frequency information in image. Ringing Effect is also known as Gibbs phenomenon in mathematical methods of image processing is the annoying effect in images and video appeared as rippling artifact near sharp edges.
advertisement

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.

11. What does frequency mean in an image?
a) Frequency refers to the rate of change of kernel values
b) Frequency refers to the rate of change of pixel values
c) Frequency refers to the rate of change of edge ratio
d) Frequency refers to the rate of change of width of the image
View Answer

Answer: b
Explanation: Frequency refers to the rate of change of pixel values or Frequency means the rate of change of intensity per pixel. If it takes many pixels to undergo that change, then it is low frequency. The fewer the pixels it takes to represent that intensity variation, the higher the frequency.

12. Which theorem is used to established relationship between the spatial domain and the frequency domain?
a) Convolution theorem
b) correlation theorem
c) Discrete theorem
d) Fourier theorem
View Answer

Answer: a
Explanation: The relationship between the spatial domain and the frequency domain can be established by convolution theorem. It can be stated as the convolution in spatial domain is equal to filtering in frequency domain and vice versa.

13. Which of the following statement is TRUE about kernel size in 2D convolution?
a) Size of kernel matrix is always 5 times bigger than size of image matrix
b) Size of kernel matrix is always 5 times smaller than size of image matrix
c) Size of kernel matrix is always less than the size of image matrix (size not fixed)
d) Size of kernel matrix is always greater than the size of image matrix (size not fixed)
View Answer

Answer: c
Explanation: The size of kernel matrix is always less than the size of image matrix (size not fixed). In object recognition and such, usually small kernel sizes are used and spatial coherency is established in later layers after several pooling layers.

14. What is the sum of the values in derivative mask?
a) 2
b) 3
c) 0
d) 1
View Answer

Answer: c
Explanation: A derivative mask have positive and as well as negative values and the sum of all the values in a derivative mask is equal to zero. As the size of the mask grows, more edge content is increased. The edge content is increased by a derivative mask.

15. What is the sum of all the values in Blurring Mask?
a) 2
b) 3
c) 0
d) 1
View Answer

Answer: d
Explanation: All the values in blurring masks are positive and the sum of all the values is equal to 1. As the size of the mask grow, more smoothing effect will take place. The edge content is reduced by using a blurring mask.

16. What is the other name of ringing effect?
a) Gibbs phenomenon
b) Gilbert phenomenon
c) Hobbs phenomenon
d) Shaw phenomenon
View Answer

Answer: a
Explanation: Ringing effect is also known as Gibbs phenomenon in mathematical methods of image processing is the annoying effect in images and video appeared as rippling artifact near sharp edges.

17. Which OpenCV library 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 library 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.

Sanfoundry Global Education & Learning Series – OpenCV.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.