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

Immagini e clustering

Introduzione alla visione artificiale (computer vision) Alberto Borghese

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

SVD - Application to rigid-motion estimation

Fisher Linear discriminant analysis (pag 228)

Single-rate three-color marker (srtcm)

Finite Model Theory / Descriptive Complexity: bin

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

Constant Propagation. A More Complex Semilattice A Nondistributive Framework

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

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

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

Singular Value Decomposition Applications

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

Self-Calibration Hands-on CASA introduction

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

6.5 RNA Secondary Structure

Scelta di uno scambiatore di calore serie aria /olio

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

Wrap up. Lezione 16: 26 Maggio 2016

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

FEROX. 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

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

Blind Source Separation: Tradizioni e Prospettive. Informatica applicata alla musica, 12/04/2016

Introduzione alla storia dell intelligenza artificiale e della robotica

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

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

Gocce d'anima (Italian Edition)

GIT Geology and Information Technology

Introduzione a Matlab

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

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

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

Customer Centric/Inquiry/E-bill. Tanya Enzminger

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

Accesso Mul*plo - modelli

Wrap up. Lezione 19: 19 Maggio 2014

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

Laboratorio di Apprendimento Automatico. Fabio Aiolli Università di Padova

Introduzione a Matlab

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

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

Downloading and Installing Software Socio TIS

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

La questione dei Multiple Comparisons

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

Comunicazione non verbale: computazione affettiva

Sun paths in the sky. Solar diagrams and obstructions: shading systems design. Sun paths in the sky. Sun paths in the sky

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

EXAMINER S PAPER Groups A & B

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

LDL come target per il controllo della dislipidemia HIV-correlata

Pilot project for tobacco mapping by remote sensing

Introduction. The Structure of a Compiler

Studio di tecniche per la rivelazione di traiettorie di veicoli in movimento in sequenze video

INTERNET & MARKETING INNOVATIVE COMMUNICATION.

Il colore marino: parametri ottici attivi

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

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

Wrap up. Lezione 20: 29 Maggio 2018

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

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

Esempio con Google Play tore Example with Google Play tore

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

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

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

Morte e Reincarnazione (Italian Edition)

SRT064 BTH SRT051 BTH SRT052 BTH

NATIONAL SPORT SCHOOL

INFORMATICA GRAFICA SSD ING-INF/05 Sistemi di elaborazione delle informazioni a.a. 2007/2008

PROGETTAZIONE ROBUSTA

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

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

Tipici tempi di esecuzione. Martedì 7 ottobre 2014

PROGETTO parte di Programma Strategico

ROTARY TENSIONERS TYPE ORIENT

Corso di Laurea in FISICA Dispositivi di calcolo II

Data Exploitation della missione PRISMA, precursore delle missioni iperspettrali nazionali

B j. custom colour on demand. 6/8 weeks approx matching border

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

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

ENGINE COMPONENT DESIGN Cap. 7 AIAA AIRCRAFT ENGINE DESIGN R03-23/10/2013

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

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

Functional programming in F#: Data Structures

The picture can't be displayed. DRONI & INTELLIGENZA ARTIFICIALE

Italian Round WPF Sudoku Grand Prix 2013 at Logic Masters

L anno scorso c erano 643 postulanti e 384 novizii

SHOP ONLINE TWISTED XL BORN IN ITALY. ARCHITECTURAL BODY designed to embody. collezione 2015

MAGNET LINK SURFACE MOUNTED

Una Ricerca Erboristica (Italian Edition)

Question 1: introduction to computer programming

Italians, European economic policies and the Euro

ECCO LE ISTRUZIONI PER INSERIRE IL MATERIALE RICHIESTO DAL BANDO TEATRO SENZA FILO CONTEST:

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/69 Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 2/69 1

Le funzioni della visione 3/69 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/69 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/69 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/69 3

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

Estrazione di regioni 10/69 Il flusso ottico 12/69 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/69 La vera Visione 14/69 6

Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 15/69 IMMAGINI DIGITALI Una matematica del pixel non è ancora disponibile. pixel ny nx IMG = Matrice nx,ny = 142 174 164 144...... 107......... 16/69 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/69 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 two important codings are: Hue. Describes the colour (red, green ) Saturation. Quantity of the colour. It differentiates red from rose. It can be viewed as the difference from the colour and a grey with the same brightness. Brightness. Intensità del colore, it depends on the hue and saturation. It can be viewed as the colour of the image in B/W. It is due to the illumination intensity. Y Brightness. Y U, V Color. Cb, Cr 18/69 8

White Light Grey (R=100, G=100, B=100) Colors (examples in RGB) Dark grey Black Red Yellow Pale blue 19/69 Green Color Spaces - RGB 20/69 9

Color Spaces YUV (YCbCr) 21/69 Color Spaces YCbCr 22/69 10

Color Spaces HSV www.wordiq.com/definition/hsv_color_space 23/69 Image RGB 24/69 11

Image Raw R=Y G=Cb B=Cr 25/69 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 HSV Rarely used in capture cards Numerically unstable for grayscale pixels Computationally expensive to calculate 26/69 12

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 27/69 Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 28/69 13

L occhio umano Its behavior is very similar to that of a camera 29/69 La camera come strumento di ripresa 30/69 14

La pin-hole camera Proiezione prospettica: tutti i raggi di proiezione passano per un unico punto, detto centro di proiezione. Pinhole camera 31/69 La lente Pinhole camera Lente convergente 32/69 15

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). 33/69 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). 34/69 16

Esempi di Distorsioni Ottime per effetti speciali, un po meno per delle misure.. Le camere non sono metriche. 35/69 Sommario La visione Le immagini digitali Il modello geometrico di una camera Segmentazione real-time. 36/69 17

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 37/69 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. 38/69 18

Before Segmentation 39/69 Ideal Segmentation 40/69 19

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 41/69 Potential Problems with Color Segmentation 42/69 20

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 43/69 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 44/69 21

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 45/69 RLE image 2) Merging Regions Goal: a closed region is formed. 46/69 22

Final Results Runs are merged into multi-row regions Image is now described as contiguous regions instead of just pixels Objects are convexes 47/69 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. 48/69 23

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 50/69 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. 51/69 24

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. 52/69 Riconoscimento palla CMU I 55/69 25

Riconoscimento palla CMU II 56/69 Ball Distance Calculation The size of the ball is known The kinematics of the robot are known Given a simplified camera projection model, the distance to the ball can be calculated d d f Object Image plane = o i o Image of object i f Inverted pinhole camera 57/69 26

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 61/69 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 62/69 27

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 67/69 End Result Accurate Ball Position 68/69 28

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