Chapter 2 Intro To Raspberry Pi
Chapter 2 Intro To Raspberry Pi
PI
Presented
by: Group 2
INRODUCTION TO RASPBERRY PI
• Raspbian Overview
• Raspbian is the official OS for Raspberry Pi, now called Raspberry Pi OS.
• It's a Debian-based Linux OS, optimized for Raspberry Pi hardware.
• Comes in Lite, Desktop, and Full versions.
• OpenCV Overview
• OpenCV (Open Source Computer Vision Library) is a powerful library for real-
time computer vision and image processing.
• Written in C++, with bindings for Python, Java, etc.
• Used for face detection, object tracking, image filtering, and more.
RASPBIAN WITH OPEN CV
Installation on Raspbian
• There are two main ways to install OpenCV:
• Typical Applications
• Face/object detection using Haar cascades or DNNs
• Video capture via Pi Camera or USB webcams
• Image processing (filters, edge detection, etc.)
• Motion detection and surveillance
• Camera Integration
• Use the PiCamera module or OpenCV's cv2.VideoCapture(0) for
USB/webcam.
• For the Pi Camera, libcamera is now preferred over legacy raspi still.
THE “HARD” WAY
• If you have a BitTorrent client installed, click Download Torrent. This is much
faster than downloading the zip file.
1. Navigate to www.raspberrypi.org/downloads/.
2. Click the Raspbian image.
3. Select the Raspbian flavor that you want to install.
4. Once the download is complete, decompress the file somewhere that you'll
easily find it.
5. Download and install Win32. Disk Imager. This allows you to write the image
file that you just downloaded to the micro SD card. You can get it at
https://sourceforge.net/projects/win32diskimager/.
STEPS IN INSTALLING RAPSBERRY PI:
6. Optionally, you may also want to download SDFormatter to make sure that
your SD card is properly prepared. You can get it at
www.sdcard.org/downloads/formatter 4/.
7. Insert your micro SD card into the card reader connected to your computer.
8. If you have downloaded and installed SDFormatter, open it. You should see a
dialog box similar to the one shown in Figure 2-2.
STEPS IN INSTALLING RAPSBERRY PI:
9. Make sure that you select the drive representing your SD card. You're about
to format it, so if you select the wrong thing, it will wipe out whatever you
have on that drive. The tool usually selects the right one by default, but
double check. It would be wise to disconnect any other external storage
devices.
10. Make sure that Format size adjustment is set to On. This removes any other
partitions on the card and uses the whole thing. Leave all the other settings at
the default.
11. Click Start. When the process finishes, you're ready to install the OS.
STEPS IN INSTALLING RAPSBERRY PI:
12. To flash the image in the SD card, upen Win32 Disk Imager.
13. In the image file field, select the Raspbian image that you downloaded. You
can click the file folder icon to navigate to it.
14. Make sure that your SD card is selected in the device drop-down box. Again,
selecting the wrong device can lead to a world of hurt; so pay attention.
15. Click Write.
16. Once the process has completed, remove the card from your card reader.
17. Insert the card into the micro SD card reader on the Raspberry Pi.
• That sounds lengthy, but it is remarkably fast and easy to do. Next, let's walk
through the NOOBS installation process.
THE “EASY”
WAY
What is NOOBS?
5. Make sure that your select the drive representing your SD card.
6. Make sure that Format size adjustments is set to On.
7. Click Start. When the process has finished, you’re ready to install the
OS.
12. When you connect power to the Raspberry Pi, it boots up to the
NOOBS installation screen. If you used the standard NOOBS download,
your only option is Raspbian ( which is OK because that’s what we’re
using).
13. Click Raspbian to make sure that it’s selected. Choose the right
language.
• Connecting Raspberry Pi Now that your micro SD card is ready to go, you need to
hook up your Raspberry Pi. If you're using an original, first generation Pi, this is a
little more complicated.
• Every model after the original, however, includes multiple USB ports and an
HDMI connector to make things easier. Hooking up the Pi is very simple.
CONNECTING RASPBERRY PI:
1. Connect your monitor via the HDMI cable. If you are using a small television that is
outfitted with component hookups rather than HDMI, the audio jack on the Pi is a
four-pole component jack. You need an RCA-to-3.5mm converter, usually in cable
form, to do this.
2. Connect your keyboard and mouse to the USB ports. I use a wireless
keyboard/touchpad combination because it's compact and portable.
3. Make sure that your micro SD card with Raspbian or NOOBS is installed in the micro
SD port on the Pi. Essentially, this is the hard drive for your small computer, so it has
to be in the right place, it will not read the OS through an SD card reader connected
to one of the USB ports.
CONNECTING RASPBERRY PI:
4. If you are using an Ethernet cable, connect it to the Ethernet port. You may
also plug a Wi-Fi dongle to the USB port. If you are using a Pi 3, as I am ,Wi-
Fi is built in.
5. Connect the 5V power to the micro USB port. This port is only for power.
You cannot access the board via USB.
CONFIGURING YOUR PI
• To configure your Raspberry Pi, especially for use with OpenCV and computer
vision tasks, follow these step-by-step instructions:
• Install Raspberry Pi OS
4 Performance:
Use:
• libcamera-still -o test.jpg
Or for OpenCV with USB cam:
• import cv2
• cap = cv2.VideoCapture(0)
• ret, frame = cap.read()
• cv2.imshow('Test', frame)
• cv2.waitKey(0)
• cap.release()
• cv2.destroyAllWindows()
USING RASPI-CONFIG
• Raspi-config:
• Raspi-config is a configuration tool for Raspberry Pi that lets you
easily set up and manage basic system settings through a simple
text-based menu.
USING RASPI-CONFIG
GROUP 2
CANCIO, MARIA BLESIE
LINIJAN, RAPHAEL
MALLOSA, ELAIZA MAE
MIRAFLOR, SYDNEY
OCAY, KHAI ZYANN
TORRES, BRICE