Raspberry Pi Computer Vision Programming
eBook - ePub

Raspberry Pi Computer Vision Programming

Design and implement computer vision applications with Raspberry Pi, OpenCV, and Python 3, 2nd Edition

Ashwin Pajankar

  1. 306 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Raspberry Pi Computer Vision Programming

Design and implement computer vision applications with Raspberry Pi, OpenCV, and Python 3, 2nd Edition

Ashwin Pajankar

Book details
Book preview
Table of contents
Citations

About This Book

Perform a wide variety of computer vision tasks such as image processing and manipulation, feature and object detection, and image restoration to build real-life computer vision applications

Key Features

  • Explore the potential of computer vision with Raspberry Pi and Python programming
  • Perform computer vision tasks such as image processing and manipulation using OpenCV and Raspberry Pi
  • Discover easy-to-follow examples and screenshots to implement popular computer vision techniques and applications

Book Description

Raspberry Pi is one of the popular single-board computers of our generation. All the major image processing and computer vision algorithms and operations can be implemented easily with OpenCV on Raspberry Pi. This updated second edition is packed with cutting-edge examples and new topics, and covers the latest versions of key technologies such as Python 3, Raspberry Pi, and OpenCV. This book will equip you with the skills required to successfully design and implement your own OpenCV, Raspberry Pi, and Python-based computer vision projects.

At the start, you'll learn the basics of Python 3, and the fundamentals of single-board computers and NumPy. Next, you'll discover how to install OpenCV 4 for Python 3 on Raspberry Pi, before covering major techniques and algorithms in image processing, manipulation, and computer vision. By working through the steps in each chapter, you'll understand essential OpenCV features. Later sections will take you through creating graphical user interface (GUI) apps with GPIO and OpenCV. You'll also learn to use the new computer vision library, Mahotas, to perform various image processing operations. Finally, you'll explore the Jupyter Notebook and how to set up a Windows computer and Ubuntu for computer vision.

By the end of this book, you'll be able to confidently build and deploy computer vision apps.

What you will learn

  • Set up a Raspberry Pi for computer vision applications
  • Perform basic image processing with libraries such as NumPy, Matplotlib, and OpenCV
  • Demonstrate arithmetical, logical, and other operations on images
  • Work with a USB webcam and the Raspberry Pi Camera Module
  • Implement low-pass and high-pass filters and understand their applications in image processing
  • Cover advanced techniques such as histogram equalization and morphological transformations
  • Create GUI apps with Python 3 and OpenCV
  • Perform machine learning with K-means clustering and image quantization

Who this book is for

This book is for beginners as well as experienced Raspberry Pi and Python 3 enthusiasts who are looking to explore the amazing world of computer vision. Working knowledge of the Python 3 programming language is assumed.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Raspberry Pi Computer Vision Programming an online PDF/ePUB?
Yes, you can access Raspberry Pi Computer Vision Programming by Ashwin Pajankar in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Medios digitales. We have over one million books available in our catalogue for you to explore.

Information

Year
2020
ISBN
9781800201026

Chapter 1: Introduction to Computer Vision and the Raspberry Pi

OpenCV is a simple and powerful programming framework for computer vision. It is preferred by both novices and experts in the field of computer vision. We can easily learn computer vision by writing OpenCV programs using Python 3 as the programming language. The Raspberry Pi family of single-board computers uses Python as its preferred development language. Using a Raspberry Pi board and Python 3 for learning OpenCV programming is one of the best approaches that we can follow to commence our wonderful journey into the amazing field of computer vision programming. In this chapter, you will become familiar with all of the important concepts that you need in order to get started with the Raspberry Pi and computer vision. By the end of this chapter, you will be able to set up the Raspbian Operating System (OS) on various Raspberry Pi board models. You will also learn how to connect the boards to the internet.
In this chapter, we will cover the following topics:
  • Understanding computer vision
  • Single-board computers
  • The Raspberry Pi family of single-board computers
  • Setting up the Raspbian OS on a Raspberry Pi
  • Connecting various Pi board models to the internet with LAN or Wi-Fi
By the end of this chapter, you will be able to set up your own Raspberry Pi board.

Understanding computer vision

The field of computer vision is a combination of different fields, including (but not limited to) computer science, mathematics, and electrical engineering. It includes ways to capture, process, and analyze images and videos from the real world in order to assist in decision making. Computer vision means mimicking biological (that is, human and non-human) vision. The end goal of most computer vision systems is to extract useful information from still images and videos (including prerecorded videos and live feeds) for the purpose of decision making. Biological vision systems work in a similar fashion. Additionally, unlike biological vision, computer vision can also acquire and work with images from the visual spectrum that are not visible to biological entities, for example, infrared and depth images.
Computer vision also relates to the area of extracting information from captured images and videos. A computer vision system may accept various types of data, such as images, videos, and live video streams, as inputs to further process, analyze, and extract meaningful information for the purpose of making important decisions.
The fields of artificial intelligence, machine vision, and computer vision overlap and share many topics, such as image processing, pattern recognition, and machine learning, as depicted in the following diagram:
Figure 1.1 – The relationships between different scientific domains
Figure 1.1 – The relationships between different scientific domains
In order to work as a researcher in the area of computer vision, you need to have a solid background and understanding of mathematics. However, to write programs for computer vision using OpenCV and Python 3, you don't need to know a lot of mathematics. Note that, in this book, you will be learning all of the mathematical and theoretical concepts required to get started with image processing and computer vision.
The typical objectives of a computer vision system could be one or more of the following:
  • The recognition of objects, the classification of visual detection, and an analysis of motion
  • The reconstruction of scenes using images
  • Image denoising and restoration
Do not get stressed if you are unfamiliar with these key terms. We will explore and implement many of these concepts throughout our journey.

OpenCV

OpenCV (also known as Open Source Computer Vision) is an open source library for computer vision and machine learning. It has many functionalities for image processing and computer vision. It is a cross-platform library, and it works with many programming languages and OSes. It has a large collection of computer vision and machine learning-related functions. It also has several Graphical User Interface (GUI) and event handling features.
OpenCV is free for academic and commercial usage as it is under the Berkley Software Distribution (BSD) license. It is written with the C++ programming language. It has interfaces for most of the popular programming languages, including (but not limited to) C/C++, Python, and Java. It runs on a variety of OSes, including Windows, Android, Linux, macOS, and other Unix-like OSes. In this book, we will write computer vision-related programs with OpenCV and Python 3.
The library has more than 2,500 optimized algorithms for machine learning and computer vision tasks. It has a community of more than 47,000 computer vision professionals, and it has been downloaded more than 18 million times. OpenCV is extensively used in academics for teaching, research organizations, government organizations, and various industry segments. Reputed able organizations such as Google, Yahoo, Microsoft, Intel, IBM, S...

Table of contents