Skip to Content
Learning OpenCV 4 Computer Vision with Python 3 - Third Edition
book

Learning OpenCV 4 Computer Vision with Python 3 - Third Edition

by Joseph Howse, Joe Minichino
February 2020
Intermediate to advanced
372 pages
9h 26m
English
Packt Publishing
Content preview from Learning OpenCV 4 Computer Vision with Python 3 - Third Edition

HPFs and LPFs

An HPF is a filter that examines a region of an image and boosts the intensity of certain pixels based on the difference in the intensity of the surrounding pixels.

Take, for example, the following kernel:

[[ 0,    -0.25,  0   ],[-0.25,  1,    -0.25],[ 0,    -0.25,  0   ]]
A kernel is a set of weights that are applied to a region in a source image to generate a single pixel in the destination image. For example, if we call an OpenCV function with a parameter to specify a kernel size or ksize of 7, this implies that 49 (7 x 7) source pixels are considered when generating each destination pixel. We can think of a kernel as a piece of frosted glass moving over the source image and letting a diffused blend of the source's light pass through.
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

Building Computer Vision Projects with OpenCV 4 and C++

Building Computer Vision Projects with OpenCV 4 and C++

David Millan Escriva, Prateek Joshi, Vinicius G. Mendonca, Roy Shilkrot

Publisher Resources

ISBN: 9781789531619Supplemental Content