Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Detecting a bounding box

This method essentially consists of understanding the characteristics of an image and its various classes and developing methods to classify the image class.

Note that the OpenCV method does not involve any training. For every contour, we define a bounding box using the OpenCV boundingRect property.

We will be using two important characteristics to select the bounding box:

  • The size of the region of interest: We will eliminate all contours with a size that is less than 20.
Note that 20 is not a universal number, it just works for this image. For a larger image, the value can be larger.
  • The color of the region of interest: Within each bounding box, we need to define the region of interest from 25% to 75% of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content