Opencv Interview Questions
Opencv Interview Questions
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.
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.
Blurring, Smoothing, Distortion, Warp Stabilizer, alpha extract, bilateral, color matrix, chrome hold are few
video filters available 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.
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.
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
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.
Syntax
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.
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.
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.