Book Image

OpenCV 3.0 Computer Vision with Java

By : Daniel Lelis Baggio
Book Image

OpenCV 3.0 Computer Vision with Java

By: Daniel Lelis Baggio

Overview of this book

Table of Contents (15 chapters)
OpenCV 3.0 Computer Vision with Java
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Morphological operators


Some image operations are called morphological operations, since they change the shape of an underlying object. We will discuss erosion and dilation, which are some very useful morphological transformations in this section as well as some derived transformations. They usually appear in the context of isolating elements, removing noise, and joining distanced elements in an image.

These operators work through the convolution of a given kernel with the image. This kernel is described with an anchor point, which is the one that is probed against a region of pixels, depending on its shape:

The preceding image shows a bright region on the image, which we will call A. Note that the complement region is completely dark. Our kernel is made of a 3 x 3 block with an anchor at its center, described as B. The C region is the result of applying the erosion morphological transformation over the image. Note that this operation takes place when you scan each pixel of the image, center...