OpenCV Questions and Answers – Tracking

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

1. How many bits per channel an image must have?
a) 8
b) 16
c) 14
d) 4
View Answer

Answer: a
Explanation: The image must have 8 bits per channel. The channel contains the value or amount of color to display in the image ranging from 0 to 255. The RGB (Red Green Blue) image contains 3 color channel Red, Green, Blue.

2. What is the value of minNeighbors argument with respect to minimum number of regions that are required in a match?
a) Minimum number of regions + 1
b) Minimum number of regions – 1
c) Minimum number of regions + 2
d) Minimum number of regions + 3
View Answer

Answer: b
Explanation: minNeighbors value is one less than minimum number of regions that are required in a match (i.e. minNeighbors = minimum number of regions – 1). A match may merge neighboring regions.

3. Which of the following is the valid standalone flag and valid combination?
a) cv2.cv.CV_HAAR_SCALE_IMAGE
b) cv2.cv.CV_HAAR_IMAGE
c) cv2.cv.CV_HAAR_SCALE
d) cv2.cv.CV_HAAR_PRUNING
View Answer

Answer: a
Explanation: cv2.cv.CV_HAAR_SCALE_IMAGE is the valid standalone flag and valid combination. Scales each windowed image region to match the feature data. (The default approach is the opposite: scale the feature data to match the window.) Scaling the image allows for certain optimizations on modern hardware.

advertisement
advertisement

4. cv2.cv.CV_HAAR_SCALE_IMAGE flag can be combined with other Flags.
a) True
b) False
View Answer

Answer: b
Explanation: cv2.cv.CV_HAAR_SCALE_IMAGE flag must not be combined with others. This flag scales each windowed image region to match the feature data. (The default approach is the opposite: scale the feature data to match the window.) Scaling the image allows for certain optimizations on modern hardware.

5. Which of the following flag Eagerly rejects regions that contain too many or too few edges to match the object type?
a) cv2.cv.CV_HAAR_SCALE_IMAGE
b) cv2.cv.CV_HAAR_DO_CANNY_PRUNING
c) cv2.cv.CV_HAAR_FIND_BIGGEST_OBJECT
d) cv2.cv.HAAR_DO_ROUGH SEARCH
View Answer

Answer: a
Explanation: cv2.cv.CV_HAAR_DO_CANNY_PRUNING is the flag that eagerly rejects regions that
contain too many or too few edges to match the object type. cv2.cv.CV_HAAR_FIND_BIGGEST_
OBJECT should not be combined with this flag.

6. cv2.cv.CV_HAAR_DO_CANNY_PRUNING flag cannot be combined with the cv2.cv.CV_HAAR_FIND_BIGGEST_OBJECT flag.
a) True
b) False
View Answer

Answer: a
Explanation: cv2.cv.CV_HAAR_DO_CANNY_PRUNING flag eagerly rejects regions that
contain too many or too few edges to match the object type while cv2.cv.CV_HAAR_FIND_BIGGEST_OBJECT flag accepts, at most, one match (the biggest match). So, these flags should not be combined.

7. In cv2.cv.HAAR_DO_ROUGH SEARCH flag what should be the value of minNeighbors argument?
a) >0
b) <0
c) >2
d) <2
View Answer

Answer: a
Explanation: cv2.cv.HAAR_DO_ROUGH SEARCH flag accepts, at most, one match (the biggest) and skips some steps that would refine (shrink) the region of this match. The minNeighbors argument should be greater than 0.
advertisement

8. Which argument separates the window sizes in two successive passes?
a) scaledFactor
b) scalingFactor
c) scaleFactorizer
d) scaleFactor
View Answer

Answer: d
Explanation: scaleFactor is a scaling factor that separates the window sizes in two
successive passes. A higher value improves performance but diminishes robustness with respect to variations in scale.

9. Which OpenCV function is used to equalize the histogram of a grayscale image?
a) equalHist
b) equalizeHistogram
c) equalizeHist
d) equalHistogram
View Answer

Answer: a
Explanation: – equalizeHist is the OpenCV function or method used for equalizing the histogram of a grayscale image. The algorithm normalizes the brightness and increases the contrast of the image.
advertisement

10. Which of the following is True about Image Histogram?
a) It is a graphical representation of the intensity distribution of an image. It quantifies the number of pixels for each intensity value considered.
b) It is a matrix representation of the intensity distribution of an image. It quantifies the number of matrices for each intensity value considered.
c) It is a graphical representation of the contrast distribution of an image. It normalizes the number of pixels for each intensity value considered.
d) It is a graphical representation of the brightness distribution of an image. It quantifies the number of objects for each intensity value considered.
View Answer

Answer: a
Explanation: Image Histogram is a graphical representation of the intensity distribution of an image. It quantifies the number of pixels for each intensity value considered. Histogram Equalization is a method that improves the contrast in an image, in order to stretch out the intensity range.

Sanfoundry Global Education & Learning Series – OpenCV.

To practice all areas of OpenCV, here is complete set of Multiple Choice Questions and Answers.

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.