(Ebook) Raspberry Pi Image Processing Programming: With NumPy, SciPy, Matplotlib and OpenCV, 2nd Edition by Ashwin Pajankar ISBN 9781484282700, 9781484282694, 1484282698, 1484282701 - Download the ebook with all fully detailed chapters
(Ebook) Raspberry Pi Image Processing Programming: With NumPy, SciPy, Matplotlib and OpenCV, 2nd Edition by Ashwin Pajankar ISBN 9781484282700, 9781484282694, 1484282698, 1484282701 - Download the ebook with all fully detailed chapters
com
https://ebooknice.com/product/raspberry-pi-image-processing-
programming-with-numpy-scipy-matplotlib-and-opencv-2nd-
edition-44555732
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebooknice.com/product/raspberry-pi-image-processing-programming-with-
numpy-scipy-matplotlib-and-opencv-44512010
ebooknice.com
(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles, James ISBN
9781459699816, 9781743365571, 9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
ebooknice.com
(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans Heikne, Sanna
Bodemyr ISBN 9789127456600, 9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312
ebooknice.com
(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT II Success) by Peterson's
ISBN 9780768906677, 0768906679
https://ebooknice.com/product/sat-ii-success-math-1c-and-2c-2002-peterson-s-sat-
ii-success-1722018
ebooknice.com
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth Study: the United
States, 1919-41 2nd Edition by Benjamin Harrison ISBN 9781398375147, 9781398375048,
1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044
ebooknice.com
https://ebooknice.com/product/raspberry-pi-image-processing-programming-develop-
real-life-examples-with-python-pillow-and-scipy-50195000
ebooknice.com
(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT Subject Test: Math
Levels 1 & 2) by Arco ISBN 9780768923049, 0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-arco-master-
the-sat-subject-test-math-levels-1-2-2326094
ebooknice.com
https://ebooknice.com/product/raspberry-pi-supercomputing-and-scientific-
programming-mpi4py-numpy-and-scipy-for-enthusiasts-5880908
ebooknice.com
https://ebooknice.com/product/raspberry-pi-computer-vision-programming-55322632
ebooknice.com
Ashwin Pajankar
Apress Standard
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, express or implied, with respect to the material
contained herein or for any errors or omissions that may have been
made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
1. Introduction to Single-Board
Computers and Raspberry Pi
Ashwin Pajankar1
History of SBCs
Dyna-Micro was the first true SBC. It was based on the Intel C8080A
and used Intel’s first EPROM, the C1702A. The Dyna-Micro was
rebranded and marketed by E&L Instruments of Derby, Connecticut, in
1976 as the MMD-1 (Mini-Micro Designer 1). It became famous as the
leading example of a microcomputer. SBCs were very popular in the
earlier days of computing, as many home computers were actually
SBCs. However, with the rise of PCs, the popularity of SBCs declined.
Since 2010, there has been a resurgence in the popularity of SBCs due
to their lower production costs.
Apart from the MMD-1, here are a few other popular historical
SBCs:
The BBC Micro was built around an MOS technology 6502A
processor running at 2MHz.
The Ferguson Big Board II was a Zilog Z80-based computer running
at 4MHz.
The Nascom was another Zilog Z80-based computer.
The Raspberry Pi
The Raspberry Pi is a family of credit card–sized SBCs developed in the
United Kingdom by the Raspberry Pi Foundation. The Raspberry Pi
Foundation was formed by Eben Upton in 2009. The aim in developing
the Raspberry Pi was to promote the teaching of basic computer
science in schools and developing countries by providing a low-cost
computing platform.
Raspberry Pi Foundation’s Raspberry Pi was released in 2012. It
was a massive hit and sold over two million units in two years.
Subsequently, the Raspberry Pi Foundation released revised versions of
the Raspberry Pi. They also released other accessories for the Pi.
More information about the Raspberry Pi Foundation can be found
on their website at https://www.raspberrypi.org.
The product page for Raspberry Pi's current production models and
other accessories can be found at
https://www.raspberrypi.org/products.
I have written, executed, and tested all the code examples in this
book on Raspberry Pi 4 Model B units with 8GB RAM. Table 1-2 lists the
specifications of the Raspberry Pi 4 Model B.
Table 1-2 Specifications of the Raspberry Pi 4 Model B
country=IN
ctrl_interface=DIR=/var/run/wpa_supplicant
GROUP=netdev
update_config=1
network={
scan_ssid=1
ssid="TP-Link_710E"
psk="internet1"
}
Remember to change the SSID and PSK sections with the name
and the password of your Wi-Fi.
Booting Up Raspberry Pi
This is the easiest part. Following these steps:
1) Remove the microSD card from the card reader and insert it into
the microSD card slot of the RPi board.
2) Make sure that the main power switch is in the OFF position at this
point. Connect the RPi to the power supply.
We can see the lights on the RPi board blinking at this point. This
means that the RPi is booting up. Wait for a couple of minutes for the
boot process to complete.
You can find the IP address of your own system with the commands
ipconfig (Windows) or ifconfig (UNIX-like systems). From this
list, we can eliminate all the known devices with known IP addresses. If
there are too many devices attached to the home network, then turn off
the Wi-Fi of all the unnecessary devices. In my case, the IP address of
the RPi board is 192.168.0.100.
On a Windows computer, we can install the Zenmap utility, which is
the graphical interface for the nmap. We can download and install it
from https://nmap.org/zenmap/. It is also available for UNIX-like
systems. Install the utility and open it. It looks as shown in Figure 1-13.
Figure 1-13 Zenmap GUI
We can easily use it. Mention 192.168.0.* in the Target text box.
Mention the command that we used earlier (nmap -sn 192.168.0.*) in
the Command text box. And then click the Scan button. It takes some
time for the scan to finish. Sometimes the scan fails prematurely. In
such cases, keep trying, and it will work after a couple of attempts. It is
all open source and free, so we cannot complain. It produces the result
shown in Figure 1-13 once finished. Sometimes, it also shows the
names of the manufacturers of the connected devices beside their MAC
addresses. This makes it easy to identify the RPi board.
Once we have the IP address of the RPi board, we can log in
remotely. We can use a variety of SSH tools, such as the built-in ssh
utility on UNIX-like operating systems, to remotely log in to the RPi
board. Just run the following command in the terminal emulator of your
operating system:
Keep in mind that this File Explorer utility is running on the RPi.
We are accessing its GUI using X-11 Forwarding. This way, with the
combination of nohup (no hangup) and &, we can launch any GUI
utility from the terminal. & makes sure that the control of the terminal
is returned back to us, and nohup keeps the process running even
when the user logs out.
Configuring Raspberry Pi
Now, type sudo raspi-config in the prompt and press Enter. It
opens the tool raspi-config, which is the configuration tool for the
Raspberry Pi OS. First, update it, as shown in Figure 1-16.
It will take some time to update. Once updated, go to the fifth option
for Localization. It looks as follows (Figure 1-17).
Figure 1-17 Localization
Set all these options as per your choice, and in the main menu
choose Finish. It will ask to reboot. Choose Yes, and it will reboot the
RPi.
The Raspberry Pi OS
An operating system is the set of basic programs and utilities that make
a computer work. It is an interface between the user and the computer.
Raspberry Pi OS is a free operating system based on the popular Linux
distribution Debian. It is optimized for the Raspberry Pi family of SBCs.
It is even ported to the other, similar SBCs like Banana Pro.
This fetches new versions of the packages on the local machine that
are marked for upgrade. It also detects and installs any dependencies. It
also removes obsolete packages.
Doing this regularly will keep the Raspberry Pi OS up to date. After
entering these commands, it will take a while to update the OS, because
these commands fetch the data and the packages from remote
repositories on the internet.
Note The command apt help will list all the options associated
with the APT utility.
sudo shutdown -h
sudo init 0
sudo reboot -h
sudo init 6
Summary
In this chapter, we learned how to set up and access RPi in headless
mode over Wi-Fi. We are comfortable with this part now.
The next chapter will focus on the concepts involved with digital
image processing. We will also write basic programs with Python 3.
Footnotes
1 Image provided by Laserlicht under a CC-by-SA 4.0 license
(https://creativecommons.org/licenses/by-sa/4.0/deed.en)
3 Image provided by Alen under a CC0 1.0 Universal (CC0 1.0) license
(https://creativecommons.org/publicdomain/zero/1.0/)
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2022
A. Pajankar, Raspberry Pi Image Processing Programming
https://doi.org/10.1007/978-1-4842-8270-0_2
Humphrey Fownes took out the dust jacket he'd found in the library.
He held it up and carefully compared the spinning cloud in his
bedroom with the illustration. The cloud rose and spun, assuming
the identical shape of the illustration.
"It's a twister," he said softly. "A Kansas twister!"
"What," MacBride asked, his bravado slipping away again, "what ...
is a twister?"
The twister roared and moved out of the bedroom, out over the rear
of the house toward the side of the dome. "It says here," Fownes
shouted over the roaring, "that Dorothy traveled from Kansas to Oz
in a twister and that ... and that Oz is a wonderful and mysterious
land beyond the confines of everyday living."
MacBride's eyes and mouth were great zeros.
"Is there something I can turn?" Lanfierre asked.
Huge chunks of glass began to fall around them.
"Fownes!" MacBride shouted. "This is a direct order! Make it go
back!"
But Fownes had already begun to run on toward the next house,
dodging mountainous puffs of glass as he went. "Mrs. Deshazaway!"
he shouted. "Yoo-hoo, Mrs. Deshazaway!"
The dome weevils were going berserk trying to keep up with the
precipitation. They whirred back and forth at frightful speed, then,
emptied of molten glass, rushed to the Trough which they quickly
emptied and then rushed about empty-handed. "Yoo-hoo!" he yelled,
running. The artificial sun vanished behind the mushrooming twister.
Optimum temperature collapsed. "Mrs. Deshazaway! Agnes, will you
marry me? Yoo-hoo!"
Lanfierre and Lieutenant MacBride leaned against their car and
waited, dazed.
There was quite a large fall of glass.
*** END OF THE PROJECT GUTENBERG EBOOK A FALL OF GLASS
***
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com