├── .gitignore ├── Build_libs ├── KinectPV2_Eclipse │ ├── .classpath │ ├── .project │ ├── .settings │ │ └── org.eclipse.jdt.core.prefs │ ├── bin │ │ └── KinectPV2 │ │ │ ├── Constants.class │ │ │ ├── Device.class │ │ │ ├── FaceData.class │ │ │ ├── FaceFeatures.class │ │ │ ├── FaceProperties.class │ │ │ ├── HDFaceData.class │ │ │ ├── Image.class │ │ │ ├── KJoint.class │ │ │ ├── KQuaternion.class │ │ │ ├── KRectangle.class │ │ │ ├── KinectPV2.class │ │ │ └── SkeletonProperties.class │ ├── data │ │ ├── frag.glsl │ │ └── vert.glsl │ ├── jni │ │ └── KinectPV2_Device.h │ ├── lib │ │ ├── Kinect20.Face.dll │ │ ├── KinectPV2.dll │ │ ├── KinectPV2.exp │ │ ├── KinectPV2.lib │ │ ├── Microsoft.Kinect.Face.dll │ │ └── NuiDatabase │ │ │ ├── Expression │ │ │ ├── ExpressionRandomForest.model │ │ │ ├── EyeLeftRandomForest.model │ │ │ ├── EyeRightRandomForest.model │ │ │ ├── FacialHairIRRandomForest.model │ │ │ ├── FacialHairRandomForest.model │ │ │ ├── Feature.config │ │ │ ├── GlassesIRRandomForest.model │ │ │ ├── GlassesRandomForest.model │ │ │ ├── LookingAwayRandomForest.model │ │ │ ├── MouthMovedRandomForest.model │ │ │ ├── MouthOpenRandomForest.model │ │ │ └── NuiExpressionModelManifest.txt │ │ │ ├── FaceAlignment.bin │ │ │ ├── FaceAlignmentColor.bin │ │ │ ├── FaceAlignmentColor27.bin │ │ │ ├── FaceDetector.bin │ │ │ ├── FaceOrientation.bin │ │ │ ├── FaceTrackingColor27.bin │ │ │ └── HDFaceTracker │ │ │ ├── AAMModel │ │ │ ├── 3DModel.bin │ │ │ ├── 3DModel_globalPCA.bin │ │ │ ├── AAMModelData_F.bin │ │ │ ├── AAMModelData_HLP.bin │ │ │ ├── AAMModelData_HRP.bin │ │ │ ├── Map2D3D_F.txt │ │ │ ├── Map2D3D_HLP.txt │ │ │ ├── Map2D3D_HRP.txt │ │ │ └── PCAMaskBias.bin │ │ │ ├── EvalModel │ │ │ ├── Front.p.txt │ │ │ ├── front.mod.bin │ │ │ ├── front_nose.mod.bin │ │ │ ├── left.mod.bin │ │ │ ├── left.p.txt │ │ │ ├── left_nose.mod.bin │ │ │ ├── right.mod.bin │ │ │ ├── right.p.txt │ │ │ └── right_nose.mod.bin │ │ │ ├── EyeState │ │ │ ├── EyeClose.pra │ │ │ ├── EyeClose.wgh │ │ │ ├── LeftCloseRightOpen44Flip.pra │ │ │ ├── LeftCloseRightOpen44Flip.wgh │ │ │ ├── LeftOpenRightClose44Flip.pra │ │ │ └── LeftOpenRightClose44Flip.wgh │ │ │ ├── MouthModel │ │ │ ├── MeanShapes.txt │ │ │ ├── close.mod.bin │ │ │ ├── close.p.txt │ │ │ ├── lopen.mod.bin │ │ │ └── lopen.p.txt │ │ │ ├── SkintoneModel │ │ │ ├── skintone_appearance_classifier.txt │ │ │ └── skintone_shape_classifier.txt │ │ │ ├── ViewModel │ │ │ ├── front.mod.bin │ │ │ ├── front.p.txt │ │ │ ├── left.mod.bin │ │ │ ├── left.p.txt │ │ │ ├── right.mod.bin │ │ │ └── right.p.txt │ │ │ └── WholeHeadModel │ │ │ ├── FullHeadMaskVertexCorrespondence.txt │ │ │ └── fullMeanHead60_tri.ply │ └── src │ │ ├── KinectPV2 │ │ ├── Constants.java │ │ ├── Device.java │ │ ├── FaceData.java │ │ ├── FaceFeatures.java │ │ ├── FaceProperties.java │ │ ├── HDFaceData.java │ │ ├── Image.java │ │ ├── KJoint.java │ │ ├── KQuaternion.java │ │ ├── KRectangle.java │ │ ├── KSkeleton.java │ │ ├── KinectPV2.java │ │ └── SkeletonProperties.java │ │ └── test │ │ ├── BodyTrackTest.java │ │ ├── CoordinateMapperRGBDepth.java │ │ ├── Face.java │ │ ├── HDFace.java │ │ ├── HDFaceSkeleton.java │ │ ├── MapDepthToColorTest.java │ │ ├── PointCloudColorTest.java │ │ ├── PointCloudDepthTest.java │ │ ├── Skeleton3DTest.java │ │ ├── SkeletonColorTest.java │ │ ├── SkeletonDepthTest.java │ │ ├── TestImg.java │ │ └── data │ │ ├── frag.glsl │ │ └── vert.glsl ├── KinectPV2_vc2012 │ ├── KinectLib_V2.0 │ │ ├── DeviceActivators.h │ │ ├── DeviceOptions.h │ │ ├── KinectLib_V2.0.cpp │ │ ├── KinectLib_V2.0.vcxproj │ │ ├── KinectLib_V2.0.vcxproj.filters │ │ ├── KinectLib_V2.0.vcxproj.user │ │ ├── KinectPV2.cpp │ │ ├── KinectPV2.h │ │ ├── KinectV2_JNI_Device.cpp │ │ ├── KinectV2_JNI_Device.h │ │ ├── dllmain.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ └── KinectPV2.sln ├── LICENSE └── README.md ├── KinectPV2 ├── examples │ ├── BodyTrack_Users │ │ └── BodyTrack_Users.pde │ ├── CoordinateMapperRGBDepth │ │ ├── CoordinateMapperRGBDepth.pde │ │ └── data │ │ │ └── mars.png │ ├── DepthTest │ │ └── DepthTest.pde │ ├── HDColor │ │ └── HDColor.pde │ ├── HDFaceVertex │ │ └── HDFaceVertex.pde │ ├── MapDepthToColor │ │ └── MapDepthToColor.pde │ ├── MaskTest │ │ └── MaskTest.pde │ ├── Mask_findUsers │ │ └── Mask_findUsers.pde │ ├── OpenCV_Processing │ │ ├── FindContours │ │ │ └── FindContours.pde │ │ └── LiveCamTest │ │ │ └── LiveCamTest.pde │ ├── PointCloudColor │ │ ├── PointCloudColor.pde │ │ └── data │ │ │ ├── frag.glsl │ │ │ └── vert.glsl │ ├── PointCloudDepth │ │ └── PointCloudDepth.pde │ ├── PointCloudOGL │ │ ├── PointCloudOGL.pde │ │ └── data │ │ │ ├── frag.glsl │ │ │ └── vert.glsl │ ├── RecordPointCloud │ │ ├── Frame.pde │ │ ├── RecordPointCloud.pde │ │ └── data │ │ │ ├── frag.glsl │ │ │ └── vert.glsl │ ├── SimpleFaceTracking │ │ └── SimpleFaceTracking.pde │ ├── Skeleton3d │ │ └── Skeleton3d.pde │ ├── SkeletonColor │ │ └── SkeletonColor.pde │ ├── SkeletonMaskDepth │ │ └── SkeletonMaskDepth.pde │ └── TestImages │ │ └── TestImages.pde ├── library.properties ├── library │ ├── Kinect20.Face.dll │ ├── KinectPV2.dll │ ├── KinectPV2.exp │ ├── KinectPV2.jar │ ├── KinectPV2.lib │ ├── KinectPV2.pdb │ └── NuiDatabase │ │ ├── Expression │ │ ├── ExpressionRandomForest.model │ │ ├── EyeLeftRandomForest.model │ │ ├── EyeRightRandomForest.model │ │ ├── FacialHairIRRandomForest.model │ │ ├── FacialHairRandomForest.model │ │ ├── Feature.config │ │ ├── GlassesIRRandomForest.model │ │ ├── GlassesRandomForest.model │ │ ├── LookingAwayRandomForest.model │ │ ├── MouthMovedRandomForest.model │ │ ├── MouthOpenRandomForest.model │ │ └── NuiExpressionModelManifest.txt │ │ ├── FaceAlignment.bin │ │ ├── FaceAlignmentColor.bin │ │ ├── FaceAlignmentColor27.bin │ │ ├── FaceDetector.bin │ │ ├── FaceOrientation.bin │ │ ├── FaceTrackingColor27.bin │ │ └── HDFaceTracker │ │ ├── AAMModel │ │ ├── 3DModel.bin │ │ ├── 3DModel_globalPCA.bin │ │ ├── AAMModelData_F.bin │ │ ├── AAMModelData_HLP.bin │ │ ├── AAMModelData_HRP.bin │ │ ├── Map2D3D_F.txt │ │ ├── Map2D3D_HLP.txt │ │ ├── Map2D3D_HRP.txt │ │ └── PCAMaskBias.bin │ │ ├── EvalModel │ │ ├── Front.p.txt │ │ ├── front.mod.bin │ │ ├── front_nose.mod.bin │ │ ├── left.mod.bin │ │ ├── left.p.txt │ │ ├── left_nose.mod.bin │ │ ├── right.mod.bin │ │ ├── right.p.txt │ │ └── right_nose.mod.bin │ │ ├── EyeState │ │ ├── EyeClose.pra │ │ ├── EyeClose.wgh │ │ ├── LeftCloseRightOpen44Flip.pra │ │ ├── LeftCloseRightOpen44Flip.wgh │ │ ├── LeftOpenRightClose44Flip.pra │ │ └── LeftOpenRightClose44Flip.wgh │ │ ├── MouthModel │ │ ├── MeanShapes.txt │ │ ├── close.mod.bin │ │ ├── close.p.txt │ │ ├── lopen.mod.bin │ │ └── lopen.p.txt │ │ ├── SkintoneModel │ │ ├── skintone_appearance_classifier.txt │ │ └── skintone_shape_classifier.txt │ │ ├── ViewModel │ │ ├── front.mod.bin │ │ ├── front.p.txt │ │ ├── left.mod.bin │ │ ├── left.p.txt │ │ ├── right.mod.bin │ │ └── right.p.txt │ │ └── WholeHeadModel │ │ ├── FullHeadMaskVertexCorrespondence.txt │ │ └── fullMeanHead60_tri.ply ├── reference │ ├── KinectPV2 │ │ ├── Device.html │ │ ├── FaceData.html │ │ ├── class-use │ │ │ ├── Device.html │ │ │ └── FaceData.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-files │ │ ├── index-1.html │ │ ├── index-2.html │ │ ├── index-3.html │ │ ├── index-4.html │ │ ├── index-5.html │ │ ├── index-6.html │ │ └── index-7.html │ ├── index.html │ ├── overview-tree.html │ ├── package-list │ ├── resources │ │ ├── background.gif │ │ ├── tab.gif │ │ ├── titlebar.gif │ │ └── titlebar_end.gif │ ├── script.js │ └── stylesheet.css └── src │ └── KinectPV2 │ ├── Constants.java │ ├── Device.java │ ├── FaceData.java │ ├── FaceFeatures.java │ ├── FaceProperties.java │ ├── HDFaceData.java │ ├── Image.java │ ├── KJoint.java │ ├── KQuaternion.java │ ├── KRectangle.java │ ├── KinectPV2.java │ ├── Skeleton.java │ └── SkeletonProperties.java ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.sdf 2 | *.obj 3 | *.ilk 4 | *.obj 5 | *.opensdf 6 | *.pdb 7 | *.suo 8 | *.idb 9 | 10 | /Build_libs/.metadata 11 | /Build_libs/.recommenders 12 | 13 | /Build_libs/KinectPV2_Eclipse/lib/ 14 | /Build_libs/KinectPV2_Eclipse/bin/ 15 | 16 | *.tlog 17 | *.log 18 | *.ipch 19 | *.codeanalysisast 20 | *.codeanalysis 21 | *.pch 22 | *.lastbuildstate 23 | 24 | *.jardesc 25 | Build_libs/RemoteSystemsTempFiles/.project 26 | Build_libs/KinectPV2_Eclipse/.metadata/ 27 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | KinectPV2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.8 13 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Constants.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Constants.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Device.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Device.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceData.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceFeatures.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceFeatures.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceProperties.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/FaceProperties.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/HDFaceData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/HDFaceData.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Image.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/Image.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KJoint.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KJoint.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KQuaternion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KQuaternion.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KRectangle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KRectangle.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KinectPV2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/KinectPV2.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/bin/KinectPV2/SkeletonProperties.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/bin/KinectPV2/SkeletonProperties.class -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/data/frag.glsl: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | precision mediump int; 4 | #endif 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | //color image int BGRA Color format 10 | gl_FragColor = vec4(vertColor.b * 0.00390625f, vertColor.g * 0.00390625f , vertColor.r * 0.00390625f, 1.0f); 11 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/data/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 transform; 2 | 3 | attribute vec4 vertex; 4 | attribute vec4 color; 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | gl_Position = transform * vertex; 10 | vertColor = color; 11 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/jni/KinectPV2_Device.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class KinectPV2_Device */ 4 | 5 | #ifndef _Included_KinectPV2_Device 6 | #define _Included_KinectPV2_Device 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: KinectPV2_Device 12 | * Method: jniDevice 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniDevice 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: KinectPV2_Device 20 | * Method: jniInit 21 | * Signature: ()Z 22 | */ 23 | JNIEXPORT jboolean JNICALL Java_KinectPV2_Device_jniInit 24 | (JNIEnv *, jobject); 25 | 26 | /* 27 | * Class: KinectPV2_Device 28 | * Method: jniSetWindowSize 29 | * Signature: (II)V 30 | */ 31 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniSetWindowSize 32 | (JNIEnv *, jobject, jint, jint); 33 | 34 | /* 35 | * Class: KinectPV2_Device 36 | * Method: jniVersion 37 | * Signature: ()Ljava/lang/String; 38 | */ 39 | JNIEXPORT jstring JNICALL Java_KinectPV2_Device_jniVersion 40 | (JNIEnv *, jobject); 41 | 42 | /* 43 | * Class: KinectPV2_Device 44 | * Method: jniUpdate 45 | * Signature: ()Z 46 | */ 47 | JNIEXPORT jboolean JNICALL Java_KinectPV2_Device_jniUpdate 48 | (JNIEnv *, jobject); 49 | 50 | /* 51 | * Class: KinectPV2_Device 52 | * Method: jniStopDevice 53 | * Signature: ()V 54 | */ 55 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniStopDevice 56 | (JNIEnv *, jobject); 57 | 58 | /* 59 | * Class: KinectPV2_Device 60 | * Method: jniEnableColorFrame 61 | * Signature: (Z)V 62 | */ 63 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableColorFrame 64 | (JNIEnv *, jobject, jboolean); 65 | 66 | /* 67 | * Class: KinectPV2_Device 68 | * Method: jniEnableDepthFrame 69 | * Signature: (Z)V 70 | */ 71 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableDepthFrame 72 | (JNIEnv *, jobject, jboolean); 73 | 74 | /* 75 | * Class: KinectPV2_Device 76 | * Method: jniEnableInfraredFrame 77 | * Signature: (Z)V 78 | */ 79 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableInfraredFrame 80 | (JNIEnv *, jobject, jboolean); 81 | 82 | /* 83 | * Class: KinectPV2_Device 84 | * Method: jniEnableBodyTrackFrame 85 | * Signature: (Z)V 86 | */ 87 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableBodyTrackFrame 88 | (JNIEnv *, jobject, jboolean); 89 | 90 | /* 91 | * Class: KinectPV2_Device 92 | * Method: jniEnableLongExposureInfrared 93 | * Signature: (Z)V 94 | */ 95 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableLongExposureInfrared 96 | (JNIEnv *, jobject, jboolean); 97 | 98 | /* 99 | * Class: KinectPV2_Device 100 | * Method: jniEnableSkeleton 101 | * Signature: (Z)V 102 | */ 103 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniEnableSkeleton 104 | (JNIEnv *, jobject, jboolean); 105 | 106 | /* 107 | * Class: KinectPV2_Device 108 | * Method: jniGetSkeleton 109 | * Signature: ()V 110 | */ 111 | JNIEXPORT void JNICALL Java_KinectPV2_Device_jniGetSkeleton 112 | (JNIEnv *, jobject); 113 | 114 | #ifdef __cplusplus 115 | } 116 | #endif 117 | #endif 118 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/Kinect20.Face.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/Kinect20.Face.dll -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/KinectPV2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/KinectPV2.dll -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/KinectPV2.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/KinectPV2.exp -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/KinectPV2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/KinectPV2.lib -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/Microsoft.Kinect.Face.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/Microsoft.Kinect.Face.dll -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/ExpressionRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/ExpressionRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/EyeLeftRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/EyeLeftRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/EyeRightRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/EyeRightRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/FacialHairIRRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/FacialHairIRRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/FacialHairRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/FacialHairRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/GlassesIRRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/GlassesIRRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/GlassesRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/GlassesRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/LookingAwayRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/LookingAwayRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/MouthMovedRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/MouthMovedRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/MouthOpenRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/MouthOpenRandomForest.model -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/Expression/NuiExpressionModelManifest.txt: -------------------------------------------------------------------------------- 1 | EyeRightRandomForest.model 2 | EyeLeftRandomForest.model 3 | MouthOpenRandomForest.model 4 | MouthMovedRandomForest.model 5 | LookingAwayRandomForest.model 6 | ExpressionRandomForest.model 7 | GlassesIRRandomForest.model 8 | GlassesRandomForest.model 9 | FacialHairIRRandomForest.model 10 | FacialHairRandomForest.model 11 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignment.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignment.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignmentColor.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignmentColor.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignmentColor27.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceAlignmentColor27.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceDetector.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceDetector.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceOrientation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceOrientation.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceTrackingColor27.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/FaceTrackingColor27.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/3DModel.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/3DModel.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/3DModel_globalPCA.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/3DModel_globalPCA.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_F.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_F.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HLP.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HLP.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HRP.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HRP.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_F.txt: -------------------------------------------------------------------------------- 1 | # AAM model frontal view (2) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 77 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 1.0 15 | 230 1 -1 0 1.0 1.0 16 | 328 2 -1 0 1.0 1.0 17 | 325 3 -1 0 1.0 1.0 18 | 470 4 -1 0 1.0 1.0 19 | 333 5 -1 0 1.0 1.0 20 | 467 6 -1 0 1.0 1.0 21 | 331 7 -1 0 1.0 1.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 1.0 25 | 871 9 -1 0 1.0 1.0 26 | 883 10 -1 0 1.0 1.0 27 | 862 11 -1 0 1.0 1.0 28 | 1016 12 -1 0 1.0 1.0 29 | 751 13 -1 0 1.0 1.0 30 | 732 14 -1 0 1.0 1.0 31 | 775 15 -1 0 1.0 1.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 1.0 35 | 218 17 -1 0 2.0 1.0 36 | 213 18 -1 0 2.0 1.0 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 1.0 40 | 339 22 -1 0 2.0 1.0 41 | 222 23 -1 0 2.0 1.0 42 | 217 24 -1 0 2.0 1.0 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 1.0 47 | 858 27 -1 0 2.0 1.0 48 | 956 28 -1 0 2.0 1.0 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 1.0 52 | 828 32 -1 0 2.0 1.0 53 | 849 33 -1 0 2.0 1.0 54 | 839 34 -1 0 2.0 1.0 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 152 36 -1 0 1.0 0.0 59 | 1216 37 -1 0 1.0 0.0 60 | 283 38 -1 0 1.0 0.0 61 | 487 39 -1 0 1.0 0.0 62 | 156 40 -1 0 1.0 1.0 63 | 204 41 -1 0 1.0 1.0 64 | 830 42 -1 0 1.0 1.0 65 | 783 43 -1 0 1.0 1.0 66 | 1021 44 -1 0 1.0 0.0 67 | 942 45 -1 0 1.0 0.0 68 | 1205 46 -1 0 1.0 0.0 69 | 771 47 -1 0 1.0 0.0 70 | 71 | # Mouth - outside lips 72 | 91 48 -1 0 1.0 1.0 73 | 264 49 -1 0 0.0 1.0 74 | 191 50 -1 0 0.0 1.0 75 | 19 51 -1 0 0.0 1.0 76 | 813 52 -1 0 0.0 1.0 77 | 762 53 -1 0 0.0 1.0 78 | 687 54 -1 0 1.0 1.0 79 | 649 55 -1 0 0.0 1.0 80 | 634 56 -1 0 0.0 1.0 81 | 8 57 -1 0 0.0 1.0 82 | 366 58 -1 0 0.0 1.0 83 | 70 59 -1 0 0.0 1.0 84 | 85 | # Mouth - inside lips 86 | 433 60 -1 0 1.0 0.0 87 | 522 61 -1 0 1.0 1.0 88 | 1072 62 -1 0 1.0 1.0 89 | 967 63 -1 0 1.0 1.0 90 | 702 64 -1 0 1.0 0.0 91 | 699 65 -1 0 1.0 1.0 92 | 10 66 -1 0 1.0 1.0 93 | 521 67 -1 0 1.0 1.0 94 | 95 | # Left Cheek 96 | 545 68 -1 0 1.0 0.0 97 | 1252 70 -1 0 1.0 0.0 98 | 411 73 -1 0 1.0 0.0 99 | 100 | # Chin 101 | 1185 76 -1 0 1.0 0.0 102 | 1187 77 -1 0 1.0 0.0 103 | 1189 78 -1 0 1.0 0.0 104 | 105 | # Right Cheek 106 | 568 81 -1 0 1.0 0.0 107 | 1246 84 -1 0 1.0 0.0 108 | 1069 86 -1 0 1.0 0.0 109 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_HLP.txt: -------------------------------------------------------------------------------- 1 | # AAM model left view (1) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 75 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 0.0 15 | 230 1 -1 0 1.0 0.0 16 | 328 2 -1 0 1.0 0.0 17 | 325 3 -1 0 1.0 0.0 18 | 470 4 -1 0 1.0 0.0 19 | 333 5 -1 0 1.0 0.0 20 | 467 6 -1 0 1.0 0.0 21 | 331 7 -1 0 1.0 0.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 0.1 25 | 871 9 -1 0 1.0 0.0 26 | 883 10 -1 0 1.0 0.1 27 | 862 11 -1 0 1.0 0.0 28 | 1016 12 -1 0 1.0 0.1 29 | 751 13 -1 0 1.0 0.0 30 | 732 14 -1 0 1.0 0.1 31 | 775 15 -1 0 1.0 0.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 0.0 35 | 218 17 -1 0 2.0 0.0 36 | 213 18 -1 0 2.0 0.0 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 0.0 40 | 339 22 -1 0 2.0 0.0 41 | 222 23 -1 0 2.0 0.0 42 | 217 24 -1 0 2.0 0.0 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 0.1 47 | 858 27 -1 0 2.0 0.1 48 | 956 28 -1 0 2.0 0.1 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 0.1 52 | 828 32 -1 0 2.0 0.1 53 | 849 33 -1 0 2.0 0.1 54 | 839 34 -1 0 2.0 0.1 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 258 36 -1 0 1.0 0.0 59 | 1218 37 -1 0 1.0 0.0 60 | 173 39 -1 0 1.0 0.0 61 | 322 41 -1 0 1.0 0.0 62 | 830 42 -1 0 1.0 0.0 63 | 783 43 -1 0 1.0 0.0 64 | 744 44 -1 0 1.0 0.0 65 | 942 45 -1 0 1.0 0.0 66 | 1263 46 -1 0 1.0 0.0 67 | 771 47 -1 0 1.0 0.0 68 | 69 | # Mouth - outside lips 70 | 91 48 -1 0 1.0 0.0 71 | 264 49 -1 0 0.0 0.0 72 | 191 50 -1 0 0.0 0.0 73 | 19 51 -1 0 0.0 0.0 74 | 813 52 -1 0 0.0 0.0 75 | 762 53 -1 0 0.0 0.0 76 | 687 54 -1 0 1.0 0.0 77 | 649 55 -1 0 0.0 0.0 78 | 634 56 -1 0 0.0 0.0 79 | 8 57 -1 0 0.0 0.0 80 | 366 58 -1 0 0.0 0.0 81 | 70 59 -1 0 0.0 0.0 82 | 83 | # Mouth - inside lips 84 | 433 60 -1 0 1.0 0.0 85 | 522 61 -1 0 1.0 0.0 86 | 1072 62 -1 0 1.0 0.0 87 | 967 63 -1 0 1.0 0.0 88 | 702 64 -1 0 1.0 0.0 89 | 699 65 -1 0 1.0 0.0 90 | 10 66 -1 0 1.0 0.0 91 | 521 67 -1 0 1.0 0.0 92 | 93 | # Left Cheek 94 | 551 68 -1 0 1.0 0.0 95 | 1255 70 -1 0 1.0 0.0 96 | 59 73 -1 0 1.0 0.0 97 | 98 | # Chin 99 | 1185 76 -1 0 1.0 0.0 100 | 1187 77 -1 0 1.0 0.0 101 | 1189 78 -1 0 1.0 0.0 102 | 103 | # Right Cheek 104 | 594 81 -1 0 1.0 0.0 105 | 1245 84 -1 0 1.0 0.0 106 | 1066 86 -1 0 1.0 0.0 107 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_HRP.txt: -------------------------------------------------------------------------------- 1 | # AAM model right view (3) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 75 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 0.1 15 | 230 1 -1 0 1.0 0.0 16 | 328 2 -1 0 1.0 0.1 17 | 325 3 -1 0 1.0 0.0 18 | 470 4 -1 0 1.0 0.1 19 | 333 5 -1 0 1.0 0.0 20 | 467 6 -1 0 1.0 0.1 21 | 331 7 -1 0 1.0 0.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 0.0 25 | 871 9 -1 0 1.0 0.0 26 | 883 10 -1 0 1.0 0.0 27 | 862 11 -1 0 1.0 0.0 28 | 1016 12 -1 0 1.0 0.0 29 | 751 13 -1 0 1.0 0.0 30 | 732 14 -1 0 1.0 0.0 31 | 775 15 -1 0 1.0 0.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 0.1 35 | 218 17 -1 0 2.0 0.1 36 | 213 18 -1 0 2.0 0.1 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 0.1 40 | 339 22 -1 0 2.0 0.1 41 | 222 23 -1 0 2.0 0.1 42 | 217 24 -1 0 2.0 0.1 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 0.0 47 | 858 27 -1 0 2.0 0.0 48 | 956 28 -1 0 2.0 0.0 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 0.0 52 | 828 32 -1 0 2.0 0.0 53 | 849 33 -1 0 2.0 0.0 54 | 839 34 -1 0 2.0 0.0 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 152 36 -1 0 1.0 0.0 59 | 1273 37 -1 0 1.0 0.0 60 | 283 38 -1 0 1.0 0.0 61 | 132 39 -1 0 1.0 0.0 62 | 156 40 -1 0 1.0 0.0 63 | 204 41 -1 0 1.0 0.0 64 | 834 42 -1 0 1.0 0.0 65 | 801 44 -1 0 1.0 0.0 66 | 1207 46 -1 0 1.0 0.0 67 | 819 47 -1 0 1.0 0.0 68 | 69 | # Mouth - outside lips 70 | 91 48 -1 0 1.0 0.0 71 | 264 49 -1 0 0.0 0.0 72 | 191 50 -1 0 0.0 0.0 73 | 19 51 -1 0 0.0 0.0 74 | 813 52 -1 0 0.0 0.0 75 | 762 53 -1 0 0.0 0.0 76 | 687 54 -1 0 1.0 0.0 77 | 649 55 -1 0 0.0 0.0 78 | 634 56 -1 0 0.0 0.0 79 | 8 57 -1 0 0.0 0.0 80 | 366 58 -1 0 0.0 0.0 81 | 70 59 -1 0 0.0 0.0 82 | 83 | # Mouth - inside lips 84 | 433 60 -1 0 1.0 0.0 85 | 522 61 -1 0 1.0 0.0 86 | 1072 62 -1 0 1.0 0.0 87 | 967 63 -1 0 1.0 0.0 88 | 702 64 -1 0 1.0 0.0 89 | 699 65 -1 0 1.0 0.0 90 | 10 66 -1 0 1.0 0.0 91 | 521 67 -1 0 1.0 0.0 92 | 93 | # Left Cheek 94 | 547 68 -1 0 1.0 0.0 95 | 1253 70 -1 0 1.0 0.0 96 | 52 73 -1 0 1.0 0.0 97 | 98 | # Chin 99 | 1185 76 -1 0 1.0 0.0 100 | 1187 77 -1 0 1.0 0.0 101 | 1189 78 -1 0 1.0 0.0 102 | 103 | # Right Cheek 104 | 589 81 -1 0 1.0 0.0 105 | 1248 84 -1 0 1.0 0.0 106 | 1006 86 -1 0 1.0 0.0 107 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/PCAMaskBias.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/AAMModel/PCAMaskBias.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/Front.p.txt: -------------------------------------------------------------------------------- 1 | -7.5117906e-001 2 | 1.7971340e+000 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/front.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/front.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/front_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/front_nose.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/left.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/left.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/left.p.txt: -------------------------------------------------------------------------------- 1 | -5.5782685e-001 2 | 2.2349918e+000 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/left_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/left_nose.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/right.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/right.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/right.p.txt: -------------------------------------------------------------------------------- 1 | -4.9366488e-001 2 | 1.7676892e+000 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/right_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/EvalModel/right_nose.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/close.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/close.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/close.p.txt: -------------------------------------------------------------------------------- 1 | -1.0390253e+000 2 | 1.5623594e-001 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/lopen.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/lopen.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/MouthModel/lopen.p.txt: -------------------------------------------------------------------------------- 1 | -1.4112765e+000 2 | 1.5076640e+000 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/SkintoneModel/skintone_appearance_classifier.txt: -------------------------------------------------------------------------------- 1 | 1 6 2 | 91.292313 69.292313 62.292313 60.292313 58.292313 42.292313 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/SkintoneModel/skintone_shape_classifier.txt: -------------------------------------------------------------------------------- 1 | 95 1 2 | 0.30455784 3 | 1.66001098 4 | -1.62138112 5 | -3.09007608 6 | -1.8449776 7 | -2.7510275 8 | 0.7156408 9 | 0.46706254 10 | 0.74084026 11 | 0.55543838 12 | 0.3068033 13 | 0.09282714 14 | 0.30903342 15 | 0.4042891 16 | -0.0464795 17 | -0.9728313 18 | -0.41406834 19 | -0.05139918 20 | -0.75276554 21 | -0.6075877 22 | 0.34373262 23 | 0.4014972 24 | -0.49888772 25 | -0.65480936 26 | 0.30483304 27 | -0.70918458 28 | -0.3512147 29 | 1.15232726 30 | 0.787535 31 | -0.25787108 32 | -0.08557144 33 | 0.65681558 34 | -0.2017218 35 | -0.37886192 36 | -0.21043326 37 | 0.57299166 38 | 0.01963078 39 | 0.2131527 40 | 0.15743048 41 | -1.21265728 42 | -0.70463972 43 | -0.44533304 44 | 0.06626808 45 | -0.3602199 46 | -0.53570248 47 | -0.18289378 48 | -0.1382585 49 | 0.15339292 50 | 0.35441632 51 | -1.227708 52 | -0.06238416 53 | 0.101142 54 | 0.14933188 55 | -0.42566896 56 | -0.82586464 57 | 0.2495135 58 | -0.24245006 59 | 0.21101868 60 | -0.02514772 61 | -0.12504932 62 | 0.00164714 63 | 0.96376986 64 | -0.07674876 65 | 0.14103244 66 | -1.35389602 67 | -0.42830124 68 | 0.18193266 69 | -0.66881618 70 | -0.17433316 71 | 0.87620696 72 | -0.11799044 73 | 0.41522964 74 | 0.05357716 75 | -1.0167036 76 | -0.56100462 77 | -0.95134026 78 | -1.24800902 79 | 0.36070056 80 | 0.75890604 81 | -0.65296004 82 | -0.5858694 83 | 0.03783712 84 | 0.18327206 85 | 0.44730186 86 | 0.2956868 87 | 0.01696344 88 | 0.60659404 89 | 0.06842162 90 | 0.40146684 91 | 0.66722408 92 | -0.01215514 93 | 0.1052204 94 | 0.4059476 95 | 0.02165666 96 | -0.72 97 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/front.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/front.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/front.p.txt: -------------------------------------------------------------------------------- 1 | -8.1733318e-001 2 | 8.0096631e-001 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/left.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/left.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/left.p.txt: -------------------------------------------------------------------------------- 1 | -4.5347825e-001 2 | 1.9513047e-001 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/right.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/right.mod.bin -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/lib/NuiDatabase/HDFaceTracker/ViewModel/right.p.txt: -------------------------------------------------------------------------------- 1 | -4.8654916e-001 2 | 3.0386777e-001 3 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/Constants.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Common variables for all the classes. 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface Constants { 32 | 33 | public final static int BODY_COUNT = 6; 34 | 35 | public final static int WIDTHColor = 1920; 36 | public final static int HEIGHTColor = 1080; 37 | 38 | public final static int WIDTHDepth = 512; 39 | public final static int HEIGHTDepth = 424; 40 | 41 | public final static int Int32 = 0; 42 | public final static int Float = 1; 43 | } 44 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/FaceFeatures.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Face Features class, with type Feature and State. 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public class FaceFeatures { 32 | 33 | int feature; 34 | int state; 35 | 36 | /** 37 | * Create Feature 38 | * @param feature 39 | * @param state 40 | */ 41 | FaceFeatures(int feature, int state){ 42 | this.feature = feature; 43 | this.state = state; 44 | } 45 | 46 | /** 47 | * Set Feature 48 | * @param feature 49 | */ 50 | public void setFeatureType(int feature){ 51 | this.feature = feature; 52 | } 53 | 54 | /** 55 | * Set State 56 | * @param state 57 | */ 58 | public void setState(int state){ 59 | this.state = state; 60 | } 61 | 62 | 63 | /** 64 | * Get State 65 | * @return 66 | */ 67 | public int getState(){ 68 | return state; 69 | } 70 | 71 | /** 72 | * Get Feature Type 73 | * @return 74 | */ 75 | public int getFeatureType(){ 76 | return feature; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/FaceProperties.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Commun Face Properties 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface FaceProperties extends Constants { 32 | public final static int FaceProperty_Happy = 0; 33 | public final static int FaceProperty_Engaged = 1; 34 | public final static int FaceProperty_LeftEyeClosed = 2; 35 | public final static int FaceProperty_RightEyeClosed = 3; 36 | public final static int FaceProperty_LookingAway = 4; 37 | public final static int FaceProperty_MouthMoved = 5; 38 | public final static int FaceProperty_MouthOpen = 6; 39 | public final static int FaceProperty_WearingGlasses = 7; 40 | public final static int Activity_Count = ( FaceProperty_WearingGlasses + 1 ); 41 | 42 | public final static int FACESIZE = BODY_COUNT * (36); 43 | 44 | public final static int DetectionResult_Unknown = -1; 45 | public final static int DetectionResult_Yes = 1; 46 | public final static int DetectionResult_No = 0; 47 | public final static int DetectionResult_Maybe =2; 48 | 49 | public final static int Face_LeftEye = 0; 50 | public final static int Face_RightEye = 1; 51 | public final static int Face_Nose = 2; 52 | public final static int Face_LeftMouth = 3; 53 | public final static int Face_RightMouth = 4; 54 | 55 | public final static int HDFaceVertexCount = 1347; 56 | 57 | //6 MORE POINT FOR TRACKING AND NOT TRAKING 58 | public final static int HDFaceVertexPoints = HDFaceVertexCount * BODY_COUNT * 2 + BODY_COUNT; 59 | 60 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/HDFaceData.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PVector; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * Face Features class, with type Feature and State. 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class HDFaceData implements FaceProperties{ 34 | 35 | PVector [] HDFaceVertex; 36 | boolean faceTracked; 37 | 38 | HDFaceData(){ 39 | HDFaceVertex = new PVector[ HDFaceVertexCount]; 40 | for(int i = 0; i < HDFaceVertexCount; i++) 41 | HDFaceVertex[i] = new PVector(0, 0); 42 | } 43 | 44 | protected void createHDFaceVertexData(float [] rawData, int iFace){ 45 | int index = HDFaceVertexCount * 2; 46 | 47 | if(rawData[BODY_COUNT * HDFaceVertexCount * 2 + iFace] == 1) 48 | faceTracked = true; 49 | else 50 | faceTracked = false; 51 | if(faceTracked){ 52 | for(int i = 0; i < HDFaceVertexCount; i++) { 53 | HDFaceVertex[i].x = rawData[index * iFace + i * 2 + 0]; 54 | HDFaceVertex[i].y = rawData[index * iFace + i * 2 + 1]; 55 | } 56 | } 57 | } 58 | 59 | public PVector [] getHDFaceVertex(){ 60 | return HDFaceVertex; 61 | } 62 | 63 | public boolean isTracked() { 64 | return faceTracked; 65 | } 66 | 67 | public float getX(int index) { 68 | return HDFaceVertex[index].x; 69 | } 70 | 71 | public float getY(int index) { 72 | return HDFaceVertex[index].y; 73 | } 74 | 75 | public PVector getPVector(int index) { 76 | return HDFaceVertex[index]; 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/Image.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | import processing.core.PApplet; 27 | import processing.core.PImage; 28 | 29 | /** 30 | * Image class helper 31 | * @author Thomas Sanchez Lengeling 32 | * 33 | */ 34 | public class Image{ 35 | private float fps; 36 | private int imgPixelSize; 37 | private PApplet parent; 38 | 39 | protected PImage img; 40 | private boolean processRawData; 41 | 42 | protected byte [] rawByteData; 43 | 44 | protected float [] rawFloatData; 45 | protected int [] rawIntData; 46 | 47 | public Image(PApplet p, int width, int height, int MODE){ 48 | parent = p; 49 | img = parent.createImage(width, height, MODE); 50 | imgPixelSize = width * height; 51 | rawByteData = new byte[imgPixelSize]; 52 | 53 | rawIntData = new int[imgPixelSize]; 54 | rawFloatData = new float[imgPixelSize]; 55 | processRawData= false; 56 | } 57 | 58 | /** 59 | * Get Image Size in int 60 | * @return int 61 | */ 62 | public int getImgSize(){ 63 | return imgPixelSize; 64 | } 65 | 66 | /** 67 | * update Pixels, img.updatePixels() 68 | */ 69 | public void updatePixels(){ 70 | img.updatePixels(); 71 | } 72 | 73 | /** 74 | * load Pixels, img.loadPixels() 75 | */ 76 | public void loadPixels(){ 77 | img.loadPixels(); 78 | } 79 | 80 | /** 81 | * get Pixels Image, img.pixels 82 | * @return int [] 83 | */ 84 | public int [] pixels(){ 85 | return img.pixels; 86 | } 87 | 88 | /** 89 | * get Image 90 | * @return PImage 91 | */ 92 | public PImage getImage() { 93 | return img; 94 | } 95 | 96 | /** 97 | * get Fps of the current Image 98 | * @return float 99 | */ 100 | public float getFPS() { 101 | return fps; 102 | } 103 | 104 | /** 105 | * Process Raw Data 106 | * @return boolean 107 | */ 108 | public boolean isProcessRawData(){ 109 | return processRawData; 110 | } 111 | 112 | /** 113 | * Activate Process Rae Data 114 | * @param rawData 115 | */ 116 | public void activateRawData(boolean rawData){ 117 | processRawData = rawData; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/KJoint.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | import processing.core.PVector; 3 | 4 | /* 5 | Copyright (C) 2014 Thomas Sanchez Lengeling. 6 | KinectPV2, Kinect for Windows v2 library for processing 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | * Simple Joint Class with (x, y, z) position, Orientation, state and type 29 | * @author thomas 30 | * 31 | */ 32 | public class KJoint { 33 | 34 | protected PVector pos; 35 | 36 | protected int state; 37 | 38 | protected int type; 39 | 40 | protected KQuaternion orientation; 41 | 42 | 43 | 44 | KJoint(float x, float y, float z, KQuaternion ori, int state){ 45 | pos = new PVector(x, y, z); 46 | orientation = ori; 47 | this.state = state; 48 | } 49 | 50 | KJoint(){} 51 | 52 | /** 53 | * Get orientation of a single Joint 54 | * @return Quartenion 55 | */ 56 | public KQuaternion getOrientation() { 57 | return orientation; 58 | } 59 | 60 | /** 61 | * get PVector Position 62 | * @return 63 | */ 64 | public PVector getPosition(){ 65 | return pos; 66 | } 67 | /** 68 | * get X position 69 | * @return float x 70 | */ 71 | public float getX(){ 72 | return pos.x; 73 | } 74 | 75 | /** 76 | * get Y position 77 | * @return float y 78 | */ 79 | public float getY(){ 80 | return pos.y; 81 | } 82 | 83 | /** 84 | * get Z position 85 | * @return float z 86 | */ 87 | public float getZ(){ 88 | return pos.z; 89 | } 90 | 91 | /** 92 | * get State of a single Joint 93 | * @return state 94 | */ 95 | public int getState(){ 96 | return state; 97 | } 98 | 99 | /** 100 | * get Joint Type 101 | * @return int 102 | */ 103 | public int getType(){ 104 | return type; 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/KQuaternion.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PVector; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * Simple KQuartenion class 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class KQuaternion { 34 | 35 | float x; 36 | float y; 37 | float z; 38 | 39 | float w; 40 | 41 | KQuaternion(float w, float x, float y, float z){ 42 | this.x = x; 43 | this.y = y; 44 | this.z = z; 45 | this.w = w; 46 | } 47 | 48 | KQuaternion(){ 49 | this.x = 0; 50 | this.y = 0; 51 | this.z = 0; 52 | this.w = 0; 53 | } 54 | 55 | 56 | public PVector rotate(float x1, float y1, float z1) 57 | { 58 | KQuaternion q = new KQuaternion(0.0f, x1, y1, z1); 59 | KQuaternion r = mult(new KQuaternion(w, x, y, z), q); 60 | KQuaternion conj = Conj(); 61 | KQuaternion retult = mult(r, conj); 62 | return new PVector( retult.x, retult.y, retult.z); 63 | } 64 | 65 | public KQuaternion Conj() 66 | { 67 | return new KQuaternion(w, -x, -y, -z); 68 | } 69 | 70 | public KQuaternion mult(KQuaternion q1, KQuaternion q2) 71 | { 72 | return new KQuaternion(q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z 73 | , q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y 74 | , q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z 75 | , q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 76 | } 77 | 78 | public float getX(){ 79 | return x; 80 | } 81 | 82 | public float getY(){ 83 | return y; 84 | } 85 | 86 | public float getZ(){ 87 | return z; 88 | } 89 | 90 | public float getW(){ 91 | return w; 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/KRectangle.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Simple KRectangle class 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public class KRectangle { 32 | 33 | float x; 34 | float y; 35 | 36 | float width; 37 | float height; 38 | 39 | 40 | KRectangle(float x, float y, float width, float height){ 41 | this.x = x; 42 | this.y = y; 43 | this.width = width; 44 | this.height = height; 45 | } 46 | 47 | public void setX(float x){ 48 | this.x =x; 49 | } 50 | 51 | public void setY(float y){ 52 | this.y =y; 53 | } 54 | 55 | public void setWidth(float w){ 56 | this.width =w; 57 | } 58 | 59 | public void setHeight(float height){ 60 | this.height = height; 61 | } 62 | 63 | public float getX(){ 64 | return x; 65 | } 66 | 67 | public float getY(){ 68 | return y; 69 | } 70 | 71 | public float getWidth(){ 72 | return width; 73 | } 74 | 75 | public float getHeight(){ 76 | return height; 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/KSkeleton.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | 4 | /* 5 | Copyright (C) 2014 Thomas Sanchez Lengeling. 6 | KinectPV2, Kinect for Windows v2 library for processing 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | * Skeleton Class 29 | * @author Thomas Sanchez Lengeling 30 | * 31 | */ 32 | public class KSkeleton implements SkeletonProperties{ 33 | 34 | 35 | protected KJoint [] kJoints; 36 | 37 | protected int leftHandState; 38 | protected int rightHandState; 39 | 40 | private boolean tracked; 41 | 42 | int colorIndex; 43 | 44 | KSkeleton(){ 45 | kJoints = new KJoint[JointType_Count + 1]; 46 | for(int i = 0; i < JointType_Count + 1; i++){ 47 | kJoints[i] = new KJoint(0,0,0, new KQuaternion(), 0); 48 | } 49 | } 50 | 51 | /* 52 | * if the current skeleton is being tracked 53 | */ 54 | public boolean isTracked(){ 55 | return tracked; 56 | } 57 | 58 | /** 59 | * get the array of joints of the skeleton 60 | * @return KJoint [] 61 | */ 62 | public KJoint [] getJoints(){ 63 | return kJoints; 64 | } 65 | 66 | /** 67 | * get Left Hand State of the skeleton 68 | * @return int leftHandState 69 | */ 70 | public int getLeftHandState(){ 71 | return leftHandState; 72 | } 73 | 74 | /** 75 | * get Right Hand State of the skeleton 76 | * @return int rightHandState 77 | */ 78 | public int getRightHandState(){ 79 | return rightHandState; 80 | } 81 | 82 | //use different color for each skeleton tracked 83 | public int getIndexColor() { 84 | int col = color(255, 255, 255); 85 | if (colorIndex == 0) 86 | col = color(255, 0, 0); 87 | if (colorIndex == 1) 88 | col = color(0, 255, 0); 89 | if (colorIndex == 2) 90 | col = color(0, 0, 255); 91 | if (colorIndex == 3) 92 | col = color(255, 255, 0); 93 | if (colorIndex == 4) 94 | col = color(0, 255, 255); 95 | if (colorIndex == 5) 96 | col = color(255, 0, 255); 97 | 98 | return col; 99 | } 100 | 101 | private final int color(int v1, int v2, int v3) { 102 | return 0xff000000 | (v1 << 16) | (v2 << 8) | v3; 103 | } 104 | 105 | protected void createSkeletonData(float [] rawData, int i){ 106 | int index2 = i * (JointType_Count+1) * 9; 107 | int indexJoint = index2 + (JointType_Count+1) * 9 - 1; 108 | if(rawData[indexJoint] == 1.0){ 109 | tracked = true; 110 | }else{ 111 | tracked = false; 112 | } 113 | 114 | if(tracked){ 115 | //set color index of the skeleton 116 | colorIndex = i; 117 | for(int j = 0; j < JointType_Count; ++j){ 118 | int index1 = j * 9; 119 | kJoints[j].pos.x = rawData[index2 + index1 + 0]; 120 | kJoints[j].pos.y = rawData[index2 + index1 + 1]; 121 | kJoints[j].pos.z = rawData[index2 + index1 + 2]; 122 | 123 | kJoints[j].orientation.w = rawData[index2 + index1 + 3]; 124 | kJoints[j].orientation.x = rawData[index2 + index1 + 4]; 125 | kJoints[j].orientation.y = rawData[index2 + index1 + 5]; 126 | kJoints[j].orientation.z = rawData[index2 + index1 + 6]; 127 | 128 | int state = (int)rawData[index2 + index1 + 7]; 129 | int type = (int)rawData[index2 + index1 + 8]; 130 | 131 | kJoints[j].state = state; 132 | kJoints[j].type = type; 133 | if(type == JointType_HandLeft) 134 | leftHandState = state; 135 | if(type == JointType_HandRight) 136 | rightHandState = state; 137 | } 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/KinectPV2.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PApplet; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class KinectPV2 extends Device{ 34 | 35 | public static PApplet parent; 36 | 37 | public KinectPV2(PApplet _p) { 38 | super(_p); 39 | parent = _p; 40 | 41 | parent.registerMethod("dispose", this); 42 | } 43 | 44 | public void init(){ 45 | initDevice(); 46 | runningKinect = true; 47 | } 48 | 49 | public void dispose() { 50 | runningKinect = false; 51 | stopDevice(); 52 | cleanDevice(); 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/KinectPV2/SkeletonProperties.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Skeleton Properties 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface SkeletonProperties extends Constants{ 32 | public final static int JointType_SpineBase = 0; 33 | public final static int JointType_SpineMid = 1; 34 | public final static int JointType_Neck = 2; 35 | public final static int JointType_Head = 3; 36 | public final static int JointType_ShoulderLeft = 4; 37 | public final static int JointType_ElbowLeft = 5; 38 | public final static int JointType_WristLeft = 6; 39 | public final static int JointType_HandLeft = 7; 40 | public final static int JointType_ShoulderRight = 8; 41 | public final static int JointType_ElbowRight = 9; 42 | public final static int JointType_WristRight = 10; 43 | public final static int JointType_HandRight = 11; 44 | public final static int JointType_HipLeft = 12; 45 | public final static int JointType_KneeLeft = 13; 46 | public final static int JointType_AnkleLeft = 14; 47 | public final static int JointType_FootLeft = 15; 48 | public final static int JointType_HipRight = 16; 49 | public final static int JointType_KneeRight = 17; 50 | public final static int JointType_AnkleRight = 18; 51 | public final static int JointType_FootRight = 19; 52 | public final static int JointType_SpineShoulder = 20; 53 | public final static int JointType_HandTipLeft = 21; 54 | public final static int JointType_ThumbLeft = 22; 55 | public final static int JointType_HandTipRight = 23; 56 | public final static int JointType_ThumbRight = 24; 57 | public final static int JointType_Count = ( JointType_ThumbRight + 1 ); 58 | 59 | public final static int JOINTSIZE = BODY_COUNT * (JointType_Count + 1) * 9; 60 | 61 | public final static int TrackingState_NotTracked = 0; 62 | public final static int TrackingState_Inferred = 1; 63 | public final static int TrackingState_Tracked = 2; 64 | 65 | 66 | public final static int HandState_Unknown = 0; 67 | public final static int HandState_NotTracked = 1; 68 | public final static int HandState_Open = 2; 69 | public final static int HandState_Closed = 3; 70 | public final static int HandState_Lasso = 4; 71 | } 72 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/BodyTrackTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | 4 | import java.util.ArrayList; 5 | 6 | import KinectPV2.KinectPV2; 7 | import KinectPV2.KSkeleton; 8 | import KinectPV2.FaceData; 9 | import processing.core.*; 10 | 11 | 12 | 13 | public class BodyTrackTest extends PApplet { 14 | 15 | private KinectPV2 kinect; 16 | 17 | KSkeleton [] skeleton; 18 | 19 | FaceData [] faceData; 20 | 21 | 22 | public void setup() { 23 | size(512*4, 424*2, P3D); 24 | 25 | kinect = new KinectPV2(this); 26 | kinect.enableBodyTrackImg(true); 27 | kinect.enableDepthMaskImg(true); 28 | kinect.init(); 29 | } 30 | 31 | public void draw() { 32 | background(255); 33 | 34 | image(kinect.getBodyTrackImage(), 0, 0); 35 | image(kinect.getDepthMaskImage(), 0, 424); 36 | 37 | 38 | ArrayList bodyTrackList = kinect.getBodyTrackUser(); 39 | 40 | for(int i = 0; i < bodyTrackList.size(); i++){ 41 | PImage bodyTrackImg = (PImage)bodyTrackList.get(i); 42 | if(i <= 2) 43 | image(bodyTrackImg, 512 + 512*i, 0); 44 | else 45 | image(bodyTrackImg, 512 + 512*(i - 3), 424); 46 | } 47 | 48 | 49 | fill(0); 50 | text(kinect.getNumOfUsers(), 50, 50); 51 | text(bodyTrackList.size(), 50, 70); 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/CoordinateMapperRGBDepth.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import KinectPV2.KinectPV2; 4 | import processing.core.PApplet; 5 | import processing.core.PImage; 6 | 7 | 8 | public class CoordinateMapperRGBDepth extends PApplet{ 9 | 10 | KinectPV2 kinect; 11 | 12 | public static void main(String[] args) { 13 | PApplet.main(new String[] { "test.CoordinateMapperRGBDepth"}); 14 | } 15 | 16 | public void settings(){ 17 | size(1280, 720, P3D); 18 | } 19 | 20 | 21 | public void setup() { 22 | 23 | kinect = new KinectPV2(this); 24 | kinect.enableCoordinateMapperRGBDepth(true); 25 | 26 | kinect.init(); 27 | 28 | //SETUP A BACKGROUND IMAGE 29 | // PImage img = loadImage("mars.png"); 30 | // img.loadPixels(); 31 | // kinect.setCoordBkgImg(img.pixels); 32 | } 33 | 34 | public void draw() { 35 | background(0); 36 | //image(kinect.getCoordinateRGBDepthImage(), 0, 0); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/HDFace.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.util.ArrayList; 4 | 5 | import KinectPV2.KinectPV2; 6 | import KinectPV2.HDFaceData; 7 | import processing.core.*; 8 | 9 | 10 | /* 11 | Copyright (C) 2014 Thomas Sanchez Lengeling. 12 | KinectPV2, Kinect one library for processing 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | */ 32 | 33 | public class HDFace extends PApplet { 34 | 35 | KinectPV2 kinect; 36 | 37 | public static void main(String[] args) { 38 | PApplet.main(new String[] { "test.HDFace"}); 39 | } 40 | 41 | public void settings(){ 42 | size(1920, 1080, P3D); 43 | } 44 | 45 | public void setup() { 46 | kinect = new KinectPV2(this); 47 | kinect.enableColorImg(true); 48 | 49 | kinect.enableHDFaceDetection(true); 50 | kinect.init(); 51 | } 52 | 53 | public void draw() { 54 | background(0); 55 | 56 | // DRAW COLOR IMAGE MAP 57 | image(kinect.getColorImage(), 0, 0); 58 | 59 | ArrayList hdFaceData = kinect.getHDFaceVertex(); 60 | 61 | stroke(0, 255, 0); 62 | for (int i = 0; i < hdFaceData.size(); i++) { 63 | beginShape(POINTS); 64 | HDFaceData HDfaceData = (HDFaceData)hdFaceData.get(i); 65 | if (HDfaceData.isTracked()) { 66 | for (int j = 0; j < KinectPV2.HDFaceVertexCount; j++) { 67 | float x = HDfaceData.getX(j); 68 | float y = HDfaceData.getY(j); 69 | vertex(x, y); 70 | } 71 | } 72 | endShape(); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/MapDepthToColorTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import KinectPV2.KinectPV2; 4 | import processing.core.*; 5 | 6 | public class MapDepthToColorTest extends PApplet { 7 | 8 | KinectPV2 kinect; 9 | 10 | int[] depthZero; 11 | 12 | // BUFFER ARRAY TO CLEAN DE PIXLES 13 | PImage depthToColorImg; 14 | 15 | public void setup() { 16 | size(512 * 2, 424 * 2, P3D); 17 | 18 | depthToColorImg = createImage(512, 424, PImage.RGB); 19 | depthZero = new int[KinectPV2.WIDTHDepth * KinectPV2.HEIGHTDepth]; 20 | 21 | // SET THE ARRAY TO 0s 22 | for (int i = 0; i < KinectPV2.WIDTHDepth; i++) { 23 | for (int j = 0; j < KinectPV2.HEIGHTDepth; j++) { 24 | depthZero[424 * i + j] = 0; 25 | } 26 | } 27 | 28 | kinect = new KinectPV2(this); 29 | kinect.enableDepthImg(true); 30 | kinect.enableColorImg(true); 31 | kinect.enablePointCloud(true); 32 | kinect.init(); 33 | } 34 | 35 | public void draw() { 36 | background(0); 37 | 38 | float[] mapDCT = kinect.getMapDepthToColor(); 39 | 40 | // get the raw data from depth and color 41 | int[] colorRaw = kinect.getRawColor(); 42 | int[] depthRaw = kinect.getRawDepthData();// [0, 4500] 43 | 44 | // clean de pixels 45 | PApplet.arrayCopy(depthZero, depthToColorImg.pixels); 46 | 47 | int count = 0; 48 | depthToColorImg.loadPixels(); 49 | for (int i = 0; i < KinectPV2.WIDTHDepth; i++) { 50 | for (int j = 0; j < KinectPV2.HEIGHTDepth; j++) { 51 | 52 | // incoming pixels 512 x 424 with position in 1920 x 1080 53 | float valX = mapDCT[count * 2 + 0]; 54 | float valY = mapDCT[count * 2 + 1]; 55 | 56 | // maps the pixels to 512 x 424, not necessary but looks better 57 | int valXDepth = (int) ((valX / 1920.0) * 512.0); 58 | int valYDepth = (int) ((valY / 1080.0) * 424.0); 59 | 60 | int valXColor = (int) (valX); 61 | int valYColor = (int) (valY); 62 | 63 | if (valXDepth >= 0 && valXDepth < 512 && valYDepth >= 0 64 | && valYDepth < 424 && valXColor >= 0 65 | && valXColor < 1920 && valYColor >= 0 66 | && valYColor < 1080) { 67 | int colorPixel = colorRaw[valYColor * 1920 + valXColor]; 68 | // color colorPixel = depthRaw[valYDepth*512 + valXDepth]; 69 | depthToColorImg.pixels[valYDepth * 512 + valXDepth] = colorPixel; 70 | } 71 | count++; 72 | } 73 | } 74 | depthToColorImg.updatePixels(); 75 | 76 | image(depthToColorImg, 0, 424); 77 | image(kinect.getColorImage(), 0, 0, 512, 424); 78 | image(kinect.getDepthImage(), 512, 0); 79 | 80 | text("fps: " + frameRate, 50, 50); 81 | 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/PointCloudDepthTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Thomas Sanchez Lengeling. 3 | KinectPV2, Kinect for Windows v2 library for processing 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | */ 23 | 24 | package test; 25 | 26 | import java.nio.FloatBuffer; 27 | 28 | 29 | import KinectPV2.KinectPV2; 30 | import processing.core.*; 31 | 32 | 33 | public class PointCloudDepthTest extends PApplet { 34 | 35 | private KinectPV2 kinect; 36 | 37 | float a = 0; 38 | int zval = 50; 39 | float scaleVal = 260; 40 | 41 | // Distance Threashold 42 | int maxD = 5000; // 4m 43 | int minD = 50; // 1m 44 | //max 8000cm and min 5cm 45 | 46 | public static void main(String[] args) { 47 | PApplet.main(new String[] { "test.PointCloudDepthTest"}); 48 | } 49 | 50 | public void settings(){ 51 | size(1280, 720, P3D); 52 | } 53 | 54 | 55 | public void setup() { 56 | 57 | 58 | kinect = new KinectPV2(this); 59 | 60 | kinect.enableDepthImg(true); 61 | 62 | kinect.enablePointCloud(true); 63 | 64 | kinect.setLowThresholdPC(minD); 65 | kinect.setHighThresholdPC(maxD); 66 | 67 | kinect.init(); 68 | 69 | } 70 | 71 | public void draw() { 72 | background(0); 73 | 74 | image(kinect.getDepthImage(), 0, 0, 320, 240); 75 | image(kinect.getPointCloudDepthImage(), 320, 0, 320, 240); 76 | 77 | // Threahold of the point Cloud. 78 | kinect.setLowThresholdPC(minD); 79 | kinect.setHighThresholdPC(maxD); 80 | 81 | FloatBuffer pointCloudBuffer = kinect.getPointCloudDepthPos(); 82 | 83 | 84 | /* 85 | PJOGL pgl = (PJOGL)beginPGL(); 86 | GL2 gl2 = pgl.gl.getGL2(); 87 | 88 | gl2.glEnable( GL2.GL_BLEND ); 89 | gl2.glEnable(GL2.GL_POINT_SMOOTH); 90 | 91 | gl2.glEnableClientState(GL2.GL_VERTEX_ARRAY); 92 | gl2.glVertexPointer(3, GL2.GL_FLOAT, 0, pointCloudBuffer); 93 | 94 | gl2.glTranslatef(width/2, height/2, zval); 95 | gl2.glScalef(scaleVal, -1*scaleVal, scaleVal); 96 | gl2.glRotatef(a, 0.0f, 1.0f, 0.0f); 97 | 98 | gl2.glDrawArrays(GL2.GL_POINTS, 0, kinect.WIDTHDepth * kinect.HEIGHTDepth); 99 | gl2.glDisableClientState(GL2.GL_VERTEX_ARRAY); 100 | gl2.glDisable(GL2.GL_BLEND); 101 | endPGL(); 102 | */ 103 | 104 | stroke(255, 0, 0); 105 | text(frameRate, 50, height - 50); 106 | } 107 | 108 | public void mousePressed() { 109 | 110 | println(frameRate); 111 | // saveFrame(); 112 | } 113 | 114 | public void keyPressed() { 115 | if (key == 'a') { 116 | zval += 1; 117 | println(zval); 118 | } 119 | if (key == 's') { 120 | zval -= 1; 121 | println(zval); 122 | } 123 | 124 | if (key == 'z') { 125 | scaleVal += 0.1; 126 | println(scaleVal); 127 | } 128 | if (key == 'x') { 129 | scaleVal -= 0.1; 130 | println(scaleVal); 131 | } 132 | 133 | if (key == 'q') { 134 | a += 1; 135 | println(a); 136 | } 137 | if (key == 'w') { 138 | a -= 1; 139 | println(a); 140 | } 141 | 142 | if (key == '1') { 143 | minD += 1; 144 | println("Change min: " + minD); 145 | } 146 | 147 | if (key == '2') { 148 | minD -= 1; 149 | println("Change min: " + minD); 150 | } 151 | 152 | if (key == '3') { 153 | maxD += 1; 154 | println("Change max: " + maxD); 155 | } 156 | 157 | if (key == '4') { 158 | maxD -= 1; 159 | println("Change max: " + maxD); 160 | } 161 | 162 | if (key == '2') { 163 | minD -= 1; 164 | println("Change min: " + minD); 165 | } 166 | 167 | if (key == '3') { 168 | maxD += 1; 169 | println("Change max: " + maxD); 170 | } 171 | 172 | if (key == '4') { 173 | maxD -= 1; 174 | println("Change max: " + maxD); 175 | } 176 | } 177 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/TestImg.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import KinectPV2.KinectPV2; 4 | import KinectPV2.KSkeleton; 5 | import KinectPV2.FaceData; 6 | import processing.core.*; 7 | 8 | public class TestImg extends PApplet { 9 | 10 | private KinectPV2 kinect; 11 | 12 | KSkeleton [] skeleton; 13 | 14 | FaceData [] faceData; 15 | 16 | public static void main(String[] args) { 17 | PApplet.main(new String[] { "test.TestImg"}); 18 | } 19 | 20 | public void settings(){ 21 | size(512*3, 424*2, P3D); 22 | } 23 | 24 | 25 | public void setup() { 26 | 27 | kinect = new KinectPV2(this); 28 | 29 | kinect.enableColorImg(true); 30 | kinect.enableDepthImg(true); 31 | kinect.enableInfraredImg(true); 32 | kinect.enableInfraredLongExposureImg(true); 33 | kinect.enableBodyTrackImg(true); 34 | 35 | kinect.init(); 36 | 37 | } 38 | 39 | public void draw() { 40 | background(0); 41 | 42 | image(kinect.getDepthImage(), 0, 0, 512, 424); 43 | image(kinect.getDepth256Image(), 512, 0, 512, 424); 44 | 45 | image(kinect.getInfraredImage(), 0, 424, 512, 424); 46 | image(kinect.getInfraredLongExposureImage(), 512, 424, 512, 424); 47 | 48 | image(kinect.getColorImage(), 512*2, 424, 512, 424); 49 | 50 | 51 | fill(255, 0, 0); 52 | text(frameRate, 50, 50); 53 | } 54 | 55 | 56 | public void keyPressed(){ 57 | if(key == '1'){ 58 | kinect.closeDevice(); 59 | } 60 | if(key == '2'){ 61 | kinect.init(); 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/data/frag.glsl: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | precision mediump int; 4 | #endif 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | //color image int BGRA Color format 10 | gl_FragColor = vertColor; 11 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_Eclipse/src/test/data/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 transform; 2 | 3 | attribute vec4 vertex; 4 | attribute vec4 color; 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | gl_Position = transform * vertex; 10 | vertColor = vertColor;//vec4(color.b * 0.00390625f, v.g * 0.00390625f , color.r * 0.00390625f, 1.0f); 11 | } -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/KinectLib_V2.0.cpp: -------------------------------------------------------------------------------- 1 | // KinectLib_V2.0.cpp : Defines the exported functions for the DLL application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | 7 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/KinectLib_V2.0.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | Source Files 55 | 56 | 57 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/KinectLib_V2.0.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // KinectLib_V2.0.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #ifndef WIN32_LEAN_AND_MEAN 11 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 12 | #endif 13 | 14 | #include 15 | 16 | // TODO: reference additional headers your program requires here 17 | #include 18 | #include 19 | 20 | 21 | // Safe release for interfaces 22 | template 23 | inline void SafeRelease(T *& pInterfaceToRelease) 24 | { 25 | if (pInterfaceToRelease != NULL) 26 | { 27 | pInterfaceToRelease->Release(); 28 | pInterfaceToRelease = NULL; 29 | } 30 | } 31 | 32 | template 33 | inline void SafeArrayDelete(T*& pArray) 34 | { 35 | if (pArray != NULL){ 36 | delete[] pArray; 37 | pArray = nullptr; 38 | } 39 | } 40 | 41 | template 42 | inline void SafeDeletePointer(T*& pointer) 43 | { 44 | if (pointer != NULL){ 45 | free(pointer); 46 | (pointer) = NULL; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectLib_V2.0/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /Build_libs/KinectPV2_vc2012/KinectPV2.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KinectLib_V2.0", "KinectLib_V2.0\KinectLib_V2.0.vcxproj", "{9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Debug|Win32.Build.0 = Debug|Win32 18 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Debug|x64.ActiveCfg = Debug|x64 19 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Debug|x64.Build.0 = Debug|x64 20 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Release|Win32.ActiveCfg = Release|Win32 21 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Release|Win32.Build.0 = Release|Win32 22 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Release|x64.ActiveCfg = Release|x64 23 | {9CDC8431-EB3E-4BEB-8FC5-7BF505672B65}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Build_libs/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Kinect4W 2.0 library build files for Processing 3 | 4 | Compiled libraries for [Kinect4W 2.0](https://github.com/ThomasLengeling/KinectPV2) 5 | 6 | ##### Build 7 | 8 | First build the vc2013 which create the .dll file. Eclipse automatically links the .dll file. Finally export the .jar. 9 | 10 | ###### vc2013 11 | 12 | Visual Stduio project for creating the .dll library with JNI code. 13 | 14 | ###### eclipse 15 | 16 | Eclipse project creates the .jar file for processing. 17 | -------------------------------------------------------------------------------- /KinectPV2/examples/BodyTrack_Users/BodyTrack_Users.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Body Test with the number of users 8 | */ 9 | 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | boolean foundUsers = false; 15 | 16 | void setup() { 17 | size(1280, 480); 18 | 19 | kinect = new KinectPV2(this); 20 | 21 | kinect.enableBodyTrackImg(true); 22 | kinect.enableDepthMaskImg(true); 23 | 24 | kinect.init(); 25 | } 26 | 27 | void draw() { 28 | background(255); 29 | 30 | image(kinect.getBodyTrackImage(), 0, 0, 320, 240); 31 | 32 | //get the body track combined with the depth information 33 | image(kinect.getDepthMaskImage(), 0, 240, 320, 240); 34 | 35 | //obtain an ArrayList of the users currently being tracked 36 | ArrayList bodyTrackList = kinect.getBodyTrackUser(); 37 | 38 | //iterate through all the users 39 | for (int i = 0; i < bodyTrackList.size(); i++) { 40 | PImage bodyTrackImg = (PImage)bodyTrackList.get(i); 41 | if (i <= 2) 42 | image(bodyTrackImg, 320 + 240*i, 0, 320, 240); 43 | else 44 | image(bodyTrackImg, 320 + 240*(i - 3), 424, 320, 240 ); 45 | } 46 | 47 | fill(0); 48 | textSize(16); 49 | text(kinect.getNumOfUsers(), 50, 50); 50 | text(bodyTrackList.size(), 50, 70); 51 | } 52 | 53 | void mousePressed() { 54 | println(frameRate); 55 | } 56 | -------------------------------------------------------------------------------- /KinectPV2/examples/CoordinateMapperRGBDepth/CoordinateMapperRGBDepth.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Green background example 8 | 9 | Not working, check library version 0.7.2 10 | */ 11 | 12 | import KinectPV2.*; 13 | 14 | KinectPV2 kinect; 15 | 16 | void setup() { 17 | size(1920, 1080); 18 | 19 | kinect = new KinectPV2(this); 20 | kinect.enableCoordinateMapperRGBDepth(true); 21 | 22 | kinect.init(); 23 | 24 | //SETUP A BACKGROUND IMAGE 25 | PImage img = loadImage("mars.png"); 26 | img.loadPixels(); 27 | kinect.setCoordBkgImg(img.pixels); 28 | } 29 | 30 | void draw() { 31 | background(0); 32 | image(kinect.getCoordinateRGBDepthImage(), 0, 0); 33 | } -------------------------------------------------------------------------------- /KinectPV2/examples/CoordinateMapperRGBDepth/data/mars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/examples/CoordinateMapperRGBDepth/data/mars.png -------------------------------------------------------------------------------- /KinectPV2/examples/DepthTest/DepthTest.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Depth and infrared Test 8 | */ 9 | 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | void setup() { 15 | size(1024, 848, P3D); 16 | 17 | kinect = new KinectPV2(this); 18 | kinect.enableDepthImg(true); 19 | kinect.enableInfraredImg(true); 20 | kinect.enableInfraredLongExposureImg(true); 21 | kinect.init(); 22 | } 23 | 24 | void draw() { 25 | background(0); 26 | 27 | //obtain the depth frame, 8 bit gray scale format 28 | image(kinect.getDepthImage(), 0, 0); 29 | 30 | //obtain the depth frame as strips of 256 gray scale values 31 | image(kinect.getDepth256Image(), 512, 0); 32 | 33 | //infrared data 34 | image(kinect.getInfraredImage(), 0, 424); 35 | image(kinect.getInfraredLongExposureImage(), 512, 424); 36 | 37 | //raw Data int valeus from [0 - 4500] 38 | int [] rawData = kinect.getRawDepthData(); 39 | 40 | //values for [0 - 256] strip 41 | int [] rawData256 = kinect.getRawDepth256Data(); 42 | 43 | stroke(255); 44 | text(frameRate, 50, height - 50); 45 | } 46 | -------------------------------------------------------------------------------- /KinectPV2/examples/HDColor/HDColor.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Simple HD Color test 8 | */ 9 | import KinectPV2.*; 10 | 11 | KinectPV2 kinect; 12 | 13 | void setup() { 14 | size(1920, 1080); 15 | 16 | kinect = new KinectPV2(this); 17 | kinect.enableColorImg(true); 18 | 19 | kinect.init(); 20 | } 21 | 22 | void draw() { 23 | background(0); 24 | 25 | //obtain the color image from the kinect v2 26 | image(kinect.getColorImage(), 0, 0, 1920, 1080); 27 | 28 | fill(255, 0, 0); 29 | text(frameRate, 50, 50); 30 | } 31 | 32 | void mousePressed() { 33 | println(frameRate); 34 | saveFrame(); 35 | } 36 | -------------------------------------------------------------------------------- /KinectPV2/examples/HDFaceVertex/HDFaceVertex.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | HD Face tracking. 8 | Vertex Face positions are mapped to the Color Frame or to the Infrared Frame 9 | */ 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | void setup() { 15 | size(1920, 1080); 16 | 17 | kinect = new KinectPV2(this); 18 | 19 | //enable HD Face detection 20 | kinect.enableHDFaceDetection(true); 21 | kinect.enableColorImg(true); //to draw the color image 22 | kinect.init(); 23 | } 24 | 25 | void draw() { 26 | background(0); 27 | 28 | // Draw the color Image 29 | image(kinect.getColorImage(), 0, 0); 30 | 31 | //Obtain the Vertex Face Points 32 | // 1347 Vertex Points for each user. 33 | ArrayList hdFaceData = kinect.getHDFaceVertex(); 34 | 35 | for (int j = 0; j < hdFaceData.size(); j++) { 36 | //obtain a the HDFace object with all the vertex data 37 | HDFaceData HDfaceData = (HDFaceData)hdFaceData.get(j); 38 | 39 | if (HDfaceData.isTracked()) { 40 | 41 | //draw the vertex points 42 | stroke(0, 255, 0); 43 | beginShape(POINTS); 44 | for (int i = 0; i < KinectPV2.HDFaceVertexCount; i++) { 45 | float x = HDfaceData.getX(i); 46 | float y = HDfaceData.getY(i); 47 | vertex(x, y); 48 | } 49 | endShape(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /KinectPV2/examples/MapDepthToColor/MapDepthToColor.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Color to fepth Example, 8 | Color Frame is aligned to the depth frame 9 | */ 10 | 11 | import KinectPV2.*; 12 | 13 | KinectPV2 kinect; 14 | 15 | int [] depthZero; 16 | 17 | //BUFFER ARRAY TO CLEAN DE PIXLES 18 | PImage depthToColorImg; 19 | 20 | void setup() { 21 | size(1024, 848, P3D); 22 | 23 | depthToColorImg = createImage(512, 424, PImage.RGB); 24 | depthZero = new int[ KinectPV2.WIDTHDepth * KinectPV2.HEIGHTDepth]; 25 | 26 | //SET THE ARRAY TO 0s 27 | for (int i = 0; i < KinectPV2.WIDTHDepth; i++) { 28 | for (int j = 0; j < KinectPV2.HEIGHTDepth; j++) { 29 | depthZero[424*i + j] = 0; 30 | } 31 | } 32 | 33 | kinect = new KinectPV2(this); 34 | kinect.enableDepthImg(true); 35 | kinect.enableColorImg(true); 36 | kinect.enablePointCloud(true); 37 | 38 | kinect.init(); 39 | } 40 | 41 | void draw() { 42 | background(0); 43 | 44 | float [] mapDCT = kinect.getMapDepthToColor(); 45 | 46 | //get the raw data from depth and color 47 | int [] colorRaw = kinect.getRawColor(); 48 | 49 | //clean de pixels 50 | PApplet.arrayCopy(depthZero, depthToColorImg.pixels); 51 | 52 | int count = 0; 53 | depthToColorImg.loadPixels(); 54 | for (int i = 0; i < KinectPV2.WIDTHDepth; i++) { 55 | for (int j = 0; j < KinectPV2.HEIGHTDepth; j++) { 56 | 57 | //incoming pixels 512 x 424 with position in 1920 x 1080 58 | float valX = mapDCT[count * 2 + 0]; 59 | float valY = mapDCT[count * 2 + 1]; 60 | 61 | //maps the pixels to 512 x 424, not necessary but looks better 62 | int valXDepth = (int)((valX/1920.0) * 512.0); 63 | int valYDepth = (int)((valY/1080.0) * 424.0); 64 | 65 | int valXColor = (int)(valX); 66 | int valYColor = (int)(valY); 67 | 68 | if ( valXDepth >= 0 && valXDepth < 512 && valYDepth >= 0 && valYDepth < 424 && 69 | valXColor >= 0 && valXColor < 1920 && valYColor >= 0 && valYColor < 1080) { 70 | color colorPixel = colorRaw[valYColor * 1920 + valXColor]; 71 | //color colorPixel = depthRaw[valYDepth*512 + valXDepth]; 72 | depthToColorImg.pixels[valYDepth * 512 + valXDepth] = colorPixel; 73 | } 74 | count++; 75 | } 76 | } 77 | depthToColorImg.updatePixels(); 78 | 79 | image(depthToColorImg, 0, 424); 80 | image(kinect.getColorImage(), 0, 0, 512, 424); 81 | image(kinect.getDepthImage(), 512, 0); 82 | 83 | text("fps: "+frameRate, 50, 50); 84 | } 85 | -------------------------------------------------------------------------------- /KinectPV2/examples/MaskTest/MaskTest.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Mask test of the Body 8 | */ 9 | 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | boolean foundUsers = false; 15 | 16 | void setup() { 17 | size(1024, 424); 18 | 19 | kinect = new KinectPV2(this); 20 | 21 | kinect.enableDepthImg(true); 22 | kinect.enableBodyTrackImg(true); 23 | 24 | kinect.init(); 25 | } 26 | 27 | void draw() { 28 | background(0); 29 | 30 | image(kinect.getDepthImage(), 0, 0); 31 | image(kinect.getBodyTrackImage(), 512, 0); 32 | 33 | //raw body data 0-6 users 255 nothing 34 | int [] rawData = kinect.getRawBodyTrack(); 35 | 36 | foundUsers = false; 37 | for(int i = 0; i < rawData.length; i+=5){ 38 | if(rawData[i] != 255){ 39 | //found something 40 | foundUsers = true; 41 | break; 42 | } 43 | 44 | } 45 | 46 | //display the number of users detected 47 | fill(255, 0, 0); 48 | text(kinect.getNumOfUsers(), 50, 50); 49 | text("Found User: "+foundUsers, 50, 70); 50 | text(frameRate, 50, 90); 51 | 52 | } 53 | 54 | void mousePressed() { 55 | println(frameRate); 56 | ///saveFrame(); 57 | } 58 | -------------------------------------------------------------------------------- /KinectPV2/examples/Mask_findUsers/Mask_findUsers.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Mask test, number of users and find user test 8 | */ 9 | 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | boolean foundUsers = false; 15 | 16 | void setup() { 17 | size(1024, 424); 18 | 19 | kinect = new KinectPV2(this); 20 | 21 | kinect.enableDepthImg(true); 22 | kinect.enableBodyTrackImg(true); 23 | 24 | kinect.init(); 25 | } 26 | 27 | void draw() { 28 | background(0); 29 | 30 | image(kinect.getBodyTrackImage(), 0, 0); 31 | image(kinect.getDepthImage(), 512, 0); 32 | 33 | //raw body data 0-6 users 255 nothing 34 | int [] rawData = kinect.getRawBodyTrack(); 35 | 36 | foundUsers = false; 37 | //iterate through 1/5th of the data 38 | for(int i = 0; i < rawData.length; i+=5){ 39 | if(rawData[i] != 255){ 40 | //found something 41 | foundUsers = true; 42 | break; 43 | } 44 | } 45 | 46 | 47 | fill(0); 48 | textSize(16); 49 | text(kinect.getNumOfUsers(), 50, 50); 50 | text("Found User: "+foundUsers, 50, 70); 51 | text(frameRate, 50, 90); 52 | 53 | } 54 | 55 | void mousePressed() { 56 | println(frameRate); 57 | ///saveFrame(); 58 | } 59 | -------------------------------------------------------------------------------- /KinectPV2/examples/OpenCV_Processing/FindContours/FindContours.pde: -------------------------------------------------------------------------------- 1 | import gab.opencv.*; 2 | import KinectPV2.*; 3 | 4 | KinectPV2 kinect; 5 | OpenCV opencv; 6 | 7 | float polygonFactor = 1; 8 | 9 | int threshold = 10; 10 | 11 | //Distance in cm 12 | int maxD = 4500; //4.5m 13 | int minD = 50; //50cm 14 | 15 | boolean contourBodyIndex = false; 16 | 17 | void setup() { 18 | size(1536, 424, P3D); 19 | opencv = new OpenCV(this, 512, 424); 20 | kinect = new KinectPV2(this); 21 | 22 | kinect.enableDepthImg(true); 23 | kinect.enableBodyTrackImg(true); 24 | kinect.enablePointCloud(true); 25 | 26 | kinect.init(); 27 | } 28 | 29 | void draw() { 30 | background(0); 31 | 32 | noFill(); 33 | strokeWeight(3); 34 | 35 | image(kinect.getDepthImage(), 0, 0); 36 | 37 | //change contour extraction from bodyIndexImg or to Depth 38 | if (contourBodyIndex) 39 | image(kinect.getBodyTrackImage(), 512, 0); 40 | else 41 | image(kinect.getPointCloudDepthImage(), 512, 0); 42 | 43 | if (contourBodyIndex) { 44 | opencv.loadImage(kinect.getBodyTrackImage()); 45 | opencv.gray(); 46 | opencv.threshold(threshold); 47 | PImage dst = opencv.getOutput(); 48 | } else { 49 | opencv.loadImage(kinect.getPointCloudDepthImage()); 50 | opencv.gray(); 51 | opencv.threshold(threshold); 52 | PImage dst = opencv.getOutput(); 53 | } 54 | 55 | ArrayList contours = opencv.findContours(false, false); 56 | 57 | if (contours.size() > 0) { 58 | for (Contour contour : contours) { 59 | 60 | contour.setPolygonApproximationFactor(polygonFactor); 61 | if (contour.numPoints() > 50) { 62 | 63 | stroke(0, 200, 200); 64 | beginShape(); 65 | 66 | for (PVector point : contour.getPolygonApproximation ().getPoints()) { 67 | vertex(point.x + 512*2, point.y); 68 | } 69 | endShape(); 70 | } 71 | } 72 | } 73 | 74 | noStroke(); 75 | fill(0); 76 | rect(0, 0, 130, 100); 77 | fill(255, 0, 0); 78 | text("fps: "+frameRate, 20, 20); 79 | text("threshold: "+threshold, 20, 40); 80 | text("minD: "+minD, 20, 60); 81 | text("maxD: "+maxD, 20, 80); 82 | 83 | kinect.setLowThresholdPC(minD); 84 | kinect.setHighThresholdPC(maxD); 85 | } 86 | 87 | 88 | void keyPressed() { 89 | //change contour finder from contour body to depth-PC 90 | if( key == 'b'){ 91 | contourBodyIndex = !contourBodyIndex; 92 | if(contourBodyIndex) 93 | threshold = 200; 94 | else 95 | threshold = 40; 96 | } 97 | 98 | if (key == 'a') { 99 | threshold+=1; 100 | } 101 | if (key == 's') { 102 | threshold-=1; 103 | } 104 | 105 | if (key == '1') { 106 | minD += 10; 107 | } 108 | 109 | if (key == '2') { 110 | minD -= 10; 111 | } 112 | 113 | if (key == '3') { 114 | maxD += 10; 115 | } 116 | 117 | if (key == '4') { 118 | maxD -= 10; 119 | } 120 | 121 | if (key == '5') 122 | polygonFactor += 0.1; 123 | 124 | if (key == '6') 125 | polygonFactor -= 0.1; 126 | } 127 | -------------------------------------------------------------------------------- /KinectPV2/examples/OpenCV_Processing/LiveCamTest/LiveCamTest.pde: -------------------------------------------------------------------------------- 1 | import KinectPV2.*; 2 | 3 | import gab.opencv.*; 4 | import java.awt.*; 5 | 6 | OpenCV opencv; 7 | KinectPV2 kinect; 8 | 9 | void setup() { 10 | size(1920, 1080); 11 | 12 | kinect = new KinectPV2(this); 13 | kinect.enableColorImg(true); 14 | kinect.init(); 15 | 16 | opencv = new OpenCV(this, 1920, 1080); 17 | } 18 | 19 | void draw() { 20 | opencv.loadImage(kinect.getColorImage()); 21 | PImage img = opencv.getInput(); 22 | image(img, 0, 0); 23 | } 24 | -------------------------------------------------------------------------------- /KinectPV2/examples/PointCloudColor/data/frag.glsl: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | precision mediump int; 4 | #endif 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | //color image int BGRA Color format 10 | gl_FragColor = vec4(vertColor.b * 0.00390625f, vertColor.g * 0.00390625f , vertColor.r * 0.00390625f, 1.0f); 11 | } -------------------------------------------------------------------------------- /KinectPV2/examples/PointCloudColor/data/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 transform; 2 | 3 | attribute vec4 vertex; 4 | attribute vec4 color; 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | gl_Position = transform * vertex; 10 | vertColor = color; 11 | } -------------------------------------------------------------------------------- /KinectPV2/examples/PointCloudDepth/PointCloudDepth.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Point Cloud example in a 2d Image, with threshold example 8 | */ 9 | 10 | import KinectPV2.KJoint; 11 | import KinectPV2.*; 12 | 13 | KinectPV2 kinect; 14 | 15 | //Distance Threashold 16 | int maxD = 4500; // 4.5mx 17 | int minD = 0; // 50cm 18 | 19 | void setup() { 20 | size(1024, 424, P3D); 21 | 22 | kinect = new KinectPV2(this); 23 | 24 | //Enable point cloud 25 | kinect.enableDepthImg(true); 26 | kinect.enablePointCloud(true); 27 | 28 | kinect.init(); 29 | 30 | } 31 | 32 | void draw() { 33 | background(0); 34 | 35 | image(kinect.getDepthImage(), 0, 0); 36 | 37 | /* obtain the point cloud as a PImage 38 | * Each pixel of the PointCloudDepthImage corresponds to the Z value 39 | * of Point Cloud i.e. distances. 40 | * The Point cloud values are mapped from (0 - 4500) mm to gray color format (0 - 255) 41 | */ 42 | image(kinect.getPointCloudDepthImage(), 512, 0); 43 | 44 | //obtain the raw depth data in integers from [0 - 4500] 45 | int [] rawData = kinect.getRawDepthData(); 46 | 47 | //Threahold of the point Cloud. 48 | kinect.setLowThresholdPC(minD); 49 | kinect.setHighThresholdPC(maxD); 50 | } 51 | 52 | void keyPressed() { 53 | if (key == '1') { 54 | minD += 10; 55 | println("Change min: "+minD); 56 | } 57 | 58 | if (key == '2') { 59 | minD -= 10; 60 | println("Change min: "+minD); 61 | } 62 | 63 | if (key == '3') { 64 | maxD += 10; 65 | println("Change max: "+maxD); 66 | } 67 | 68 | if (key == '4') { 69 | maxD -=10; 70 | println("Change max: "+maxD); 71 | } 72 | } -------------------------------------------------------------------------------- /KinectPV2/examples/PointCloudOGL/data/frag.glsl: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | precision mediump int; 4 | #endif 5 | 6 | varying vec4 vertColor; 7 | 8 | //input color 9 | //uniform vec4 fragColor; 10 | 11 | void main() { 12 | 13 | //outputColor 14 | gl_FragColor = vec4(1, 1, 1, 1); 15 | } 16 | -------------------------------------------------------------------------------- /KinectPV2/examples/PointCloudOGL/data/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 transform; 2 | 3 | attribute vec4 vertex; 4 | attribute vec4 color; 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | gl_Position = transform * vertex; 10 | vertColor = color; 11 | } -------------------------------------------------------------------------------- /KinectPV2/examples/RecordPointCloud/Frame.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Simple class that manager saving each FloatBuffer and writes the data into a OBJ file 3 | */ 4 | class FrameBuffer { 5 | 6 | FloatBuffer frame; 7 | 8 | //id of the frame 9 | int frameId; 10 | 11 | FrameBuffer(FloatBuffer f) { 12 | frame = clone(f); 13 | } 14 | 15 | void setFrameId(int fId) { 16 | frameId = fId; 17 | } 18 | 19 | /* 20 | Writing of the obj file, 21 | */ 22 | void saveOBJFrame() { 23 | int vertData = 512 * 424; 24 | String[] points = new String[vertData]; 25 | 26 | //Iterate through all the XYZ points 27 | for (int i = 0; i < vertData; i++) { 28 | float x = frame.get(i*3 + 0); 29 | float y = frame.get(i*3 + 1); 30 | float z = frame.get(i*3 + 2); 31 | points[i] = "v "+x+" "+y+" "+z; 32 | } 33 | 34 | saveStrings("data/frame0"+frameId+".obj", points); 35 | println("Done Saving Frame "+frameId); 36 | } 37 | 38 | //Simple function that copys the FloatBuffer to another FloatBuffer 39 | public FloatBuffer clone(FloatBuffer original) { 40 | FloatBuffer clone = FloatBuffer.allocate(original.capacity()); 41 | original.rewind();//copy from the beginning 42 | clone.put(original); 43 | original.rewind(); 44 | clone.flip(); 45 | return clone; 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /KinectPV2/examples/RecordPointCloud/data/frag.glsl: -------------------------------------------------------------------------------- 1 | #ifdef GL_ES 2 | precision mediump float; 3 | precision mediump int; 4 | #endif 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | 10 | //outputColor 11 | gl_FragColor = vec4(1.0f, 1.0f, 1.0f, 1.0f); 12 | } -------------------------------------------------------------------------------- /KinectPV2/examples/RecordPointCloud/data/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 transform; 2 | 3 | attribute vec4 vertex; 4 | attribute vec4 color; 5 | 6 | varying vec4 vertColor; 7 | 8 | void main() { 9 | gl_Position = transform * vertex; 10 | vertColor = color; 11 | } -------------------------------------------------------------------------------- /KinectPV2/examples/TestImages/TestImages.pde: -------------------------------------------------------------------------------- 1 | /* 2 | Thomas Sanchez Lengeling. 3 | http://codigogenerativo.com/ 4 | 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Test all Images 8 | */ 9 | 10 | import KinectPV2.*; 11 | 12 | KinectPV2 kinect; 13 | 14 | public void setup() { 15 | size(1536, 848); 16 | kinect = new KinectPV2(this); 17 | kinect.enableColorImg(true); 18 | kinect.enableDepthImg(true); 19 | kinect.enableInfraredImg(true); 20 | kinect.enableInfraredLongExposureImg(true); 21 | kinect.enableBodyTrackImg(true); 22 | kinect.enableDepthMaskImg(true); 23 | 24 | frameRate(60); 25 | 26 | kinect.init(); 27 | } 28 | 29 | public void draw() { 30 | background(0); 31 | 32 | image(kinect.getColorImage(), 0, 424, 512, 424); 33 | image(kinect.getDepthImage(), 0, 0, 512, 424); 34 | 35 | image(kinect.getInfraredImage(), 512, 0, 512, 424); 36 | image(kinect.getInfraredLongExposureImage(), 512, 424, 512, 424); 37 | 38 | image(kinect.getBodyTrackImage(), 512*2, 0, 512, 424); 39 | image(kinect.getDepthMaskImage(), 512*2, 424, 512, 424); 40 | 41 | fill(255, 0, 0); 42 | text(frameRate, 50, 50); 43 | } -------------------------------------------------------------------------------- /KinectPV2/library.properties: -------------------------------------------------------------------------------- 1 | # UTF-8 supported 2 | 3 | name = Kinect v2 for Processing 4 | 5 | authors = [Thomas Sanchez Lengeling](http://codigogenerativo.com/) 6 | 7 | url = http://codigogenerativo.com/kinectpv2/ 8 | 9 | categories = Video & Vision 10 | 11 | sentence = A Kinect v2 implementation using the Windows SDK. 12 | 13 | paragraph = For Windows 10 and 8 with 64 bits. 14 | 15 | version = 077 16 | 17 | prettyVersion = 0.7.7 18 | 19 | minRevision = 246 20 | 21 | maxRevision = 0 22 | -------------------------------------------------------------------------------- /KinectPV2/library/Kinect20.Face.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/Kinect20.Face.dll -------------------------------------------------------------------------------- /KinectPV2/library/KinectPV2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/KinectPV2.dll -------------------------------------------------------------------------------- /KinectPV2/library/KinectPV2.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/KinectPV2.exp -------------------------------------------------------------------------------- /KinectPV2/library/KinectPV2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/KinectPV2.jar -------------------------------------------------------------------------------- /KinectPV2/library/KinectPV2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/KinectPV2.lib -------------------------------------------------------------------------------- /KinectPV2/library/KinectPV2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/KinectPV2.pdb -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/ExpressionRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/ExpressionRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/EyeLeftRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/EyeLeftRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/EyeRightRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/EyeRightRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/FacialHairIRRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/FacialHairIRRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/FacialHairRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/FacialHairRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/GlassesIRRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/GlassesIRRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/GlassesRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/GlassesRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/LookingAwayRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/LookingAwayRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/MouthMovedRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/MouthMovedRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/MouthOpenRandomForest.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/Expression/MouthOpenRandomForest.model -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/Expression/NuiExpressionModelManifest.txt: -------------------------------------------------------------------------------- 1 | EyeRightRandomForest.model 2 | EyeLeftRandomForest.model 3 | MouthOpenRandomForest.model 4 | MouthMovedRandomForest.model 5 | LookingAwayRandomForest.model 6 | ExpressionRandomForest.model 7 | GlassesIRRandomForest.model 8 | GlassesRandomForest.model 9 | FacialHairIRRandomForest.model 10 | FacialHairRandomForest.model 11 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceAlignment.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceAlignment.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceAlignmentColor.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceAlignmentColor.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceAlignmentColor27.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceAlignmentColor27.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceDetector.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceDetector.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceOrientation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceOrientation.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/FaceTrackingColor27.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/FaceTrackingColor27.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/3DModel.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/3DModel.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/3DModel_globalPCA.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/3DModel_globalPCA.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_F.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_F.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HLP.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HLP.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HRP.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/AAMModelData_HRP.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_F.txt: -------------------------------------------------------------------------------- 1 | # AAM model frontal view (2) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 77 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 1.0 15 | 230 1 -1 0 1.0 1.0 16 | 328 2 -1 0 1.0 1.0 17 | 325 3 -1 0 1.0 1.0 18 | 470 4 -1 0 1.0 1.0 19 | 333 5 -1 0 1.0 1.0 20 | 467 6 -1 0 1.0 1.0 21 | 331 7 -1 0 1.0 1.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 1.0 25 | 871 9 -1 0 1.0 1.0 26 | 883 10 -1 0 1.0 1.0 27 | 862 11 -1 0 1.0 1.0 28 | 1016 12 -1 0 1.0 1.0 29 | 751 13 -1 0 1.0 1.0 30 | 732 14 -1 0 1.0 1.0 31 | 775 15 -1 0 1.0 1.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 1.0 35 | 218 17 -1 0 2.0 1.0 36 | 213 18 -1 0 2.0 1.0 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 1.0 40 | 339 22 -1 0 2.0 1.0 41 | 222 23 -1 0 2.0 1.0 42 | 217 24 -1 0 2.0 1.0 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 1.0 47 | 858 27 -1 0 2.0 1.0 48 | 956 28 -1 0 2.0 1.0 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 1.0 52 | 828 32 -1 0 2.0 1.0 53 | 849 33 -1 0 2.0 1.0 54 | 839 34 -1 0 2.0 1.0 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 152 36 -1 0 1.0 0.0 59 | 1216 37 -1 0 1.0 0.0 60 | 283 38 -1 0 1.0 0.0 61 | 487 39 -1 0 1.0 0.0 62 | 156 40 -1 0 1.0 1.0 63 | 204 41 -1 0 1.0 1.0 64 | 830 42 -1 0 1.0 1.0 65 | 783 43 -1 0 1.0 1.0 66 | 1021 44 -1 0 1.0 0.0 67 | 942 45 -1 0 1.0 0.0 68 | 1205 46 -1 0 1.0 0.0 69 | 771 47 -1 0 1.0 0.0 70 | 71 | # Mouth - outside lips 72 | 91 48 -1 0 1.0 1.0 73 | 264 49 -1 0 0.0 1.0 74 | 191 50 -1 0 0.0 1.0 75 | 19 51 -1 0 0.0 1.0 76 | 813 52 -1 0 0.0 1.0 77 | 762 53 -1 0 0.0 1.0 78 | 687 54 -1 0 1.0 1.0 79 | 649 55 -1 0 0.0 1.0 80 | 634 56 -1 0 0.0 1.0 81 | 8 57 -1 0 0.0 1.0 82 | 366 58 -1 0 0.0 1.0 83 | 70 59 -1 0 0.0 1.0 84 | 85 | # Mouth - inside lips 86 | 433 60 -1 0 1.0 0.0 87 | 522 61 -1 0 1.0 1.0 88 | 1072 62 -1 0 1.0 1.0 89 | 967 63 -1 0 1.0 1.0 90 | 702 64 -1 0 1.0 0.0 91 | 699 65 -1 0 1.0 1.0 92 | 10 66 -1 0 1.0 1.0 93 | 521 67 -1 0 1.0 1.0 94 | 95 | # Left Cheek 96 | 545 68 -1 0 1.0 0.0 97 | 1252 70 -1 0 1.0 0.0 98 | 411 73 -1 0 1.0 0.0 99 | 100 | # Chin 101 | 1185 76 -1 0 1.0 0.0 102 | 1187 77 -1 0 1.0 0.0 103 | 1189 78 -1 0 1.0 0.0 104 | 105 | # Right Cheek 106 | 568 81 -1 0 1.0 0.0 107 | 1246 84 -1 0 1.0 0.0 108 | 1069 86 -1 0 1.0 0.0 109 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_HLP.txt: -------------------------------------------------------------------------------- 1 | # AAM model left view (1) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 75 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 0.0 15 | 230 1 -1 0 1.0 0.0 16 | 328 2 -1 0 1.0 0.0 17 | 325 3 -1 0 1.0 0.0 18 | 470 4 -1 0 1.0 0.0 19 | 333 5 -1 0 1.0 0.0 20 | 467 6 -1 0 1.0 0.0 21 | 331 7 -1 0 1.0 0.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 0.1 25 | 871 9 -1 0 1.0 0.0 26 | 883 10 -1 0 1.0 0.1 27 | 862 11 -1 0 1.0 0.0 28 | 1016 12 -1 0 1.0 0.1 29 | 751 13 -1 0 1.0 0.0 30 | 732 14 -1 0 1.0 0.1 31 | 775 15 -1 0 1.0 0.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 0.0 35 | 218 17 -1 0 2.0 0.0 36 | 213 18 -1 0 2.0 0.0 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 0.0 40 | 339 22 -1 0 2.0 0.0 41 | 222 23 -1 0 2.0 0.0 42 | 217 24 -1 0 2.0 0.0 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 0.1 47 | 858 27 -1 0 2.0 0.1 48 | 956 28 -1 0 2.0 0.1 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 0.1 52 | 828 32 -1 0 2.0 0.1 53 | 849 33 -1 0 2.0 0.1 54 | 839 34 -1 0 2.0 0.1 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 258 36 -1 0 1.0 0.0 59 | 1218 37 -1 0 1.0 0.0 60 | 173 39 -1 0 1.0 0.0 61 | 322 41 -1 0 1.0 0.0 62 | 830 42 -1 0 1.0 0.0 63 | 783 43 -1 0 1.0 0.0 64 | 744 44 -1 0 1.0 0.0 65 | 942 45 -1 0 1.0 0.0 66 | 1263 46 -1 0 1.0 0.0 67 | 771 47 -1 0 1.0 0.0 68 | 69 | # Mouth - outside lips 70 | 91 48 -1 0 1.0 0.0 71 | 264 49 -1 0 0.0 0.0 72 | 191 50 -1 0 0.0 0.0 73 | 19 51 -1 0 0.0 0.0 74 | 813 52 -1 0 0.0 0.0 75 | 762 53 -1 0 0.0 0.0 76 | 687 54 -1 0 1.0 0.0 77 | 649 55 -1 0 0.0 0.0 78 | 634 56 -1 0 0.0 0.0 79 | 8 57 -1 0 0.0 0.0 80 | 366 58 -1 0 0.0 0.0 81 | 70 59 -1 0 0.0 0.0 82 | 83 | # Mouth - inside lips 84 | 433 60 -1 0 1.0 0.0 85 | 522 61 -1 0 1.0 0.0 86 | 1072 62 -1 0 1.0 0.0 87 | 967 63 -1 0 1.0 0.0 88 | 702 64 -1 0 1.0 0.0 89 | 699 65 -1 0 1.0 0.0 90 | 10 66 -1 0 1.0 0.0 91 | 521 67 -1 0 1.0 0.0 92 | 93 | # Left Cheek 94 | 551 68 -1 0 1.0 0.0 95 | 1255 70 -1 0 1.0 0.0 96 | 59 73 -1 0 1.0 0.0 97 | 98 | # Chin 99 | 1185 76 -1 0 1.0 0.0 100 | 1187 77 -1 0 1.0 0.0 101 | 1189 78 -1 0 1.0 0.0 102 | 103 | # Right Cheek 104 | 594 81 -1 0 1.0 0.0 105 | 1245 84 -1 0 1.0 0.0 106 | 1066 86 -1 0 1.0 0.0 107 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/Map2D3D_HRP.txt: -------------------------------------------------------------------------------- 1 | # AAM model right view (3) 2 | # LUT 3 | 4 | # Number of common 2D and 3D vertices 5 | 75 6 | 7 | # The following lines are of the format: i3D i2DA i2DB alpha weight, 8 | # where i3D is the index of the 3D model vertex, i2D{A,B} are vertex indices of the 2D AAM mesh, 9 | # and alpha (0 to 1.0) is used to interpolate the 2D points A and B with (1-alpha)*Pts[i2DA] + alpha*Pts[i2DB], 10 | # assuming i2DB is not -1 (meaning "undefined"). 11 | # Weight is the weight of this point in the 2D3D energy term (defines how important this points is in the fit) 12 | 13 | # Left Eye 14 | 197 0 -1 0 1.0 0.1 15 | 230 1 -1 0 1.0 0.0 16 | 328 2 -1 0 1.0 0.1 17 | 325 3 -1 0 1.0 0.0 18 | 470 4 -1 0 1.0 0.1 19 | 333 5 -1 0 1.0 0.0 20 | 467 6 -1 0 1.0 0.1 21 | 331 7 -1 0 1.0 0.0 22 | 23 | # Right eye 24 | 844 8 -1 0 1.0 0.0 25 | 871 9 -1 0 1.0 0.0 26 | 883 10 -1 0 1.0 0.0 27 | 862 11 -1 0 1.0 0.0 28 | 1016 12 -1 0 1.0 0.0 29 | 751 13 -1 0 1.0 0.0 30 | 732 14 -1 0 1.0 0.0 31 | 775 15 -1 0 1.0 0.0 32 | 33 | # Left eyebrow 34 | 345 16 -1 0 2.0 0.1 35 | 218 17 -1 0 2.0 0.1 36 | 213 18 -1 0 2.0 0.1 37 | 338 19 -1 0 2.0 0.0 38 | 176 20 -1 0 2.0 0.0 39 | 163 21 -1 0 2.0 0.1 40 | 339 22 -1 0 2.0 0.1 41 | 222 23 -1 0 2.0 0.1 42 | 217 24 -1 0 2.0 0.1 43 | 346 25 -1 0 2.0 0.0 44 | 45 | # Right eyebrow 46 | 804 26 -1 0 2.0 0.0 47 | 858 27 -1 0 2.0 0.0 48 | 956 28 -1 0 2.0 0.0 49 | 954 29 -1 0 2.0 0.0 50 | 953 30 -1 0 2.0 0.0 51 | 781 31 -1 0 2.0 0.0 52 | 828 32 -1 0 2.0 0.0 53 | 849 33 -1 0 2.0 0.0 54 | 839 34 -1 0 2.0 0.0 55 | 803 35 -1 0 2.0 0.0 56 | 57 | # Nose 58 | 152 36 -1 0 1.0 0.0 59 | 1273 37 -1 0 1.0 0.0 60 | 283 38 -1 0 1.0 0.0 61 | 132 39 -1 0 1.0 0.0 62 | 156 40 -1 0 1.0 0.0 63 | 204 41 -1 0 1.0 0.0 64 | 834 42 -1 0 1.0 0.0 65 | 801 44 -1 0 1.0 0.0 66 | 1207 46 -1 0 1.0 0.0 67 | 819 47 -1 0 1.0 0.0 68 | 69 | # Mouth - outside lips 70 | 91 48 -1 0 1.0 0.0 71 | 264 49 -1 0 0.0 0.0 72 | 191 50 -1 0 0.0 0.0 73 | 19 51 -1 0 0.0 0.0 74 | 813 52 -1 0 0.0 0.0 75 | 762 53 -1 0 0.0 0.0 76 | 687 54 -1 0 1.0 0.0 77 | 649 55 -1 0 0.0 0.0 78 | 634 56 -1 0 0.0 0.0 79 | 8 57 -1 0 0.0 0.0 80 | 366 58 -1 0 0.0 0.0 81 | 70 59 -1 0 0.0 0.0 82 | 83 | # Mouth - inside lips 84 | 433 60 -1 0 1.0 0.0 85 | 522 61 -1 0 1.0 0.0 86 | 1072 62 -1 0 1.0 0.0 87 | 967 63 -1 0 1.0 0.0 88 | 702 64 -1 0 1.0 0.0 89 | 699 65 -1 0 1.0 0.0 90 | 10 66 -1 0 1.0 0.0 91 | 521 67 -1 0 1.0 0.0 92 | 93 | # Left Cheek 94 | 547 68 -1 0 1.0 0.0 95 | 1253 70 -1 0 1.0 0.0 96 | 52 73 -1 0 1.0 0.0 97 | 98 | # Chin 99 | 1185 76 -1 0 1.0 0.0 100 | 1187 77 -1 0 1.0 0.0 101 | 1189 78 -1 0 1.0 0.0 102 | 103 | # Right Cheek 104 | 589 81 -1 0 1.0 0.0 105 | 1248 84 -1 0 1.0 0.0 106 | 1006 86 -1 0 1.0 0.0 107 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/PCAMaskBias.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/AAMModel/PCAMaskBias.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/Front.p.txt: -------------------------------------------------------------------------------- 1 | -7.5117906e-001 2 | 1.7971340e+000 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/front.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/front.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/front_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/front_nose.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/left.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/left.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/left.p.txt: -------------------------------------------------------------------------------- 1 | -5.5782685e-001 2 | 2.2349918e+000 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/left_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/left_nose.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/right.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/right.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/right.p.txt: -------------------------------------------------------------------------------- 1 | -4.9366488e-001 2 | 1.7676892e+000 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/right_nose.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/EvalModel/right_nose.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/close.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/close.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/close.p.txt: -------------------------------------------------------------------------------- 1 | -1.0390253e+000 2 | 1.5623594e-001 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/lopen.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/lopen.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/MouthModel/lopen.p.txt: -------------------------------------------------------------------------------- 1 | -1.4112765e+000 2 | 1.5076640e+000 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/SkintoneModel/skintone_appearance_classifier.txt: -------------------------------------------------------------------------------- 1 | 1 6 2 | 91.292313 69.292313 62.292313 60.292313 58.292313 42.292313 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/SkintoneModel/skintone_shape_classifier.txt: -------------------------------------------------------------------------------- 1 | 95 1 2 | 0.30455784 3 | 1.66001098 4 | -1.62138112 5 | -3.09007608 6 | -1.8449776 7 | -2.7510275 8 | 0.7156408 9 | 0.46706254 10 | 0.74084026 11 | 0.55543838 12 | 0.3068033 13 | 0.09282714 14 | 0.30903342 15 | 0.4042891 16 | -0.0464795 17 | -0.9728313 18 | -0.41406834 19 | -0.05139918 20 | -0.75276554 21 | -0.6075877 22 | 0.34373262 23 | 0.4014972 24 | -0.49888772 25 | -0.65480936 26 | 0.30483304 27 | -0.70918458 28 | -0.3512147 29 | 1.15232726 30 | 0.787535 31 | -0.25787108 32 | -0.08557144 33 | 0.65681558 34 | -0.2017218 35 | -0.37886192 36 | -0.21043326 37 | 0.57299166 38 | 0.01963078 39 | 0.2131527 40 | 0.15743048 41 | -1.21265728 42 | -0.70463972 43 | -0.44533304 44 | 0.06626808 45 | -0.3602199 46 | -0.53570248 47 | -0.18289378 48 | -0.1382585 49 | 0.15339292 50 | 0.35441632 51 | -1.227708 52 | -0.06238416 53 | 0.101142 54 | 0.14933188 55 | -0.42566896 56 | -0.82586464 57 | 0.2495135 58 | -0.24245006 59 | 0.21101868 60 | -0.02514772 61 | -0.12504932 62 | 0.00164714 63 | 0.96376986 64 | -0.07674876 65 | 0.14103244 66 | -1.35389602 67 | -0.42830124 68 | 0.18193266 69 | -0.66881618 70 | -0.17433316 71 | 0.87620696 72 | -0.11799044 73 | 0.41522964 74 | 0.05357716 75 | -1.0167036 76 | -0.56100462 77 | -0.95134026 78 | -1.24800902 79 | 0.36070056 80 | 0.75890604 81 | -0.65296004 82 | -0.5858694 83 | 0.03783712 84 | 0.18327206 85 | 0.44730186 86 | 0.2956868 87 | 0.01696344 88 | 0.60659404 89 | 0.06842162 90 | 0.40146684 91 | 0.66722408 92 | -0.01215514 93 | 0.1052204 94 | 0.4059476 95 | 0.02165666 96 | -0.72 97 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/front.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/front.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/front.p.txt: -------------------------------------------------------------------------------- 1 | -8.1733318e-001 2 | 8.0096631e-001 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/left.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/left.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/left.p.txt: -------------------------------------------------------------------------------- 1 | -4.5347825e-001 2 | 1.9513047e-001 3 | -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/right.mod.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/right.mod.bin -------------------------------------------------------------------------------- /KinectPV2/library/NuiDatabase/HDFaceTracker/ViewModel/right.p.txt: -------------------------------------------------------------------------------- 1 | -4.8654916e-001 2 | 3.0386777e-001 3 | -------------------------------------------------------------------------------- /KinectPV2/reference/KinectPV2/class-use/Device.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class KinectPV2.Device 7 | 8 | 9 | 10 | 11 | 17 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 35 |
36 | 63 | 64 |
65 |

Uses of Class
KinectPV2.Device

66 |
67 |
No usage of KinectPV2.Device
68 | 69 |
70 | 71 | 72 | 73 | 74 | 83 |
84 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /KinectPV2/reference/KinectPV2/class-use/FaceData.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uses of Class KinectPV2.FaceData 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Uses of Class
KinectPV2.FaceData

73 |
74 |
No usage of KinectPV2.FaceData
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /KinectPV2/reference/KinectPV2/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KinectPV2 7 | 8 | 9 | 10 | 11 | 12 |

KinectPV2

13 |
14 |

Classes

15 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /KinectPV2/reference/KinectPV2/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KinectPV2 Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package KinectPV2

73 |
74 |
75 |

Class Hierarchy

76 |
    77 |
  • java.lang.Object 78 |
      79 |
    • KinectPV2.FaceData (implements KinectPV2.FaceProperties)
    • 80 |
    81 |
  • 82 |
83 |
84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 101 |
102 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /KinectPV2/reference/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /KinectPV2/reference/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /KinectPV2/reference/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Constant Field Values 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Constant Field Values

73 |

Contents

74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /KinectPV2/reference/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Deprecated List 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Deprecated API

73 |

Contents

74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /KinectPV2/reference/index-files/index-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | F-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
F G I K  72 | 73 | 74 |

F

75 |
76 |
FaceData - Class in KinectPV2
77 |
78 |
Face Data 79 | P
80 |
81 |
82 | F G I K 
83 | 84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 100 |
101 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /KinectPV2/reference/index-files/index-4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | K-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
F G I K  72 | 73 | 74 |

K

75 |
76 |
KinectPV2 - package KinectPV2
77 |
 
78 |
79 | F G I K 
80 | 81 |
82 | 83 | 84 | 85 | 86 | 87 | 88 | 97 |
98 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /KinectPV2/reference/index-files/index-6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R-Index 7 | 8 | 9 | 10 | 11 | 17 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 35 |
36 | 63 | 64 |
D E G K M R S  65 | 66 | 67 |

R

68 |
69 |
run() - Method in class KinectPV2.Device
70 |
 
71 |
72 | D E G K M R S 
73 | 74 |
75 | 76 | 77 | 78 | 79 | 88 |
89 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /KinectPV2/reference/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Generated Documentation (Untitled) 7 | 59 | 60 | 61 | 62 | 63 | 64 | <noscript> 65 | <div>JavaScript is disabled on your browser.</div> 66 | </noscript> 67 | <h2>Frame Alert</h2> 68 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="KinectPV2/package-summary.html">Non-frame version</a>.</p> 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /KinectPV2/reference/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For All Packages

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 |
    81 |
  • java.lang.Object 82 |
      83 |
    • KinectPV2.FaceData (implements KinectPV2.FaceProperties)
    • 84 |
    85 |
  • 86 |
87 |
88 | 89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 105 |
106 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /KinectPV2/reference/package-list: -------------------------------------------------------------------------------- 1 | KinectPV2 2 | -------------------------------------------------------------------------------- /KinectPV2/reference/resources/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/reference/resources/background.gif -------------------------------------------------------------------------------- /KinectPV2/reference/resources/tab.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/reference/resources/tab.gif -------------------------------------------------------------------------------- /KinectPV2/reference/resources/titlebar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/reference/resources/titlebar.gif -------------------------------------------------------------------------------- /KinectPV2/reference/resources/titlebar_end.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasLengeling/KinectPV2/3bda24ba8b7c62155bf308c0d86c961ca89dbfa3/KinectPV2/reference/resources/titlebar_end.gif -------------------------------------------------------------------------------- /KinectPV2/reference/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/Constants.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Common variables for all the classes. 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface Constants { 32 | 33 | public final static int BODY_COUNT = 6; 34 | 35 | public final static int WIDTHColor = 1920; 36 | public final static int HEIGHTColor = 1080; 37 | 38 | public final static int WIDTHDepth = 512; 39 | public final static int HEIGHTDepth = 424; 40 | 41 | public final static int Int32 = 0; 42 | public final static int Float = 1; 43 | } 44 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/FaceFeatures.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Face Features class, with type Feature and State. 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public class FaceFeatures { 32 | 33 | int feature; 34 | int state; 35 | 36 | /** 37 | * Create Feature 38 | * @param feature 39 | * @param state 40 | */ 41 | FaceFeatures(int feature, int state){ 42 | this.feature = feature; 43 | this.state = state; 44 | } 45 | 46 | /** 47 | * Set Feature 48 | * @param feature 49 | */ 50 | public void setFeatureType(int feature){ 51 | this.feature = feature; 52 | } 53 | 54 | /** 55 | * Set State 56 | * @param state 57 | */ 58 | public void setState(int state){ 59 | this.state = state; 60 | } 61 | 62 | 63 | /** 64 | * Get State 65 | * @return 66 | */ 67 | public int getState(){ 68 | return state; 69 | } 70 | 71 | /** 72 | * Get Feature Type 73 | * @return 74 | */ 75 | public int getFeatureType(){ 76 | return feature; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/FaceProperties.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Commun Face Properties 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface FaceProperties extends Constants { 32 | public final static int FaceProperty_Happy = 0; 33 | public final static int FaceProperty_Engaged = 1; 34 | public final static int FaceProperty_LeftEyeClosed = 2; 35 | public final static int FaceProperty_RightEyeClosed = 3; 36 | public final static int FaceProperty_LookingAway = 4; 37 | public final static int FaceProperty_MouthMoved = 5; 38 | public final static int FaceProperty_MouthOpen = 6; 39 | public final static int FaceProperty_WearingGlasses = 7; 40 | public final static int Activity_Count = ( FaceProperty_WearingGlasses + 1 ); 41 | 42 | public final static int FACESIZE = BODY_COUNT * (36); 43 | 44 | public final static int DetectionResult_Unknown = -1; 45 | public final static int DetectionResult_Yes = 1; 46 | public final static int DetectionResult_No = 0; 47 | public final static int DetectionResult_Maybe =2; 48 | 49 | public final static int Face_LeftEye = 0; 50 | public final static int Face_RightEye = 1; 51 | public final static int Face_Nose = 2; 52 | public final static int Face_LeftMouth = 3; 53 | public final static int Face_RightMouth = 4; 54 | 55 | public final static int HDFaceVertexCount = 1347; 56 | 57 | //6 MORE POINT FOR TRACKING AND NOT TRAKING 58 | public final static int HDFaceVertexPoints = HDFaceVertexCount * BODY_COUNT * 2 + BODY_COUNT; 59 | 60 | } -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/HDFaceData.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PVector; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * Face Features class, with type Feature and State. 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class HDFaceData implements FaceProperties{ 34 | 35 | PVector [] HDFaceVertex; 36 | boolean faceTracked; 37 | 38 | HDFaceData(){ 39 | HDFaceVertex = new PVector[ HDFaceVertexCount]; 40 | for(int i = 0; i < HDFaceVertexCount; i++) 41 | HDFaceVertex[i] = new PVector(0, 0); 42 | } 43 | 44 | protected void createHDFaceVertexData(float [] rawData, int iFace){ 45 | int index = HDFaceVertexCount * 2; 46 | 47 | if(rawData[BODY_COUNT * HDFaceVertexCount * 2 + iFace] == 1) 48 | faceTracked = true; 49 | else 50 | faceTracked = false; 51 | for(int i = 0; i < HDFaceVertexCount; i++) { 52 | HDFaceVertex[i].x = rawData[index * iFace + i * 2 + 0]; 53 | HDFaceVertex[i].y = rawData[index * iFace + i * 2 + 1]; 54 | } 55 | } 56 | 57 | public PVector [] getHDFaceVertex(){ 58 | return HDFaceVertex; 59 | } 60 | 61 | public boolean isTracked() { 62 | return faceTracked; 63 | } 64 | 65 | public float getX(int index) { 66 | return HDFaceVertex[index].x; 67 | } 68 | 69 | public float getY(int index) { 70 | return HDFaceVertex[index].y; 71 | } 72 | 73 | public PVector getPVector(int index) { 74 | return HDFaceVertex[index]; 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/Image.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | import processing.core.PApplet; 27 | import processing.core.PImage; 28 | 29 | /** 30 | * Image class helper 31 | * @author Thomas Sanchez Lengeling 32 | * 33 | */ 34 | public class Image{ 35 | private float fps; 36 | private int imgPixelSize; 37 | private PApplet parent; 38 | 39 | protected PImage img; 40 | private boolean processRawData; 41 | 42 | protected byte [] rawByteData; 43 | 44 | protected float [] rawFloatData; 45 | protected int [] rawIntData; 46 | 47 | public Image(PApplet p, int width, int height, int MODE){ 48 | parent = p; 49 | img = parent.createImage(width, height, MODE); 50 | imgPixelSize = width * height; 51 | rawByteData = new byte[imgPixelSize]; 52 | 53 | rawIntData = new int[imgPixelSize]; 54 | rawFloatData = new float[imgPixelSize]; 55 | processRawData= false; 56 | } 57 | 58 | /** 59 | * Get Image Size in int 60 | * @return int 61 | */ 62 | public int getImgSize(){ 63 | return imgPixelSize; 64 | } 65 | 66 | /** 67 | * update Pixels, img.updatePixels() 68 | */ 69 | public void updatePixels(){ 70 | img.updatePixels(); 71 | } 72 | 73 | /** 74 | * load Pixels, img.loadPixels() 75 | */ 76 | public void loadPixels(){ 77 | img.loadPixels(); 78 | } 79 | 80 | /** 81 | * get Pixels Image, img.pixels 82 | * @return int [] 83 | */ 84 | public int [] pixels(){ 85 | return img.pixels; 86 | } 87 | 88 | /** 89 | * get Image 90 | * @return PImage 91 | */ 92 | public PImage getImage() { 93 | return img; 94 | } 95 | 96 | /** 97 | * get Fps of the current Image 98 | * @return float 99 | */ 100 | public float getFPS() { 101 | return fps; 102 | } 103 | 104 | /** 105 | * Process Raw Data 106 | * @return boolean 107 | */ 108 | public boolean isProcessRawData(){ 109 | return processRawData; 110 | } 111 | 112 | /** 113 | * Activate Process Rae Data 114 | * @param rawData 115 | */ 116 | public void activateRawData(boolean rawData){ 117 | processRawData = rawData; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/KJoint.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | import processing.core.PVector; 3 | 4 | /* 5 | Copyright (C) 2014 Thomas Sanchez Lengeling. 6 | KinectPV2, Kinect for Windows v2 library for processing 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | * Simple Joint Class with (x, y, z) position, Orientation, state and type 29 | * @author thomas 30 | * 31 | */ 32 | public class KJoint { 33 | 34 | protected PVector pos; 35 | 36 | protected int state; 37 | 38 | protected int type; 39 | 40 | protected KQuaternion orientation; 41 | 42 | 43 | 44 | KJoint(float x, float y, float z, KQuaternion ori, int state){ 45 | pos = new PVector(x, y, z); 46 | orientation = ori; 47 | this.state = state; 48 | } 49 | 50 | KJoint(){} 51 | 52 | /** 53 | * Get orientation of a single Joint 54 | * @return Quartenion 55 | */ 56 | public KQuaternion getOrientation() { 57 | return orientation; 58 | } 59 | 60 | /** 61 | * get PVector Position 62 | * @return 63 | */ 64 | public PVector getPosition(){ 65 | return pos; 66 | } 67 | /** 68 | * get X position 69 | * @return float x 70 | */ 71 | public float getX(){ 72 | return pos.x; 73 | } 74 | 75 | /** 76 | * get Y position 77 | * @return float y 78 | */ 79 | public float getY(){ 80 | return pos.y; 81 | } 82 | 83 | /** 84 | * get Z position 85 | * @return float z 86 | */ 87 | public float getZ(){ 88 | return pos.z; 89 | } 90 | 91 | /** 92 | * get State of a single Joint 93 | * @return state 94 | */ 95 | public int getState(){ 96 | return state; 97 | } 98 | 99 | /** 100 | * get Joint Type 101 | * @return int 102 | */ 103 | public int getType(){ 104 | return type; 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/KQuaternion.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PVector; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * Simple KQuartenion class 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class KQuaternion { 34 | 35 | float x; 36 | float y; 37 | float z; 38 | 39 | float w; 40 | 41 | KQuaternion(float w, float x, float y, float z){ 42 | this.x = x; 43 | this.y = y; 44 | this.z = z; 45 | this.w = w; 46 | } 47 | 48 | KQuaternion(){ 49 | this.x = 0; 50 | this.y = 0; 51 | this.z = 0; 52 | this.w = 0; 53 | } 54 | 55 | 56 | public PVector rotate(float x1, float y1, float z1) 57 | { 58 | KQuaternion q = new KQuaternion(0.0f, x1, y1, z1); 59 | KQuaternion r = mult(new KQuaternion(w, x, y, z), q); 60 | KQuaternion conj = Conj(); 61 | KQuaternion retult = mult(r, conj); 62 | return new PVector( retult.x, retult.y, retult.z); 63 | } 64 | 65 | public KQuaternion Conj() 66 | { 67 | return new KQuaternion(w, -x, -y, -z); 68 | } 69 | 70 | public KQuaternion mult(KQuaternion q1, KQuaternion q2) 71 | { 72 | return new KQuaternion(q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z 73 | , q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y 74 | , q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z 75 | , q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 76 | } 77 | 78 | public float getX(){ 79 | return x; 80 | } 81 | 82 | public float getY(){ 83 | return y; 84 | } 85 | 86 | public float getZ(){ 87 | return z; 88 | } 89 | 90 | public float getW(){ 91 | return w; 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/KRectangle.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Simple KRectangle class 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public class KRectangle { 32 | 33 | float x; 34 | float y; 35 | 36 | float width; 37 | float height; 38 | 39 | 40 | KRectangle(float x, float y, float width, float height){ 41 | this.x = x; 42 | this.y = y; 43 | this.width = width; 44 | this.height = height; 45 | } 46 | 47 | public void setX(float x){ 48 | this.x =x; 49 | } 50 | 51 | public void setY(float y){ 52 | this.y =y; 53 | } 54 | 55 | public void setWidth(float w){ 56 | this.width =w; 57 | } 58 | 59 | public void setHeight(float height){ 60 | this.height = height; 61 | } 62 | 63 | public float getX(){ 64 | return x; 65 | } 66 | 67 | public float getY(){ 68 | return y; 69 | } 70 | 71 | public float getWidth(){ 72 | return width; 73 | } 74 | 75 | public float getHeight(){ 76 | return height; 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/KinectPV2.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | import processing.core.PApplet; 4 | 5 | /* 6 | Copyright (C) 2014 Thomas Sanchez Lengeling. 7 | KinectPV2, Kinect for Windows v2 library for processing 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | */ 27 | 28 | /** 29 | * 30 | * @author Thomas Sanchez Lengeling 31 | * 32 | */ 33 | public class KinectPV2 extends Device{ 34 | 35 | public static PApplet parent; 36 | 37 | public KinectPV2(PApplet _p) { 38 | super(_p); 39 | parent = _p; 40 | 41 | parent.registerMethod("dispose", this); 42 | } 43 | 44 | public void init(){ 45 | initDevice(); 46 | runningKinect = true; 47 | } 48 | 49 | public void dispose() { 50 | System.out.println("EXIT"); 51 | runningKinect = false; 52 | stopDevice(); 53 | cleanDevice(); 54 | } 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/Skeleton.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Skeleton Class 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public class Skeleton implements SkeletonProperties{ 32 | 33 | 34 | protected KJoint [] kJoints; 35 | 36 | protected int leftHandState; 37 | protected int rightHandState; 38 | 39 | private boolean tracked; 40 | 41 | Skeleton(){ 42 | kJoints = new KJoint[JointType_Count + 1]; 43 | for(int i = 0; i < JointType_Count + 1; i++){ 44 | kJoints[i] = new KJoint(0,0,0, new KQuaternion(), 0); 45 | } 46 | } 47 | 48 | /* 49 | * if the current skeleton is being tracked 50 | */ 51 | public boolean isTracked(){ 52 | return tracked; 53 | } 54 | 55 | /** 56 | * get the array of joints of the skeleton 57 | * @return KJoint [] 58 | */ 59 | public KJoint [] getJoints(){ 60 | return kJoints; 61 | } 62 | 63 | /** 64 | * get Left Hand State of the skeleton 65 | * @return int leftHandState 66 | */ 67 | public int getLeftHandState(){ 68 | return leftHandState; 69 | } 70 | 71 | /** 72 | * get Right Hand State of the skeleton 73 | * @return int rightHandState 74 | */ 75 | public int getRightHandState(){ 76 | return rightHandState; 77 | } 78 | 79 | protected void createSkeletonData(float [] rawData, int i){ 80 | int index2 = i * (JointType_Count+1) * 9; 81 | int indexJoint = index2 + (JointType_Count+1) * 9 - 1; 82 | if(rawData[indexJoint] == 1.0){ 83 | tracked = true; 84 | }else{ 85 | tracked = false; 86 | } 87 | 88 | if(tracked){ 89 | for(int j = 0; j < JointType_Count; ++j){ 90 | int index1 = j * 9; 91 | kJoints[j].pos.x = rawData[index2 + index1 + 0]; 92 | kJoints[j].pos.y = rawData[index2 + index1 + 1]; 93 | kJoints[j].pos.z = rawData[index2 + index1 + 2]; 94 | 95 | kJoints[j].orientation.w = rawData[index2 + index1 + 3]; 96 | kJoints[j].orientation.x = rawData[index2 + index1 + 4]; 97 | kJoints[j].orientation.y = rawData[index2 + index1 + 5]; 98 | kJoints[j].orientation.z = rawData[index2 + index1 + 6]; 99 | 100 | int state = (int)rawData[index2 + index1 + 7]; 101 | int type = (int)rawData[index2 + index1 + 8]; 102 | 103 | kJoints[j].state = state; 104 | kJoints[j].type = type; 105 | if(type == JointType_HandLeft) 106 | leftHandState = state; 107 | if(type == JointType_HandRight) 108 | rightHandState = state; 109 | } 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /KinectPV2/src/KinectPV2/SkeletonProperties.java: -------------------------------------------------------------------------------- 1 | package KinectPV2; 2 | 3 | /* 4 | Copyright (C) 2014 Thomas Sanchez Lengeling. 5 | KinectPV2, Kinect for Windows v2 library for processing 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | */ 25 | 26 | /** 27 | * Skeleton Properties 28 | * @author Thomas Sanchez Lengeling 29 | * 30 | */ 31 | public interface SkeletonProperties extends Constants{ 32 | public final static int JointType_SpineBase = 0; 33 | public final static int JointType_SpineMid = 1; 34 | public final static int JointType_Neck = 2; 35 | public final static int JointType_Head = 3; 36 | public final static int JointType_ShoulderLeft = 4; 37 | public final static int JointType_ElbowLeft = 5; 38 | public final static int JointType_WristLeft = 6; 39 | public final static int JointType_HandLeft = 7; 40 | public final static int JointType_ShoulderRight = 8; 41 | public final static int JointType_ElbowRight = 9; 42 | public final static int JointType_WristRight = 10; 43 | public final static int JointType_HandRight = 11; 44 | public final static int JointType_HipLeft = 12; 45 | public final static int JointType_KneeLeft = 13; 46 | public final static int JointType_AnkleLeft = 14; 47 | public final static int JointType_FootLeft = 15; 48 | public final static int JointType_HipRight = 16; 49 | public final static int JointType_KneeRight = 17; 50 | public final static int JointType_AnkleRight = 18; 51 | public final static int JointType_FootRight = 19; 52 | public final static int JointType_SpineShoulder = 20; 53 | public final static int JointType_HandTipLeft = 21; 54 | public final static int JointType_ThumbLeft = 22; 55 | public final static int JointType_HandTipRight = 23; 56 | public final static int JointType_ThumbRight = 24; 57 | public final static int JointType_Count = ( JointType_ThumbRight + 1 ); 58 | 59 | public final static int JOINTSIZE = BODY_COUNT * (JointType_Count + 1) * 9; 60 | 61 | public final static int TrackingState_NotTracked = 0; 62 | public final static int TrackingState_Inferred = 1; 63 | public final static int TrackingState_Tracked = 2; 64 | 65 | 66 | public final static int HandState_Unknown = 0; 67 | public final static int HandState_NotTracked = 1; 68 | public final static int HandState_Open = 2; 69 | public final static int HandState_Closed = 3; 70 | public final static int HandState_Lasso = 4; 71 | } 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Thomas Sanchez Lengeling 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------