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++

Installing the v4l2 driver

OpenCV libraries can, by default, recognize the USB camera attached to the RPi's USB port, but it cannot directly detect the RPi camera. To recognize our RPi camera, we need to load the v4l2 driver inside the modules file. To open this file, enter the following command inside the Terminal window:

sudo nano /etc/modules

To load the v4l2 driver, add bcm2835-v4l2 inside the following file:

Press Ctrl + O, followed by Enter, to save this file and press Ctrl + X to exit the file, then reboot your RPi. Once rebooted, the RPi camera will be recognized by the OpenCV libraries.

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