P R O J E T D ’ I N G É N I E R I E M U L T I - S I T E 2 A P E N C A D R E M E N T : J U L I E N V I L L E M E J A N E
P I E R R E G O D E T , X A V I E R H U S S O N ,
T H O M A S M A G N A C & H I P P O L Y T E D O U R D E N T
TRAITEMENT D’IMAGES SUR RASPBERRY PI
1
I - O B J E C T I F S D U P R O J E T E T C O N T E X T E P R É S E N T A T I O N D E L A R A S P B E R R Y P I
I D É E S E T F A N T A I S I E S
I I - P R I S E E N M A I N E T R É A L I S A T I O N S F E U T R I C O L O R E & A T E L I E R S E L F I E
D É T E C T E R L A L U M I È R E A M B I A N T E
C A P T E U R D E M O U V E M E N T & M A N I P U L A T I O N D E S I M A G E S I I I - P R O J E T S P O U R P I M S P A R T 2
D O M O T I Q U E
P R O B L É M A T I Q U E , F A I S A B I L I T É
2
PLAN DE LA PRESENTATION
I-OBJECTIFS ET CONTEXTE
3
Développement d’une série de TD/TP autour des cartes Raspberry Pi pour le module d’informatique de 1A.
Découverte des systèmes d’exploitation libres
Découverte des systèmes embarqués / Interface électronique-informatique.
Prototypage /Implémentation d’algorithmes de contrôle-commande.
PRESENTATION DE LA RASPBERRY PI 2
4
Micro-ordinateur monocarte à processeur ARM - Dimensions : 85,60 mm × 53,98 mm × 17 mm, Poids : 45g - Mémoire : 1 Go (SDRAM)
- 26 GPIO, 4 ports USB, sortie HDMI…
- Destiné à l’apprentissage de la programmation informatique
-Permet la réalisation facile et ‘maison’ de systèmes embarqués divers
IDÉES et FANTAISIES
5
Light Morse Communication
Light Painting
Time Lapse Motion Control
Catapulte
Télescope traqueur et correcteur
Craqueur des mots de passe
Robot Aspirateur
R2D2
Tank – R2D2
Scanner Photo-Fichier texte Générateur de partitions
Robot contrôlé avec une Wii-mote
Reconnaissance rétinienne
Domotique
IDÉES et FANTAISIES
6
Light Morse Communication
Light Painting
Time Lapse Motion Control
Catapulte
Télescope traqueur et correcteur
Craqueur des mots de passe
Robot Aspirateur
R2D2
Tank – R2D2
Scanner Photo-Fichier texte Générateur de partitions
Robot contrôlé avec une Wii-mote
Reconnaissance rétinienne
Domotique
C A H I E R D E S C H A R G E S
P R I S E E N M A I N D U R A S P B E R R Y P I 2 P E T I T E S E X P E R I E N C E S D E D O M O T I Q U E
E N V U E D E D E V E L O P P E R U N P R O J E T R É A L I S A B L E E N 2 0 H P O U R D E F U T U R S 1 A
Q U I O N T D É J À F A I T U N P E U D E P Y T H O N M A I S P A S B C P D ' E L E C .
R A S P B E R R Y + C A M É R A C M O S O B L I G A T O I R E 7
II- RÉALISATIONS
FEU TRICOLORE
8
Matériel utilisé : 3 LEDS, 3 Résistances 1kΩ pour les LEDs et 10 kΩ pour les Switchs Difficulté : Facile
Feu tricolore maison contrôlé par Raspberry Pi
FEU TRICOLORE
9
Démonstration de notre feu tricolore « maison »
ATELIER SELFIE
10
Selfie du groupe (Thomas, Xavier, Hippolyte et Pierre) avec la Picamera
Matériel ut ilisé : Picaméra (C MOS) Diff icult é : Très Facile
ATELIER SELFIE
11
DÉTECTER LA LUMIÈRE AMBIANTE
12
Matériel utilisé : 1 LED, 1 Photodiode, 1 Résistance pour chaque, 1 Bouton Difficulté : Moyen (pour l’arrêt du programme avec le bouton)
Démonstration de notre détecteur de lumière ambiante
CONTRÔLE D’UN MOTEUR
DOURDENT-GODET-HUSSON-MAGNAC PIMS
13
Démonstration du contrôle d’un moteur
Diff icult é : Moyen
Remarque : Nous disposons également d’un programme de « détection de
mouvement » mais le capteur de mouvement utilisé n’est pas fonctionnel.
MANIPULATION D’IMAGES
14
Prendre une photo avec la picaméra
Récupérer le format brut RVB
Travailler avec le tableau correspondant : ex. Image en négatif Photo du groupe en « négatif maison »
Diff icult é : Diff icile
15
III- PROJET PIMS PART.2 DOMOTIQUE
http://www.daraux-electricite.fr/domotique
RÉPARTITION DES TÂCHES
16
- Détection de mouvement et de présence (X. & P.)
- Par Traitement d’images
- avec PIR
- Couplage caméra/moteur (T. & H.)
- Suiveur
- Time lapse controller
DOURDENT-GODET-HUSSON-MAGNAC PIMS 2015 IOGS 2AP
MATERIEL NECESSAIRE
17
2 webcams
1 PIR
1 CAN
1 alimentation moteur (piles)
1 capteur de température ?
6 LEDs, 1 photodiode, 3 switchs ?
Moteur
Photo d’un PIR
RESPECT DU CAHIER DES CHARGES
DOURDENT-GODET-HUSSON-MAGNAC PIMS 2015 IOGS 2AP
18
Pour les 1A :
Montage élec déjà prêt
Progression dans la difficulté des expériences proposées
Découverte Python, Raspberry Pi et application
Traitement d’Images
N E W S K I L L S
P Y T H O N , R A S P B E R R Y P I
S I O N A L E T E M P S …
I M A G E 3 D E N P I L O T A N T 2 W E B C A M S C A N P O U R T E M P É R A T U R E
DOURDENT-GODET-HUSSON-MAGNAC PIMS
19
CONCLUSION
BIBLIOGRAPHIE
20
Listes non-exhaustive des tutoriels et cours utilisés :
Raspberry Pi : https://www.raspberrypi.org/
Piloter la Picaméra en Python : http://www.framboise314.fr/picamera-pour-piloter-integralement-la- camera-de-votre-raspberry-pi-en-python/ et https://picamera.readthedocs.org/en/release-1.10
Reconnaissance faciale : http://docs.opencv.org/modules/contrib/doc/facerec/facerec_tutorial.html
Cours de programmation en Python : https://openclassrooms.com/courses/apprenez-a-programmer- en-python et http://python.developpez.com/
Detection de mouvement : http://raspberry-pi.developpez.com/cours-tutoriels/capteur/mag-pi- utiliser-port-gpio/partie-1-detection-mouvement/
SPI sur Raspberry Pi : http://www.blaess.fr/christophe/2012/11/02/spi-sur-raspberry-pi-1/