Book Image

Raspberry Pi By Example

By : Arush Kakkar
Book Image

Raspberry Pi By Example

By: Arush Kakkar

Overview of this book

Want to put your Raspberry Pi through its paces right out of the box? This tutorial guide is designed to get you learning all the tricks of the Raspberry Pi through building complete, hands-on hardware projects. Speed through the basics and then dive right in to development! Discover that you can do almost anything with your Raspberry Pi with a taste of almost everything. Get started with Pi Gaming as you learn how to set up Minecraft, and then program your own game with the help of Pygame. Turn the Pi into your own home security system with complete guidance on setting up a webcam spy camera and OpenCV computer vision for image recognition capabilities. Get to grips with GPIO programming to make a Pi-based glowing LED system, build a complete functioning motion tracker, and more. Finally, get ready to tackle projects that push your Pi to its limits. Construct a complete Internet of Things home automation system with the Raspberry Pi to control your house via Twitter; turn your Pi into a super-computer through linking multiple boards into a cluster and then add in advanced network capabilities for super speedy processing!
Table of Contents (22 chapters)
Raspberry Pi By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Morphological transformations on images


Morphological operations are based on image shapes, and they work best on binary images. We can use these to get away with a lot of unwanted information, such as noise in an image. Any morphological operation requires two inputs: image and kernel. In this section, we will explore the erosion, dilation, and gradient of an image. Since binary images are most suitable for explaining this concept, we will use a binary image (black and white) to study the concepts.

Erosion removes the boundaries in the image and slims it. In a binary image, white is the foreground and black is the background. All the pixels at the boundary of the white foreground image are made zero, thus slimming the image and eroding away the boundary. Dilation is exactly opposite of erosion; it expands the foreground image boundary and flattens it. The extent of to erosion and dilation depends on the kernel and the number of iterations. The morphological gradient of an image is the difference...