{"id":1451,"date":"2018-12-04T08:11:00","date_gmt":"2018-12-04T13:11:00","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/?p=1451"},"modified":"2018-12-04T08:11:00","modified_gmt":"2018-12-04T13:11:00","slug":"computer-vision-finger-puppets","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/jltai\/computer-vision-finger-puppets\/","title":{"rendered":"Computer Vision &#8211; Finger Puppets!"},"content":{"rendered":"<p>Computer vision is always a fun thing to play around with. In max the use of the Open CV package really makes this much much much more easier to manage, since you then don&#8217;t have to think about the crazy implementation and doing kalman filters, and doing the right integrals on the data and so on and so forth. I figured that It would be fun to use the point tracker template and give it a little bit more of a purpose and turn it into something that allows you to have digital finger puppets! Like so:<\/p>\n<p><iframe loading=\"lazy\" width=\"1000\" height=\"563\" src=\"https:\/\/www.youtube.com\/embed\/QcBoQRKFnVI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>So as you can see its rather buggy, however what i essentially did was take the x y positional outputs of the original example and map them to the x y distance coordinates of the video out put. Then, at the same time i would take a second points x and y and subtracted the original points x and y from it. This creates some distance which I then scale and linearise to symbolizesome kind of size change, and it works fairly well. The only issue is that sometimes, depending on the contrast between your environment and you finger, the selected points get lost and disappear and you don&#8217;t get the results you were looking for.<\/p>\n<p>If you are interested here is the following patch.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1452 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch-800x395.jpg\" alt=\"\" width=\"800\" height=\"395\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch-800x395.jpg 800w, https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch-768x379.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch-1024x506.jpg 1024w, https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch-600x296.jpg 600w, https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-content\/uploads\/sites\/8\/2018\/12\/patch.jpg 1752w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Computer vision is always a fun thing to play around with. In max the use of the Open CV package really makes this much much much more easier to manage, since you then don&#8217;t have to think about the crazy implementation and doing kalman filters, and doing the right integrals on the data and so&#8230; <\/p>\n<div class=\"link-more\"><a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/jltai\/computer-vision-finger-puppets\/\">Read More<\/a><\/div>\n","protected":false},"author":108,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-1451","post","type-post","status-publish","format-standard","hentry","category-computer-vision-gestures"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/posts\/1451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/users\/108"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/comments?post=1451"}],"version-history":[{"count":1,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/posts\/1451\/revisions"}],"predecessor-version":[{"id":1453,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/posts\/1451\/revisions\/1453"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/media?parent=1451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/categories?post=1451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-b18\/wp-json\/wp\/v2\/tags?post=1451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}