Questions

  1. What function should you use if you want to detect contours in a binary image?
  2. What four flags does OpenCV provide for compressing contours?
  3. What function does OpenCV provide to compute image moments?
  4. What moment provides the size of the contour?
  5. What function does OpenCV provide to calculate the seven Hu moment invariants?
  6. What function should you use if you want to get a contour approximation of a given contour?
  7. The extreme_points() function defined in the contour_functionality.py script can be rewritten in a more compact way as explained in this chapter. Therefore, rewrite it accordingly.
  8. What function should you use if you want to match contours using Hu moment invariants as features?