{"id":1370,"date":"2019-09-27T11:20:41","date_gmt":"2019-09-27T15:20:41","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/?p=1370"},"modified":"2019-09-27T14:12:47","modified_gmt":"2019-09-27T18:12:47","slug":"matt-johannesen-bricked","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/augmented-selfies\/mdjohannesen\/matt-johannesen-bricked\/","title":{"rendered":"Matt Johannesen &#8211; &#8220;Bricked&#8221;"},"content":{"rendered":"\n<p>I may have bitten off more than I could chew with this one.  I decided to make my Augmented Selfie a reflection of my current state, very fuzzy and uncertain while still blocked in (it comes easy when one tries to overload and lead a new game development team simultaneously) &#8211; and to go about it, my first instinct was to make a large cube, with a static- covered view of the user&#8217;s face on all sides, follow the user around and rotate with them.<\/p>\n\n\n\n<p>I first tried to use the standard [cv.jit.faces] patch to do some rudimentary tracking, but quickly realized that it didn&#8217;t output the rotation of a face, only the location.  I then switched over to a FaceOSC patch I found, which did capture the rotation, location and scale of the user&#8217;s face map &#8211; but because FaceOSC is an external program, it hogs the webcam&#8217;s output stream, and prevents Max from accessing the video feed!<\/p>\n\n\n\n<p>After trying in vain to extract the webcam data from FaceOSC, I ultimately just switched back to cv.jit.faces as the face detection method.  I had a couple challenges with this: a) I had to force [cv.jit.faces.draw] to output the dimensions of the face to manually calculate scale, and b) I had to map the cube&#8217;s rotation to how far the face was from the center of the screen.  As a result, lots of painful math trickery ensued.  But this is the final result:<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Bricked\" width=\"1000\" height=\"750\" src=\"https:\/\/www.youtube.com\/embed\/E4DmYpHSUzc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><figcaption>(There was static noise originally, but I think YouTube may have processed it out)<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I may have bitten off more than I could chew with this one. I decided to make my Augmented Selfie a reflection of my current state, very fuzzy and uncertain while still blocked in (it comes easy when one tries to overload and lead a new game development team simultaneously) &#8211; and to go about&#8230; <\/p>\n<div class=\"link-more\"><a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/augmented-selfies\/mdjohannesen\/matt-johannesen-bricked\/\">Read More<\/a><\/div>\n","protected":false},"author":132,"featured_media":1378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[12],"tags":[],"class_list":["post-1370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-augmented-selfies"],"jetpack_featured_media_url":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-content\/uploads\/sites\/10\/2019\/09\/Bricked-header.png","_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/posts\/1370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/users\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/comments?post=1370"}],"version-history":[{"count":6,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/posts\/1370\/revisions"}],"predecessor-version":[{"id":1379,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/posts\/1370\/revisions\/1379"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/media\/1378"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/media?parent=1370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/categories?post=1370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/imgd3200-a19\/wp-json\/wp\/v2\/tags?post=1370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}