I/O and GUI

In this chapter, we will cover the following recipes:

  • Reading images from file
  • Simple image transformations—resizing and flipping
  • Saving images using lossy and lossless compression
  • Showing images in an OpenCV window
  • Working with UI elements, such as buttons and trackbars, in an OpenCV window
  • Drawing 2D primitives—markers, lines, ellipses, rectangles, and text
  • Handling user input from a keyboard
  • Making your app interactive through handling user input from a mouse
  • Capturing and showing frames from a camera
  • Playing frame stream from video
  • Obtaining a frame stream properties
  • Writing a frame stream into video
  • Jumping between frames in video files

Get OpenCV 3 Computer Vision with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.