0% found this document useful (0 votes)
461 views

Opencv Interview Questions

OpenCV is an open source computer vision and machine learning software library. It contains functions for image processing, video analysis, and more. Some key functions include reading and displaying images using cv2.imread() and cv2.imshow(), edge detection using Sobel filters, and drawing lines using cv2.line(). The Mat class is used to store image data in OpenCV. A variety of linear and non-linear filters can be applied to images, such as blurring, smoothing, dilation, erosion, and more.

Uploaded by

Yogesh Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
461 views

Opencv Interview Questions

OpenCV is an open source computer vision and machine learning software library. It contains functions for image processing, video analysis, and more. Some key functions include reading and displaying images using cv2.imread() and cv2.imshow(), edge detection using Sobel filters, and drawing lines using cv2.line(). The Mat class is used to store image data in OpenCV. A variety of linear and non-linear filters can be applied to images, such as blurring, smoothing, dilation, erosion, and more.

Uploaded by

Yogesh Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

By OnlineInterviewQuestions.

com
OpenCV interview questions

What is OpenCV ?
OpenCV is Open Source Computer Vision Library released under BSD license. Below you find some latest
interview questions and answers on OpenCV.

Q1. What is OpenCV?

OpenCV is Open Source Computer Vision Library released under the BSD license, which is free for both
commercial and academic use.OpenCV provides a programming interface for Python, C, C++, and Java and
supports various platforms like Windows, Linux, iOS, and Android.

Q2. Enlist different types of video filters available in OpenCV ?

Blurring, Smoothing, Distortion, Warp Stabilizer, alpha extract, bilateral, color matrix, chrome hold are few
video filters available in OpenCV.

Q3. What is use of Mat class in OpenCV?

The primary use of the Mat class in OpenCV is to store and obtain the values of any image. This class is used
in representing the n-dimensional array and is utilized in storing data of the image of grayscale or color images,
vector fields, point clouds, voxel volumes and so on. Mat stands for Matrix and is contained in the namespace of
OpenCV. They are represented using a type number of a certain manner.

Q4. How to read and display an image in OpenCV?


The cv2.imread() and cv2.imshow() method is used by the OpenCV to read and show images.

Cv2.imread() - It requires an argument that is the path of the image file. The second option is optional.
They are cv2.IMREAD_COLOR, cv2.IMREAD_GRAYSCALE, cv2.IMREAAD_UNCHANGED and
they define to load a colored image, grayscale image, and load image with the alpha channel. This method
returns the numpy array that contains the pixel values of the image in RGB.
Cv2.imshow() - It accepts two argument. The first is the name of the window where the image should be
displayed and the second argument is the name of the image itself.

Q5. What is use of sobel operation in OpenCV?

The Sobel is a filter in the OpenCV to detect the edge of an image. It detects the edge in both horizontal and
vertical directions.

Syntax

Sobel(src, dst, ddepth, dx, dy)

Here src is the object representing the source of the image. Dst is the object representing the output image.
Ddepth is the variable representing the depth of the image. Dx and dy are variables representing the x & y
derivative.

Q6. Which function is used to draw line in OpenCV ?

The cv2.line() method in the OpenCV is used to draw a line.

Syntax

cv2.line(image, start_point, end_point, color, thickness)

Here the image is the source image where the line should be drawn. Start_point and end_point are the
coordinates for the starting and ending point of the line. They are represented as a tuple value of x & y. color
represents the color for the line. BGR represents the Blue Green Red color values of the line. Thickness
represents the thickness of the line in px.

Q7. Where opencv libraries are installed?

The libraries of the OpenCV are installed in the folder /usr/lib in the ubuntu and directly under the lib folder
present in your OpenCV directory on Windows.

Q8. What is cv_8uc1 in opencv?


cv_8uc1 is an 8-bit single-channel array. It has 2 parts, the depth, and various numbers of channels. There is a
flexible system that is enough to let the users define some new types with up to 215 channels. CV_8UC1 makes
the code more clear that how many numbers of channels is the code is working with. If someone is dealing with
a matrix that contains 10 channels or even more than that, the person needs to specify the number of channels
that will be included.

Q9. Enlist different types of filters available in OpenCV?

The different types of linear and non-linear filter that you can apply to a picture using OpenCV are, BaeColumn
filter, Base filter, BaseRow filter, FilterEngine, Bilateral filter, AdaptiveBilateral Filter, Blur, BorderInterpolate,
BoxFilter, BuildPyramid, copyMakeBorder, createBoxFilter, createDerivFilter, createGuassionFilter,
createLinear filter, createMorphology filter, createSeparableLinear filter, dilate, erode, filter2D, GuassianBlur,
getDerivKernels, getKernelType, getStructuringElement, medianBlur, morphologyEx, Laplacian, pyrDown,
pyrUp, pyrMeanShiftFiltering, sepFilter2D, Smooth, Sobel, Scharr.

Please Visit OnlineInterviewquestions.com to download more pdfs

You might also like