Robotica ed Animazione Digitale La visione

Documenti analoghi
Robotica ed Animazione Digitale La visione

La visione. Prof. Alberto Borghese Dipartimento di Scienze dell Informazione Università degli Studi di Milano

Visione negli AIBO. What is Vision?

Immagini e clustering

Introduzione alla visione artificiale (computer vision) Alberto Borghese

Graphs: Cycles. Tecniche di Programmazione A.A. 2012/2013

Single-rate three-color marker (srtcm)

SVD - Application to rigid-motion estimation

Finite Model Theory / Descriptive Complexity: bin

ECOLE POLYTECHNIQlE FEDERALE DE LAUSANNE

Constant Propagation. A More Complex Semilattice A Nondistributive Framework

LA SACRA BIBBIA: OSSIA L'ANTICO E IL NUOVO TESTAMENTO VERSIONE RIVEDUTA BY GIOVANNI LUZZI

A.A. 2006/2007 Laurea di Ingegneria Informatica. Fondamenti di C++ Horstmann Capitolo 3: Oggetti Revisione Prof. M. Angelaccio

Electronic Supplementary Information for: protein KLHL40 changes upon nemaline myopathy. associated mutation

Self-Calibration Hands-on CASA introduction

Monocular SLAM. Corso di Robotica Prof. Davide Brugali Università degli Studi di Bergamo

College Algebra. Logarithms: Denitions and Domains. Dr. Nguyen November 9, Department of Mathematics UK

6.5 RNA Secondary Structure

Fisher Linear discriminant analysis (pag 228)

Mathematics Binary System basic concepts

FEROX. brand identity guidelines. Indice. Il logo The logo. Interazione con altri elementi grafici Use with other graphic elements

Radar signal contains 2 types of information: intensity and phase intensity lets us discriminate among materials

Singular Value Decomposition Applications

fresca foglia brand identity guidelines Indice Il logo The logo Interazione con altri elementi grafici Use with other graphic elements

intensity brand identity guidelines Indice Il logo The logo Interazione con altri elementi grafici Use with other graphic elements

6.5 RNA Secondary Structure. 18 novembre 2014

Accesso Mul*plo - modelli

SVITOL. brand identity guidelines. Indice. Il logo The logo. Interazione con altri elementi grafici Use with other graphic elements

6in1. brand identity guidelines. Indice. Il logo The logo. Interazione con altri elementi grafici Use with other graphic elements

Probability Distributions T O P I C # 1

Arexons. brand identity guidelines. Indice. Segno d identità Distinctive mark. Il logo The logo

I CAMBIAMENTI PROTOTESTO-METATESTO, UN MODELLO CON ESEMPI BASATI SULLA TRADUZIONE DELLA BIBBIA (ITALIAN EDITION) BY BRUNO OSIMO

Scheduling. Scheduler. Class 1 Class 2 Class 3 Class 4. Scheduler. Class 1 Class 2 Class 3 Class 4. Scheduler. Class 1 Class 2 Class 3 Class 4

Fiori di campo. Conoscere, riconoscere e osservare tutte le specie di fiori selvatici più note

Mounting the allocator on the heater. Montaggio del ripartitore sul radiatore

Customer Centric/Inquiry/E-bill. Tanya Enzminger

Esempio con Google Play tore Example with Google Play tore

Lo sniffer. questo sconosciuto! Corso di Reti di Calcolatori Architetture e Servizi A.A. 2010/11. Introduzione allo sniffing TCP

GIT Geology and Information Technology

07/02/2011. Elementi di Biomeccanica Statica, Cinetica, Esercizi sull analisi delle forze. Mechanics. Statics constant state of motion

TLR05S-350. Extender in corrente costante, 3 x 350mA per TLR04M_

Exam of DIGITAL ELECTRONICS June 14 th, 2012 Prof. Marco Sampietro

Physics [for life science] by examples Draft 0. Problems:

UNIVERSITÀ DI PISA. Facoltà di Ingegneria Corso di laurea in Ingegneria Meccanica Tesi di laurea. TITOLO della TESI. Candidato Massimiliano Mannozzi

ROTARY TENSIONERS TYPE ORIENT

Functional programming in F#: Data Structures

Analisi dei Requisiti, Progettazione Preliminare ed Esecutiva di Grandi Sistemi Ingegneristici: Casi di Studio

Quando mi collego ad alcuni servizi hosting ricevo un messaggio relativo al certificato di protezione del sito SSL, come mai?

Gocce d'anima (Italian Edition)

Laboratorio di Apprendimento Automatico. Fabio Aiolli Università di Padova

LDL come target per il controllo della dislipidemia HIV-correlata

Scelta di uno scambiatore di calore serie aria /olio

Introduzione alla storia dell intelligenza artificiale e della robotica

LA SACRA BIBBIA: OSSIA L'ANTICO E IL NUOVO TESTAMENTO VERSIONE RIVEDUTA BY GIOVANNI LUZZI

INTERNET & MARKETING INNOVATIVE COMMUNICATION.

Il colore marino: parametri ottici attivi

Le coniche furono studiate già 2000 anni fa dagli antichi Greci in particolare da Apollonio (III secolo a.c) che ne scoprì numerose proprietà.

Introduzione a Matlab

SYSTEM. brand identity guidelines. Indice. Il logo The logo. Interazione con altri elementi grafici Use with other graphic elements

Data Exploitation della missione PRISMA, precursore delle missioni iperspettrali nazionali

Ministero della Salute Direzione Generale della Ricerca Scientifica e Tecnologica Bando Giovani Ricercatori FULL PROJECT FORM

Comunicazione non verbale: computazione affettiva

SRT064 BTH SRT051 BTH SRT052 BTH

Canti Popolari delle Isole Eolie e di Altri Luoghi di Sicilia (Italian Edition)

FORM 3 (3rd year) ITALIAN TIME: 6 minutes ORAL EXAMINATION. EXAMINER S PAPER Groups A & B

ASBESTOS MINE Balangero (IT) AMIANTIFERA di BALANGERO (Italia TO)

Introduzione a Matlab

Lezione n. 7. Un esempio di applicazione del metodo degli elementi finiti: calcolo della capacità di un condensatore piano

AVERE 30 ANNI E VIVERE CON LA MAMMA BIBLIOTECA BIETTI ITALIAN EDITION

Linguaggi Corso M-Z - Laurea in Ingegneria Informatica A.A I/O, thread, socket in Java

EXAMINER S PAPER Groups A & B

Lecture 2: Data Representation

Wrap up. Lezione 16: 26 Maggio 2016

Downloading and Installing Software Socio TIS

Wizzy. brand identity guidelines. Indice. Il logo The logo. Interazione con altri elementi grafici Use with other graphic elements

Exam of ELECTRONIC SYSTEMS June 15 th, 2012 Prof. Marco Sampietro

ESERCIZIO 1 Si faccia riferimento all Allegato A - OPS 2016, problema ricorrente REGOLE E DEDUZIONI, pagina 2.

my WORLD is brand identity guidelines Indice Il logo The logo Interazione con altri elementi grafici Use with other graphic elements

Algoritmi Priority-Driven RT. Corso di Sistemi RT Prof. Davide Brugali Università degli Studi di Bergamo

Estratto dal Cap. 8 di: Statistics for Marketing and Consumer Research, M. Mazzocchi, ed. SAGE, 2008.

Il concetto di varietà e la nascita della teoria degli insiemi RIEMANN ( )

A.S. 2011/2012. Circuito semaforico da incrocio. Corso di Elettronica. Dipartimento di Elettrotecnica

NATIONAL SPORT SCHOOL

Pilot project for tobacco mapping by remote sensing

Appendice A. Conduttori elettrici, sezioni e diametri Appendix A. Wires, Sizes and AWG diameters

Relative error analysis of matrix exponential approximations for numerical integration

Exam of ELECTRONIC SYSTEMS June 17 th, 2014 Prof. Marco Sampietro

S C.F.

Quality-by-Design nello sviluppo e scaleup di processi di liofilizzazione di farmaci LYO. Research Team

Tipici tempi di esecuzione. Martedì 7 ottobre 2014

ROCKLED indoor / outdoor use

Marketing non Convenzionale: Viral, Guerrilla e prospettive future (Italian Edition)

manuale di identità visiva visual identity manual

Progettazione Fisica

WEB OF SCIENCE. COVERAGE: multidisciplinary TIME RANGE: DOCUMENT TYPES: articles, proceedings papers, books

R.M.Dorizzi, Strumenti per interpretare gli esami di laboratorio? Forlì, 9 ottobre 2012

Il pattern e le immagini utilizzate sono di proprietà dell autore MaryJ Handmade.

Sistema K2 / K2 System

Guida ai Promessi Sposi - Riassunto e analisi dei personaggi: Analisi e interpretazione del romanzo di A. Manzoni (Italian Edition)

Transcript:

Robotica ed Animazione Digitale La visione Prof. Alberto Borghese Dipartimento di Scienze dell Informazione borghese@dsi.unimi.it Università degli Studi di Milano Slide in parte tratte da: http://www.andrew.cmu.edu/course/15-491 1/73 Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 2/73 1

Le funzioni della visione 3/73 Computer Vision Obbiettivo: determinazione delle proprietà geometriche, fisiche e dinamiche del mondo che ci circonda mediante elaborazione di immagini o sequenze di immagini. Low level vision (o early vision): estrazione dalle immagini o sequenze di immagini delle informazioni necessarie al livello superiore (features = caratteristiche locali) utili alle elaborazioni successive. High level vision: riconoscimento, associazione di un significato semantico all atto del vedere, ricostruzione del movimento degli oggetti. Nel nostro caso, comportamento reattivo, principalmente low-level vision. 4/73 2

Processing visivo. Low-level vision (early vision) Pre-elaborazione delle immagini (estrazione di feature). Calcolo del Movimento degli oggetti sull immagine (optical flow). Estrazione del colore. Estrazione della profondita. Riconoscimento di tessiture. Contorni (edge) Low-level vision (intermediate representations). Calcolo delle sorgenti di illuminazione e stima dell albedo e del colore. Forme dai contorni (shape from edges). Forme da tessitura (shape from texture). Forme da ombreggiatura (shape from shading). Stereo-matching. Determinazione della stuttura 3D e del movimento 3D di oggetti da sequenze di immagini monoculari e da sistemi di specchi (Structure from Motion). Ricostruzione 3D da stereo di oggetti della scena. Ricostruzione di superfici. Parametri geometrici del sistema di visione (calibrazione). High-level vision. Interpretazione e movimento (la visione artificiale deriva storicamente dall Intelligenza Artificiale). 5/73 Visione 3D, Elaborazione di immagini e grafica Visione 3D: Immagine/i => Ricostruzione 3D della scena statica o dinamica ed interpretazione. Grafica 3D: Modello 3D della scena, statico o dinamico => Visualizzazione. Si incontrano sul terreno della visualizzazione 3D. Immagini Immagini Immagini Statiche Dinamiche Shape from Monocular View Feature Extraction Differential Motion Analysis L elaborazione delle imagini costituisce il primo livello di un sistema di visione. Fornisce le features di base. 3D Shape Features Optical Flow 6/73 3

Cosa sono le features? 1) Località. 2) Significatività. 3) Riconoscibilità. 7/73 Riconoscimento dei bordi (edge) 8/73 4

Estrazione di regioni 10/73 Il flusso ottico 12/73 5

I problemi di visione sono mal posti Perché non è facile costruire un sistema di visione? Difficoltà ad identificare esattamente le feature Risoluzione spaziale limitata. Gli oggetti reali non sono mai uniformemente illuminati. I contorni non sono netti. Le superfici non hanno albedo costante. L illuminazione genera campi di irradianza dificili. Difficoltà ad assemblare le feature Difficoltà ad interpretare le primitive visive 13/73 La vera Visione 14/73 6

Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 15/73 IMMAGINI DIGITALI Una matematica del pixel non è ancora disponibile. pixel ny nx IMG = Matrice nx,ny = 142 174 164 144...... 107......... 16/73 nx ny 7

IMMAGINI DIGITALI Quantizzazione: n bit => 2 n colori ES.: 3 bit => 2 3 = 8 gradini 2 bit => 2 2 = 4 gradini 8 bit => 256 colori 3 bit => 8 colori 17/73 Colore Colour is the colour which is perceived, seen, that is the colour which is reflected by the objects surface. Color is coded with three parameters (three channels). Colour images are represented as additive mixture of Red Green Blue (additive mix). Another important coding is: Y. Brightness. Intensità del colore. It can be viewed as the colour of the image in B/W. It is due to the illumination intensity. Cb, Cr. Quantità di blu e di rosso all interno di un immagine. Y Brightness. Y U, V Color. Cb, Cr 18/73 8

Conversione tra gli spazi colore (secondo ITU-R BT.601) Y = + 0.299 * R + 0.587 * G + 0.114 * B Cb = - 0.168736 * R - 0.331264 * G + 0.5 * B Cr = + 0.5 * R - 0.418688 * G - 0.081312 * B R = Y + 1.402 * (Cr-128) G = Y - 0.34414 * (Cb-128) - 0.71414 * (Cr-128) B = Y + 1.772 * (Cb-128) Diversi coefficienti per ITU-R NT.709 - HDTV 20/73 White Light Grey (R=100, G=100, B=100) Colors (examples in RGB) Dark grey Black Red Yellow Pale blue 21/73 Green 9

Color Spaces - RGB 22/73 Color Spaces YUV (YCbCr) 23/73 10

Color Spaces YCbCr 24/73 Image RGB 26/73 11

Image Raw R=Y G=Cb B=Cr 27/73 Color Spaces - Discussion RGB Handled by most capture cards Used by computer monitors Not easily separable channels YCbCr (YUV) Handled by most capture cards Used by TVs and JPEG images Easily workable color space 28/73 12

Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 30/73 L occhio umano Its behavior is very similar to that of a camera 31/73 13

La camera come strumento di ripresa 32/73 La pin-hole camera Proiezione prospettica: tutti i raggi di proiezione passano per un unico punto, detto centro di proiezione. Pinhole camera 33/73 14

La lente Pinhole camera Lente convergente 34/73 Geometria dell ottica Oggetti all infinito Distanza focale: distanza del piano immagine quando un oggetto si trova all infinito. Asse ottico: raggio che non viene deviato dalla lente. Intersezione dell asse ottico con il piano immagine dà il punto principale (F). 35/73 15

Messa a fuoco Problema della messa a fuoco Parametri di camera (o intrinseci): Punto principale c(x,y) + lunghezza focale, f (3 parametri). Occorre conoscere anche il fattore di forma dei pixel nel caso di immagini digitali (è una costante, non un parametro). (Distorsioni). 36/73 Calculating Distance d Object Image plane f d = o f i o i Image of the object 37/73 Inverted pinhole camera 16

Retroproiezione c(c x, c y ) punto principale Il punto A si trova lungo la retta che ha coseni direttori, misurati in un sistema di riferimento locale: f + ( a f + ( a f + ( a x x x a c x cx ) + ( a a c y cx ) + ( a f c ) + ( a x x y y y y c ) y c ) y c ) y 38/73 Esempi di Distorsioni Ottime per effetti speciali, un po meno per delle misure.. Le camere non sono metriche. 39/73 17

Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 40/73 Fast color segmentation Low level vision is responsible for summarizing relevant-to-task image features Color is the main feature that is relevant to identifying the objects needed for the task Important to reduce the total image information Color segmentation algorithm Segment image into symbolic colors Run length encode image Find connected components Join nearby components into regions 41/73 18

Color Segmentation Goal: semantically label each pixel as belonging to a particular type of object Map the domain of raw camera pixels into the range of symbolic colors L C may include for instance ball, carpet, 2 goal colors, 1 additional marker color, 2 robot colors, walls/lines and unknown F : y, u, v c L Reduces the amount of information per pixel roughly by 1.8M Instead of a space of 2 24 = 256 3 values, we only have 9 values! NB No semantic is given. Low level vision. 42/73 Before Segmentation 43/73 19

Ideal Segmentation 44/73 Result of Segmentation Segmentazione HW in 8 classi. Viene definita per ogni classe: Y min Y max Cb min Cb max Cr min Cr max 45/73 20

Potential Problems with Color Segmentation 46/73 Color Segmentation Analysis Advantages Quickly extract relevant information Provide useful representation for higher-level processing Differentiate between YCbCr pixels that have similar values Disadvantages Cannot segment YCbCr pixels that have identical values into different classes Generate smoothly contoured regions from noisy images 47/73 21

Turning Pixels into Regions A disjoint set of labeled pixels is still not enough to properly identify objects Pixels must be grouped into spatially-adjacent regions Regions are grown by considering local neighborhoods around pixels How to achieve this? 4-connected neighborhood N N N N P N N P N N N N N N 8-connected neighborhood 48/73 1) Run Length Encoding Segment each image row into groups of similar pixels called runs Runs store a start and number of pixels belonging to the same color (alternatively the end point is memorized) Original image 49/73 RLE image 22

2) Merging Regions Goal: a closed region is formed. 50/73 Final Results Runs are merged into multi-row regions Image is now described as contiguous regions instead of just pixels Objects are convexes 51/73 23

Data Extracted from Regions Features extracted from regions Centroid Mean location Bounding box Max and min (x,y) values Area Number of pixels in box Average color Mean color of region pixels Regions are stored by color class and sorted by largest area These features let us write concise and fast object detectors Features are a function of later processing required. 52/73 High level vision - Object Detection Process Produces a set of candidate objects that might be this object from lists of regions Given n orange blobs, is one of them the ball? Compares each candidate object to a set of models that predict what the object would look like when seen by a camera Models encapulate all assumptions Also called filtering Selects best match to report to behaviors Position and quality of match are also reported 54/73 24

Filtering Overview Each filtering model produces a number in [0.0, 1.0] representing the certainty of a match Some filters can be binary and will return either 0.0 or 1.0 Certainty levels are multiplied together to produce an overall match Real-valued range allows for areas of uncertainty Keeps one bad filter result from ruining the object Multiple bad observations will still cause the object to be thrown out Alternatively fuzzy inference can be used. 55/73 Object Detection Algorithm 1) Produce a set of candidate objects that might be the object from the list of regions produced by low-level vision. 2) Compare each candidate object to a set of models that predict features that the object should have when seen through a camera. 3) Select the best match and compute its distance to the robot based on the robot s camera model and kinematics. 4) Return this best match along with the quality of the estimate to the behaviors. 56/73 25

Riconoscimento palla CMU I Bounding box (height x width) o = 1 iff w = h o < 1 if w > h or w > h 59/73 Riconoscimento palla CMU II h fisso -w h fisso -w 60/73 26

Calculating Distance d Object Image plane f d = o f i o i Image of the object 64/73 Inverted pinhole camera Calculation of Camera Position Position of camera is calculated based on body position and head position w.r.t body Body position is known from walk engine Head position relative to body position is found from forward kinematics using joint positions Camera position camera_loc is defined as position of camera relative to egocentric origin camera_dir, camera_up, and camera_down are unit vectors in egocentric space Specify camera direction, up and right in the image 65/73 27

Ball Position Estimation Two methods are used for estimating the position of the ball The first calculates the camera angle from the ball model The second uses the robot s encoders to calculate the head angle The first is more accurate but relies on the pixel size of the ball This method is chosen if the ball is NOT on the edge of the image Partial occlusions will make this estimate worse camera h d g r 66/73 Ball Position Estimation - I Ball position estimation problem is overconstrained. g is the unknown Works also when the ball is at the edge of the image Critical estimate of the body schema (height h and angle a) g = h tan(a), does not need d camera h a d g 67/73 r 28

Ball Position Estimation - I This method works all of the time Camera angle computed from kinematics Used when ball is on edge of image camera h a g 68/73 r Ball Position Estimation - II This method is more accurate Requires accurate pixel count Used only when ball is near center of image More reliable when many pixels are available (close range) g = 2 2 d h a = acos(h/d) camera a h f * radius d = radius d measured real g 69/73 r 29

Additional Color Filters - tricks The pixels around the ball are analyzed Red vs. area Filters out candidate balls that are part of red robot uniform Green filter Ensures the ball is near the green floor If the ball is farther than 1.5m away Average redness value of the ball is calculated If too red, then the ball is assumed to be the fringe of the red robot s uniform 71/73 End Result Accurate Ball Position 72/73 30

Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 73/73 31