{"id":15886,"date":"2016-03-16T21:03:13","date_gmt":"2016-03-16T12:03:13","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=15886"},"modified":"2016-03-16T22:00:30","modified_gmt":"2016-03-16T13:00:30","slug":"%e3%83%87%e3%83%a5%e3%82%a2%e3%83%ab%e3%83%87%e3%82%a3%e3%82%b9%e3%83%97%e3%83%ac%e3%82%a4%e3%81%aa%e3%81%a8%e3%81%8d%e3%81%ab%e9%a1%94%e3%81%ae%e5%90%91%e3%81%8d%e3%81%a7%e3%82%a2%e3%83%97%e3%83%aa","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2016\/03\/15886\/","title":{"rendered":"\u30c7\u30e5\u30a2\u30eb\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306a\u3068\u304d\u306b\u9854\u306e\u5411\u304d\u3067\u30a2\u30d7\u30ea\u5207\u308a\u66ff\u3048\u3066\u307f\u305f"},"content":{"rendered":"<p>SAO The Beginning\u306e\u03b1\u30c6\u30b9\u30c8\u306b\u843d\u9078\u3057\u305f\u3075\u3058\u3082\u3068 (<a href=\"https:\/\/twitter.com\/masaki_fujimoto\">@masaki_fujimoto<\/a>) \u3067\u3059\u3002\u5f53\u9078\u3055\u308c\u305f\u304b\u305f\u306f\u3001\u7121\u4e8b\u30ed\u30b0\u30a2\u30a6\u30c8\u3067\u304d\u308b\u3068\u3044\u3044\u3067\u3059\u306d (\u8ca0\u3051\u60dc\u3057\u307f\u611f)\u3002<\/p>\n<h1>\u76f8\u5909\u308f\u3089\u305a\u9577\u3044\u524d\u7f6e\u304d<\/h1>\n<p>\u305d\u308c\u306f\u305d\u308c\u3068\u3057\u3066\u3001\u6700\u8fd1\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u304c\u4f59\u3063\u305f (\u5225\u306e\u30d5\u30ed\u30a2\u306b1\u53f0\u304a\u304d\u3063\u3071\u306b\u3057\u3066\u305f\u306e\u3092\u56de\u53ce\u3057\u3066\u304d\u305f) \u306e\u3067\u3001\u4e45\u3005\u306b\u30c7\u30e5\u30a2\u30eb\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3067\u3001\u753b\u9762\u304c\u3072\u308d\u3073\u308d\u3068\u3059\u308b\u306e\u306f\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u306a\u3093\u304b\u601d\u3063\u305f\u3088\u308a\u5feb\u9069\u3058\u3083\u306a\u3044\u611f\u3058\u304c\u3057\u307e\u3057\u3066\u3001\u306a\u3093\u3067\u304b\u306a\u3041\u3068\u601d\u3063\u305f\u3089\u3001\u96a3\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u898b\u305f\u3068\u304d\u306b\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u30b9\u30a4\u30c3\u30c1\u3059\u308b\u306e\u304c\u304b\u3063\u305f\u308b\u3044\u3093\u3067\u3059\u3088\u306d\u3002\u4e00\u5fdc\u56f3\u306b\u3057\u3066\u307f\u308b\u3068\u3053\u3046\u3044\u3046\u611f\u3058\u3067:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled.png\" alt=\"Untitled\" width=\"477\" height=\"286\" class=\"alignnone size-full wp-image-15899\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled.png 477w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled-276x165.png 276w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/p>\n<p>\u305d\u308c\u305e\u308c27inch\u3067\u7d50\u69cb\u5927\u304d\u3044\u306e\u3067\u3001\u57fa\u672c\u306f\u5de6\u5074\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u6b63\u9762\u306b\u307f\u3066\u304a\u3057\u3054\u3068\u3057\u3066\u307e\u3059\u3002\u3067\u3001\u53f3\u5074\u306b\u306fchat\u3092\u8868\u793a\u3055\u305b\u3066\u3066\u3001\u901a\u77e5\u304d\u305f\u3089\u305d\u3063\u3061\u307f\u3066\u3001\u3063\u3066\u611f\u3058\u3067\u307e\u3041\u3042\u308a\u304c\u3061\u306a\u611f\u3058\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u3001\u305d\u308c\u306f\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u554f\u984c\u306fchat\u3067channel\u9078\u3093\u3060\u308a\u8fd4\u4fe1\u3059\u308b\u3068\u304d\u3067\u3001\u5f53\u7136\u632f\u308b\u821e\u3044\u3068\u3057\u3066\u306f:<\/p>\n<ol>\n<li>\u3061\u3087\u3063\u3068\u53f3\u3092\u5411\u304f<\/li>\n<li>\u30a2\u30d7\u30ea\u3092\u5207\u308a\u66ff\u3048\u308b<\/li>\n<li>chat\u64cd\u4f5c\u3059\u308b (\u8fd4\u4fe1\u3057\u305f\u308a\u3044\u308d\u3044\u308d)<\/li>\n<\/ol>\n<p>\u306b\u306a\u308b\u3093\u3067\u3059\u304c\u3001\u554f\u984c\u306f2.\u306b\u3042\u308b\u306e\u3067\u3059:<\/p>\n<ol>\n<li>\u306a\u307e\u3058\u5168\u753b\u9762\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u3066\u3001\u30a2\u30af\u30c6\u30a3\u30d6\u3063\u307d\u304f\u898b\u3048\u308b\u306e\u3067\u300c\u3042\u3001\u3053\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30a2\u30af\u30c6\u30a3\u30d6\u3060\u306f\u30fc\u300d\u3068\u601d\u3063\u3066\u30ad\u30fc\u30dc\u30fc\u30c9\u64cd\u4f5c\u3059\u308b\u3068\u3001\u5f53\u7136\u305d\u3093\u306a\u308f\u3051\u306f\u306a\u304f\u3066\u3001\u5de6\u5074\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u304c\u9001\u4fe1\u3055\u308c\u3066\u3044\u3089\u3044\u3089\u3059\u308b<\/li>\n<li>\u305d\u3082\u305d\u3082\u30a2\u30d7\u30ea\u5207\u308a\u66ff\u3048\u308b\u306e\u304c\u3081\u3093\u3069\u3046<\/li>\n<\/ol>\n<p>\u5225\u306b\u7d75\u306b\u3057\u305f\u3068\u3053\u308d\u3067\u308f\u304b\u308a\u3084\u3059\u304f\u3082\u306a\u3044\u3093\u3067\u3059\u304c\u3001\u307e\u3068\u3081\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3059:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled1.png\" alt=\"Untitled(1)\" width=\"478\" height=\"305\" class=\"alignnone size-full wp-image-15903\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled1.png 478w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/03\/Untitled1-276x176.png 276w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/p>\n<p>\u306a\u3093\u304b\u7d76\u671b\u7684\u306b\u7d75\u306e\u30bb\u30f3\u30b9\u304c\u306a\u3044\u3067\u3059\u304c\u3001\u305d\u308c\u306f\u3055\u3066\u7f6e\u304d\u305d\u3093\u306a\u3053\u3068\u3092Facebook\u306b\u66f8\u3044\u305f\u3089:<\/p>\n<div id=\"fb-root\"><\/div>\n<p><script>(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = \"\/\/connect.facebook.net\/en_US\/sdk.js#xfbml=1&version=v2.3\";  fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));<\/script><\/p>\n<div class=\"fb-post\" data-href=\"https:\/\/www.facebook.com\/masaki.fujimoto\/posts\/10208746711726525\" data-width=\"500\">\n<div class=\"fb-xfbml-parse-ignore\">\n<blockquote cite=\"https:\/\/www.facebook.com\/masaki.fujimoto\/posts\/10208746711726525\"><p>&#x4e45;&#x3005;&#x306b;&#x30c7;&#x30e5;&#x30a2;&#x30eb;&#x30c7;&#x30a3;&#x30b9;&#x30d7;&#x30ec;&#x30a4;&#x306b;&#x3057;&#x3066;&#x3001;&#x3068;&#x308a;&#x3042;&#x3048;&#x305a;&#x601d;&#x3063;&#x305f;&#x306e;&#x304c;&#x3044;&#x3061;&#x3044;&#x3061;&#x30a2;&#x30d7;&#x30ea;&#x30b1;&#x30fc;&#x30b7;&#x30e7;&#x30f3;&#x3092;&#x5207;&#x308a;&#x66ff;&#x3048;&#x308b;&#x306e;&#x304c;&#x3081;&#x3093;&#x3069;&#x3059;&#x304e;&#x308b;&#x3068;&#x3044;&#x3046; (&#x5de6;&#x304c;&#x4f5c;&#x696d;&#x7528;&#x3001;&#x53f3;&#x304c;&#x5168;&#x753b;&#x9762;&#x3067;&#x30c1;&#x30e3;&#x30c3;&#x30c8;&#x3068;&#x304b;&#x306b;&#x3057;&#x3066;&#x308b;&#x306e;&#x3067;&#x3001;&#x53f3;&#x898b;&#x3066;chat&#x8fd4;&#x4e8b;&#x3057;&#x3088;&#x3046;&#x3068;&#x601d;&#x3063;&#x305f;&#x3089;focus&#x304c;&#x5de6;&#x306e;&#x753b;&#x9762;&#x306e;&#x307e;&#x307e;&#x3060;&#x3063;&#x305f;&#x4e8b;&#x4ef6;&#x7d9a;&#x51fa;...<\/p>\n<p>Posted by <a href=\"https:\/\/www.facebook.com\/masaki.fujimoto\">\u85e4\u672c \u771f\u6a39<\/a> on&nbsp;<a href=\"https:\/\/www.facebook.com\/masaki.fujimoto\/posts\/10208746711726525\">Monday, March 14, 2016<\/a><\/p><\/blockquote>\n<\/div>\n<\/div>\n<p>\u3042\u308c\u3053\u308c\u30a2\u30c9\u30d0\u30a4\u30b9\u3092\u3044\u305f\u3060\u304f\u3082\u3001\u3061\u3087\u3046\u3069\u826f\u3055\u305d\u3046\u306a\u30a2\u30d7\u30ea\u3082\u306a\u3044\u3057\u3001\u62bd\u9078\u3082\u843d\u3061\u308b\u3057\u3001\u3063\u3066\u3053\u3068\u3067\u6628\u65e5\u306e\u591c\u304a\u3057\u3054\u3068\u3072\u3068\u6bb5\u843d\u3057\u305f\u306e\u3067\u3048\u3044\u3084\u30fc\u3001\u3068\u66f8\u3044\u3066\u305f\u3089\u610f\u5916\u3068\u4e00\u6669\u3067\u4fbf\u5229\u306b\u3046\u3054\u304f\u306e\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u3053\u3046\u3057\u3066blog\u66f8\u3044\u3066\u307f\u3066\u307e\u3059\u3002<\/p>\n<h1>\u3068\u308a\u3042\u3048\u305a\u3067\u304d\u305f<\/h1>\n<p>\u30b3\u30fc\u30c9\u306f<a href=\"https:\/\/github.com\/fujimoto\/HeadTracker\">GitHub<\/a>\u306b\u3042\u308a\u307e\u3059\u3001\u521d\u3081\u3066osx\u306e\u30a2\u30d7\u30ea\u66f8\u304d\u307e\u3057\u305f\u3002\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3068\u306f\u7a0b\u9060\u3044\u904a\u3073\u3063\u307d\u3044\u30b3\u30fc\u30c9\u306a\u306e\u3067\u3001\u305d\u306e\u304a\u3064\u3082\u308a\u3067 (\u3069\u308c\u304f\u3089\u3044\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u3058\u3083\u306a\u3044\u304b\u3068\u3044\u3046\u3068\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u8abf\u6574\u3059\u308b\u305f\u3081\u306b\u306fbuild\u3057\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u304f\u3089\u3044\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u3058\u3083\u306a\u3044\u3067\u3059\u306d)\u3002<\/p>\n<p>\u3067\u3001\u3060\u3044\u3076\u624b\u629c\u304d\u3057\u305f\u3093\u3067\u3059\u304c\u3001\u610f\u5916\u306b\u4fbf\u5229\u306b\u52d5\u3044\u3066\u3044\u3066\u3001\u53f3\u306e\u753b\u9762\u898b\u308b\u3068\u308f\u308a\u3068\u30b9\u30e0\u30fc\u30b9\u306b (\u3067\u3082\u3063\u3066\u307b\u307c\u8aa4\u691c\u77e5\u306a\u304f) \u53f3\u753b\u9762\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u308b\u306e\u3067 (\u3067\u3082\u3063\u3066\u6b63\u9762\u5411\u304f\u3068\u3082\u3068\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u308b) \u3060\u3044\u3076\u5e78\u305b\u3067\u3059\u3002\u4e00\u6669\u304c\u3093\u3070\u3063\u305f\u7532\u6590\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u307b\u3093\u3068\u306f\u52d5\u753b\u3068\u304b\u3042\u308b\u3068\u7d20\u6575\u306a\u3093\u3067\u3059\u304c\u3001\u306f\u305a\u304b\u3057\u3044\u306e\u3067\u30d1\u30b9\u3067\u3059\u3002<\/p>\n<p>\u632f\u308b\u821e\u3044\u306e\u8981\u7d20\u3068\u3057\u3066\u306f\u3001\u30ab\u30e1\u30e9\u304b\u3089\u753b\u50cf\u3068\u3063\u3066\u304d\u3066\u3001\u9854\u8a8d\u8b58\u3057\u3066\u3001\u9854\u306e\u5411\u304d\u8a8d\u8b58\u3057\u3066\u3001(\u305d\u308c\u305e\u308c\u306e) \u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306e\u4e00\u756a\u624b\u524d\u306b\u8868\u793a\u3055\u308c\u3066\u308b\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53d6\u5f97\u3057\u3066\u3001\u305d\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3059\u308b\u3001\u3063\u3066\u51e6\u7406\u304c\u5fc5\u8981\u3067\u3001\u305b\u3063\u304b\u304f\u306a\u3093\u3067\u30e1\u30e2\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h2>(0) \u306f\u3058\u3081\u3066\u306eosx\u30a2\u30d7\u30ea<\/h2>\n<p>\u308f\u304b\u3063\u3066\u306f\u3044\u307e\u3057\u305f\u304c\u3001iOS\u30a2\u30d7\u30ea\u3068\u4e00\u7dd2\u306a\u306e\u3067\u3001\u4eca\u56de\u306e\u3088\u3046\u306a\u3061\u3087\u3063\u3068\u3057\u305f\u30a2\u30d7\u30ea\u3067\u306f\u3068\u304f\u306b\u56f0\u308b\u3053\u3068\u3082\u306a\u304b\u3063\u305f\u306e\u3067\u3057\u305f (UIKit -> Cocoa\u306b\u306a\u3063\u3066\u3066UI<em>\u304cNS<\/em>\u306b\u306a\u3063\u3066\u308b\u304f\u3089\u3044\uff1f)\u3002<\/p>\n<h2>(1) \u30ab\u30e1\u30e9\u304b\u3089\u753b\u50cf\u3068\u3063\u3066\u304f\u308b<\/h2>\n<p>\u305d\u3082\u305d\u3082\u30ab\u30e1\u30e9\u3042\u308b\u306e\u304b\u3063\u3066\u3068\u3053\u308d\u306b\u3064\u3044\u3066\u306f\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u3064\u3044\u3066\u305f\u306e\u3067\u3053\u308c\u3092\u305d\u306e\u307e\u307e\u4f7f\u3048\u3070\u3044\u3044\u3063\u3066\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3067\u3001\u305d\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u306e\u3082\u3001(osx\u306e\u306f\u5168\u7136\u306a\u3044\u3067\u3059\u304c) iOS\u306e\u30a2\u30d7\u30ea\u3067\u3042\u308c\u3053\u308c\u3084\u3063\u3066\u308b\u304b\u305f\u304c\u305f\u304f\u3055\u3093\u3044\u3089\u3063\u3057\u3083\u308b\u306e\u3067\u30b5\u30f3\u30d7\u30eb\u306b\u306f\u4e8b\u6b20\u304b\u305a\u3001\u3068\u308a\u3042\u3048\u305a <a href=\"http:\/\/giveitashot.hatenadiary.jp\/entry\/2014\/10\/19\/190505\">Swift + OpenCV\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u9854\u8a8d\u8b58\u3057\u3066\u307f\u305f\uff11<\/a> \u3068\u3044\u3046\u307e\u3093\u307e\u306a\u30a8\u30f3\u30c8\u30ea\u304c\u3042\u308b\u306e\u3067\u3001Reference\u307f\u306a\u304c\u3089\u3053\u3061\u3089\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u306f\u3082\u3046\u534a\u5206\u304f\u3089\u3044\u304a\u7d04\u675f\u306e\u4e16\u754c\u306a\u306e\u3067\u3001\u3068\u304f\u306b\u96e3\u3057\u3044\u3053\u3068\u306f\u306a\u304f\u3001\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30ab\u30e1\u30e9\u304b\u3089\u306e\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u306e\u306f\u3059\u3050\u3067\u3057\u305f...\u3068\u3044\u3046\u306e\u306f\u3061\u3087\u3063\u3068\u898b\u6804\u306f\u3063\u3066\u3066\u3001\u5b9f\u306fAvCaptureVideoOutput\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308bcallback\u306bsignature\u304c2\u3064\u3042\u308b\u306e\u306b\u6c17\u4ed8\u304b\u305a\u3001\u305a\u3063\u3068:<\/p>\n<pre class=\"lang:swift decode:true \" >func captureOutput(captureOutput: AVCaptureOutput!, didDropSampleBuffer sampleBuffer: CMSampleBuffer!, fromConnection connection: AVCaptureConnection!)<\/pre>\n<p>\u3067\u3001buffer\u3068\u308c\u306d\u30fc\u3001\u3068\u60a9\u3093\u3067\u307e\u3057\u305f...\u3002\u6b63\u89e3\u306f\u3053\u3063\u3061\u3067\u3059\u306d:<\/p>\n<pre class=\"lang:swift decode:true \" >func captureOutput(captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, fromConnection connection: AVCaptureConnection!) <\/pre>\n<p>\u307b\u307c\u306a\u3093\u3082\u610f\u8b58\u305b\u305a\u306b\u88dc\u5b8c\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3067\u52d5\u304b\u3057\u3066\u305f\u3089\u306f\u307e\u308a\u307e\u3057\u305f\u3001\u4eca\u632f\u308a\u8fd4\u308c\u3070\u305d\u3046\u3044\u3048\u3070\u5019\u88dc2\u3064\u3042\u3063\u305f\u306a\u3001\u3068\u304b\u3001\u305d\u3082\u305d\u3082\u3061\u3083\u3093\u3068\u8aad\u3081\u3088\u3001\u3068\u304b\u3042\u308b\u3093\u3067\u3059\u304c\u3002\u3084\u308c\u3084\u308c\u3067\u3059\u3002<\/p>\n<h2>(2) \u9854\u8a8d\u8b58\u3059\u308b<\/h2>\n<p>\u3053\u308c\u3082\u3001\u6614\u3088\u304f\u904a\u3093\u3067\u305f\u3057\u3001OpenCV\u6a19\u6e96\u306e\u3067\u554f\u984c\u306a\u304f\u3067\u304d\u308b\u3060\u308d\u3046\u306a\u30fc\u3001\u3068\u601d\u3063\u305f\u3089 (\u307e\u3041\u3053\u3046\u3044\u3046\u904a\u3073\u30a2\u30d7\u30ea\u7a0b\u5ea6\u306a\u3089) \u4f59\u88d5\u3067\u3057\u305f\u3002\u5148\u4eba\u306e\u77e5\u6075\u306b\u983c\u308a\u307e\u304f\u3063\u3066\u3001\u7279\u306b\u304c\u3093\u3070\u3063\u305f\u3068\u3053\u308d\u3082\u3042\u308a\u307e\u305b\u3093\u3002\u30b3\u30fc\u30c9\u7684\u306b\u3082\u3059\u3054\u304f\u77ed\u304f\u3066:<\/p>\n<pre class=\"lang:swift decode:true \" >NSString* pathFrontal = [bundle pathForResource:@\"haarcascade_frontalface_alt\" ofType:@\"xml\"];\nstd::string cascadeFrontalPath = (char*)[pathFrontal UTF8String];\nif (cascadeFrontal.load(cascadeFrontalPath) == false) {\n    return nil;\n}\n\n\/\/ ...\n\ncv::Mat cvImage = [image CVMat];\n\nstd::vector&lt;cv::Rect&gt; faces;\nint found = 0;\n\n\/\/ frontal\ncascadeFrontal.detectMultiScale(cvImage, faces, 1.1, 3, CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_ROUGH_SEARCH | CV_HAAR_FIND_BIGGEST_OBJECT, cv::Size(28, 28));\nif (faces.size() &gt; 0) {\n    found |= 0x01 &lt;&lt; 0;\n}<\/pre>\n<p>\u3053\u308c\u304f\u3089\u3044\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u89e3\u50cf\u5ea6\u3067\u3042\u308b\u3068\u3053\u308d\u306e1280x720\u3067\u52d5\u304b\u3057\u3066\u308b\u3068CPU 1\u30b3\u30a2\u5360\u9818\u3059\u308b\u304f\u3089\u3044\u306b\u306a\u308a\u307e\u3057\u305f\u3001\u305d\u308a\u3083\u305d\u3046\u3067\u3059\u306d\u3001\u3063\u3066\u3053\u3068\u3067160x120\u306b\u3057\u3066\u307e\u3059\u304c\u3001\u5341\u5206\u7cbe\u5ea6\u3067\u307e\u3059\u3002\u306a\u304a\u3001\u89e3\u50cf\u5ea6\u3092\u5909\u66f4\u3059\u308b\u306b\u306fAVCaptureVideoOutput\u306evideoSettigs\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5229\u7528\u3057\u307e\u3059:<\/p>\n<pre class=\"lang:swift decode:true \" >self.videoOutput = AVCaptureVideoDataOutput()\nself.videoOutput.videoSettings = [\n    kCVPixelBufferPixelFormatTypeKey:Int(kCVPixelFormatType_32BGRA),\n    kCVPixelBufferWidthKey:160,\n    kCVPixelBufferHeightKey:120,\n]<\/pre>\n<h2>(3) \u9854\u306e\u5411\u304d\u8a8d\u8b58\u3059\u308b<\/h2>\n<p>\u3053\u308c\u304c\u7d76\u5bfe\u5927\u5909\u3060\u308d\u3046\u306a\u30fc\u3001\u3068\u601d\u3063\u3066\u3044\u3066\u3001\u6b63\u76f4\u4e00\u6669\u3067\u306f\u3053\u308c\u306f\u7121\u7406\u3060\u308d\u3046\u3001\u9031\u672b\u306e\u3093\u3073\u308a\u304c\u3093\u3070\u308d\u3046\u304b\u306a\u30fc\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3055\u304d\u306eFacebook post\u306e\u30b3\u30e1\u30f3\u30c8\u3067\u6559\u3048\u3066\u3044\u305f\u3060\u3044\u305f <a href=\"http:\/\/facetracknoir.sourceforge.net\/home\/default.htm\">FaceTrackNoIR<\/a> \u3092\u53c2\u8003\u306b\u304c\u3093\u3070\u3063\u3066\u307f\u308b\u304b\u3001<a href=\"http:\/\/cmp.felk.cvut.cz\/~uricamic\/clandmark\/\">\u3053\u306e\u3042\u305f\u308a<\/a>\u306e\u624b\u6cd5\/\u30b3\u30fc\u30c9\u3092\u307f\u3066\u30e9\u30a4\u30d6\u30e9\u30ea\u3064\u304f\u308b\u304b\u3001\u3042\u3068\u306f<a href=\"https:\/\/github.com\/royshil\/HeadPosePnP\">HeadPosePnP<\/a>\u3063\u3066\u3044\u3046\u306e\u3082\u3059\u3054\u304f\u53c2\u8003\u306b\u306a\u308a\u305d\u3046\u3001\u3060\u3051\u3069\u3001\u3061\u3087\u3063\u3068\u304c\u3093\u3070\u3089\u306a\u304d\u3083\u611f\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>...\u3068\u601d\u3044\u3064\u3064\u3001OpenCV\u3067\u904a\u3093\u3067\u305f\u3089\u3044\u3064\u306e\u9593\u306b\u304b\u3001\u3068\u3044\u3046\u304b3\u5e74\u304f\u3089\u3044\u524d\u306b\u6a2a\u9854\u7528\u306e\u30e2\u30c7\u30eb\u30c7\u30fc\u30bf\u304c\u8ffd\u52a0\u3055\u308c\u3066\u305f\u3093\u3067\u3059\u306d\u3001\u3042\u308c\u3001\u3053\u308c\u3067\u524d\u898b\u3066\u308b\u304b\u6a2a\u898b\u3066\u308b\u304b\u3067\u5224\u5225\u3057\u3061\u3083\u3048\u3070 (\u30c7\u30a3\u30b9\u30d7\u30ec\u30a42\u3064\u306a\u306e\u3067\u5de6\u53f3\u3069\u3061\u3089\u304b\u306f\u5224\u5225\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u3084\u3001\u3068\u3044\u3046) \u3044\u3051\u308b...\u3088\u3046\u306a\u304d\u304c\u3059\u308b\u3001\u3068\u304a\u3082\u3063\u3066\u8a66\u3057\u305f\u3089\u601d\u3044\u306e\u307b\u304b\u3061\u3087\u3046\u3069\u3088\u304f\u52d5\u304d\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3067\u30b9\u30c8\u30ec\u30b9\u306a\u304f\u4f7f\u3048\u308b\u304b\u8a66\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f (\u305d\u3057\u3066\u7d50\u679c\u3001\u308f\u308a\u3068\u3053\u308c\u3067\u5341\u5206\u3067\u3057\u305f)\u3002<\/p>\n<p>\u305f\u3060\u3001\u30ca\u30a4\u30fc\u30d6\u306b\u3084\u3063\u3061\u3083\u3063\u3066\u308b\u306e\u3067\u3001\u753b\u50cf\u306e\u5404\u30d5\u30ec\u30fc\u30e0\u3054\u3068\u306b\u3001\u6b63\u9762\u7528\u306e\u691c\u51fa\u3068\u6a2a\u9854\u306e\u691c\u51fa\u30672\u30d1\u30b9\u8d70\u3063\u3066\u3061\u3087\u3063\u3068\u30b3\u30b9\u30c8\u304c\u9ad8\u3044\u3093\u3067\u3059\u3088\u306d\u3001\u7d50\u679c\u3068\u3057\u30661\u30b3\u30a2\u306e10-15%\u7a0b\u5ea6\u306eCPU\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u7d9a\u3051\u308b\u30a2\u30d7\u30ea\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f\u3001\u30e2\u30d0\u30a4\u30eb\u3060\u3068\u7d76\u5bfe\u4f7f\u3044\u305f\u304f\u306a\u3044\u3084\u3064\u3067\u3059\u306d)\u3002<\/p>\n<h2>(4) \u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3059\u308b<\/h2>\n<p>\u3053\u308c\u3082\u6559\u3048\u3066\u3044\u305f\u3060\u3044\u305f <a href=\"http:\/\/stackoverflow.com\/questions\/21069066\/move-other-windows-on-mac-os-x-using-accessibility-api\">stack overflow<\/a>\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u307e\u3059\u3002\u3082\u3046\u3053\u3053\u6700\u5f8c\u306b\u3064\u304f\u3063\u305f\u306e\u3067\u3001\u6b63\u76f4\u52d5\u3051\u3070\u3044\u3044\u3084\u611f\u51fa\u3066\u307e\u3059\u306d\u3002<\/p>\n<ol>\n<li>CGWindowListCopyWindowInfo()\u3067\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53d6\u5f97\u3057\u3066<\/li>\n<li>\u5de6\u4e0a\u306eX\u5ea7\u6a19\u3067\u3069\u3061\u3089\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u3042\u308b\u304b\u3092\u5224\u5225\u3057\u3066<\/li>\n<li>\u4e00\u756a\u4e0a\u306b\u304d\u3066\u308b\u3084\u3064\u3092\u5224\u5225\u3057\u3066\u307e\u3059 (\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e26\u3073\u9806\u306e\u53d6\u308a\u65b9\u304c\u3088\u304f\u308f\u304b\u3093\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30ea\u30b9\u30c8\u304c\u4e0a\u304b\u3089\u9806\u306b\u306a\u3063\u3066\u308b\u307d\u3044\u306e\u3067\u3001\u305d\u308c\u3067\u3088\u3044\u3053\u3068\u306b\u3057\u307e\u3057\u305f)<\/li>\n<\/ol>\n<p>\u3067\u3001\u3042\u3068\u306f\u305d\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5bfe\u3057\u3066<\/p>\n<pre class=\"lang:swift decode:true \" >let element:AXUIElementRef = AXUIElementCreateApplication(Int32(windowOwnerPID)).takeRetainedValue() as AXUIElementRef\nAXUIElementSetAttributeValue(element, kAXFrontmostAttribute, kCFBooleanTrue as CFTypeRef)<\/pre>\n<p>\u3063\u3066\u611f\u3058\u3067Attribute\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u305d\u306e\u4ed6\u306f\u307e\u3063\u305f\u3068\u3053\u308d<\/h2>\n<p>Unsafe(Mutable)Pointer\u3068\u304b\u306e\u6271\u3044\u306b\u6163\u308c\u3066\u306a\u304f\u3066 (\u3044\u3084\u305d\u3082\u305d\u3082swift\u305d\u3093\u306a\u6163\u308c\u3066\u306a\u304f\u3066)\u3001\u3061\u3087\u3068\u60a9\u307f\u307e\u3057\u305f\u3002CGWindowListCopyWindowInfo()\u304c\u3001CFDictionaryRef\u306e\u914d\u5217 (CFArrayRef) \u3092\u8fd4\u3059\u3093\u3067\u3059\u304c\u3001\u5f97\u3089\u308c\u305fCFArrayRef\u306b\u5bfe\u3057\u3066CFArrayGetValueAtIndex()\u306e\u623b\u308a\u5024\u306fUnsafePointer<void>\u306a\u306e\u3067\u3001\u3061\u3083\u3093\u3068cast\u3057\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u3061\u3083\u3093\u3068\u4f53\u7cfb\u7684\u306b\u672c\u8aad\u3093\u3060\u3001\u3068\u304b\u3058\u3083\u306a\u3044\u306e\u3067\u666e\u901a\u306bcast\u3057\u3066\u306a\u3093\u3067\u843d\u3061\u308b\u3093\u3060\u3053\u308c\u3001\u3063\u3066\u306a\u3063\u3066\u307e\u3057\u305f\u3002\u6b63\u89e3\u306f:<\/p>\n<pre class=\"lang:swift decode:true \" >unsafeBitCast(CFArrayGetValueAtIndex(windows, i), CFDictionaryRef.self)<\/pre>\n<p>\u3067\u3001unsafeBitCast()\u4f7f\u3044\u307e\u3057\u3087\u3046\u3001\u3063\u3066\u3053\u3068\u306a\u3093\u3067\u3059\u306d\u3002<\/p>\n<h1>\u3068\u3044\u3046\u3053\u3068\u3067<\/h1>\n<p>\u5168\u3046\u306a\u30a2\u30d7\u30ea\u306b\u6539\u5584\u3057\u3066\u304f\u308c\u308b\u304b\u305f\u304c\u3044\u305f\u3089\u3046\u308c\u3057\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SAO The Beginning\u306e\u03b1\u30c6\u30b9\u30c8\u306b\u843d\u9078\u3057\u305f\u3075\u3058\u3082\u3068 (@masaki_fujimoto) \u3067\u3059\u3002\u5f53\u9078\u3055\u308c\u305f\u304b\u305f\u306f\u3001\u7121\u4e8b\u30ed\u30b0\u30a2\u30a6\u30c8\u3067\u304d\u308b\u3068\u3044\u3044\u3067\u3059\u306d (\u8ca0\u3051\u60dc\u3057\u307f\u611f)\u3002 \u76f8\u5909\u308f\u3089\u305a\u9577\u3044\u524d\u7f6e\u304d \u305d\u308c\u306f\u305d\u308c\u3068\u3057\u3066\u3001 [&hellip;]<\/p>\n","protected":false},"author":112,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[113],"class_list":["post-15886","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-mac"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=15886"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15886\/revisions"}],"predecessor-version":[{"id":15961,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15886\/revisions\/15961"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=15886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=15886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=15886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}