{"id":382,"date":"2012-06-30T03:18:32","date_gmt":"2012-06-29T19:18:32","guid":{"rendered":"http:\/\/tangochen.com\/?p=382"},"modified":"2012-06-30T03:18:32","modified_gmt":"2012-06-29T19:18:32","slug":"kinect-angry-birds-space","status":"publish","type":"post","link":"http:\/\/tangochen.com\/blog\/?p=382","title":{"rendered":"Kinect Angry Birds Space"},"content":{"rendered":"<p>Youtube:<br \/>\n<iframe loading=\"lazy\" src=\"http:\/\/www.youtube.com\/embed\/fh4jko2cXFc\" frameborder=\"0\" width=\"560\" height=\"315\"><\/iframe><br \/>\nYouku(The same as the u2 video above..):<br \/>\n<embed src=\"http:\/\/player.youku.com\/player.php\/sid\/XNDIxNDU2NTE2\/v.swf\" allowFullScreen=\"true\" quality=\"high\" width=\"480\" height=\"400\" align=\"middle\" allowScriptAccess=\"always\" type=\"application\/x-shockwave-flash\"><\/embed><\/p>\n<p>It&#8217;s developed in C# using Kinect for Windows SDK 1.5.<br \/>\nI put the Kinect sensor high and tilted it down like this:<br \/>\n<a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/KinectSensor.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/KinectSensor.jpg\" alt=\"\" title=\"KinectSensor\" width=\"440\" height=\"440\" class=\"alignnone size-full wp-image-411\" \/><\/a><\/p>\n<p><a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/twoGestures.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/twoGestures.jpg\" alt=\"\" title=\"Two Gestures\" width=\"640\" height=\"446\" class=\"alignnone size-full wp-image-394\" \/><\/a><br \/>\nNow let me introduce my simple way to detect whether you&#8217;re gesturing like Gesture 1 or Gesture 2.<\/p>\n<p>1st Step:<br \/>\nLimit the depth data you get. In my case, it&#8217;s between 950 to 1120. The red parts are what we get now.<br \/>\n<a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step1.png\" alt=\"\" title=\"Step1\" width=\"525\" height=\"350\" class=\"alignnone size-full wp-image-395\" \/><\/a><\/p>\n<p>2nd Step:<br \/>\nLimit the area you get so it only gets the area of your two hands.<br \/>\n<a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step2.png\" alt=\"\" title=\"Step2\" width=\"525\" height=\"350\" class=\"alignnone size-full wp-image-396\" \/><\/a><\/p>\n<p>3rd Step:<br \/>\nOnly get the top side of the depth data we get. The red line is what we get now.<br \/>\n<a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step3.png\" alt=\"\" title=\"Step3\" width=\"525\" height=\"350\" class=\"alignnone size-full wp-image-397\" \/><\/a><\/p>\n<blockquote><p>How to do this: I add the X coordinate of the depth data to a listbox if there&#8217;s no this such X coordinate in the listbox. And next time if you find that the listbox contains the X coordinate you don&#8217;t have to record it again, pass it.<\/p><\/blockquote>\n<p>4th Step:<br \/>\nIf the count(length) of the listbox(the red line) is larger than a value(in my case it&#8217;s 30), you&#8217;re gesturing like Gesture One. Or you&#8217;re gesturing like Gesture Two. Because the Gesture One makes a longer red line.<br \/>\n<a href=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step4-all.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tangochen.com\/blog\/wp-content\/uploads\/2012\/06\/Step4-all.png\" alt=\"\" title=\"Step4-all\" width=\"1050\" height=\"808\" class=\"alignnone size-full wp-image-398\" \/><\/a><br \/>\nThat&#8217;s All\uff5e<\/p>\n<blockquote><p>Sorry for my poor English..<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Youtube: Youku(The same as the u2 video above..): It&#8217;s developed in C# using Kinect for Windows SDK 1.5. I put the Kinect sensor high and tilted it down like this: Now let me introduce my simple way to detect whether &hellip; <a href=\"http:\/\/tangochen.com\/blog\/?p=382\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[8],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-kinect","category-tech","tag-csharp"],"_links":{"self":[{"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=382"}],"version-history":[{"count":0,"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/382\/revisions"}],"wp:attachment":[{"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tangochen.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}