Microsoft Kinect 2. Lab 06. Renato Mainetti Alessandro Tironi.

Documenti analoghi
Copyright 2012 Binary System srl Piacenza ITALIA Via Coppalati, 6 P.IVA info@binarysystem.eu

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

BDM Motorola MC32xxx User Manual

Self-Calibration Hands-on CASA introduction

Principi di movimento di AIBO

Data Alignment and (Geo)Referencing (sometimes Registration process)

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

Android Development. Course Projects. Università degli Studi di Parma

Fisher Linear discriminant analysis (pag 228)

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

Luca Dei Cas Centro di Monitoraggio Geologico ARPA Lombardia

Keep calm, observe and assess

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

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

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

Applicazioni della Realtà Virtuale al settore della Riabilitazione Motoria. Stato dell arte e caso di studio: il progetto HYPER Alessandro De Mauro

User Guide Guglielmo SmartClient

ART. 1254AL155SS CERNIERE PER PORTE A SPINGERE MANO SINISTRA / HINGES FOR LEFT-HAND DOORS

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

GstarCAD 2010 Features

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

U Corso di italiano, Lezione Quattordici

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

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

Presence in VR: ImmotionRoom

Compatibilità del Portale Piaggio con Internet Explorer 10 e 11. Internet Explorer 10

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

Classificazione e Segmentazione di Gesture per la Human Computer Interaction

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

Code: GW-IMP-WEB-1. Datalogger web pulses counter. Version 6 inputs with Ethernet. MarCom

SVD - Application to rigid-motion estimation

IL GIOVANE HOLDEN FRANNY E ZOOEY NOVE RACCONTI ALZATE LARCHITRAVE CARPENTIERI E SEYMOUR INTRODUZIONE BY JD SALINGER

Blender Tutorial Creazione gioco in FPS Questo video tutorial è stato preso da you tube e lo script richiama il sito

General info on using shopping carts with Ingenico epayments

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

Resources and Tools for Bibliographic Research. Search & Find Using Library Catalogues

Roll it. per grandi o piccole dimensioni, Meccanismo Light Touch

Portale Materiali Grafiche Tamburini. Grafiche Tamburini Materials Portal

UNIVERSITÀ DEGLI STUDI DI TORINO

Le piccole cose che fanno dimagrire: Tutte le mosse vincenti per perdere peso senza dieta (Italian Edition)

Microsoft Dynamics CRM Live

Mock exam. Cow & Gate

100 consigli per vivere bene (Italian Edition)

Sensori low-cost per la riabilitazione

Elaborazione di segnali generati dal sensore Kinect

Manuale di applicazione del logo Axiom logo application manual

Pensiero computazionale. Lezione 2: Introduzione a Scratch

Solutions in motion.

INTERNET & MARKETING INNOVATIVE COMMUNICATION.

Data Exploitation della missione PRISMA, precursore delle missioni iperspettrali nazionali

The Effect of Manual Techniques on Cervical Kinematic. An Innovative Approach using Helical Axis

U Corso di italiano, Lezione Tredici

Constant Propagation. A More Complex Semilattice A Nondistributive Framework

NDCMB NDCMB MOTORIDUTTORI C.C. AD ASSI ORTOGONALI RARE EARTH D.C. BEVEL HELICAL GEARMOTORS

Finite Model Theory / Descriptive Complexity: bin

Corso di Percezione Robotica (PRo) Modulo C. Percezione Attiva

Corso di Laurea in FISICA Dispositivi di calcolo II

- rispetto al contenuto linguistico: SAPERE/SAPER FARE Saper relazionare in modo scorrevole e con la giusta intonazione

API e socket per lo sviluppo di applicazioni Web Based

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

19 touchscreen display

Fondamenti di Informatica Esercitazione 8/5/2014

Downloading and Installing Software Socio TIS

products that can give profit from the management point of view. Please read carefully to better understand our DAVIDE vs GOLIA

Computer Graphics. 3D Rendering. Digital representation of 3D objects. Scena 3D rendering image. Geometry of a 3D object. 3D Model

Percorsi: L'Italia Attraverso La Lingua E La Cultura, Books A La Carte Plus MyItalianLab By Francesca Italiano, Irene Marchegiani READ ONLINE

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

Succhi di frutta e verdura con la centrifuga (Italian Edition)

Scelta di uno scambiatore di calore serie aria /olio

Database support Prerequisites Architecture Driver features Setup Stored procedures Where to use. Contents

Guida all immatricolazione online

Conoscere l uso delle collezioni in Java. Conoscere il concetto di Generics (programmazione

CCTV DIVISION. Guida Alla Lettura del Numero Seriale, Codice Prodotto, Versione Firmware, Versione Software, Codice Libretto

Singular Value Decomposition Applications

Virtual planning of operations in hazardous environment

Sistemi di Monitoraggio Monitoring Systems

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

START-LINE AYCT-202 USER MANUAL MULTI LANGUAGE. Item Version 2.0 Visit for the latest instructions REMOTE CONTROL

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

Introduzione ai motion controllers ed al sensore Kinect

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

PORTALE DEI SERVIZI ART/ ART WEB PORTAL MANUALE UTENTE /USER MANUAL PROCEDURA DI ACCREDITAMENTO / REGISTRATION PROCEDURE

Gocce d'anima (Italian Edition)

Manuale di applicazione del logo Darestone Darestone logo application manual

Tomography. A Lecture for: Inverse Problems Seminar. Asaf Zarmi Dec. 2009

20 Giugno 2013 Gianni Rosa

Posta elettronica per gli studenti for the students

2 LINE: FROM 2,5 TO 6 SECONDS (ONLY IF VERY DENSE) NO!: LESS THAN 2 SECONDS, MORE THAN 6 SECONDS

Manuale di applicazione del logo Proel logo application manual

Esperienze nel settore Automotive

INSTALLATION GUIDE ITA-ENG CATALYZER YAMAHA T-MAX

Mod INTERFACCIA USB/KEY USB/KEY INTERFACE. Sch./Ref.1067/003

Speech to text at RSI archive

Le cellule staminali dell embrione: cosa possono fare Embryonic stem cells are exciting because they can make all the different types of cell in the

UNIFORM. La logica vi porterà da A a B. L immaginazione vi porterà dappertutto. - Albert Einstein -

NDCMG NDCMG MOTORIDUTTORI C.C. AD INGRANAGGI CILINDRICI RARE EARTH D.C. HELICAL GEARMOTORS

STONE AGE SIMPLICITY IS NOT OVER. Semplicità. L Età della Pietra non è mai finita.

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

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

Transcript:

Microsoft Kinect 2 Renato Mainetti Alessandro Tironi renato.mainetti@unimi.it alessandro.tironi@studenti.unimi.it Lab 06

Outline: Introduction and Theory Kinect vs others NUI devices Kinect History and how does it works? Avateering (Rotations vs Positions) Quaternions Kinect Skeleton Let s CODE! Microsoft Kinect SDK Kinect Unity Integration Avateering in Unity Kinect as NUI for our AAA game (Assembly line) Kinect & VR Kinect 2 - VR 2

NUI: In computing, a natural user interface is a user interface that is effectively invisible, and remains invisible as the user continuously learns increasingly complex interactions. The word natural is used because most computer interfaces use artificial control devices whose operation has to be learned. (examples are: multitouch, speech recognition, gesture motion recognition) Kinect 2 - VR 3

Obtrusiveness, precision, usability, etc Kinect vs

Kinect 1 Hardware (Primesense) RGB: 640x480 @ 30fps, 1280x960 @ 12fps Depth: 320x240 @ 30fps 4 mic array (16 KHz) Servo for Tilt regulation 5

Kinect 1 (xbox 360) vs Kinect 1 (for Windows) The windows version has introduced: Near mode Sitting position RGB cam exposure etc Different use licenses 6

How does it work? V1 Proprietary technology: Structured light Depth from focus Stereo principles 7

Kinect 2 Hardware (3DV Systems, Canesta) RGB: 1920x1080 @ 30fps Depth & IR cam: 512x424 @ 30fps 4 mic array (48 KHz) USB 3.0 8

How does it work? V2 TOF: 9

Kinect 1 Skeleton: 20 joints 2 bodies 10

Kinect 2 Skeleton: 11

Skeleton - demo 12

Colour and Depth demo (alignment) 13

Face tracking demo Orientations Expression etc 14

Kinect HeartRate: 15

Audio direction demo 16

Speech recognition demo SIT - ROLL - BARK 17

3D scanning (and retopolgy) 18

Kinect Studio 19

Mocap / Avateering Brekel PRO body V2 20

Avateering (Why rotation are so important) The right approach is to apply the rotation evaluated to the avatar skeleton. If we try to translate the avatar s joints to the Kinect s joint position then the mesh could get strechtched, depending how the skeleton was made and skinned to the mesh. 21

Quaternion: Generalization of complex numbers Very powerful to describe rotation and orientation It doesn t suffer of the gimbal lock problem Excellent for interpolation 22

Kinect s rotations Kinect, every frame, returns the rotation quaternion of each joint. (Leaf joint excluded) Each quaternion represents the absolute rotation of the parent bone.(e.g: the ElbowRight quaternion represents the right arm rotation) The Y axis is always parallel to the bone 23

Microsoft Kinect SDK 2.0 The SDK gives you the ability to access all the Kinect s features (frame by frame): Color sensor (RGB image) Depth sensor (Float depth image) Audio samples Body tracking (Joint Pos (X,Y,Z), Bone Quaternion (X,Y,Z,W)) Other features: Face tracking Gesture Recognition 24

Sensor initialization and joint evaluation Let s try showing the movements of the joints in a unity scene. Remember to deallocate each frame after using it. (in c# use the using structure) It is possible to retrieve the 3D coordinates using the Body.Joints dictionary: CameraSpacePoint p = body.joints[jointtype.spinebase]; Pay attention to the reference axis system! (Kinect is a right-handed ) 25

Inizializzazione del sensore KinectManager.InitializeSensor(): // Gets and opens default sensor. Sensor = KinectSensor.GetDefault(); if (!Sensor.IsOpen) Sensor.Open(); // Sets bodyframereader. bodyframereader = Sensor.BodyFrameSource.OpenReader(); // Initializes the bodies array. bodies = new Body[bodyFrameReader.BodyFrameSource.BodyCount]; 26

Dalle posizioni alle rotazioni Mostriamo in un altra scena come cambiano nel tempo le rotazioni misurate dal Kinect. Passiamo dal sistema di riferimento del sensore a quello di Unity invertendo i valori dei campi Z e W del quaternione; È possibile applicare delle rotazioni aggiuntive moltiplicando il quaternione q K ottenuto dal Kinect per un altro quaternione q offset 27

Avateering Importiamo un Avatar da Blender già skinnato e andiamo ad applicare le rotazioni ai joint. Se facciamo tutto per bene dovremmo vedere la mesh muoversi senza particolari deformazioni (carta di caramelle o cose del genere), altrimenti occorre applicare degli offset come visto precedentemente. 28

Come usare il package dentro la nostra scena di gioco Strutturiamo la scena come un sistema client/server in cui il server (il KinectManager) contatta i client (nel nostro caso l avatar) inviandogli di volta in volta i frame contenenti i dati acquisiti. L avatar, per ogni frame ricevuto, applicherà le rotazioni in esso contenute al rispettivo joint, dopo le opportune elaborazioni. KinectManager.Update(): // Executes each of the elaboration tasks in the given order. IEnumerator<KinectService> taskenumerator = Tasks.GetEnumerator(); while (taskenumerator.movenext()) taskenumerator.current.elaborate(bodies); 29

Come usare il package dentro la nostra scena di gioco Avateering.Elaborate(): foreach (JointType currentjoint in Enum.GetValues(typeof(JointType))) { // Gets the quaternion acquired from Kinect. Quaternion neworientation = new Quaternion(orientations[currentJoint].Orientation.X, orientations[currentjoint].orientation.y, -orientations[currentjoint].orientation.z, - orientations[currentjoint].orientation.w); // Applies the correction from a joint-to-correction dictionary. neworientation *= adjustrotations[currentjoint]; // Applies the rotation. jointmap[currentjoint].transform.rotation = Quaternion.Euler(offsetRotation) * neworientation; } 30

Configuriamo la scena per colpire i cubi Vogliamo che l avatar sia in grado di evitare che i cubi rossi arrivino in fondo al nastro prendendoli a pugni o a calci. Per fare questo applichiamo un collider ai joint interessati. 31

Configuriamo la scena per colpire i cubi Per calcolare la direzione del pugno/calcio conserviamo un buffer della posizione del joint (mani e piedi) nel frame precedente, per calcolare il vettore risultante quando viene registrata una collisione. KinectPositionBuffer.Elaborate(): foreach (JointType jointtype in bufferedjoints){ CameraSpacePoint acquiredposition = playerbody.joints[jointtype].position; Vector3 newposition = new Vector3(acquiredPosition.X, acquiredposition.y, acquiredposition.z); } // Updates buffers. bufferold[jointtype] = buffernew[jointtype]; buffernew[jointtype] = newposition; 32

Kinect and VR You can try this combination for your final project in the lab! Kinect 2 - VR 33