Kinect Session Slides - DevRide

bouncerarcheryΤεχνίτη Νοημοσύνη και Ρομποτική

14 Νοε 2013 (πριν από 3 χρόνια και 1 μήνα)

40 εμφανίσεις

Human
-
human interaction

Human
-
object interaction

Human
-
computer interaction



Also known as HCI


User interface


A place where interaction between humans & machines
occurs



Types


Command
-
line interface


Graphical user interface


Natural user interface



Dos

Unix

GUI
NUI
No
No.
8

wiki
Controller
-
free
Xbox 360 by
Microsoft
SCM
-
CityU

10

Spring 2012

wiki
wiki

Four microphone array with hardware
-
based
audio processing


Multichannel echo cancellation (MEC)


Sound position tracking


Other digital signal processing (noise suppression
and reduction)

http://kinectforwindows.org
DirectX® SDK
-

June 2010
Current runtime for Microsoft DirectX®
9
Microsoft Speech Platform Runtime, version 10.2
Microsoft Speech Platform
-

Software Development Kit, version 10.2
Kinect for Windows Runtime Language Pack, version 0.9
Start New Windows Presentation Foundation Project


Add
a reference to:

using

Microsoft.Kinect
;

KinectSensorChooser

sensorChooser

= new
KinectSensorChooser
();




void
StopKinect
(
KinectSensor

sensor)


{


if (sensor != null)


{


sensor.Stop
();


sensor.AudioSource.Stop
();



}


}

newSensor.ColorStream.Enable
(ColorImageFormat.RgbResolut
ion640x480Fps30);


newSensor.ColorFrameReady

+=
newSensor_ColorFrameReady
;
using (
ColorImageFrame

colorFrame

=
e.OpenColorImageFrame
())


{


if (
colorFrame

!= null)


{


// Copy the pixel data from the image to a temporary array


colorFrame.CopyPixelDataTo
(
this.colorPixels
);



// Write the pixel data into our bitmap


this.colorBitmap.WritePixels
(


new Int32Rect(0, 0,
this.colorBitmap.PixelWidth
,
this.colorBitmap.PixelHeight
),


this.colorPixels
,


this.colorBitmap.PixelWidth

*
sizeof
(
int
),


0);


}


}


imgKinect.Source

=
colorBitmap
;


newSensor.ColorFrameReady

+=
newSensor_ColorFrameReady
;


newSensor.DepthFrameReady

+=
newSensor_DepthFrameReady
;



private
int

GetDistanceWithPlayerIndex
(byte
firstFrame
, byte
secondFrame
)

{


//offset by 3 in first byte to get value after player index


int

distance = (
int
)(
firstFrame

>> 3 |
secondFrame

<< 5);


return distance;

}

newSensor.SkeletonStream.Enable
(parameters
);

newSensor.SkeletonFrameReady

+=
newSensor_SkeletonFrameReady
;
void

newSensor_SkeletonFrameReady
(object

sender,

SkeletonFrameReadyEvent
Args

e)


{


using

(
SkeletonFrame

skeletonFrameData

=

e.OpenSkeletonFrame
())


{


if

(
skeletonFrameData

!=

null)

{






skeletonFrameData.CopySkeletonDataTo
(
allSkeletons
);


Skeleton

first

=

(from

s

in

allSkeletons



where

s.TrackingState

==

SkeletonTrackingState.Tracked



select

s).
FirstOrDefault
();



//if(first!=null)


//
this.Title
=(
first.Joints
[
JointType.Head
].
Position.X.ToString
());


}

}

}


skeleton.Joints
[
JointID.Head
].
Position.X


skeleton.Joints
[
JointID.Head
].
Position.Y


skeleton.Joints
[
JointID.HandLeft
].
Position.X


skeleton.Joints
[
JointID.HandLeft
].
Position.Y


TransformSmoothParameters

parameters = new
TransformSmoothParameters
();


parameters.Smoothing

= 0.7f;


parameters.Correction

= 0.3f;


parameters.Prediction

= 0.4f;


parameters.JitterRadius

= 1.0f;


parameters.MaxDeviationRadius

= 0.5f;



http://www.microsoft.com/en
-
us/kinectforwindows
/
http://
www.i
-
programmer.info/programming/hardware/2623
-
getting
-
started
-
with
-
microsoft
-
kinect
-
sdk.html
http://channel9.msdn.com/Series/KinectSDKQuickstarts