Book Image

BeagleBone: Creative Projects for Hobbyists

By : Rodolfo Giometti, Charles A. Hamilton, Richard Grimmett
Book Image

BeagleBone: Creative Projects for Hobbyists

By: Rodolfo Giometti, Charles A. Hamilton, Richard Grimmett

Overview of this book

BeagleBone is a microboard PC that runs Linux. It can connect to the Internet and run OSes such as Android and Ubuntu. You can transform this tiny device into a brain for an embedded application or an endless variety of electronic inventions and prototypes. This Learning Path starts off by teaching you how to program the BeagleBone. You will create introductory projects to get yourselves acquainted with all the nitty gritty. Then we’ll focus on a series of projects that are aimed at hobbyists like you and encompass the areas of home automation and robotics. With each project, we’ll teach you how to connect several sensors and an actuator to the BeagleBone Black. We’ll also create robots for land, sea, and water. Yes, really! The books used in this Learning Path are: 1. BeagleBone Black Cookbook 2. BeagleBone Home Automation Blueprints 3. Mastering BeagleBone Robotics
Table of Contents (6 chapters)

Chapter 4. Vision and Image Processing

Now that your tracked platform can move around, you'll want to add a more complex sensor to provide information to it—the webcam. Using a webcam, you can allow your robot to see its environment. You'll learn how to use a powerful open source software platform called OpenCV to add powerful vision algorithms to your robotic platform.

In this chapter, you will be doing the following:

  • Connecting a webcam
  • Learning image processing using OpenCV
  • Discovering edge detection for barrier finding
  • Adding color and motion detection for targeting

Connecting a webcam to the BeagleBone Black

In order to enable computer vision, you'll need to connect a USB web camera to the USB port. Most standard USB webcams will work. This example uses a Logitech HD 720.

Here are the steps:

  1. Check if your USB webcam is connected. You'll do this using a program called guvcview. Install this by typing sudo apt-get install guvcview.
  2. Connect your USB camera and...