OpenCV Questions and Answers – Basic I/O Scripts – Set 2

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

Answer: a
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

Answer: a
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

Answer: d
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.
advertisement
advertisement

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

Answer: b
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

Answer: c
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

Answer: a
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

Answer: b
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.
advertisement

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

Answer: c
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

Answer: c
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.
advertisement

10. Which OpenCV function or method is used to return the trackbar position?
a) getMousePos()
b) getTrackPos()
c) getTrackbarPos()
d) getPosTrackbar()
View Answer

Answer: c
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.

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.