This set of OpenCV Multiple Choice Questions & Answers (MCQs) focuses on “Basic I/O Scripts – Set 2”.
1. What is the full form of FLV?
a) Flash Video
b) File Video
c) Flash player Video
d) Fedora Video
View Answer
Explanation: The full form of FLV is Flash Video. Flash Video is a container file format which is used to deliver or view video online. The video that is flash video will contain .flv extension. The videos on the YouTube are in flash video format.
2. OpenCV has very limited means of handling window events.
a) True
b) False
View Answer
Explanation: OpenCV has limited means of handling window events like we cannot stop our application when the windows close button is clicked. Different application frameworks can be used to overcoming its limited GUI capabilities and limited event handling.
3. Which function is used to capture the keyboard input in OpenCV?
a) CallBack()
b) namedWindows()
c) setCallback()
d) waitKey()
View Answer
Explanation: The waitKey() function is the OpenCV’s function that takes the keyboard input into the system. The function waits for specified milliseconds for any Keyboard event. If 0 is passed as value in waitKey() it waits indefinitely for a key stroke.
4. In Y’UV color format, the blue projection is defined by which chrominance component?
a) Y
b) U
c) V
d) Y’
View Answer
Explanation: The U chrominance component defines the blue projection in the Y’UV color format, while Y’ define the luma component (the brightness of the image) and the V chrominance component defines the red projections in Y’UV color format.
5. Which of these is not the setMouseCallback()’s event agreement?
a) cv2.cv.CV_EVENT_MOUSEMOVE
b) cv2.cv.CV_EVENT_LBUTTONDOWN
c) cv2.cv.CV_EVENT_FLAG_LBUTTON
d) cv2.cv.CV_EVENT_RBUTTONDOWN
View Answer
Explanation: cv2.cv.CV_EVENT_MOUSEMOVE is an argument that is used for detecting Mouse movement, cv2.cv.CV_EVENT_LBUTTONDOWN detects left button-down movement, cv2.cv.CV_EVENT_RBUTTODOWN detects right button-down movement, while cv2.cv.CV_EVENT_FLAG_LBUTTON is a flags argument not an event argument which detects left button being pressed.
6. What is the full form of FOURCC?
a) four character code
b) five character code
c) Fourier character code
d) Fifteen character code
View Answer
Explanation: FOURCC is short for four character code as it used to identify the codec of the video, compression format, color of the video or pixel format of the video. Sometimes FOURCC is also written as 4CC. Example H264, DIVX, DX50
7. A FOURCC always takes up exactly 40 bits or 5 bytes in a file.
a) True
b) False
View Answer
Explanation: A FOURCC does not takes up exactly 5 bytes or 40 bits in a file. A character in FOURCC (four character code) context is a 1 byte or 8-bit value, thus a FOURCC always takes up exactly 32 bits or 4 bytes in a file.
8. What is the file extension of the video file with FOURCC as motion-JPEG (cv2.cv.CV_FOURCC(‘M’, ’J’, ‘P’, ‘G’))?
a) .ogv
b) .flv
c) .avi
d) .mpeg
View Answer
Explanation: The file extension of video file with FOURCC as motion-JPEG is .avi, .ogv is file extension of video file with FOURCC as Ogg-Vorbis and the file extension for FOURCC as Flash Video is flv.
9. Which of these method or function is used to destroy all of the opened HighGUI windows?
a) destroywindows()
b) destroyAllwinodw()
c) destroyAllWindows()
d) destroyWindow()
View Answer
Explanation: destroyAllWindows() method or function is used to destroy all the opened highGUI (high graphics User Interface) windows, while destroyWindow is used to destroy the specified windows with the given name.
10. Which OpenCV function or method is used to return the trackbar position?
a) getMousePos()
b) getTrackPos()
c) getTrackbarPos()
d) getPosTrackbar()
View Answer
Explanation: getTrackbarPos() function or method is used to return the trackbar position. getTrackbarPos takes two argument trackbarname (name of the trackbar whose position we want to know) and winname (name of the window in which the trackbar is located).
Sanfoundry Global Education & Learning Series – OpenCV.
To practice all areas of OpenCV, here is complete set of Multiple Choice Questions and Answers.