Skip to Content
Hands-On Robotics Programming with C++
book

Hands-On Robotics Programming with C++

by Dinesh Tavasalkar
March 2019
Intermediate to advanced
312 pages
7h 37m
English
Packt Publishing
Content preview from Hands-On Robotics Programming with C++

Using the white dot on the face triangle to move the robot

Similar to Chapter 7, Building an Object-Following Robot with OpenCV, we will divide the camera screen into three sections: the left section, the middle section, and the right section. When the white dot is in the left or right section, we will turn the robot left or right, thus tracking the face. Even though I have not resized videofeed, the resolution of videofeed is set to 640 x 480 (a width of 640 and a height of 480).

You can vary the range as per your requirements, but as shown in the following diagram, the left section is set to an x range from 0 to 280, the middle section is set to a range of 280-360, and the right section is set to a range of 360 to 640:

When we move our ...

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

Learn Robotics Programming

Learn Robotics Programming

Danny Staple
C++ Reactive Programming

C++ Reactive Programming

Praseed Pai, Peter Abraham

Publisher Resources

ISBN: 9781789139006Supplemental Content