SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
TABLE OF CONTENTS
CHAPTER I: Architectural review.........................................................................................5
1.1 INTRODUCTION:................................................................................................5
1.2 INTEL GALILEO OVERIVEW:...............................................................................5
1.3 ARDUINO COMPATIBILITES [1]:...........................................................................6
1.3.1 HARDWARE COMPATIBIILITES:....................................................................6
1.3.2 Libraries compatible with Arduino.......................................................................6
1.3.3 Intel Galileo Arduino compatibilities fails:.............................................................7
1.4 Intel Galileo Architecture:.......................................................................................8
1.4.1 Board architecture:..........................................................................................8
1.4.2 Intel Quark SoC X1000 architecture [3]................................................................9
Architecture x86........................................................................................................10
1.5 ARM PROCESSORS:..........................................................................................11
1.5.1 Architecture SOC ARM..................................................................................11
1.5.2 Operating modes:..........................................................................................12
1.6 Comparative and solutions: [12]..............................................................................13
1.6.1 Arduino Due................................................................................................13
1.6.2 BeagleBone Black.........................................................................................13
1.6.3 Raspberry Pi................................................................................................13
1.6.4 Comparison between RPi and Galileo:[6]............................................................13
Conclusion..................................................................................................................14
CHAPTER II: Experimental review...................................................................................15
1.7 INTRODUCTION:..............................................................................................15
1.8 START WITH GALILEO......................................................................................15
1.9 Test the Arduino compatibilities:.............................................................................21
1.10 Conclusion:.......................................................................................................22
chapter III: Application:.....................................................................................................23
1.11 Introduction:......................................................................................................23
1.12 Computer vision:.................................................................................................23
1.13 OpenCV library..................................................................................................24
1.13.1 About:.......................................................................................................24
1.13.2 Main functions.............................................................................................24
1.13.3 Used functions:............................................................................................25
1.14 Application Algorithm.[9].....................................................................................26
1.15 CONCLUSION:.................................................................................................29
List of figures
Figure 1: Intel Galileo board (front and back)........................................................6
Figure 2: Galileo main connectors.........................................................................7
Figure 3: GPIOs connected to Cypress CY8C9540A.................................................8
Figure 4:Galileo architecture..............................................................................10
Figure 5: Intel® Quark™ SoC X1000 architecture.................................................11
Figure 6: ARM ARCHTECTURE.............................................................................13
Figure 7:: unzip the ARDUINO IDE.......................................................................17
Figure 8:driver install through device manager...................................................17
Figure 9:browse the driver installation...............................................................18
Figure 10:COM Selection....................................................................................19
Figure 11:Board selection..................................................................................19
Figure 12: updating firmware.............................................................................20
Figure 13:telnet connection using tera term.......................................................21
Figure 14:extract the linux image.......................................................................21
Figure 15: Running python on the linux image....................................................22
Figure 16:ASCII Table on serial monitor of Arduino Uno.......................................23
Figure 17: serial event on Arduino Uno serial monitor.........................................24
Figure 18: real time image................................................................................28
Figure 19: apply the gray scale mode on the image.............................................28
Figure 20:sobel filter.........................................................................................29
Figure 21: black line detection..........................................................................29
Figure 22:center coordinated.............................................................................30
List of acronyms:
C:
CISC: complex instruction-set computer
CPU: Central Processing Unit
G:
GPIO: General Purpose Input/Output
I:
I2C: Inter Integrated Circuit
IT: Information Technology
IOT: Internet of Things
R:
RISC: Reduced Instruction-Set Computer
S:
SoC: system on a chip
SPI: Serial Peripheral Interface
Image recognition for a line follower using intel Galileo board General introduction
General Introduction:
Embedded systems generally refer to electronic systems and IT which are autonomous
dedicated to a specific task. Its resources are available generally limited (limited memory size and
limited energy consumption).
The fields of application concerned by these systems become increasingly many:
Multimedia, Telecommunications, Automotive, Avionics, Health, Marine...
The features of these systems are numerous: close cohabitation between hardware and
software, low power consumption, portability, real-time, operational safety and minimum cost.
As part of my study in applied license of electronics, electrical and automatic, specialty of
electronics and industrial computing I realized my final year project.
In this context I chose a topic based on “Intel Galileo (gen1)” platform.
My work is intended to make a full review of this platform and an implementation of
image processing code to test the actual performance of this embedded platform.
This report contain 3 chapter.
The 1st chapter contain an architectural review of the Intel Galileo, the second is an
experimental review and the last chapter contain an application: in this chapter we will implement
a code of image processing based on python code and OpenCV library to test the performance of
the Galileo.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
CHAPTER I: ARCHITECTURAL REVIEW
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.1 INTRODUCTION:
In this chapter we will take an architectural review of the Intel Galileo board .also we will
find the Arduino compatibles features and fails.
Then we will try to compare the Intel processor and his x86 architecture with the ARM
processors in embedded systems applications.
1.2 INTEL GALILEO OVERIVEW:
The Galileo is Intel’s toe-dip into the Arduino waters. It features their Quark SoC X1000
Application Processor, a 32-bit Intel Pentium-class system (low-power embedded system) on a
chip. The 32-bit processor can run at up to 400MHz, and it has 512 KB SRAM built-in. The
Galileo board supports the Quark with a wide range of external peripherals.
As far as memory goes, the Galileo has a lot of it. There’s 8MB Flash (to store firmware),
an 11KB EEPROM (non-volatile memory), and a µSD socket (which supports up to 32GB µSD
cards). In addition to the memory, there are all sorts of peripherals: 10/100Mb Ethernet, USB 2.0
host and device ports, an RS-232 port, and a mini PCI Express (mPCIE) socket. Plus it has that
same, familiar Arduino pinout. The Arduino pins – including six analog inputs, SPI, I2C, UART,
and PWM outputs – are all exactly where an experienced Arduino user would expect them to be.
To do is meld the ease of Arduino’s hardware manipulation with the power of a fully
operational Linux operating system. Most sketches written for Arduino Uno, Leonardo, and other
boards can be ported directly over to the Galileo. You still have access to popular Arduino
libraries like SD, Ethernet, Wi-Fi, EEPROM, SPI, and Wire, but you can also access the Linux
side of the board. The Linux half of the board supports stuff like Python, Node.js, SSH, Telnet,
and all sorts of other, fun Linux stuff.
Figure 1: Intel Galileo board (front and back)
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.3 ARDUINO COMPATIBILITES [1]:
To define Arduino compatibility, the board must be released under the official Arduino
name, Arduino shields compatible and development environment compatible.
1.3.1 HARDWARE COMPATIBIILITES:
Galileo is the first board based on Intel architecture designed to be hardware and software
pin-compatible with Arduino shields designed for the Arduino Uno R3. Digital pins 0 to 13 (and
the adjacent AREF and GND pins), Analog inputs 0 to 5, the power header, ICSP header, and the
UART port pins (0 and 1), are all in the same locations as on the Arduino Uno R3. This is also
known as the Arduino 1.0 pinout.
Galileo is designed to support shields that operate at either 3.3V or 5V. The core operating
voltage of Galileo is 3.3V. However, a jumper on the board enables voltage translation to 5V at the
I/O pins. This provides support for 5V Uno shields and is the default behavior. By switching the
jumper position, the voltage translation can be disabled to provide 3.3V operation at the I/O pins.
The Galileo board is also software compatible with the Arduino Software Development
Environment (IDE), which makes usability and introduction a snap.
Arduino Shield Supported Features Galileo is compatible with Arduino UNO shields and is
designed to support 3.3V or 5V shields, following the Arduino Uno Revision 3.
Figure 2: Galileo main connectors
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.3.2 Libraries compatible with Arduino
 SPI : for communicating with devices using the Serial Peripheral Interface (SPI)
Bus.
 EEPROM : reading and writing to "permanent" storage
 Wire : Two Wire Interface (TWI/I2C) for sending and receiving data over a net of
devices or sensors.
 WiFi - for connecting to the internet using the Arduino WiFi shield
 Servo :for controlling servo motors
 USBHost : Communicate with USB peripherals like mice and keyboards.
Not supported libraries:
 Ethernet - for connecting to the internet using the Arduino Ethernet Shield
 Firmata - for communicating with applications on the computer using a standard
serial protocol.
 GSM : for connecting to a GSM/GRPS network with the GSM shield.
 LiquidCrystal : for controlling liquid crystal displays (LCDs)
 SD : for reading and writing SD cards
 SoftwareSerial : for serial communication on any digital pins.
 Stepper : for controlling stepper motors
 TFT : for drawing text , images, and shapes on the Arduino TFT screen
1.3.3 Intel Galileo Arduino compatibilities fails:
The fundamental problem with the Galileo is that all of the bit-level I/O (ADCs, etc) go
through an IO expander (Cypress CY8C9540A chip) on the board that means it takes at least 2 mS
to access an IO bit.
The Atmel chips used in the Arduino boards gives you direct access to the pins and ADCs
etc, so they are much, much faster than the Galileo at bit-level and A/D.
As the Galileo is running Linux and emulating the Arduino IDE, the GPIO’s run a lot slower
than expected, as the chip copes with this overhead.
The default speed of the cypress [2]is 230khz and it can be selected up to 24mhz as top
speed that make the real performance of the 400mhz intel SoC not used .
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
Figure 3: GPIOs connected to Cypress CY8C9540A
 Default max through put is 230 Hz
 IO2 and IO3 if configured as OUTPUT_FAST - will clock in at 477 kHz - to 2.93 MHz
 digitalWrite() will achieve 477 kHz
 fastGpioDigitalWrite() - an Intel extension of the Arduino API will achieve 680 kHz
 fastGpioDigitalWriteDestructive - can achieve GPIO speeds of about 2.93 MHz
To set each mode we need to upload a specific syntax.[3]
1.4 INTEL GALILEO ARCHITECTURE:
1.4.1 Board architecture:
The Intel processor and surrounding native I/O capabilities of the Clanton SoC provides
for a fully featured offering for both the maker community and students alike. It will also be useful
to professional developers who are looking for a simple and cost effective development
environment to the more complex Intel Atom processor and Intel Core processor-based designs.
 400MHz 32-bit Intel Pentium instruction set architecture (ISA)-compatible processor o
16 KBytes on-die L1 cache
 512 KBytes of on-die embedded SRAM
 Simple to program: Single thread, single core, constant speed
 ACPI compatible CPU sleep states supported
 An integrated Real Time Clock (RTC), with an optional 3V “coin cell” battery for
operation between turn on cycles.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
 10/100 Ethernet connector
 One slot PCI Express mini-card in the PCIe 2.0 standard that can accommodate mini-PCIe
cards half-height, possibly with an adapter. The slot has been designed specifically to
connect a WiFi card usable with the WiFi library.
 USB Host connector 2.0 able to support up to 128 USB devices.
 USB client connector that can be used both for downloading the sketch on the board and
connecting USB 2.0-compatible devices.
 3.5mm jack connector allows to use a second serial port standard UART. Notice that this is
not an audio input / output.
 10-pin Standard JTAG header for debugging
 Reboot button to reboot the processor
 Reset button to reset the sketch and any attached shields
Figure 4:Galileo architecture
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.4.2 Intel Quark SoC X1000 architecture [3]
The Intel Quark SoC X1000 is Intel’s lowest-power secure SoC
The single-core, single-threaded Intel Quark SoC X1000 is designed on the smallest core
offered by Intel, making it low-cost, small form factor, 4-layer boards.
Integration of I/O interfaces, clocks, and voltage regulator in a 15mm x 15mm package
simplifies design and reduces BOM by minimizing external components required on the platform.
BGA packaging with a 0.593 ball pitch allows low-cost PCB designs in cost-sensitive
applications.
Rich I/O features include two on-chip Ethernet interfaces, PCI Express, USB 2.0,
SD/SDIO/eMMC, SPI, UART, and I2C/GPIO.
Intel Pentium processor instruction set architecture (ISA) enables applications to scale
from the Intel Quark SoC to platforms based on Intel Atom and Intel Core processors, without
recompiling code.
Compatibility with 32-bit Intel architecture solutions. And Available error correcting code
(ECC) protects data integrity.
Available hardware-based secure boot maximizes device and data security.
Available extended temperature options (-40° C - +85° C) designed for thermally
constrained and harsh operating environments.
Figure 5: Intel® Quark™ SoC X1000 architecture
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
Architecture x86
Basic properties of the architecture:
The x86 architecture [4] is a variable instruction length, primarily "CISC" design with
emphasis on backward compatibility. The instruction set is not typical CISC, however, but
basically an extended version of the simple eight-bit 8008 and 8080 architectures. Byte-addressing
is enabled and words are stored in memory with little-endian byte order. Memory access to
unaligned addresses is allowed for all valid word sizes. The largest native size
for integer arithmetic and memory addresses (or offsets) is 16, 32 or 64 bits depending on
architecture generation (newer processors include direct support for smaller integers as well).
Multiple scalar values can be handled simultaneously via the SIMD unit present in later
generations. Immediate addressing offsets and immediate data may be expressed as 8-bit
quantities for the frequently occurring cases or contexts where a -128..127 range is enough.
Typical instructions are therefore 2 or 3 bytes in length (although some are much longer, and some
are single-byte).
To further conserve encoding space, most registers are expressed in opcodes using three or
four bits, the latter via an opcode prefix in 64-bit mode, while at most one operand to an
instruction can be a memory location. However, this memory operand may also be
the destination (or a combined source and destination), while the other operand, the source, can be
either register or immediate. Among other factors, this contributes to a code size that rivals eight-
bit machines and enables efficient use of instruction cache memory. The relatively small number
of general registers (also inherited from its 8-bit ancestors) has made register-relative addressing
(using small immediate offsets) an important method of accessing operands, especially on the
stack. Much work has therefore been invested in making such accesses as fast as register accesses,
i.e. a one cycle instruction throughput, in most circumstances where the accessed data is available
in the top-level cache.
Operating modes:
1-Real mode:
2-Protected mode.
3-Long mode.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.5 ARM PROCESSORS:
1.5.1 Architecture SOC ARM
ARM is a family of instruction set architectures [5]for computer processors based on
a reduced instruction set computing (RISC)architecture developed by British company ARM
Holdings.
A RISC-based computer design approach means ARM processors require significantly
fewer transistors than typical CISC x86processors in most personal computers. This approach
reduces costs, heat and power use. Such reductions are desirable traits for light, portable, battery-
powered devices—including smartphones, laptops, tablet and notepad computers, and
other embedded systems. A simpler design facilitates more efficient multi-core CPUs and higher
core counts at lower cost, providing improved energy efficiency for servers.
ARM Holdings develops the instruction set and architecture for ARM-based products, but does
not manufacture products. The company periodically releases updates to its cores. Current cores
from ARM Holdings support a 32-bit address space and 32-bit arithmetic; the ARMv8-A
architecture, announced in October 2011, adds support for a 64-bit address space and 64-bit
arithmetic. Instructions for ARM Holdings' cores have 32 bits wide fixed-length instructions, but
later versions of the architecture also support a variable-length instruction set that provides both
32 and 16 bits wide instructions for improved code density.
Figure 6: ARM ARCHTECTURE
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
1.5.2 Operating modes:
Except in the M-profile, the 32-bit ARM architecture specifies several CPU modes,
depending on the implemented architecture features. At any moment in time, the CPU can be in
only one mode, but it can switch modes due to external events (interrupts) or programmatically.
1.6 COMPARATIVE AND SOLUTIONS:
1.6.1 Arduino Due
Don’t support any operating system.
The board contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. The
Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0
Arduino pinout.
1.6.2 BeagleBone Black
Great operating system support with the availability of Debian, Ubuntu, Android, and many other
operating systems for the board.
Installation of compilers and programming languages (such as GCC, Python, Ruby,
Node.js, Perl, etc.) is very easy from packages in the supported Linux distributions.
Out of the box provides a web-based Cloud9 IDE and Bonescript (Node.js and Javascript-
based) interface to I/O.
Huge amount of I/O available to the board, however access to the I/O is complicated by
manipulating the device tree in Linux.
Real-time control of devices is possible with the programmable real-time units, however
there's not a lot of tools or libraries to make development with them easy yet.
1.6.3 Raspberry Pi
Like the BeagleBone Black, operating system support is great with options like Raspbian,
Occidentalis, and more.
Installation of compilers and programming languages (such as GCC, Python, Ruby,
Node.js, Perl, etc.) is very easy from packages in the supported Linux distributions.
Access to I/O is easy with support from libraries in many programming languages.
No real-time support so interfacing with hardware that has strict timing requirements is not
possible directly.
Largest support community of all the boards, with many tutorials and guides available online for
learning about the Pi.
Final internship study
Aymen HAJRI
1.6.4 Comparison between RPi and Galileo:[6]
The Galileo board sports a 400MHz Pentium-class System-on-a-Chip (SoC). RPi is
normally clocked at 700MHz, but is easily overclocked (with the consequence of excess heat.),
with RPi being faster, but don’t forget to consider details such as the number of instructions
completed per clock cycle. Both are single core processors, but RPi is apparently less efficient in
how many instructions it executes per clock cycle. According to the Raspberry Pi Foundation,
"The overall real world performance is something like a 300MHz Pentium 2, only with much,
much swankier graphics."
Raspberry Pi is best for handling media such as photos or video, and a Galileo is an
excellent choice if for a project requiring sensors (and decent memory and processing power),
monitoring, or have productivity-related applications (Galileo has a real time clock.) RPi could be
used as a networked security camera or a media server, but without an analog-to-digital converter,
analog sensors would not be easy to implement. Galileo could be used to develop smart everyday
"things" with lots of sensors, such as watches, health monitoring or fitness devices, or simply be
an inexpensive personal computer running Linux sans all things Arduino..
The Quark, as an x86 device, has an existing well of software, and historically the vast majority of
x86 SoCs are implemented in desktops. (Intel is eyeing the next wave of technology advances,
known as "The Internet of Things" (IoT) or "Industry 4.0". IoT is a concept in which
Things (objects, animals, or people) have unique embedded identifiers that automatically
communicate (over the internet) with other things (machines, computers, or objects) without direct
human intervention, to automatically transfer data for the purpose of self-regulation or for acting
in concert on a grand scale. Implementation would result in big data collections and great energy,
cost, and time savings with efficiencies gained from every aspect of the interaction of "smart"
things. It’s a logical conclusion that Quark demonstrates Intel's interest in the evolving IoT.
Assuming users match to the x86 instruction set, some bleed-over from the desktop domain to the
embedded domain (and IoT) is feasible (using Linux, of course.)
The Galileo has some differentiating attributes such as PCI Express (PCIe) and a Real
Time Clock (RTC), whereas the RPi has peripherals well-suited for graphics-intensive applications
for HD 1080p streaming video. Galileo is a memory-rich, fairly high-performance 32-bit x86 with
traits well-suited to embedded portables or wearable devices: small in size (highly integrated), low
power, and fairly low cost with respect to the value that is packed in this SoC Some major
differences: RPi has a Graphics Processing Unit (GPU.) Galileo does not. Galileo has an I2C-
controlled I/O expander that runs at 200Hz. I/O that runs through the any of the three "GPIO
PWM" blocks on the Galileo schematic is going to be limited to only 200 updates per second.
IO13 avoids the limitations of the expander, as well as the UARTs, SPI, I2C, and the ADC. Galileo
has the first PCIe slot supported by Arduino.
Image recognition for a line follower using intel Galileo board Chapter I: Architectural review
Galileo can boot from on-board memory. The RPi boots only from an SD card, which
needs an image that can be found on the Foundation website.
1.7 CONCLUSION:
As it turns out, few anticipated the real payoff of this simpler design: lower power
consumption. Contrary to popular belief, RISC processors are neither faster nor slower than their
doddering CISC forebears. But they are generally more power-efficient, which turns out to be a
key differentiator when you're making battery-powered gizmos.
It's tough to compare one CPU circuit design to another, but roughly speaking, an ARM
design has about one-third the number of transistors of an x86 design. That's leaving out the likes
of cache and bus interfaces, which can easily consume more transistors than the CPU "core" itself.
Indeed, most processors today (RISC or CISC) are about three-quarters cache, with a little CPU
core lurking in one corner of the chip.
It’s not clear what the Galileo board is actually good at. The CPU is great, but the lack of
usable IO like video or audio makes it less capable than a Uno at things like A/D conversion.
Galileo still behind the raspberry pi in performance and price.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
2 CHAPTER II: EXPERIMENTAL REVIEW
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
2.1 INTRODUCTION:
In this chapter we will set our environment and we will start the Galileo through different
steps.
Also as an experimental review we will test the basic Arduino examples on the Galileo.
2.2 START WITH GALILEO
1. Download Arduino for Galileo
The download is about 100MB, and comes as an archived (zip or tgz) file. The next step,
“installing”, amounts to unzipping the folder properly.
2. Install the Arduino IDE for Galileo(Windows Install)
Windows version of the IDE software is delivered in a ZIP format. We’ll need to unzip that
archive in order to use the software.
Double-click, or run Arduino.exe to open up the Arduino IDE for Galileo.
Figure 7:: unzip the ARDUINO IDE
3. Windows Driver Install
Connect a 5V power supply to the Galileo.
Connect a micro-B USB cable from the Galileo’s USB Client port to an available USB socket on
your computer.
Upon connecting the board, Windows will automatically attempt to install the driver and,
unsurprisingly, it will fail. We’ll have to manually install the driver.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
Open up the Device Manager. (Either Start > Run > devmgmt.msc, or go to the Control Panel,
select Systemand click Device Manager.)
Locate the Gadget Serial v2.4 device, under the other devices tree. And Update Driver Software.
Figure 8:driver install through device manager
On the first window that pops up, click Browse my computer for driver software. And on the
next page select Browse… and navigate to the hardwarearduinox86tools folder within your
Arduino Galileo software installation. Then click Next.
Figure 9:browse the driver installation
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
Click Install.than Windows has successfully updated the driver software window.
Look back at the Device Manager, under the Ports tree now. There should be an entry
for Galileo (COM #). It’ll be important for Arduino sketch uploading and the next step, updating
firmware.
4. Updating Firmware
Updating the Galileo firmware is a good first step to take after driver installation. It helps to
prove that your software and drivers are set up correctly, and it prepares your Galileo board with
the most up-to-date firmware available. Follow the steps below to update your Galileo board’s
firmware.
Step 1: Reboot the Galileo (No SD Cards!)
To reboot the Galileo, first unplug the USB cable. Then unplug the 5V adapter from the
board. If there is an SD card in the Galileo, remove it before powering the board back up.
To power the board back up, make sure you plug the 5V cable in first, then plug in a USB
cable into the USB Client port.
Step 2: Set Up the Arduino Galileo IDE
Open up the Galileo-specific Arduino software you downloaded earlier. run
the Arduino.exe file at the top level of the unzipped folder.
Serial Port Selection
Double-check that the title of the Window has Arduino 1.5.3 at the top. Then the first step
is to select the serial port. Go to the Tools menu, then hover over Serial Port. On a Windows
machine, select the COM port you saw earlier in the Device Manager.
Final internship study
Aymen HAJRI
Figure 10:COM Selection
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
BOARD SELECTION:
Under the Tools > Board menu, make sure Intel Galileo is selected
Figure 11:Board selection
Step 3: Firmware Update
Last, but not least, to update the board firmware go to Help > Firmware Update. Then
click Yes to proceed.
The software will attempt to communicate with the board, and read the current version of
the firmware. On the next window that pops up, select yes to acknowledge that you’d like to
upgrade the firmware, and the process will begin.
Figure 12: updating firmware
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
The update procedure will take about five minutes. A Target Firmware Upgraded
Successfully pop-up will appear after the update completes.
5. Using the Terminal
To interact with the Linux OS through the terminal, executing simple commands through
a command-line interface. In comparison to uploading Arduino sketches, interacting with the
Linux command line is a much more advanced skill.
To connect to the Linux terminal there is two method:
 The first over the 3.5mm stereo jack RS-232 through DB9 RS-232 cable port.
 The second over RJ45 Ethernet cable.
The problem that there is no more computer that support serial communication through
DB9 RS-232 cable so that put an interrogation for Intel engineers!!
The first method requires a special cable (or two).
And the two cables (3.5mm stereo jack RS-232 through DB9 RS-232 and the db9 USB can
cost 15dt-7.5dollars...)
So the simple way is to use RJ45 Ethernet cable and upload a special code through Arduino
IDE to configure the Galileo and give it a static IP address.
Once the board is connected to the computer, open up a serial terminal program (like Tera
Term or Putty). Set the IP address and connect.
Figure 13:telnet connection using tera term
6. Install the bigger linux image (yocto)[7}
This method require a terminal emulator installed on computer.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
To boot the Galileo off the bigger Linux image, we need an SD card that is at least 1GB (and
less than 32GB). You’ll also need to download the bigger image from Intel’s Drivers page (find
the most current file there). The file is about 37 MB.
The download comes as a 7z file, which means you may need extra software to extract it.
Extract the contents of the 7z file to the top level of your SD card. Once unzipped, this is what
your SD directory structure should look like.
With the on-board flash memory, the Galileo has a limited amount of space to store its Linux
kernel. As such, the default Linux image is a bit gimped in terms of extra features which provides
access to the following:WIFI drivers ,Python,Node js,SSH,Opencv,ALSA,V4L2.
Figure 14:extract the linux image
Power down the Galileo (remove both USB and 5V power), and plug in the µSD card.
Then power it back up.
The first boot may take a little longer than average. You can use the terminal to verify that
the bigger image is working.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
Figure 15: Running python on the linux image.
2.3 TEST THE ARDUINO COMPATIBILITIES:
In those testes we will upload some basic Arduino code in both boards (GALILEO AND
ARDUINO UNO) to test the compatibles and the issues in this test.
1. Test1:Blink example:
This example shows the simplest thing you can do with an Arduino to see physical output: it
blinks an LED.
 Output on Arduino: the led blink
 Output on Galileo: the led blink but the led doesn’t shut down totally
Conclusion:
The same code doesn’t work the same on the 2 boards .the reason is that Arduino clocked at
16Mhz which make it faster 4 time (at least)
So that test prove the lows speed of the GPIO can make a difference which it visually proved.
The GPIO’s are default clocked at 230 Hz (slow 70 time than an Arduino)
2 fast IO it’s too low number of pin for a user.
IO2 and IO3 if configured as OUTPUT_FAST - will clock in at 477 kHz - to 2.93 MHz
 digitalWrite() will achieve 477 kHz
 fastGpioDigitalWrite() - an Intel extension of the Arduino API will achieve 680 kHz.
 fastGpioDigitalWriteDestructive can achieve GPIO speeds of about 2.93 MHz
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
2. Communication examples:
*ASCII Table: Demonstrates Arduino's advanced serial output functions.
 Output on Arduino Uno:
Figure 16:ASCII Table on serial monitor of Arduino Uno
 Output on Intel Galileo:
*No output (white screen)
*-SerialEvent: When new serial data arrives, this sketch adds it to a String
 Arduino Uno output:
Figure 17: serial event on Arduino Uno serial monitor
 Intel Galileo output:
*No result (white screen)
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter II: Experimental review
Conclusion:
, the board can't even be applied to real-time applications: where the microsecond will take a loop
to execute - and that I/O will take place now rather than at some point within the next 2mSec.and
the Arduino API who does byte-by-byte SPI transactions - which are not especially fast for the
intel Galileo than we get data stuck before it send by the serial connection.
2.4 CONCLUSION:
In the architectural review we stop at many feature for the Galileo which give it and
advantage but in the excremental review we find that the Galileo it’s not a real Arduino compatible
for many reason a simple sensor who a high clock speed need like ultrasonic sensor not supported
on the Galileo.
So the Galileo it’s basically dedicated to data processing and IOT applications and not for
real time applications like Arduino Uno.
Intel just certified his Galileo board from Arduino just to attract the community of makers of
Arduino.
Galileo can be a great educational platform especially by the great future from his Linux
(yocto) dedicated for embedded application that handle many compilers (python node …)and
libraries like OpenCV.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
3 CHAPTER III: IMAGE RECOGNITION
APPLICATION
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
3.1 INTRODUCTION:
After testing the Intel Galileo board and knows the limits and the features, now we will
make a python code for image processing(object detection: detect a black line) based on OpenCV
library and implement it on Galileo
This development is based on computer vision enhancement using digital image processing.
It is accomplished through the following stages: Firstly, the acquired RGB image using the
webcam is converted to gray scale mode that allows us to process our image. After that, we fix
colors that we will work on it by the threshold function, and then the image is filtered using Sobel
filter, finally we divide the image in such parts and search for contours of a black object in each
parts .
3.2 COMPUTER VISION:
Computer vision is a field that includes methods for acquiring, processing, analyzing, and
understanding images and, in general, high-dimensional data from the real world in order to
produce numerical or symbolic information, e.g., in the forms of decisions.
A theme in the development of this field has been to duplicate the abilities of human vision by
electronically perceiving and understanding an image. This image understanding can be seen as
the disentangling of symbolic information from image data using models constructed with the aid
of geometry, physics, statistics, and learning theory. Computer vision has also been described as
the enterprise of automating and integrating a wide range of processes and representations for
vision perception.
As a scientific discipline, computer vision is concerned with the theory behind artificial systems
that extract information from images. The image data can take many forms, such as video
sequences, views from multiple cameras, or multi-dimensional data from a medical scanner. As a
technological discipline, computer vision seeks to apply its theories and models to the construction
of computer vision systems.
Sub-domains of computer vision include scene reconstruction, event detection, video
tracking, object recognition, object pose estimation, learning, indexing, motion estimation,
and image restoration.
3.3 OPENCV LIBRARY
3.3.1 About:
OpenCV [8](Open Source Computer Vision Library) is an open source computer vision
and machine learning software library. OpenCV was built to provide a common infrastructure for
computer vision applications and to accelerate the use of machine perception in the commercial
products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and
modify the code.
Final internship study
Aymen HAJRI
The library has more than 2500 optimized algorithms, which includes a comprehensive set of both
classic and state-of-the-art computer vision and machine learning algorithms. These algorithms
can
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
be used to detect and recognize faces, identify objects, classify human actions in videos, track
camera movements, track moving objects, extract 3D models of objects, produce 3D point clouds
from stereo cameras, stitch images together to produce a high resolution image of an entire scene,
find similar images from an image database, remove red eyes from images taken using flash,
follow eye movements, recognize scenery and establish markers to overlay it with augmented
reality, etc.
OpenCV has more than 47 thousand people of user community and estimated number of
downloads exceeding 7 million. The library is used extensively in companies, research groups and
by governmental bodies.
3.3.2 Main functions
 Core: core functionality.
This library allows to manipulate the basic structures, perform operations on
matrices, draw on images, save and load data in XML files...
 imgproc: image processing.
The functions and structures this module relate to image transformations, filtering,
detection of contours, points of interest...
 features2d: descriptors.
This module mainly involves the extraction of descriptors according to two
common approaches (SURF and StarDetector)
 objdetect: object detection.
This library allows for the recognition of objects in an image using the Adaboost
algorithm (Viola & Jones, 2001).
 video: video stream processing.
These functions are used to segment and track moving objects in a video.
 highgui: IO and user interface.
OpenCV includes its own high-level library to open, save and view images and
video streams. It also contains a number of features to make very simple GUI but
more than sufficient to test our programs.
 calib3d: calibration, pose estimation and stereovision.
This module contains functions for reconstructing a 3D scene from images acquired
with multiple cameras simultaneously.
3.3.3 Used functions:
 CvtColor: The function converts an input image from one color space to another. In
case of a transformation to-from RGB color space, the order of the channels should
be specified explicitly (RGB or BGR). Note that the default color format in
OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed).
So the first byte in a standard (24-bit) color image will be an 8-bit Blue component,
the second byte will be Green, and the third byte will be Red. The fourth, fifth, and
sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
 Threshold: The function applies fixed-level thresholding to a single-channel array.
The function is typically used to get a bi-level (binary) image out of a grayscale
image or for removing a noise, that is, filtering out pixels with too small or too
large values. There are several types of thresholding supported by the function.
 .Sobel: The Sobel Operator is a discrete differentiation operator. It computes an
approximation of the gradient of an image intensity function.
 Dilate: The function dilates the source image using the specified structuring
element that determines the shape of a pixel neighborhood over which the
maximum is taken.
 FindContours: The function retrieves contours from the binary image using the
algorithm [Suzuki85]. The contours are a useful tool for shape analysis and object
detection and recognition. See squares.c in the OpenCV sample directory.
3.4 APPLICATION ALGORITHM.[9]
1st step is to take a real picture
The first step is to take a frame using a webcam connected to the Galileo board the speed of frame
capturing is 1 fps, we set the size of the frame 320*240.
Figure 18: real time image
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
2nd step make image in gray scale mode:
This step is the most important to convert image to binary mode that make us able to apply other
function and manipulation on the image.
Figure 19: apply the gray scale mode on the image
3rd step threshold the desired color (black):
If pixel value is greater than a threshold value, it is assigned one value (may be white), else it is
assigned another value (may be black).
In our case we assigned the white value.
4th step apply Sobel filter on the image to remove noise:
The intensity function of a digital image is only known at discrete points, derivatives of
this function cannot be defined unless we assume that there is an underlying continuous intensity
function which has been sampled at the image points. With some additional assumptions, the
derivative of the continuous intensity function can be computed as a function on the sampled
intensity function, i.e. the digital image. It turns out that the derivatives at any particular point are
functions of the intensity values at virtually all image points. However, approximations of these
derivative functions can be defined at lesser or larger degrees of accuracy.
The Sobel operator represents a rather inaccurate approximation of the image gradient, but is still
of sufficient quality to be of practical use in many applications. More precisely, it uses intensity
values only in a 3×3 region around each image point to approximate the corresponding image
gradient, and it uses only integer values for the coefficients which weight the image intensities to
produce the gradient approximation.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
Figure 20:sobel filter
5th step: contours detection
The final step in the image processing is to plot the contours in the real frame in this step we apply
a circular contour for the geometric features provided by this function like center, radius …
Figure 21: black line detection
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications
After the object detection we can extract many information like center, (x,y) coordinated:
We can explore this data in an interactive application like robot movement, motor rotation and
many other applications.
Figure 22:center coordinated
3.5 CONCLUSION:
After the implementation of the code we observe a real low speed of image processing and a
not real time image capturing.
In general intel Galileo can be used for IOT applications and not for real time applications.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board General conclusion
General conclusion:
Due to the big marketing from Intel to its board Galileo and the Arduino certification and
the powerful quark SoC x1000 all the embedded systems community was waiting for it.
But after using it and many tests, we can say that it’s a big fail for Intel community (at least at the
Arduino compatibility).
The Galileo engineers fails in choosing the cypress expander which are the main limitation for the
full performance of the x1000 quark Soc.
In general Galileo stay a good alternative for developers but the price doesn't match to the
performances which make her much expensive than other boards.
We can say that Galileo is a good platform in case that it cost like an Arduino Due.
The raspberry pi and beagle bone stay leader for the maker’s community with over 5 million unit
[10] (for the raspberry pi) that make Intel in a hard competition to gain the trust of maker’s
community.
The image processing application can perform much smoothly in other platform (like R Pi)
With this application we can make a line follower robot or a management system based on color
recognition .this application has many features for many industrial or domestic application.
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Bibliographies
References:
[1]
http://www.arduino.cc/en/ArduinoCertified/IntelGalileo
[2] http://www.cypress.com/?docID=31413
[3]https://www-
ssl.intel.com/content/www/us/en/intelligent-
systems/quark/quark-x1000-overview.html
[4] http://en.wikipedia.org/wiki/X86
[5] http ://fr.wikipedia.org/wiki/Architecture_ARM
[6]http://www.mouser.com/applications/open-source-hardware-
galileo-pi/
[7]http://www.malinov.com/Home/sergey-s-blog/intelgalileo-
programminggpiofromlinux
[8] http://docs.opencv.org/doc/tutorials/tutorials.html
[8] http://en.wikipedia.org/wiki/OpenCV
[9]https://github.com/hajriaimen/Intel-Galileo-line-
follower-/blob/master/code
[10] https://www.raspberrypi.org/five-million-sold/
 Note: All the websites are verified on 05/30/2015 at 13:00h
Final internship study
Aymen HAJRI
Image recognition for a line follower using intel Galileo board Annexes
Annexes
Final internship study
Aymen HAJRI
Galileo Arduino hardware compatibility:
 14 digital input/output pins, of which 6 can be used as Pulse Width Modulation
(PWM) outputs;
Each of the 14 digital pins on Galileo can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions.
 A0 – A5: 6 analog inputs, via an AD7298 A-to-D converter (external converter).
 Each of the 6 analog inputs, labeled A0 through A5, provides 12 bits of resolution
(i.e., 4096 different values). By default they measure from ground to 5 volts.Muxed
via an I2C-controlled expansion header.
 I2C bus, TWI: SDA and SCL pins that are near to the AREF pin.
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.
 SPI: Defaults to 4MHz to support Arduino Uno shields. Programmable to 25 MHz
Note: While Galileo has a native SPI controller, it will act as a master and not as an
SPI slave. Therefore, Galileo cannot be a SPI slave to another SPI master. It can
act, however, as a slave device via the USB Client connector.
 UART (serial port): Programmable speed UART port (digital pins 0 (RX) and 1
(TX))
 ICSP (SPI): a 6 pin in-circuit serial programming (ICSP) header, located
appropriately to plug into existing shields. These pins support SPI communication
using the SPI library.
 VIN: The input voltage to the Galileo board when it's using an external power
source (as opposed to 5 volts from the regulated power supply connected at the
power jack). You can supply voltage through this pin, or, if supplying voltage via
the power jack, access it through this pin.
Warning: The voltage applied to this pin must be a regulated 5V supply otherwise
it could damage the Galileo board or cause incorrect operation.
 5V output pin: This pin outputs 5V from the external source or the USB connector.
Maximum current draw to the shield is: 800 mA.
 3.3V output pin: A 3.3 volt supply generated by the on-board regulator. Maximum
current draw to the shield is: 800 mA
 GND: Ground pins.
 IOREF: The IOREF pin on Galileo allows an attached shield with the proper
configuration to adapt to the voltage provided by the board. The IOREF pin voltage
is controlled by a jumper on the board, i.e., a selection jumper on the board is used
to select between 3.3V and 5V shield operation.
 RESET button/pin: Bring this line LOW to reset the sketch. Typically used to add a
reset button to shields that block the one on the board.
 AREF: is unused on Galileo. Providing an external reference voltage for the analog
inputs is not supported.
For Galileo it is not possible to change the upper end of the analog input range
using the AREF pin and the analogReference()function.
ARM processors modes.
1. User mode: The only non-privileged mode.
2. FIQ mode: A privileged mode that is entered whenever the processor accepts an FIQ
interrupt.
3. IRQ mode: A privileged mode that is entered whenever the processor accepts an IRQ
interrupt.
4. Supervisor (svc) mode: A privileged mode entered whenever the CPU is reset or when an
SVC instruction is executed.
5. Abort mode: A privileged mode that is entered whenever a prefetch abort or data abort
exception occurs.
6. Undefined mode: A privileged mode that is entered whenever an undefined instruction
exception occurs.
7. System mode (ARMv4 and above): The only privileged mode that is not entered by an
exception. It can only be entered by executing an instruction that explicitly writes to the
mode bits of the CPSR.
8. Monitor mode (ARMv6 and ARMv7 Security Extensions, ARMv8 EL3): A monitor mode
is introduced to support TrustZone extension in ARM cores.
9. Hyp mode (ARMv7 Virtualization Extensions, ARMv8 EL2): A hypervisor mode that
supports Popek and Goldberg virtualization requirements for the non-secure operation of
the CPU.
Example-1 – outputs 477kHz waveform on IO2:
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT_FAST);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, HIGH);
digitalWrite(2, LOW);
}
Example-2 – outputs 683kHz waveform on IO3:
void setup(){
pinMode(2, OUTPUT_FAST);
}
void loop()
{
register int x = 0;
while(1){
fastGpioDigitalWrite(GPIO_FAST_IO2, x);
x =!x;
}
}
Example-3 – outputs 2.93MHz waveform on IO3:
uint32_t latchValue;
void setup(){
pinMode(3, OUTPUT_FAST);
latchValue = fastGpioDigitalLatch();
}
void loop()
{
while(1){
fastGpioDigitalWriteDestructive(latchValue);
latchValue ^= GPIO_FAST_IO3;
}
}
Intel Galileo Storage options:
 Default - 8 MByte Legacy SPI Flash main purpose is to store the firmware (or bootloader)
and the latest sketch. Between 256KByte and 512KByte is dedicated for sketch storage.
The download will happen automatically from the development PC, so no action is
required unless there is an upgrade that is being added to the firmware.
 Default 512 KByte embedded SRAM, enabled by the firmware by default.
 Default 256 MByte DRAM, enabled by the firmware by default.
 Optional micro SD card offers up to 32GByte of storage
 USB storage works with any USB 2.0 compatible drive
 11 KByte EEPROM can be programmed via the EEPROM library.
* set an IP address for the Gaileo
void setup() {
system("telnetd -l /bin/sh");
system("ifconfig eth0 169.254.1.1 netmask 255.255.0.0 up"); //set an IP address for the Gaileo
169.254.1.1
}
void loop() {
}
The following table compares the specs of each board:
Arduino Due
Beaglebone
Black
Intel Galileo Raspberry Pi
SoC Atmel SAM3X8E
Texas
Instruments
AM3358
Intel Quark
X1000
Broadcom
BCM2835
CPU
ARMCortex-
M3
ARM
Cortex-A8
Intel X1000 ARM1176
Architecture 32-bit ARM core ARMv7 X86 ARMv6
Speed 84 MHz 1ghz 400mhz 700mhz
Memory
512 KB (2
blocks of 256
KB)
512MB 256MB
256MB
(model A) or
512MB
(model B)
FPU **** Hardware Hardware Hardware
GPU None
PowerVR
SGX530
None
Broadcom
VideoCore IV
Internal
Storage
The available
SRAM is 96 KB
in two
contiguous
bank of 64 KB
and 32 KB.
2GB (rev B)
or 4GB (rev
C)
8MB None
External None MicroSD MicroSD SD card
Storage
Networking ******
10/100Mbit
ethernet
10/100Mbit
ethernet
None (model
A) or
10/100Mbit
ethernet
(model B)
Power Source
7-12V from
2.1mm jack, or
header pin or
usb
5V from
USB mini B
connector,
2.1mm
jack, or
header pin.
5V from
2.1mm jack,
or header
pin.
5V from USB
micro B
connector, or
header pin.
Dimensions
101.52 mm x
53.3 mm
86.4mm x
53.3mm
106.7mm x
71.1mm
85.6mm x
56mm
Weight 36 g 40g 50g 45g
Approximate
Price
$38
$55 (rev C),
$45 (rev B)
$80
$25 (model
A), $35
(model B)
Documentati
on
Open source
with full
schematics.
CPU fully
documented
Open
source with
full
schematics.
CPU fully
documente
d.
Open
source with
full
schematics.
CPU fully
documente
d.
Open source
with full
schematics.
CPU partially
documented.
Input / Output
The following table compares the I/O capabilities of each board:
Arduino Due
BeagleBone
Black
Intel Galileo
Raspberry
Pi
Digital
I/O Pins
54 65 14 17
Digital
I/O
Power
3.3V 3.3V
3.3V or 5V
(switched
with jumper)
3.3V
Analo 12 with 12-bit 7 with 12-bit 6 with 12-bit None
g
Input
ADC, 0-3.3V (no
external
reference input)
ADC, 0-1.8V (no
external
reference input)
ADC, 0-5V (no
external
reference
input)
PWM
Output
12 8
6 (limited
speeds
prevent
fine servo
control)
1
UART 4 4
2 (1 exposed
through
3.5mm jack)
1
SPI 1 2 1 2
I2C 2 2 1 1
USB
Host
1 micro AB
connector
1 standard A
connector
1 micro AB
connector
1 (Model A)
or 2 (Model
B) standard
A
connector
USB
Client
1 micro B
connector
1 mini B
connector
1 micro B
connector
None
Video
Output
None Micro HDMI None
HDMI,
Composite
RCA, DSI
Video
Input
None None None
CSI
(camera)
Audio
Output
None Micro HDMI None
HDMI,
3.5mm jack
Power
Output
3.3V up to 130
mA, 5V
3.3V up to
250mA, 5V up to
1A
3.3V up to
800mA, 5V up
to 800mA
3.3V up to
50mA, 5V
up to 300-
500mA
Other designed to be
compatible with
most shields
designed for
- Real-time
support with
programmable
real-time units.
- Mini-PCI
Express slot.
- Real-time
the Uno,
Diecimila or
Duemilanove
- Many pins
have multiple
-Hardware
compatibility
with
most Arduino
Leonardo
compatible
shields.
- Many pins have
multiple
functions such as
I2S audio, CAN
bus, etc. See the
wiki for more
information.
clock with
optional
battery.
- Mixed
compatibility
with Arduino
shields.

Contenu connexe

Tendances

Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems Suhani Singh
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduinoSantosh Verma
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Embedded System Practical Workshop using the ARM Processor
Embedded System Practical Workshop using the ARM ProcessorEmbedded System Practical Workshop using the ARM Processor
Embedded System Practical Workshop using the ARM ProcessorMomenMostafa
 
Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded SystemRoshan Mani
 

Tendances (7)

Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
Day1
Day1Day1
Day1
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Embedded System Practical Workshop using the ARM Processor
Embedded System Practical Workshop using the ARM ProcessorEmbedded System Practical Workshop using the ARM Processor
Embedded System Practical Workshop using the ARM Processor
 
E530
E530 E530
E530
 
Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded System
 

Similaire à Report Image recognition for a line follower using intel Galileo board

Arduino bộ vi điều khiển cho tất cả chúng ta part 1
Arduino bộ vi điều khiển cho tất cả chúng ta part 1Arduino bộ vi điều khiển cho tất cả chúng ta part 1
Arduino bộ vi điều khiển cho tất cả chúng ta part 1tungdientu
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avrWiseNaeem
 
A Review of Intel Galileo Development Board’s Technology
A Review of Intel Galileo Development Board’s TechnologyA Review of Intel Galileo Development Board’s Technology
A Review of Intel Galileo Development Board’s TechnologyIJERA Editor
 
An Introduction to Semiconductors and Intel
An Introduction to Semiconductors and IntelAn Introduction to Semiconductors and Intel
An Introduction to Semiconductors and IntelDESMOND YUEN
 
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfAdvanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfIsmailkhan77481
 
Internet+of+things+iot+learn+faster+the+io t+
Internet+of+things+iot+learn+faster+the+io t+Internet+of+things+iot+learn+faster+the+io t+
Internet+of+things+iot+learn+faster+the+io t+CDKTCaoThangBMDTCN
 
Digital Design With Systemc (with notes)
Digital Design With Systemc (with notes)Digital Design With Systemc (with notes)
Digital Design With Systemc (with notes)Marc Engels
 
BRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxBRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxSKTAHMEDSALIMRAFID
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtechsangeetha rakhi
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentGiacomo Antonino Fazio
 
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdf
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdfAdvanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdf
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdfWiseNaeem
 
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdf
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdfAdvanced View Arduino Projects List - Use Arduino for Projects {4}.pdf
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdfIsmailkhan77481
 
Picaxe manual3 interfaces
Picaxe manual3 interfacesPicaxe manual3 interfaces
Picaxe manual3 interfacesalto34
 
Wireless appliances control report
Wireless appliances control reportWireless appliances control report
Wireless appliances control reportengineerssolution
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to MicrocontrollerNikhil Sharma
 
final report (parking project).pdf
final report (parking project).pdffinal report (parking project).pdf
final report (parking project).pdfgamefacegamer
 

Similaire à Report Image recognition for a line follower using intel Galileo board (20)

Arduino bộ vi điều khiển cho tất cả chúng ta part 1
Arduino bộ vi điều khiển cho tất cả chúng ta part 1Arduino bộ vi điều khiển cho tất cả chúng ta part 1
Arduino bộ vi điều khiển cho tất cả chúng ta part 1
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
 
A Review of Intel Galileo Development Board’s Technology
A Review of Intel Galileo Development Board’s TechnologyA Review of Intel Galileo Development Board’s Technology
A Review of Intel Galileo Development Board’s Technology
 
Atmega tutorial
Atmega tutorialAtmega tutorial
Atmega tutorial
 
An Introduction to Semiconductors and Intel
An Introduction to Semiconductors and IntelAn Introduction to Semiconductors and Intel
An Introduction to Semiconductors and Intel
 
what is core-i
what is core-i what is core-i
what is core-i
 
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfAdvanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
 
Internet+of+things+iot+learn+faster+the+io t+
Internet+of+things+iot+learn+faster+the+io t+Internet+of+things+iot+learn+faster+the+io t+
Internet+of+things+iot+learn+faster+the+io t+
 
Digital Design With Systemc (with notes)
Digital Design With Systemc (with notes)Digital Design With Systemc (with notes)
Digital Design With Systemc (with notes)
 
BRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxBRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptx
 
Final paper0
Final paper0Final paper0
Final paper0
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtech
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross Development
 
Embedded2003
Embedded2003Embedded2003
Embedded2003
 
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdf
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdfAdvanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdf
Advanced View Pic Microcontroller Projects List _ PIC Microcontroller.pdf
 
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdf
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdfAdvanced View Arduino Projects List - Use Arduino for Projects {4}.pdf
Advanced View Arduino Projects List - Use Arduino for Projects {4}.pdf
 
Picaxe manual3 interfaces
Picaxe manual3 interfacesPicaxe manual3 interfaces
Picaxe manual3 interfaces
 
Wireless appliances control report
Wireless appliances control reportWireless appliances control report
Wireless appliances control report
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
final report (parking project).pdf
final report (parking project).pdffinal report (parking project).pdf
final report (parking project).pdf
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Report Image recognition for a line follower using intel Galileo board

  • 1. TABLE OF CONTENTS CHAPTER I: Architectural review.........................................................................................5 1.1 INTRODUCTION:................................................................................................5 1.2 INTEL GALILEO OVERIVEW:...............................................................................5 1.3 ARDUINO COMPATIBILITES [1]:...........................................................................6 1.3.1 HARDWARE COMPATIBIILITES:....................................................................6 1.3.2 Libraries compatible with Arduino.......................................................................6 1.3.3 Intel Galileo Arduino compatibilities fails:.............................................................7 1.4 Intel Galileo Architecture:.......................................................................................8 1.4.1 Board architecture:..........................................................................................8 1.4.2 Intel Quark SoC X1000 architecture [3]................................................................9 Architecture x86........................................................................................................10 1.5 ARM PROCESSORS:..........................................................................................11 1.5.1 Architecture SOC ARM..................................................................................11 1.5.2 Operating modes:..........................................................................................12 1.6 Comparative and solutions: [12]..............................................................................13 1.6.1 Arduino Due................................................................................................13 1.6.2 BeagleBone Black.........................................................................................13 1.6.3 Raspberry Pi................................................................................................13 1.6.4 Comparison between RPi and Galileo:[6]............................................................13 Conclusion..................................................................................................................14 CHAPTER II: Experimental review...................................................................................15 1.7 INTRODUCTION:..............................................................................................15 1.8 START WITH GALILEO......................................................................................15 1.9 Test the Arduino compatibilities:.............................................................................21 1.10 Conclusion:.......................................................................................................22 chapter III: Application:.....................................................................................................23 1.11 Introduction:......................................................................................................23 1.12 Computer vision:.................................................................................................23 1.13 OpenCV library..................................................................................................24 1.13.1 About:.......................................................................................................24 1.13.2 Main functions.............................................................................................24 1.13.3 Used functions:............................................................................................25 1.14 Application Algorithm.[9].....................................................................................26 1.15 CONCLUSION:.................................................................................................29
  • 2. List of figures Figure 1: Intel Galileo board (front and back)........................................................6 Figure 2: Galileo main connectors.........................................................................7 Figure 3: GPIOs connected to Cypress CY8C9540A.................................................8 Figure 4:Galileo architecture..............................................................................10 Figure 5: Intel® Quark™ SoC X1000 architecture.................................................11 Figure 6: ARM ARCHTECTURE.............................................................................13 Figure 7:: unzip the ARDUINO IDE.......................................................................17 Figure 8:driver install through device manager...................................................17 Figure 9:browse the driver installation...............................................................18 Figure 10:COM Selection....................................................................................19 Figure 11:Board selection..................................................................................19 Figure 12: updating firmware.............................................................................20 Figure 13:telnet connection using tera term.......................................................21 Figure 14:extract the linux image.......................................................................21 Figure 15: Running python on the linux image....................................................22 Figure 16:ASCII Table on serial monitor of Arduino Uno.......................................23 Figure 17: serial event on Arduino Uno serial monitor.........................................24 Figure 18: real time image................................................................................28 Figure 19: apply the gray scale mode on the image.............................................28 Figure 20:sobel filter.........................................................................................29 Figure 21: black line detection..........................................................................29 Figure 22:center coordinated.............................................................................30 List of acronyms:
  • 3. C: CISC: complex instruction-set computer CPU: Central Processing Unit G: GPIO: General Purpose Input/Output I: I2C: Inter Integrated Circuit IT: Information Technology IOT: Internet of Things R: RISC: Reduced Instruction-Set Computer S: SoC: system on a chip SPI: Serial Peripheral Interface
  • 4. Image recognition for a line follower using intel Galileo board General introduction General Introduction: Embedded systems generally refer to electronic systems and IT which are autonomous dedicated to a specific task. Its resources are available generally limited (limited memory size and limited energy consumption). The fields of application concerned by these systems become increasingly many: Multimedia, Telecommunications, Automotive, Avionics, Health, Marine... The features of these systems are numerous: close cohabitation between hardware and software, low power consumption, portability, real-time, operational safety and minimum cost. As part of my study in applied license of electronics, electrical and automatic, specialty of electronics and industrial computing I realized my final year project. In this context I chose a topic based on “Intel Galileo (gen1)” platform. My work is intended to make a full review of this platform and an implementation of image processing code to test the actual performance of this embedded platform. This report contain 3 chapter. The 1st chapter contain an architectural review of the Intel Galileo, the second is an experimental review and the last chapter contain an application: in this chapter we will implement a code of image processing based on python code and OpenCV library to test the performance of the Galileo. Final internship study Aymen HAJRI
  • 5. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review CHAPTER I: ARCHITECTURAL REVIEW Final internship study Aymen HAJRI
  • 6. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.1 INTRODUCTION: In this chapter we will take an architectural review of the Intel Galileo board .also we will find the Arduino compatibles features and fails. Then we will try to compare the Intel processor and his x86 architecture with the ARM processors in embedded systems applications. 1.2 INTEL GALILEO OVERIVEW: The Galileo is Intel’s toe-dip into the Arduino waters. It features their Quark SoC X1000 Application Processor, a 32-bit Intel Pentium-class system (low-power embedded system) on a chip. The 32-bit processor can run at up to 400MHz, and it has 512 KB SRAM built-in. The Galileo board supports the Quark with a wide range of external peripherals. As far as memory goes, the Galileo has a lot of it. There’s 8MB Flash (to store firmware), an 11KB EEPROM (non-volatile memory), and a µSD socket (which supports up to 32GB µSD cards). In addition to the memory, there are all sorts of peripherals: 10/100Mb Ethernet, USB 2.0 host and device ports, an RS-232 port, and a mini PCI Express (mPCIE) socket. Plus it has that same, familiar Arduino pinout. The Arduino pins – including six analog inputs, SPI, I2C, UART, and PWM outputs – are all exactly where an experienced Arduino user would expect them to be. To do is meld the ease of Arduino’s hardware manipulation with the power of a fully operational Linux operating system. Most sketches written for Arduino Uno, Leonardo, and other boards can be ported directly over to the Galileo. You still have access to popular Arduino libraries like SD, Ethernet, Wi-Fi, EEPROM, SPI, and Wire, but you can also access the Linux side of the board. The Linux half of the board supports stuff like Python, Node.js, SSH, Telnet, and all sorts of other, fun Linux stuff. Figure 1: Intel Galileo board (front and back) Final internship study Aymen HAJRI
  • 7. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.3 ARDUINO COMPATIBILITES [1]: To define Arduino compatibility, the board must be released under the official Arduino name, Arduino shields compatible and development environment compatible. 1.3.1 HARDWARE COMPATIBIILITES: Galileo is the first board based on Intel architecture designed to be hardware and software pin-compatible with Arduino shields designed for the Arduino Uno R3. Digital pins 0 to 13 (and the adjacent AREF and GND pins), Analog inputs 0 to 5, the power header, ICSP header, and the UART port pins (0 and 1), are all in the same locations as on the Arduino Uno R3. This is also known as the Arduino 1.0 pinout. Galileo is designed to support shields that operate at either 3.3V or 5V. The core operating voltage of Galileo is 3.3V. However, a jumper on the board enables voltage translation to 5V at the I/O pins. This provides support for 5V Uno shields and is the default behavior. By switching the jumper position, the voltage translation can be disabled to provide 3.3V operation at the I/O pins. The Galileo board is also software compatible with the Arduino Software Development Environment (IDE), which makes usability and introduction a snap. Arduino Shield Supported Features Galileo is compatible with Arduino UNO shields and is designed to support 3.3V or 5V shields, following the Arduino Uno Revision 3. Figure 2: Galileo main connectors Final internship study Aymen HAJRI
  • 8. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.3.2 Libraries compatible with Arduino  SPI : for communicating with devices using the Serial Peripheral Interface (SPI) Bus.  EEPROM : reading and writing to "permanent" storage  Wire : Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors.  WiFi - for connecting to the internet using the Arduino WiFi shield  Servo :for controlling servo motors  USBHost : Communicate with USB peripherals like mice and keyboards. Not supported libraries:  Ethernet - for connecting to the internet using the Arduino Ethernet Shield  Firmata - for communicating with applications on the computer using a standard serial protocol.  GSM : for connecting to a GSM/GRPS network with the GSM shield.  LiquidCrystal : for controlling liquid crystal displays (LCDs)  SD : for reading and writing SD cards  SoftwareSerial : for serial communication on any digital pins.  Stepper : for controlling stepper motors  TFT : for drawing text , images, and shapes on the Arduino TFT screen 1.3.3 Intel Galileo Arduino compatibilities fails: The fundamental problem with the Galileo is that all of the bit-level I/O (ADCs, etc) go through an IO expander (Cypress CY8C9540A chip) on the board that means it takes at least 2 mS to access an IO bit. The Atmel chips used in the Arduino boards gives you direct access to the pins and ADCs etc, so they are much, much faster than the Galileo at bit-level and A/D. As the Galileo is running Linux and emulating the Arduino IDE, the GPIO’s run a lot slower than expected, as the chip copes with this overhead. The default speed of the cypress [2]is 230khz and it can be selected up to 24mhz as top speed that make the real performance of the 400mhz intel SoC not used . Final internship study Aymen HAJRI
  • 9. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review Figure 3: GPIOs connected to Cypress CY8C9540A  Default max through put is 230 Hz  IO2 and IO3 if configured as OUTPUT_FAST - will clock in at 477 kHz - to 2.93 MHz  digitalWrite() will achieve 477 kHz  fastGpioDigitalWrite() - an Intel extension of the Arduino API will achieve 680 kHz  fastGpioDigitalWriteDestructive - can achieve GPIO speeds of about 2.93 MHz To set each mode we need to upload a specific syntax.[3] 1.4 INTEL GALILEO ARCHITECTURE: 1.4.1 Board architecture: The Intel processor and surrounding native I/O capabilities of the Clanton SoC provides for a fully featured offering for both the maker community and students alike. It will also be useful to professional developers who are looking for a simple and cost effective development environment to the more complex Intel Atom processor and Intel Core processor-based designs.  400MHz 32-bit Intel Pentium instruction set architecture (ISA)-compatible processor o 16 KBytes on-die L1 cache  512 KBytes of on-die embedded SRAM  Simple to program: Single thread, single core, constant speed  ACPI compatible CPU sleep states supported  An integrated Real Time Clock (RTC), with an optional 3V “coin cell” battery for operation between turn on cycles. Final internship study Aymen HAJRI
  • 10. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review  10/100 Ethernet connector  One slot PCI Express mini-card in the PCIe 2.0 standard that can accommodate mini-PCIe cards half-height, possibly with an adapter. The slot has been designed specifically to connect a WiFi card usable with the WiFi library.  USB Host connector 2.0 able to support up to 128 USB devices.  USB client connector that can be used both for downloading the sketch on the board and connecting USB 2.0-compatible devices.  3.5mm jack connector allows to use a second serial port standard UART. Notice that this is not an audio input / output.  10-pin Standard JTAG header for debugging  Reboot button to reboot the processor  Reset button to reset the sketch and any attached shields Figure 4:Galileo architecture Final internship study Aymen HAJRI
  • 11. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.4.2 Intel Quark SoC X1000 architecture [3] The Intel Quark SoC X1000 is Intel’s lowest-power secure SoC The single-core, single-threaded Intel Quark SoC X1000 is designed on the smallest core offered by Intel, making it low-cost, small form factor, 4-layer boards. Integration of I/O interfaces, clocks, and voltage regulator in a 15mm x 15mm package simplifies design and reduces BOM by minimizing external components required on the platform. BGA packaging with a 0.593 ball pitch allows low-cost PCB designs in cost-sensitive applications. Rich I/O features include two on-chip Ethernet interfaces, PCI Express, USB 2.0, SD/SDIO/eMMC, SPI, UART, and I2C/GPIO. Intel Pentium processor instruction set architecture (ISA) enables applications to scale from the Intel Quark SoC to platforms based on Intel Atom and Intel Core processors, without recompiling code. Compatibility with 32-bit Intel architecture solutions. And Available error correcting code (ECC) protects data integrity. Available hardware-based secure boot maximizes device and data security. Available extended temperature options (-40° C - +85° C) designed for thermally constrained and harsh operating environments. Figure 5: Intel® Quark™ SoC X1000 architecture Final internship study Aymen HAJRI
  • 12. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review Architecture x86 Basic properties of the architecture: The x86 architecture [4] is a variable instruction length, primarily "CISC" design with emphasis on backward compatibility. The instruction set is not typical CISC, however, but basically an extended version of the simple eight-bit 8008 and 8080 architectures. Byte-addressing is enabled and words are stored in memory with little-endian byte order. Memory access to unaligned addresses is allowed for all valid word sizes. The largest native size for integer arithmetic and memory addresses (or offsets) is 16, 32 or 64 bits depending on architecture generation (newer processors include direct support for smaller integers as well). Multiple scalar values can be handled simultaneously via the SIMD unit present in later generations. Immediate addressing offsets and immediate data may be expressed as 8-bit quantities for the frequently occurring cases or contexts where a -128..127 range is enough. Typical instructions are therefore 2 or 3 bytes in length (although some are much longer, and some are single-byte). To further conserve encoding space, most registers are expressed in opcodes using three or four bits, the latter via an opcode prefix in 64-bit mode, while at most one operand to an instruction can be a memory location. However, this memory operand may also be the destination (or a combined source and destination), while the other operand, the source, can be either register or immediate. Among other factors, this contributes to a code size that rivals eight- bit machines and enables efficient use of instruction cache memory. The relatively small number of general registers (also inherited from its 8-bit ancestors) has made register-relative addressing (using small immediate offsets) an important method of accessing operands, especially on the stack. Much work has therefore been invested in making such accesses as fast as register accesses, i.e. a one cycle instruction throughput, in most circumstances where the accessed data is available in the top-level cache. Operating modes: 1-Real mode: 2-Protected mode. 3-Long mode. Final internship study Aymen HAJRI
  • 13. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.5 ARM PROCESSORS: 1.5.1 Architecture SOC ARM ARM is a family of instruction set architectures [5]for computer processors based on a reduced instruction set computing (RISC)architecture developed by British company ARM Holdings. A RISC-based computer design approach means ARM processors require significantly fewer transistors than typical CISC x86processors in most personal computers. This approach reduces costs, heat and power use. Such reductions are desirable traits for light, portable, battery- powered devices—including smartphones, laptops, tablet and notepad computers, and other embedded systems. A simpler design facilitates more efficient multi-core CPUs and higher core counts at lower cost, providing improved energy efficiency for servers. ARM Holdings develops the instruction set and architecture for ARM-based products, but does not manufacture products. The company periodically releases updates to its cores. Current cores from ARM Holdings support a 32-bit address space and 32-bit arithmetic; the ARMv8-A architecture, announced in October 2011, adds support for a 64-bit address space and 64-bit arithmetic. Instructions for ARM Holdings' cores have 32 bits wide fixed-length instructions, but later versions of the architecture also support a variable-length instruction set that provides both 32 and 16 bits wide instructions for improved code density. Figure 6: ARM ARCHTECTURE Final internship study Aymen HAJRI
  • 14. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review 1.5.2 Operating modes: Except in the M-profile, the 32-bit ARM architecture specifies several CPU modes, depending on the implemented architecture features. At any moment in time, the CPU can be in only one mode, but it can switch modes due to external events (interrupts) or programmatically. 1.6 COMPARATIVE AND SOLUTIONS: 1.6.1 Arduino Due Don’t support any operating system. The board contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout. 1.6.2 BeagleBone Black Great operating system support with the availability of Debian, Ubuntu, Android, and many other operating systems for the board. Installation of compilers and programming languages (such as GCC, Python, Ruby, Node.js, Perl, etc.) is very easy from packages in the supported Linux distributions. Out of the box provides a web-based Cloud9 IDE and Bonescript (Node.js and Javascript- based) interface to I/O. Huge amount of I/O available to the board, however access to the I/O is complicated by manipulating the device tree in Linux. Real-time control of devices is possible with the programmable real-time units, however there's not a lot of tools or libraries to make development with them easy yet. 1.6.3 Raspberry Pi Like the BeagleBone Black, operating system support is great with options like Raspbian, Occidentalis, and more. Installation of compilers and programming languages (such as GCC, Python, Ruby, Node.js, Perl, etc.) is very easy from packages in the supported Linux distributions. Access to I/O is easy with support from libraries in many programming languages. No real-time support so interfacing with hardware that has strict timing requirements is not possible directly. Largest support community of all the boards, with many tutorials and guides available online for learning about the Pi. Final internship study Aymen HAJRI
  • 15. 1.6.4 Comparison between RPi and Galileo:[6] The Galileo board sports a 400MHz Pentium-class System-on-a-Chip (SoC). RPi is normally clocked at 700MHz, but is easily overclocked (with the consequence of excess heat.), with RPi being faster, but don’t forget to consider details such as the number of instructions completed per clock cycle. Both are single core processors, but RPi is apparently less efficient in how many instructions it executes per clock cycle. According to the Raspberry Pi Foundation, "The overall real world performance is something like a 300MHz Pentium 2, only with much, much swankier graphics." Raspberry Pi is best for handling media such as photos or video, and a Galileo is an excellent choice if for a project requiring sensors (and decent memory and processing power), monitoring, or have productivity-related applications (Galileo has a real time clock.) RPi could be used as a networked security camera or a media server, but without an analog-to-digital converter, analog sensors would not be easy to implement. Galileo could be used to develop smart everyday "things" with lots of sensors, such as watches, health monitoring or fitness devices, or simply be an inexpensive personal computer running Linux sans all things Arduino.. The Quark, as an x86 device, has an existing well of software, and historically the vast majority of x86 SoCs are implemented in desktops. (Intel is eyeing the next wave of technology advances, known as "The Internet of Things" (IoT) or "Industry 4.0". IoT is a concept in which Things (objects, animals, or people) have unique embedded identifiers that automatically communicate (over the internet) with other things (machines, computers, or objects) without direct human intervention, to automatically transfer data for the purpose of self-regulation or for acting in concert on a grand scale. Implementation would result in big data collections and great energy, cost, and time savings with efficiencies gained from every aspect of the interaction of "smart" things. It’s a logical conclusion that Quark demonstrates Intel's interest in the evolving IoT. Assuming users match to the x86 instruction set, some bleed-over from the desktop domain to the embedded domain (and IoT) is feasible (using Linux, of course.) The Galileo has some differentiating attributes such as PCI Express (PCIe) and a Real Time Clock (RTC), whereas the RPi has peripherals well-suited for graphics-intensive applications for HD 1080p streaming video. Galileo is a memory-rich, fairly high-performance 32-bit x86 with traits well-suited to embedded portables or wearable devices: small in size (highly integrated), low power, and fairly low cost with respect to the value that is packed in this SoC Some major differences: RPi has a Graphics Processing Unit (GPU.) Galileo does not. Galileo has an I2C- controlled I/O expander that runs at 200Hz. I/O that runs through the any of the three "GPIO PWM" blocks on the Galileo schematic is going to be limited to only 200 updates per second. IO13 avoids the limitations of the expander, as well as the UARTs, SPI, I2C, and the ADC. Galileo has the first PCIe slot supported by Arduino.
  • 16. Image recognition for a line follower using intel Galileo board Chapter I: Architectural review Galileo can boot from on-board memory. The RPi boots only from an SD card, which needs an image that can be found on the Foundation website. 1.7 CONCLUSION: As it turns out, few anticipated the real payoff of this simpler design: lower power consumption. Contrary to popular belief, RISC processors are neither faster nor slower than their doddering CISC forebears. But they are generally more power-efficient, which turns out to be a key differentiator when you're making battery-powered gizmos. It's tough to compare one CPU circuit design to another, but roughly speaking, an ARM design has about one-third the number of transistors of an x86 design. That's leaving out the likes of cache and bus interfaces, which can easily consume more transistors than the CPU "core" itself. Indeed, most processors today (RISC or CISC) are about three-quarters cache, with a little CPU core lurking in one corner of the chip. It’s not clear what the Galileo board is actually good at. The CPU is great, but the lack of usable IO like video or audio makes it less capable than a Uno at things like A/D conversion. Galileo still behind the raspberry pi in performance and price. Final internship study Aymen HAJRI
  • 17. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review 2 CHAPTER II: EXPERIMENTAL REVIEW Final internship study Aymen HAJRI
  • 18. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review 2.1 INTRODUCTION: In this chapter we will set our environment and we will start the Galileo through different steps. Also as an experimental review we will test the basic Arduino examples on the Galileo. 2.2 START WITH GALILEO 1. Download Arduino for Galileo The download is about 100MB, and comes as an archived (zip or tgz) file. The next step, “installing”, amounts to unzipping the folder properly. 2. Install the Arduino IDE for Galileo(Windows Install) Windows version of the IDE software is delivered in a ZIP format. We’ll need to unzip that archive in order to use the software. Double-click, or run Arduino.exe to open up the Arduino IDE for Galileo. Figure 7:: unzip the ARDUINO IDE 3. Windows Driver Install Connect a 5V power supply to the Galileo. Connect a micro-B USB cable from the Galileo’s USB Client port to an available USB socket on your computer. Upon connecting the board, Windows will automatically attempt to install the driver and, unsurprisingly, it will fail. We’ll have to manually install the driver. Final internship study Aymen HAJRI
  • 19. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review Open up the Device Manager. (Either Start > Run > devmgmt.msc, or go to the Control Panel, select Systemand click Device Manager.) Locate the Gadget Serial v2.4 device, under the other devices tree. And Update Driver Software. Figure 8:driver install through device manager On the first window that pops up, click Browse my computer for driver software. And on the next page select Browse… and navigate to the hardwarearduinox86tools folder within your Arduino Galileo software installation. Then click Next. Figure 9:browse the driver installation Final internship study Aymen HAJRI
  • 20. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review Click Install.than Windows has successfully updated the driver software window. Look back at the Device Manager, under the Ports tree now. There should be an entry for Galileo (COM #). It’ll be important for Arduino sketch uploading and the next step, updating firmware. 4. Updating Firmware Updating the Galileo firmware is a good first step to take after driver installation. It helps to prove that your software and drivers are set up correctly, and it prepares your Galileo board with the most up-to-date firmware available. Follow the steps below to update your Galileo board’s firmware. Step 1: Reboot the Galileo (No SD Cards!) To reboot the Galileo, first unplug the USB cable. Then unplug the 5V adapter from the board. If there is an SD card in the Galileo, remove it before powering the board back up. To power the board back up, make sure you plug the 5V cable in first, then plug in a USB cable into the USB Client port. Step 2: Set Up the Arduino Galileo IDE Open up the Galileo-specific Arduino software you downloaded earlier. run the Arduino.exe file at the top level of the unzipped folder. Serial Port Selection Double-check that the title of the Window has Arduino 1.5.3 at the top. Then the first step is to select the serial port. Go to the Tools menu, then hover over Serial Port. On a Windows machine, select the COM port you saw earlier in the Device Manager. Final internship study Aymen HAJRI
  • 22. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review BOARD SELECTION: Under the Tools > Board menu, make sure Intel Galileo is selected Figure 11:Board selection Step 3: Firmware Update Last, but not least, to update the board firmware go to Help > Firmware Update. Then click Yes to proceed. The software will attempt to communicate with the board, and read the current version of the firmware. On the next window that pops up, select yes to acknowledge that you’d like to upgrade the firmware, and the process will begin. Figure 12: updating firmware Final internship study Aymen HAJRI
  • 23. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review The update procedure will take about five minutes. A Target Firmware Upgraded Successfully pop-up will appear after the update completes. 5. Using the Terminal To interact with the Linux OS through the terminal, executing simple commands through a command-line interface. In comparison to uploading Arduino sketches, interacting with the Linux command line is a much more advanced skill. To connect to the Linux terminal there is two method:  The first over the 3.5mm stereo jack RS-232 through DB9 RS-232 cable port.  The second over RJ45 Ethernet cable. The problem that there is no more computer that support serial communication through DB9 RS-232 cable so that put an interrogation for Intel engineers!! The first method requires a special cable (or two). And the two cables (3.5mm stereo jack RS-232 through DB9 RS-232 and the db9 USB can cost 15dt-7.5dollars...) So the simple way is to use RJ45 Ethernet cable and upload a special code through Arduino IDE to configure the Galileo and give it a static IP address. Once the board is connected to the computer, open up a serial terminal program (like Tera Term or Putty). Set the IP address and connect. Figure 13:telnet connection using tera term 6. Install the bigger linux image (yocto)[7} This method require a terminal emulator installed on computer. Final internship study Aymen HAJRI
  • 24. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review To boot the Galileo off the bigger Linux image, we need an SD card that is at least 1GB (and less than 32GB). You’ll also need to download the bigger image from Intel’s Drivers page (find the most current file there). The file is about 37 MB. The download comes as a 7z file, which means you may need extra software to extract it. Extract the contents of the 7z file to the top level of your SD card. Once unzipped, this is what your SD directory structure should look like. With the on-board flash memory, the Galileo has a limited amount of space to store its Linux kernel. As such, the default Linux image is a bit gimped in terms of extra features which provides access to the following:WIFI drivers ,Python,Node js,SSH,Opencv,ALSA,V4L2. Figure 14:extract the linux image Power down the Galileo (remove both USB and 5V power), and plug in the µSD card. Then power it back up. The first boot may take a little longer than average. You can use the terminal to verify that the bigger image is working. Final internship study Aymen HAJRI
  • 25. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review Figure 15: Running python on the linux image. 2.3 TEST THE ARDUINO COMPATIBILITIES: In those testes we will upload some basic Arduino code in both boards (GALILEO AND ARDUINO UNO) to test the compatibles and the issues in this test. 1. Test1:Blink example: This example shows the simplest thing you can do with an Arduino to see physical output: it blinks an LED.  Output on Arduino: the led blink  Output on Galileo: the led blink but the led doesn’t shut down totally Conclusion: The same code doesn’t work the same on the 2 boards .the reason is that Arduino clocked at 16Mhz which make it faster 4 time (at least) So that test prove the lows speed of the GPIO can make a difference which it visually proved. The GPIO’s are default clocked at 230 Hz (slow 70 time than an Arduino) 2 fast IO it’s too low number of pin for a user. IO2 and IO3 if configured as OUTPUT_FAST - will clock in at 477 kHz - to 2.93 MHz  digitalWrite() will achieve 477 kHz  fastGpioDigitalWrite() - an Intel extension of the Arduino API will achieve 680 kHz.  fastGpioDigitalWriteDestructive can achieve GPIO speeds of about 2.93 MHz Final internship study Aymen HAJRI
  • 26. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review 2. Communication examples: *ASCII Table: Demonstrates Arduino's advanced serial output functions.  Output on Arduino Uno: Figure 16:ASCII Table on serial monitor of Arduino Uno  Output on Intel Galileo: *No output (white screen) *-SerialEvent: When new serial data arrives, this sketch adds it to a String  Arduino Uno output: Figure 17: serial event on Arduino Uno serial monitor  Intel Galileo output: *No result (white screen) Final internship study Aymen HAJRI
  • 27. Image recognition for a line follower using intel Galileo board Chapter II: Experimental review Conclusion: , the board can't even be applied to real-time applications: where the microsecond will take a loop to execute - and that I/O will take place now rather than at some point within the next 2mSec.and the Arduino API who does byte-by-byte SPI transactions - which are not especially fast for the intel Galileo than we get data stuck before it send by the serial connection. 2.4 CONCLUSION: In the architectural review we stop at many feature for the Galileo which give it and advantage but in the excremental review we find that the Galileo it’s not a real Arduino compatible for many reason a simple sensor who a high clock speed need like ultrasonic sensor not supported on the Galileo. So the Galileo it’s basically dedicated to data processing and IOT applications and not for real time applications like Arduino Uno. Intel just certified his Galileo board from Arduino just to attract the community of makers of Arduino. Galileo can be a great educational platform especially by the great future from his Linux (yocto) dedicated for embedded application that handle many compilers (python node …)and libraries like OpenCV. Final internship study Aymen HAJRI
  • 28. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications 3 CHAPTER III: IMAGE RECOGNITION APPLICATION Final internship study Aymen HAJRI
  • 29. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications 3.1 INTRODUCTION: After testing the Intel Galileo board and knows the limits and the features, now we will make a python code for image processing(object detection: detect a black line) based on OpenCV library and implement it on Galileo This development is based on computer vision enhancement using digital image processing. It is accomplished through the following stages: Firstly, the acquired RGB image using the webcam is converted to gray scale mode that allows us to process our image. After that, we fix colors that we will work on it by the threshold function, and then the image is filtered using Sobel filter, finally we divide the image in such parts and search for contours of a black object in each parts . 3.2 COMPUTER VISION: Computer vision is a field that includes methods for acquiring, processing, analyzing, and understanding images and, in general, high-dimensional data from the real world in order to produce numerical or symbolic information, e.g., in the forms of decisions. A theme in the development of this field has been to duplicate the abilities of human vision by electronically perceiving and understanding an image. This image understanding can be seen as the disentangling of symbolic information from image data using models constructed with the aid of geometry, physics, statistics, and learning theory. Computer vision has also been described as the enterprise of automating and integrating a wide range of processes and representations for vision perception. As a scientific discipline, computer vision is concerned with the theory behind artificial systems that extract information from images. The image data can take many forms, such as video sequences, views from multiple cameras, or multi-dimensional data from a medical scanner. As a technological discipline, computer vision seeks to apply its theories and models to the construction of computer vision systems. Sub-domains of computer vision include scene reconstruction, event detection, video tracking, object recognition, object pose estimation, learning, indexing, motion estimation, and image restoration. 3.3 OPENCV LIBRARY 3.3.1 About: OpenCV [8](Open Source Computer Vision Library) is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and modify the code. Final internship study Aymen HAJRI
  • 30. The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms. These algorithms can
  • 31. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, extract 3D models of objects, produce 3D point clouds from stereo cameras, stitch images together to produce a high resolution image of an entire scene, find similar images from an image database, remove red eyes from images taken using flash, follow eye movements, recognize scenery and establish markers to overlay it with augmented reality, etc. OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 7 million. The library is used extensively in companies, research groups and by governmental bodies. 3.3.2 Main functions  Core: core functionality. This library allows to manipulate the basic structures, perform operations on matrices, draw on images, save and load data in XML files...  imgproc: image processing. The functions and structures this module relate to image transformations, filtering, detection of contours, points of interest...  features2d: descriptors. This module mainly involves the extraction of descriptors according to two common approaches (SURF and StarDetector)  objdetect: object detection. This library allows for the recognition of objects in an image using the Adaboost algorithm (Viola & Jones, 2001).  video: video stream processing. These functions are used to segment and track moving objects in a video.  highgui: IO and user interface. OpenCV includes its own high-level library to open, save and view images and video streams. It also contains a number of features to make very simple GUI but more than sufficient to test our programs.  calib3d: calibration, pose estimation and stereovision. This module contains functions for reconstructing a 3D scene from images acquired with multiple cameras simultaneously. 3.3.3 Used functions:  CvtColor: The function converts an input image from one color space to another. In case of a transformation to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on. Final internship study Aymen HAJRI
  • 32. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications  Threshold: The function applies fixed-level thresholding to a single-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function.  .Sobel: The Sobel Operator is a discrete differentiation operator. It computes an approximation of the gradient of an image intensity function.  Dilate: The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken.  FindContours: The function retrieves contours from the binary image using the algorithm [Suzuki85]. The contours are a useful tool for shape analysis and object detection and recognition. See squares.c in the OpenCV sample directory. 3.4 APPLICATION ALGORITHM.[9] 1st step is to take a real picture The first step is to take a frame using a webcam connected to the Galileo board the speed of frame capturing is 1 fps, we set the size of the frame 320*240. Figure 18: real time image Final internship study Aymen HAJRI
  • 33. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications 2nd step make image in gray scale mode: This step is the most important to convert image to binary mode that make us able to apply other function and manipulation on the image. Figure 19: apply the gray scale mode on the image 3rd step threshold the desired color (black): If pixel value is greater than a threshold value, it is assigned one value (may be white), else it is assigned another value (may be black). In our case we assigned the white value. 4th step apply Sobel filter on the image to remove noise: The intensity function of a digital image is only known at discrete points, derivatives of this function cannot be defined unless we assume that there is an underlying continuous intensity function which has been sampled at the image points. With some additional assumptions, the derivative of the continuous intensity function can be computed as a function on the sampled intensity function, i.e. the digital image. It turns out that the derivatives at any particular point are functions of the intensity values at virtually all image points. However, approximations of these derivative functions can be defined at lesser or larger degrees of accuracy. The Sobel operator represents a rather inaccurate approximation of the image gradient, but is still of sufficient quality to be of practical use in many applications. More precisely, it uses intensity values only in a 3×3 region around each image point to approximate the corresponding image gradient, and it uses only integer values for the coefficients which weight the image intensities to produce the gradient approximation. Final internship study Aymen HAJRI
  • 34. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications Figure 20:sobel filter 5th step: contours detection The final step in the image processing is to plot the contours in the real frame in this step we apply a circular contour for the geometric features provided by this function like center, radius … Figure 21: black line detection Final internship study Aymen HAJRI
  • 35. Image recognition for a line follower using intel Galileo board Chapter III: Image recognition Applications After the object detection we can extract many information like center, (x,y) coordinated: We can explore this data in an interactive application like robot movement, motor rotation and many other applications. Figure 22:center coordinated 3.5 CONCLUSION: After the implementation of the code we observe a real low speed of image processing and a not real time image capturing. In general intel Galileo can be used for IOT applications and not for real time applications. Final internship study Aymen HAJRI
  • 36. Image recognition for a line follower using intel Galileo board General conclusion General conclusion: Due to the big marketing from Intel to its board Galileo and the Arduino certification and the powerful quark SoC x1000 all the embedded systems community was waiting for it. But after using it and many tests, we can say that it’s a big fail for Intel community (at least at the Arduino compatibility). The Galileo engineers fails in choosing the cypress expander which are the main limitation for the full performance of the x1000 quark Soc. In general Galileo stay a good alternative for developers but the price doesn't match to the performances which make her much expensive than other boards. We can say that Galileo is a good platform in case that it cost like an Arduino Due. The raspberry pi and beagle bone stay leader for the maker’s community with over 5 million unit [10] (for the raspberry pi) that make Intel in a hard competition to gain the trust of maker’s community. The image processing application can perform much smoothly in other platform (like R Pi) With this application we can make a line follower robot or a management system based on color recognition .this application has many features for many industrial or domestic application. Final internship study Aymen HAJRI
  • 37. Image recognition for a line follower using intel Galileo board Bibliographies References: [1] http://www.arduino.cc/en/ArduinoCertified/IntelGalileo [2] http://www.cypress.com/?docID=31413 [3]https://www- ssl.intel.com/content/www/us/en/intelligent- systems/quark/quark-x1000-overview.html [4] http://en.wikipedia.org/wiki/X86 [5] http ://fr.wikipedia.org/wiki/Architecture_ARM [6]http://www.mouser.com/applications/open-source-hardware- galileo-pi/ [7]http://www.malinov.com/Home/sergey-s-blog/intelgalileo- programminggpiofromlinux [8] http://docs.opencv.org/doc/tutorials/tutorials.html [8] http://en.wikipedia.org/wiki/OpenCV [9]https://github.com/hajriaimen/Intel-Galileo-line- follower-/blob/master/code [10] https://www.raspberrypi.org/five-million-sold/  Note: All the websites are verified on 05/30/2015 at 13:00h Final internship study Aymen HAJRI
  • 38. Image recognition for a line follower using intel Galileo board Annexes Annexes Final internship study Aymen HAJRI
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Galileo Arduino hardware compatibility:  14 digital input/output pins, of which 6 can be used as Pulse Width Modulation (PWM) outputs; Each of the 14 digital pins on Galileo can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions.  A0 – A5: 6 analog inputs, via an AD7298 A-to-D converter (external converter).  Each of the 6 analog inputs, labeled A0 through A5, provides 12 bits of resolution (i.e., 4096 different values). By default they measure from ground to 5 volts.Muxed via an I2C-controlled expansion header.  I2C bus, TWI: SDA and SCL pins that are near to the AREF pin.  TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.  SPI: Defaults to 4MHz to support Arduino Uno shields. Programmable to 25 MHz Note: While Galileo has a native SPI controller, it will act as a master and not as an SPI slave. Therefore, Galileo cannot be a SPI slave to another SPI master. It can act, however, as a slave device via the USB Client connector.  UART (serial port): Programmable speed UART port (digital pins 0 (RX) and 1 (TX))  ICSP (SPI): a 6 pin in-circuit serial programming (ICSP) header, located appropriately to plug into existing shields. These pins support SPI communication using the SPI library.  VIN: The input voltage to the Galileo board when it's using an external power source (as opposed to 5 volts from the regulated power supply connected at the power jack). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin. Warning: The voltage applied to this pin must be a regulated 5V supply otherwise it could damage the Galileo board or cause incorrect operation.  5V output pin: This pin outputs 5V from the external source or the USB connector. Maximum current draw to the shield is: 800 mA.  3.3V output pin: A 3.3 volt supply generated by the on-board regulator. Maximum current draw to the shield is: 800 mA
  • 46.  GND: Ground pins.  IOREF: The IOREF pin on Galileo allows an attached shield with the proper configuration to adapt to the voltage provided by the board. The IOREF pin voltage is controlled by a jumper on the board, i.e., a selection jumper on the board is used to select between 3.3V and 5V shield operation.  RESET button/pin: Bring this line LOW to reset the sketch. Typically used to add a reset button to shields that block the one on the board.  AREF: is unused on Galileo. Providing an external reference voltage for the analog inputs is not supported. For Galileo it is not possible to change the upper end of the analog input range using the AREF pin and the analogReference()function. ARM processors modes. 1. User mode: The only non-privileged mode. 2. FIQ mode: A privileged mode that is entered whenever the processor accepts an FIQ interrupt. 3. IRQ mode: A privileged mode that is entered whenever the processor accepts an IRQ interrupt. 4. Supervisor (svc) mode: A privileged mode entered whenever the CPU is reset or when an SVC instruction is executed. 5. Abort mode: A privileged mode that is entered whenever a prefetch abort or data abort exception occurs. 6. Undefined mode: A privileged mode that is entered whenever an undefined instruction exception occurs. 7. System mode (ARMv4 and above): The only privileged mode that is not entered by an exception. It can only be entered by executing an instruction that explicitly writes to the mode bits of the CPSR. 8. Monitor mode (ARMv6 and ARMv7 Security Extensions, ARMv8 EL3): A monitor mode is introduced to support TrustZone extension in ARM cores. 9. Hyp mode (ARMv7 Virtualization Extensions, ARMv8 EL2): A hypervisor mode that supports Popek and Goldberg virtualization requirements for the non-secure operation of the CPU. Example-1 – outputs 477kHz waveform on IO2: void setup() {
  • 47. // put your setup code here, to run once: pinMode(2, OUTPUT_FAST); } void loop() { // put your main code here, to run repeatedly: digitalWrite(2, HIGH); digitalWrite(2, LOW); } Example-2 – outputs 683kHz waveform on IO3: void setup(){ pinMode(2, OUTPUT_FAST); } void loop() { register int x = 0; while(1){ fastGpioDigitalWrite(GPIO_FAST_IO2, x); x =!x; } } Example-3 – outputs 2.93MHz waveform on IO3: uint32_t latchValue; void setup(){ pinMode(3, OUTPUT_FAST); latchValue = fastGpioDigitalLatch(); } void loop() { while(1){
  • 48. fastGpioDigitalWriteDestructive(latchValue); latchValue ^= GPIO_FAST_IO3; } } Intel Galileo Storage options:  Default - 8 MByte Legacy SPI Flash main purpose is to store the firmware (or bootloader) and the latest sketch. Between 256KByte and 512KByte is dedicated for sketch storage. The download will happen automatically from the development PC, so no action is required unless there is an upgrade that is being added to the firmware.  Default 512 KByte embedded SRAM, enabled by the firmware by default.  Default 256 MByte DRAM, enabled by the firmware by default.  Optional micro SD card offers up to 32GByte of storage  USB storage works with any USB 2.0 compatible drive  11 KByte EEPROM can be programmed via the EEPROM library. * set an IP address for the Gaileo void setup() { system("telnetd -l /bin/sh"); system("ifconfig eth0 169.254.1.1 netmask 255.255.0.0 up"); //set an IP address for the Gaileo 169.254.1.1 } void loop() { } The following table compares the specs of each board:
  • 49. Arduino Due Beaglebone Black Intel Galileo Raspberry Pi SoC Atmel SAM3X8E Texas Instruments AM3358 Intel Quark X1000 Broadcom BCM2835 CPU ARMCortex- M3 ARM Cortex-A8 Intel X1000 ARM1176 Architecture 32-bit ARM core ARMv7 X86 ARMv6 Speed 84 MHz 1ghz 400mhz 700mhz Memory 512 KB (2 blocks of 256 KB) 512MB 256MB 256MB (model A) or 512MB (model B) FPU **** Hardware Hardware Hardware GPU None PowerVR SGX530 None Broadcom VideoCore IV Internal Storage The available SRAM is 96 KB in two contiguous bank of 64 KB and 32 KB. 2GB (rev B) or 4GB (rev C) 8MB None External None MicroSD MicroSD SD card
  • 50. Storage Networking ****** 10/100Mbit ethernet 10/100Mbit ethernet None (model A) or 10/100Mbit ethernet (model B) Power Source 7-12V from 2.1mm jack, or header pin or usb 5V from USB mini B connector, 2.1mm jack, or header pin. 5V from 2.1mm jack, or header pin. 5V from USB micro B connector, or header pin. Dimensions 101.52 mm x 53.3 mm 86.4mm x 53.3mm 106.7mm x 71.1mm 85.6mm x 56mm Weight 36 g 40g 50g 45g Approximate Price $38 $55 (rev C), $45 (rev B) $80 $25 (model A), $35 (model B) Documentati on Open source with full schematics. CPU fully documented Open source with full schematics. CPU fully documente d. Open source with full schematics. CPU fully documente d. Open source with full schematics. CPU partially documented. Input / Output The following table compares the I/O capabilities of each board: Arduino Due BeagleBone Black Intel Galileo Raspberry Pi Digital I/O Pins 54 65 14 17 Digital I/O Power 3.3V 3.3V 3.3V or 5V (switched with jumper) 3.3V Analo 12 with 12-bit 7 with 12-bit 6 with 12-bit None
  • 51. g Input ADC, 0-3.3V (no external reference input) ADC, 0-1.8V (no external reference input) ADC, 0-5V (no external reference input) PWM Output 12 8 6 (limited speeds prevent fine servo control) 1 UART 4 4 2 (1 exposed through 3.5mm jack) 1 SPI 1 2 1 2 I2C 2 2 1 1 USB Host 1 micro AB connector 1 standard A connector 1 micro AB connector 1 (Model A) or 2 (Model B) standard A connector USB Client 1 micro B connector 1 mini B connector 1 micro B connector None Video Output None Micro HDMI None HDMI, Composite RCA, DSI Video Input None None None CSI (camera) Audio Output None Micro HDMI None HDMI, 3.5mm jack Power Output 3.3V up to 130 mA, 5V 3.3V up to 250mA, 5V up to 1A 3.3V up to 800mA, 5V up to 800mA 3.3V up to 50mA, 5V up to 300- 500mA Other designed to be compatible with most shields designed for - Real-time support with programmable real-time units. - Mini-PCI Express slot. - Real-time
  • 52. the Uno, Diecimila or Duemilanove - Many pins have multiple -Hardware compatibility with most Arduino Leonardo compatible shields. - Many pins have multiple functions such as I2S audio, CAN bus, etc. See the wiki for more information. clock with optional battery. - Mixed compatibility with Arduino shields.