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

The HOG detector

The Histogram of Oriented Gradients (HOG) is a useful feature that can be used to determine the localized image intensity of an image. This technique can be used to find objects within an image. The localized image gradient information can be used to find similar images. In this example, we will use scikit-image to import the HOG and use it to plot the HOG of our image. You may have to install scikit-image, if it's not already installed, using pip install scikit-image:

from skimage.feature import hogfrom skimage import data, exposurefruit, hog_image = hog(img, orientations=8, pixels_per_cell=(16, 16),cells_per_block=(1, 1), visualize=True, multichannel=True)hog_image_rescaled = exposure.rescale_intensity(hog_image, in_range=(0, ...
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