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

Reading an image using OpenCV

After playing around a little bit with the RPi camera, let's write a simple C++ program using the OpenCV functions to display an image. In this program, we first read an image from a particular folder and then we display this image in a new window:

To display the image, we first need an image. Inside the pi folder, I have created a new folder called Data and inside it, I have copied one image called Car.png. In the same folder, I have created the DisplayImage.cpp file, inside which we are going to write the program to display the image. The DisplayImage.cpp program can be download from the Chapter06 folder of ...

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