nui - natural user interface utilizando kinect

46
KINECT FOR WINDOWS NUI - Natural User Interface Utilizando o Kinect 1

Upload: vitor-reis

Post on 20-May-2015

211 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

NUI - Natural User Interface Utilizando o Kinect

1

Page 2: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

APRESENTAÇÃO● Vitor A. Reis - [email protected]● Desenvolvedor VBA, .NET no Grupo Custom

Software● Blog: www.vitorreis7.wordpress.com

2

Page 3: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

QUICKSTART SERIES3

Page 4: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamentos de Audio

QUICKSTART SERIES

4

Page 5: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

INSTALANDO EUSANDO O KINECT

5

Page 6: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

INTRODUÇÃO● Elaborado para quem esta começando● Assumindo que você tem alguma experiência

em programação.● API Gerenciada - Conceitos funcionam em

VB/C#

6

Page 7: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

SENSORES DO KINECTEmissor de I.V Sensor de Cor Sensor I.V de

ProfundidadeEixo Motorizado

Microfone Multidirecional

7

Page 8: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

COMEÇANDO● http://kinectforwindows.org

● Adquira o Hardware Kinect● Baixar a SDK do Kinect

8

Page 9: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

9

Page 10: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

CONFIGURANDO O AMBIENTE DE DESENVOLVIMENTO

10

Page 11: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de

Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamento de Audio

QUICKSTART SERIES

11

Page 12: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

KINECT API - BASICO● Gerenciar o estado do Kinect

● Conectado● Ativar Cor, Profundidade, Esqueleto● Iniciar o Kinect

● Obter Dados● Eventos - AllFramesReady● Polling (Sondagem) – OpenNextFrame

12

Page 13: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

RECURSOS● Instalar Kinect Explorer

● KinectWpfViewers● Coding4Fun Toolkit

● Skeletal scaling

13

Page 14: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

14

Page 15: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FUNDAMENTOSDA CAMERA

15

Page 16: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamento de Audio

QUICKSTART SERIES

16

Page 17: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DADOS DA CAMERA● Eventos retornam objetos do tipo ImageFrame

● PixelDataLength● FrameNumber● Timestamp● Dimensões: Height, Width

● Usa o evento AllFramesReady para sincronizar.

17

Page 18: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

RESOLUÇÕES● Cor

● 12 FPS: 1280X960 RGB● 15 FPS: Raw YUV 640x480● 30 FPS: 640x480

● Profundidade ● 30 FPS: 80x60, 320x240, 640x480

18

Page 19: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

19

Page 20: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

TRABALHANDOCOM DADOS DEPROFUNDIDADE

20

Page 21: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamento de Audio

QUICKSTART SERIES

21

Page 22: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DADOS DE PROFUNDIDADE● Retorna a distancia e jogador para cada pixel

● Ex: 320x240 = 76,800 pixels● Distancia

● Distancia em mm do Kinect ex: 2,000mm (2 metros)● Jogadores

● 1-6 jogadores

22

Page 23: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

MODO

Modo Profundidade & Jogador

Centro de Articulação do Quadril

Outras 19 Articulações

Default (Padrão) Sim Sim Yes

Near (Perto) Sim Sim Não, para v1.0

23

Page 24: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DISTÂNCIAS1.3’ 2.6’ 9.8’ 13.1’ 26.2’

.4 .8 3 4 8

DefaultMode

Near Mode

Passos

Metros

24

Page 25: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FORMULAS● Distance Formula

int profundidade = depthPoint >> DepthImageFrame.PlayerIndexBitmaskWidth;

● Player Formulaint jogador = depthPoint & DepthImageFrame.PlayerIndexBitmask;

25

Page 26: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

26

Page 27: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FUNDAMENTOS DE RASTREAMENTODE ESQUELETO

27

Page 28: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamento de Audio

QUICKSTART SERIES

28

Page 29: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DADOS DE ESQUELETO

29

Page 30: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

ARTICULAÇÕES DO ESQUELETO

● Cada jogador possuí um conjunto <x, y, z> de articulações em metros

● Cada articulação é associada a um estado● Tracked, Not tracked, or Inferred

● Inferred - Occluded, clipped, ou low confidence joints● Use TransformSmoothParameters para suavizar o jitter (atraso de

rede) nos dados de articulações.

30

Page 31: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

RASTREAMENTO DE ESQUELETO

● Máximo de 2 jogadores rastreados simultaneamente● Cada esqueleto possui um identificador único - TrackingID ● SkeletonStream

● Configurar AppChoosesSkeletons em false● Utilizar o método ChooseSkeletons para escolher qual esqueleto irá

rastrear

31

Page 32: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

32

Page 33: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FUNDAMENTOS DE AUDIO

33

Page 34: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Instalando e Usando o Sensor Kinect● Configurando o Ambiente de Desenvolvimento● Fundamentos da Camera● Trabalhando com Dados de Profundidade● Fundamentos de Rastreamento de Esqueleto● Fundamento de Audio

QUICKSTART SERIES

34

Page 35: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

POSIÇÃO DO SOM● Sound Source Angle – O ângulo e o nivel de confiança da onde o

audio esta vindo● Beam Angle – O ângulo usado para gravar o audio que voce pode

considerar de "microfone direcional"

-50 0 +50

35

Page 36: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

GRAVAÇÃO● KinectAudioSource audio buffer● Utiliza "Echo Cancellation" para não gravar o

som do PC.

36

Page 37: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

RECONHECIMENTO DE FALA● Grammar – O que estamos escutando

● Code – GrammarBuilder, Choices● Nota: Garantir que AutomaticGainControl = false

37

Page 38: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

GRAMATICA<!-- Confirmation_Yes._value: string ["Yes"] --><rule id="Confirmation_Yes" scope="public"> <example> yes </example> <example> yes please </example> <one-of> <item> yes </item> <item> yeah </item> <item> yep </item> <item> ok </item> </one-of> <item repeat="0-1"> please </item> <tag> out._value = "Yes";</tag>

var grammar = new Choices();grammar.Add(“yes please");grammar.Add(“yes");grammar.Add(“yeah");grammar.Add(“ok");

38

Page 39: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

● Modelo de Engajamento● Indicação por fala para menus speech-enable● Palavra chave para engajar

● Feedback e confirmação

MULTI-MODAL FEEDBACK

39

Page 40: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DEMO

40

Page 41: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

PROJETOS

41

Page 42: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FUSION 4D

42

Page 43: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

BOARD OF AWESOMENESS

43

Page 44: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

MINORITY REPORT UI

44

Page 45: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

DÚVIDAS?

45

Page 46: NUI - Natural User Interface utilizando kinect

KINECT FOR WINDOWS

FIM46