Book Image

OpenCV Essentials

Book Image

OpenCV Essentials

Overview of this book

Table of Contents (15 chapters)
OpenCV Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using OpenCV's highgui module


The highgui module has been designed to provide an easy way to visualize the results and try the functionality of developed applications with OpenCV. As we saw in the previous chapter, this module supplies functions to perform the following operations:

  • Reading images and videos from files and live cameras (imread) through a VideoCapture object.

  • Writing images and videos from memory to disk (imwrite) through a VideoWriter object.

  • Creating a window that can display images and video frames (namedWindow and imshow).

  • Fetching and handling events when a key is pressed (waitKey).

Of course, the module contains more functions to enhance the user interaction with the software applications. Some of them will be explained in this chapter. In the following tbContrast code example, we can read an image file and two windows are created: the first one shows the original image and the other is the resulting image after increasing or decreasing the contrast to the original image...