O'Reilly logo

Mastering BeagleBone Robotics by Richard Grimmett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Finding movement in your vision system

Another interesting behavior of your tracked robot is the ability to find motion. Here is the first part of the code to use the OpenCV library and your webcam to follow motion:

Finding movement in your vision system

The following is the second part of the code to use the OpenCV library and your webcam to follow motion:

Finding movement in your vision system

It is useful to look at the code in detail. This first section of the code is very similar to the setup code you used in the colored object section:

  • #!/usr/bin/env python: This line allows the program to be executed as a regular program. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required