Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning OpenCV 5 Computer Vision with Python

You're reading from   Learning OpenCV 5 Computer Vision with Python Tackle computer vision and machine learning with the newest tools, techniques and algorithms

Arrow left icon
Product type Paperback
Published in Jul 2025
Publisher Packt
ISBN-13 9781803230221
Length
Edition 4th Edition
Arrow right icon
Authors (2):
Arrow left icon
Joe Minichino Joe Minichino
Author Profile Icon Joe Minichino
Joe Minichino
Joseph Howse Joseph Howse
Author Profile Icon Joseph Howse
Joseph Howse
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

1. Learning OpenCV 5 Computer Vision with Python, Fourth Edition: Tackle tools, techniques, and algorithms for computer vision and machine learning FREE CHAPTER
2. Setting Up OpenCV 3. Handling Files, Cameras, and GUIs 4. Processing Images with OpenCV 5. Detecting and Recognizing Faces 6. Retrieving Images and Searching Using Image Descriptors 7. Building Custom Object Detectors 8. Tracking Objects 9. Camera Models and Augmented Reality 10. Introduction to Neural Networks with OpenCV 11. OpenCV Applications at Scale Appendix A: Bending Color Space with the Curves Filter

Basic I/O scripts

Most CV applications need to get images as input. Most also produce images as output. An interactive CV application might require a camera as an input source and a window as an output destination. However, other possible sources and destinations include image files, video files, and raw bytes. For example, raw bytes might be transmitted via a network connection, or they might be generated by an algorithm, if we incorporate procedural graphics into our application. Let's look at each of these possibilities.

Reading/writing an image file

OpenCV provides the imread function to load an image from a file and the imwrite function to write an image to a file. These functions support various file formats for still images (not videos). The supported formats vary—as formats can be added or removed in a custom build of OpenCV—but normally BMP, PNG, JPEG, and TIFF are among the supported formats.

Let's explore the anatomy of the representation of an image...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime