{"id":28692,"date":"2013-08-10T15:33:28","date_gmt":"2013-08-10T15:33:28","guid":{"rendered":"http:\/\/rafaelfajardo.com\/portfolio\/brucesterling-javascript-hand-tracking\/"},"modified":"2018-12-06T09:37:16","modified_gmt":"2018-12-06T16:37:16","slug":"brucesterling-javascript-hand-tracking","status":"publish","type":"post","link":"https:\/\/rafaelfajardo.com\/portfolio\/brucesterling-javascript-hand-tracking\/","title":{"rendered":""},"content":{"rendered":"<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" title=\"YouTube video player\" width=\"250\" height=\"187\" src=\"https:\/\/www.youtube.com\/embed\/0I1ar9Lrhsw?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=opaque\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<p><a href=\"http:\/\/brucesterling.tumblr.com\/post\/57881365441\/javascript-hand-tracking\" class=\"tumblr_blog\">brucesterling<\/a>:<\/p>\n<blockquote>\n<p>*Javascript hand-tracking<\/p>\n<p><a href=\"http:\/\/code.google.com\/p\/js-handtracking\/\">http:\/\/code.google.com\/p\/js-handtracking\/<\/a><\/p>\n<div id=\"maincol\">\n<h1>How to use?<\/h1>\n<p>Create a\u00a0HT.Tracker\u00a0object:<\/p>\n<pre class=\"prettyprint\">var tracker = new HT.Tracker();<\/pre>\n<p>Call\u00a0detect\u00a0function:<\/p>\n<pre class=\"prettyprint\">var candidate = tracker.detect(imageData);<\/pre>\n<p>imageData\u00a0argument must be a valid\u00a0ImageData\u00a0canvas object.<\/p>\n<p>candidate\u00a0result (if any) will be a\u00a0HT.Candidate\u00a0object with the following properties:<\/p>\n<ul>\n<li>contour: Optimized contour as a plain array of two dimensional vectors<\/li>\n<li>hull: Convex hull as a plain array of two dimensional vectors<\/li>\n<li>defects: Convexity defects as a plain array of objects<\/li>\n<\/ul>\n<p>&lsquo;defects&rsquo; objects have the following properties:<\/p>\n<ul>\n<li>start: Start point of hull segment as a two dimensional vector<\/li>\n<li>end: End point of hull segment as a two dimensional vector<\/li>\n<li>depthPoint: Deeper defect point as a two dimensional vector<\/li>\n<li>depth: Minimum distance from hull segment to deeper defect point<\/li>\n<\/ul>\n<h1><a name=\"Skin_detection\" id=\"Skin_detection\"><\/a>Skin detection<\/h1>\n<p>The library converts RGB images to HSV one. V and H channels are used to characterize the colors range for skin detection:<\/p>\n<pre class=\"prettyprint\">v &gt;= 15 and v &lt;= 250<br \/><br \/>h &gt;= 3 and h &lt;= 33<\/pre>\n<p>Note that source alpha channel is ignored.<\/p>\n<\/div>\n<\/blockquote>\n<p>Whoa<\/p>\n<div class=\"attribution\">(<span>Source:<\/span> <a href=\"https:\/\/www.youtube.com\/\">https:\/\/www.youtube.com\/<\/a>)<\/div>\n","protected":false},"excerpt":{"rendered":"<p>brucesterling: *Javascript hand-tracking http:\/\/code.google.com\/p\/js-handtracking\/ How to use? Create a\u00a0HT.Tracker\u00a0object: var tracker = new HT.Tracker(); Call\u00a0detect\u00a0function: var candidate = tracker.detect(imageData); imageData\u00a0argument must be a valid\u00a0ImageData\u00a0canvas object. candidate\u00a0result (if any) will be a\u00a0HT.Candidate\u00a0object with the following properties: contour: Optimized contour as a plain array of two dimensional vectors hull: Convex hull as a plain array of two [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"video","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[],"tags":[1538],"class_list":["post-28692","post","type-post","status-publish","format-video","hentry","tag-humane-games","post_format-post-format-video"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p6PWot-7sM","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/posts\/28692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/comments?post=28692"}],"version-history":[{"count":1,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/posts\/28692\/revisions"}],"predecessor-version":[{"id":28694,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/posts\/28692\/revisions\/28694"}],"wp:attachment":[{"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/media?parent=28692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/categories?post=28692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rafaelfajardo.com\/portfolio\/wp-json\/wp\/v2\/tags?post=28692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}