# OpenCV Questions and Answers – Curves

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

1. Which SciPy library function is used for interpolation?
a) interpld()
b) interpolate()
c) intplt()
d) intpolate()

Explanation: interpld() is the SciPy library’s function or method that is used for interpolation. interpld() function takes two arrays (x and y coordinates) as arguments and returns a function that interpolates the points.

2. Which of the following are the interpolation techniques available in OpenCV library?
a) INTER_NEAREST, INTER_LINEAR, INTER_AREA, INTER_CUBIC, and INTER_LANCZOS4
b) INTER_NEAREST, INTER_LINEAR, INTER_AREA, and INTER_CUBIC
c) INTER_LINEAR, INTER_AREA, INTER_CUBIC, and INTER_LANCZOS4
d) INTER_NEAREST, INTER_LINEAR, and INTER_LANCZOS4

Explanation: There are five interpolation techniques available in OpenCV library. INTER_NEAREST interpolation, INTER_LINEAR interpolation, INTER_AREA interpolation, INTER_CUBIC interpolation and INTER_LANCZOS4 interpolation.

3. Which OpenCV interpolation technique is sinusoidal?
a) INTER_NEAREST
b) INTER_LANCZOS4
c) INTER_AREA
d) INTER_LINEAR

Explanation: INTER_LANCZOS4 is the OpenCV interpolation technique that is sinusoidal. It works over 8X8 pixel neighborhood. It is the highest quality and highest cost approach among all interpolation techniques in OpenCV library.

4. Curves and channel mixing are dissimilar approach.
a) True
b) False

Explanation: Curves and channel mixing are dissimilar approach. With curves, a channel’s value at a destination pixel is a function of (only) the same channel’s value at the source pixel. We do not define the function directly, instead for each function, we define a set of control points from which the function is interpolated.

5. Which OpenCV interpolation technique is nearest neighbor interpolation?
a) INTER_NEAREST
b) INTER_LANCZOS4
c) INTER_AREA
d) INTER_LINEAR

Explanation: INTER_NEAREST is the OpenCV interpolation technique that uses nearest neighbor interpolation. INTER_NEAREST interpolation is the cheapest interpolation among other interpolation techniques but it produces blocky results.

6. What is the default interpolation technique in OpenCV?
a) INTER_NEAREST
b) INTER_LANCZOS4
c) INTER_AREA
d) INTER_LINEAR

Explanation: INTER_LINEAR is the default interpolation technique used in OpenCV library. It offers a good compromise between cost and quality in real-time applications. It is bilinear interpolation.

7. Interpolation is the process of estimating unknown values that fall between known values.
a) True
b) False

Explanation: Interpolation is the process of estimating unknown values that fall between known values. Interpolation is achieved by using other established values that are located in sequence with the unknown value.

8. Which OpenCV interpolation technique uses pixel area relation?
a) INTER_NEAREST
b) INTER_LANCZOS4
c) INTER_AREA
d) INTER_LINEAR

Explanation: INTER_AREA interpolation technique uses pixel area relation for resampling. It may offer a better compromise between cost and quality when downscaling but produces blocky results when upscaling.

Sanfoundry Global Education & Learning Series – OpenCV.