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

Important functions in OpenCV

Before writing any OpenCV program, it is important to understand some of the main functions in OpenCV and the output that these functions can give us. Let's start by looking at the functions:

  • imread(): The imread() function is used to read an image or a video feed from the Pi camera or webcam. Inside the imread() function, we have to provide the location of the image. If the image and program files are in the same folder, we only need to provide the name of the image. However, if the image is stored in a different folder, then we need to provide the complete path of the image inside the imread function. We store the image value from the imread() function inside a matrix (Mat) variable.

If the image and

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