0% found this document useful (0 votes)
14 views16 pages

Introduction to IOT with Machine Learning and Image Processing using Raspberry Pi

This book provides an introduction to using Raspberry Pi for Internet of Things (IoT) applications, focusing on machine learning and image processing. It covers the fundamentals of Raspberry Pi, Python programming, and practical implementations of machine learning and image processing techniques. The authors aim to enhance the usability of Raspberry Pi in various fields, including healthcare, security, and communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views16 pages

Introduction to IOT with Machine Learning and Image Processing using Raspberry Pi

This book provides an introduction to using Raspberry Pi for Internet of Things (IoT) applications, focusing on machine learning and image processing. It covers the fundamentals of Raspberry Pi, Python programming, and practical implementations of machine learning and image processing techniques. The authors aim to enhance the usability of Raspberry Pi in various fields, including healthcare, security, and communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Introduction to IoT with

Machine Learning and


Image Processing using
Raspberry Pi
Introduction to IoT with
Machine Learning and
Image Processing using
Raspberry Pi

Shrirang Ambaji Kulkarni


Varadraj P. Gurupur
Steven L. Fernandes
MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks
does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of
MATLAB® software or related products does not constitute endorsement or sponsorship by The
MathWorks of a particular pedagogical approach or particular use of the MATLAB® software.
First edition published 2020
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
© 2020 Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, LLC
International Standard Book Number-13: 978-1-138-54352-2 (Hardback)
International Standard Book Number-13: 978-1-351-00666-8 (eBook)

Reasonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences of their
use. The authors and publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and
let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com
or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-
750-8400. For works that are not available on CCC please contact [email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Contents

Authors, vii

CHAPTER 1 ■ Introduction 1

CHAPTER 2 ■ Raspberry Pi Unraveled 7

CHAPTER 3 ■ Python and Its Libraries for Machine Learning 19

CHAPTER 4 ■ Machine Learning 81

CHAPTER 5 ■ Introduction to Image Processing 125

BIBLIOGRAPHY, 151

INDEX, 153

v
Authors

Dr. Shrirang Ambaji Kulkarni is a prolific learner, author, and faculty


member with 18-plus years of experience in the field of Computer Science
and Engineering. He is currently working as an Associate Professor at
the National Institute of Engineering in the Department of Computer
Science and Engineering, Mysore, India.

Dr. Varadraj P. Gurupur is an distinguished faculty member and


researcher in the field of Health Informatics. He has authored many
research articles in reputed journals. He is currently working as an
Associate Professor at the University of Central Florida in the Department
of Health Informatics, Florida, USA.

Dr. Steven Lawrence Fernandes is a high-profile researcher in the field


of Image Processing. He is currently working as Post-Doctoral Fellow at
the University of Central Florida in the Department of Computer Science
and Engineering, Florida, USA.

vii
CHAPTER 1

Introduction

I n the last three decades, technology has changed the way we live our
lives. This happens to be a universally accepted truth. In this book, we
attempt to illustrate the use of a new technology that has changed the
world of communication, computing and computing education. Interest-
ingly, the name of this technology coincides with that of a famous dessert
named Raspberry Pie. Raspberry Pi is a single board computer developed
in the United Kingdom. Incidentally, the organization that started this is
known as the Raspberry Pi Foundation. This was first launched in
the year 2012.
By the year 2015, Raspberry Pi had gained wide-scale popularity. One of
the key features of this technology was its size and adaptability. In some
strange ways, Raspberry Pi was the panacea the world of technology was
dreaming of. To build on this idea of a tiny computer, one must consider
the fact that more than a decade ago you would have computer programs
running on desktops wired to electromechanical systems that would use
them. The advent of the Raspberry Pi enables the community of technology
developers to innovate handheld devices than can encompass the power of
regular computers. Our intention in writing this book is twofold: a) we
want to provide a basic understanding of how a Raspberry Pi can be used
for simple applications, and b) we want to provide fundamental informa-
tion on how a Raspberry Pi can be used to advance innovations in machine
learning and image recognition.
While providing fundamental information on Raspberry Pi, we will
help students comprehend the necessary information required to develop

1
2 ■ IoT using Raspberry Pi

applications and devices. These devices and applications can have a wide
range of applications such as networking devices, using devices and
applications related to privacy and security, creating medical applications
and developing sensors. The authors believe that this range of applica-
tions will help the scientific community adapt Raspberry Pi for use in
some of their projects and thereby enhance its usability.
Additionally, the authors are attempting to present information on
how Raspberry Pi can successfully implement machine learning and
image processing. The information presented in this book will help the
community of researchers synthesize new scientific methods, algo-
rithms, devices and other forms of technology into a wide range of
application domains. The authors envision Raspberry Pi advancing the
development of science and technology across various user domains
such as medicine, security, communication, and the military. Last but
not least, it is our attempt to have this book used as study material for
courses teaching students about using Raspberry Pi. It is our under-
standing that Raspberry Pi can be used extensively in healthcare informa-
tion systems.
In this book, the authors present a transformative interdisciplinary
perspective of Raspberry Pi usage. This idea is based on the philosophy of
transformative transdisciplinary perspective presented by the founding
fathers of Society for Design and Process Science [1]. This philosophy is
based on bringing about a positive transformative change to one domain
by making changes or improvements in another. This philosophy is
applicable to Raspberry Pi because rapid improvements in Raspberry Pi
and its applicability will facilitate and create a rostrum for improvements
in all the domains in which this device can be used. One example will be
the implementation of machine learning algorithms that can aid image
processing. In this book, the authors have dwelled on some of the
fundamental programming concepts that are needed for image analysis
and machine learning. This is another very important reason this book is
needed for its targeted audience.
While we engage ourselves in recognizing the importance of the Rasp-
berry Pi, it is also important to note that Raspberry Pi has competitors or
alternatives available in the market. A brief summary of these alternatives is
listed in Table 1.1.
This book is divided into five chapters. The first chapter provides some
introductory material on Raspberry Pi and a brief introduction to the
Introduction ■ 3

TABLE 1.1 A List of Raspberry Pi Alternatives Available as of 2019 [2]


Raspberry Pi Model Brief Description

Odroid XU4 Compatible with a few prominent versions of Linux operating


system and comparable to Raspberry Pi 3
UDOO Bolt Works well with desktop applications
ASUS Tinker Board Works with versions of Linux operating system and Chrome
LattePanda Alpha Unlike many alternatives; supports windows 10 and uses an
Intel Core M3 processor
Banana Pi M64 Works with a wider range of operating systems
RockPro 64 A powerful 64 bit CPU
BeagleBone Black Developed by Texas Instruments in collaboration with
Newark element 14
Libre Computer AML- Suitable for image processing
S905X-CC Le Potato
MinnowBoard Turbot Its small size and affordability make it a viable competitor for
the Raspberry Pi.
Odroid H2 Suitable for game streaming and video applications
Arduino Useful for applications involving robotics

authors. The second chapter explains different types of Raspberry Pis and
provides the reader with important information on the slots and other
necessary elements of the Raspberry Pi. An explanation on these elements
or parts is essential from a usability perspective. It also provides instruc-
tions on installing the operating system Raspbian [3] on Raspberry Pi.
Additionally, it provides some information on peripheral devices and the
ways in which they can be used with the Raspberry Pi.
The importance of using Raspbian dwells in the idea that installing and
using this operating system is a necessary step in the synthesis of systems
and applications. Raspbian is a freely available operating system for the
Raspberry Pi. It is important to note that Raspbian is not affiliated with the
Raspberry Pi Foundation. Raspbian is a community-funded development
effort as was the case in the early days of the Linux operating system.
Interestingly, Raspbian is a Linux distribution built with the Linux operating
system. Raspbian was first released in the year 2012.
The third chapter explains the elements of Python programming [4]
that are essential with respect to using Raspberry Pi. Here the authors
dwell on esoteric programming details that are needed for successful
Raspberry Pi application. These details include matrix operations, Cholesky
4 ■ IoT using Raspberry Pi

decomposition and modifying data frames. It is important to note that


data manipulation and analysis have become critical in today’s world of
artificial intelligence and big data. Raspberry Pi provides the much-
needed hardware for manipulating big data. The authors understand this
need and provide some basic information on the development of systems
for data manipulation using the Raspberry Pi. Chapter 3 contains neces-
sary program snippets with illustrations of expected outcomes. One of the
critical objectives of this illustration is to help the reader with machine
learning application development using the Raspberry Pi. These applica-
tions can be applied to smart phones, wearable devices, farming devices
and other IoT applications.
Chapter 4 dwells on details with respect to programming machine-
learning systems. The authors explore required approaches for splitting
data sets into test and training sets essential for machine learning algo-
rithm implementations. We use health informatics examples to explain
how machine learning can be implemented using the Raspberry Pi. This
chapter provides the reader with necessary information on synthesizing
expert systems, developing knowledge banks and performing knowledge
curation.
Machine learning implementation is explained with several examples,
programing snippets and figures associated with the outcome of their
implementation. Implementation of machine learning is important in
many domains including health informatics, where machine learning
has been extensively used to predict healthcare outcomes and diagnoses
and for genetics and bioinformatics. Machine learning and big data
analytics have been helpful in predicting the early onset of diseases.
Additionally, the possibility of the development of a disease or disorder
later in life can be predicted with the application of bioinformatics
based on the information derived from human genomes. The integra-
tion of Raspberry Pi into portable biomedical devices enhances the
possibility of computation.
Finally, chapter 5 deals with image processing using the Raspberry Pi.
Here the authors provide many program snippets and associated out-
puts, thereby delineating details that are necessary for the reader to use
the device to perform image-processing algorithms. In recent times, it
has been observed that image processing and machine learning associ-
ate well. Thus, the authors provide information on machine learning
and image processing in this book. With the advent of the Raspberry Pi,
Introduction ■ 5

the size of the computational device for image processing is reduced


while at the same time it improved the available computability. This
aids the development and synthesis of real-time sensors in need of
advanced processing.
The authors have extensive experience in research and development
of science and technology. Dr. Shrirang Kulkarni has a Doctoral degree
in Computer Engineering; he started his career in research by exploring
and developing technologies for ad hoc wireless networks. He further
identified other areas of science and technology in which his fundamental
approaches could be used, thereby expanding on the transdisciplinary and
transformative nature of his research. He now works on research projects
that involve using the Raspberry Pi for developing machine learning
techniques for healthcare. Additionally, Dr. Kulkarni has written several
books that have attained national attention in India. It is also important
to mention that he has been involved in teaching engineering students
for the last 18 years.
Dr. Steven Fernandes is a well-accomplished researcher in the area of
Internet of Things (IoT), machine learning, image processing and the
design and development of intelligent systems. He has published more
than 40 articles in reputable journals. Additionally, he has served as
a guest editor for several special issues. Dr. Fernandes has been involved
in teaching engineering students in India and the United States for
about a decade.
Finally, Dr. Varadraj Prabhu Gurupur is currently serving as an
Associate Professor with the Department of Health Management and
Informatics at the University of Central Florida. Dr. Gurupur has more
than 100 publications, including a book, chapters, journal articles,
abstracts, conference papers and published reviews. He has worked on
several projects funded by agencies such as the National Science Foun-
dation and the National Institutes of Health. He has been actively
involved with the Institute of Electrical and Electronic Engineers for
over a decade. Additionally, he has been honored with several national,
regional and state level awards in the United States for his accomplish-
ments in the area of Health Informatics. Dr. Gurupur received his
Master’s in Computer Science in the year 2005 and Doctor of Philoso-
phy in Computer engineering in 2010 from the University of Alabama
at Birmingham.
6 ■ IoT using Raspberry Pi

REFERENCES
[1] Society for Design and Process Science Official Website [Online]. Available:
www.sdpsnet.org/sdps/. Accessed: 09/24/2019.
[2] Electromaker [Online]. Available: www.electromaker.io/blog/article/10-
best-raspberry-pi-alternatives. Accessed: 09/24/2019.
[3] Raspbian [Online]. Available: www.raspbian.org/RaspbianImages
[4] S.A. Kulkarni, Problem Solving and Python Programming, YesDee Publish-
ers, Chennai, India, 2017.
Bibliography

[1]. Derek Molloy, Exploring Raspberry Pi: Interfacing to the Real World with Embedded
Linux, Wiley Publication,United States, 2016.
[2]. Steven Lawrence Fernandes, Raspberry Pi 3 Cookbook for Python Programmers:
Unleash the Potential of Raspberry Pi 3 with Over 100 Recipes, 3rd Edition, Packt
Publications, United Kingdom, 2018.
[3]. Leonard Eddison, Raspberry Pi: A Step by Step Guide for Beginners, CreateSpace
Independent Publishing Platform, 2018.
[4]. Claus Fuhrer, Jan Erik Solem and Olivier Verdier, Scientific Computing with Python 3,
Packt Publications, United Kingdom, 2016.
[5]. Shrirang Ambaji Kulkarni, Problem Solving and Python Programming, yesdee Publica-
tions, India, 2019.
[6]. Andreas C. Müller and Sarah Guido, Introduction to Machine Learning with Python:
A Guide for Data Scientists, 1st Edition, O’Reilly Publication, United States, 2016.
[7]. Sebastian Raschka, Python Machine Learning, Packt Publications, United Kingdom,
2015.
[8]. Peter Harrington, Machine Learning in Action, Manning Publication, 2012.

You might also like