﻿{"id":2143,"date":"2015-12-14T00:06:10","date_gmt":"2015-12-13T15:06:10","guid":{"rendered":"http:\/\/yucchi.jp\/blog\/?p=2143"},"modified":"2015-12-14T00:08:33","modified_gmt":"2015-12-13T15:08:33","slug":"intel-realsense-3d%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92-javafx-%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"http:\/\/yucchi.jp\/blog\/?p=2143","title":{"rendered":"Intel RealSense 3D\u30ab\u30e1\u30e9\u3092 JavaFX \u3067\u52d5\u304b\u3057\u3066\u307f\u305f\u3002"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001<a href=\"http:\/\/qiita.com\/advent-calendar\/2015\/javafx\" target=\"_blank\">JavaFX Advent Calendar 2015<\/a> \u306e14\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n<p>\u6628\u65e5\u306f <a href=\"http:\/\/qiita.com\/tomo_taka01\">tomo_taka01<\/a> \u3055\u3093\u306e \u300c<a href=\"http:\/\/d.hatena.ne.jp\/tomoTaka\/20151213\/1449956731\" name=\"1449956731\">Server Event Client Sample<\/a>\u300d \u3067\u3059\u3002\u660e\u65e5\u306f&nbsp; <a href=\"http:\/\/qiita.com\/kimukou\">kimukou<\/a> \u3055\u3093\u306e\u300c\u8a66\u7528\u3082\u3075\u304f\u3081\u3066 basilisk-fw \u3042\u305f\u308a\u306e\u8a71\u3092\u66f8\u3053\u3046\u304b\u3068\u300d\u3067\u3059\u3002<\/p>\n<p>\u4eca\u5e74\u306f Windows 10 \u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u751f\u4f53\u8a8d\u8a3c\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b Windows Hello \u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>Windows OS \u306b\u3053\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u642d\u8f09\u3055\u308c\u3066\u3057\u307e\u3063\u305f\u304b\u3089\u306b\u306f\u3053\u3046\u3044\u3063\u305f\u6642\u4ee3\u306b\u306a\u308b\u3093\u3060\u308d\u3046\u306a\u3063\u3066\u3053\u3068\u3067\u3001<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a WebCam \u3067\u3082\u8cb7\u3063\u3066\u8a66\u3057\u3066\u307f\u3088\u3046\u304b\u3068\u601d\u3063\u305f\u3089\u7279\u6b8a\u306a\u30ab\u30e1\u30e9\u6a5f\u80fd\u304c\u5fc5\u8981\u3067\u91cf\u8ca9\u5bb6\u96fb\u5e97\u3067\u58f2\u3063\u3066\u3044\u308b\u3082\u306e\u3067\u306f\u99c4\u76ee\u3067\u3057\u305f\u3002<\/p>\n<p>\u5c11\u3057\u8abf\u3079\u3066\u307f\u305f\u3089 Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u304c intel \u306e\u30b5\u30a4\u30c8\u304b\u3089\u8cfc\u5165\u53ef\u80fd\u3060\u3063\u305f\u306e\u3067\u8cb7\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u30ab\u30e1\u30e9\u3067\u4f55\u304c\u3067\u304d\u308b\u304b\u306f\u3053\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"http:\/\/www.intel.co.jp\/content\/www\/jp\/ja\/architecture-and-technology\/realsense-overview.html\" target=\"_blank\">\u30a4\u30f3\u30c6\u30eb\u00ae RealSense\u2122 \u30c6\u30af\u30ce\u30ed\u30b8\u30fc<\/a><\/p>\n<p>\u3053\u306e\u30ab\u30e1\u30e9\u3092\u8cfc\u5165\u3057\u305f\u7406\u7531\u306e\u4e00\u3064\u306b <a href=\"https:\/\/software.intel.com\/en-us\/intel-realsense-sdk\" target=\"_blank\">Intel\u00ae RealSense\u2122 SDK<\/a> \u304c\u958b\u767a\u8005\u767b\u9332\u3055\u3048\u3059\u308c\u3070\u7121\u511f\u3067\u5165\u624b\u53ef\u80fd\u3067\u3042\u308a\u3001Java \u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u305f\u3002<\/p>\n<p>\u8cfc\u5165\u306f\u3053\u3061\u3089\u304b\u3089\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/click.intel.com\/intel-realsense-developer-kit.html\" target=\"_blank\">Intel\u00ae RealSense\u2122 Developer Kit<\/a><\/p>\n<p>\u3053\u308c\u306f\u958b\u767a\u8005\u5411\u3051\u306e\u30ad\u30c3\u30c8\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u822c\u7684\u306b\u5e02\u8ca9\u3055\u308c\u3066\u3044\u308b webCam \u306e\u3088\u3046\u306b\u4fbf\u5229\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u4ed8\u5c5e\u3057\u3066\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4e00\u822c\u7684\u306a WebCam \u306b\u306f\u7121\u3044\u6a5f\u80fd\u3092\u642d\u8f09\u3057\u3066\u3044\u308b\u306e\u3067\u3044\u308d\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u79c1\u306f\u65b0\u3057\u3044\u7269\u597d\u304d\u306a\u6027\u683c\u304b\u3089 Windows Hello \u3092\u4f7f\u3044\u305f\u304b\u3063\u305f\u3060\u3051\u306a\u306e\u3067\u3059\u304c\u3001\u958b\u767a\u74b0\u5883\u306b Java \u8a00\u8a9e\u3082\u30b5\u30dd\u30fc\u30c8\u3068\u3042\u3063\u305f\u306e\u3067\u3061\u3087\u3063\u3068\u8a66\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u306f\u3058\u3081\u306b\u3001Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u306f\u6b21\u306e\u3088\u3046\u306a\u7279\u5fb4\u3092\u3082\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong><font size=\"3\">Specifications<\/font><\/strong><\/p>\n<p><font color=\"#333333\">Shorter range (0.2 meters &#8211; 1.2 meters, indoors only)<br \/>Depth\/IR: 640&#215;480 resolution at 60fps<br \/>RGB: 1080p at 30fps<br \/>USB 3.0 required<br \/>Developer Kit Dimensions: 150mm x 30mm x 58mm<\/font><\/p>\n<p><font size=\"3\"><strong>Targeted Usages<\/strong><\/font><\/p>\n<p><font color=\"#333333\">Full hand-skeletal tracking and gesture control<br \/>3D segmentation<br \/>Facial analysis<br \/>Depth-enhanced Augmented Reality<br \/>Speech<br \/>3D Capture for faces<\/font><\/p>\n<p><font size=\"3\"><strong>SYSTEM REQUIREMENTS<\/strong><\/font><\/p>\n<p><font color=\"#333333\">Ports: USB 3.0<br \/>Supported CPUs: 4th generation (or later) Intel\u00ae Core\u2122 processor<br \/>Supported Operating Systems: Microsoft Windows 8.1* (or later) (64-bit)<\/font><\/p>\n<p>\u79c1\u306f\u307e\u3055\u304b CPU \u304c\u7b2c4\u4e16\u4ee3\u306e Haswell \u4ee5\u964d\u3092\u8981\u6c42\u3055\u308c\u308b\u3068\u306f\u601d\u3063\u3066\u306a\u304b\u3063\u305f\u306e\u3067 Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u304c\u5c4a\u3044\u3066\u7bb1\u306b\u66f8\u3044\u3066\u3042\u308b Minimum System Requirements \u3092\u898b\u305f\u77ac\u9593\u3001\u76ee\u304c\u70b9\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u79c1\u306e \u30d1\u30bd\u30b3\u30f3\u306f Sandy Bridge \u306a\u306e\u3067\u30fb\u30fb\u30fb<\/p>\n<p>\u5927\u4e08\u592b\u3060\u308d\u3046\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u59cb\u3081\u308b\u3082\u3001Depth Camera Manager (DCM) \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u304d\u306a\u3044\u3068\u304b\u306e\u30a8\u30e9\u30fc\u3067\u6483\u6c88\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u305f\u306a\u304f Skylake \u74b0\u5883\u306b\u30d1\u30bd\u30b3\u30f3\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c8\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002(&gt;_&lt;\uff61)<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u3048\u5b8c\u4e86\u3057\u3066\u3057\u307e\u3048\u3070 Sandy Bridge \u3067\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u3066\u3057\u307e\u3046\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u8a66\u3057\u3066\u307f\u305f\u3089\u3042\u3063\u3051\u306a\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b5\u30dd\u30fc\u30c8\u5916 CPU \u306a\u306e\u3067\u52d5\u4f5c\u306b\u4e00\u62b9\u306e\u4e0d\u5b89\u3092\u899a\u3048\u307e\u3059\u3002<\/p>\n<p>\u73fe\u72b6\u3068\u3057\u3066\u306f\u3001Facial analysis \u95a2\u4fc2\u306f\u554f\u984c\u7121\u3055\u305d\u3046\u3067\u3059\u3002\uff08\u3053\u306e\u767a\u8a00\u306b\u8cac\u4efb\u306f\u6301\u3066\u307e\u305b\u3093\uff01\uff09<\/p>\n<p>\u3055\u3066\u3001Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u306b\u3064\u3044\u3066\u306f\u3053\u306e\u304f\u3089\u3044\u306b\u3057\u3066\u79c1\u306e\u5927\u597d\u304d\u306a Java \u3067\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5f53\u7136\u3001\u4eca\u3060\u3068 Swing \u306a\u3093\u3066\u904e\u53bb\u306e\u6280\u8853\u306a\u3093\u304b\u4f7f\u308f\u305a\u306b\u30ea\u30c3\u30c1\u306a UI \u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u308b JavaFX \u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>JavaFX \u3092\u4f7f\u3063\u3066 WebCam \u3092\u52d5\u304b\u3059\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u306e\u304b\uff1f<\/p>\n<p>\u65e9\u901f\u3001\u60a9\u307f\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067 Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u306f\u7f6e\u3044\u3068\u3044\u3066\u3001\u307e\u305a\u4e00\u822c\u7684\u306b Java \u3067 WebCam \u3092\u4f7f\u3046\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u306e\u304b\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u3001\u601d\u3044\u3046\u304b\u3093\u3060\u306e\u306f\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306b webCam \u3084\u30de\u30a4\u30af\u306a\u3069\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u6271\u3046 API \u304c\u5b58\u5728\u3059\u308b\u304b\u3067\u3059\u3002<\/p>\n<p>\u8a18\u61b6\u306b\u7121\u3044\u3067\u3059\u3002\u3075\u3068\u3001Java Media Framework (JMF) \u304c\u8133\u88cf\u3092\u3088\u304e\u308a\u307e\u3057\u305f\u3002(^_^;<\/p>\n<p>\u305d\u308c\u306f\u7121\u304b\u3063\u305f\u3053\u3068\u306b\u3057\u3066\u4ed6\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002(\u30f2\u30d2!<\/p>\n<p>1. OpenCV \u3092\u4f7f\u3046<\/p>\n<p>2. <a href=\"https:\/\/github.com\/sarxos\/webcam-capture\" target=\"_blank\">sarxos Webcam-Capture API<\/a> \u3092\u4f7f\u3046<\/p>\n<p>\u3053\u306e\u4e8c\u3064\u304c\u826f\u3055\u3052\u3067\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3089\u4e8c\u3064\u306e\u65b9\u6cd5\u306f\u3069\u3061\u3089\u3082\u9854\u691c\u51fa\u304c\u5bb9\u6613\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>OpenCV \u3067\u9854\u691c\u51fa\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u305f\u7269\u306f\u4e0b\u8a18\u52d5\u753b\u30b5\u30a4\u30c8\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a title=\"https:\/\/youtu.be\/Zjc6-IF3rtM\" href=\"https:\/\/youtu.be\/Zjc6-IF3rtM\">https:\/\/youtu.be\/Zjc6-IF3rtM<\/a><\/p>\n<p>WebCam \u3092\u4f7f\u3063\u3066\u9854\u691c\u51fa\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8f09\u305b\u3088\u3046\u3068\u601d\u3063\u305f\u3051\u3069\u9577\u304f\u306a\u308b\u306e\u3067 GitHub \u306b\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"1\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"1\" src=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/1_thumb.png\" width=\"484\" height=\"394\"><\/a><\/p>\n<p><a title=\"https:\/\/github.com\/Yucchi-1995\/OpenCV_with_JavaFX_WebCam\" href=\"https:\/\/github.com\/Yucchi-1995\/OpenCV_with_JavaFX_WebCam\">https:\/\/github.com\/Yucchi-1995\/OpenCV_with_JavaFX_WebCam<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/sarxos\/webcam-capture\" target=\"_blank\">sarxos Webcam-Capture API<\/a> \u3092\u4f7f\u3046\u65b9\u6cd5\u306f Example \u304c\u305f\u304f\u3055\u3093\u3042\u308b\u3057\u3001JavaFX \u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308b\u306e\u3067\u7701\u7565\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3076\u3093\u3001\u3053\u308c\u304c\u4e00\u756a\u4eba\u6c17\u306a\u3093\u3058\u3083\u306a\u3044\u3060\u308d\u3046\u304b\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001Intel RealSense SDK \u3092\u4f7f\u3063\u3066 JavaFX \u3067 Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u3092\u52d5\u304b\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u30ab\u30e1\u30e9\u753b\u50cf\u3092\u6620\u3059\u3060\u3051\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3080\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>Intel RealSense 3D\u30ab\u30e1\u30e9(F200) \u306f\u3001Color, Depth, IR \u30683\u7a2e\u985e\u306e\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3067\u5207\u308a\u66ff\u3048\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3044\u3061\u304a\u3046\u3001\u958b\u59cb\u3001\u505c\u6b62\u30dc\u30bf\u30f3\u3082\u3064\u3051\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u56f3\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u306a\u3093\u3068\u304b\u3067\u304d\u3042\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u52d5\u753b\u306f\u3053\u3061\u3089\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a title=\"https:\/\/youtu.be\/jywwwYcwZA8\" href=\"https:\/\/youtu.be\/jywwwYcwZA8\">https:\/\/youtu.be\/jywwwYcwZA8<\/a><\/p>\n<p><a href=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/2.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"2\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"2\" src=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/2_thumb.png\" width=\"484\" height=\"335\"><\/a><\/p>\n<p><a href=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/3.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"3\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"3\" src=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/3_thumb.png\" width=\"484\" height=\"336\"><\/a><\/p>\n<p><a href=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/4.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"4\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"4\" src=\"http:\/\/yucchi.jp\/blog\/wp-content\/uploads\/2015\/12\/4_thumb.png\" width=\"484\" height=\"336\"><\/a><\/p>\n<p>Intel RealSense SDK \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u82f1\u8a9e\u3067\u66f8\u304b\u308c\u3066\u3044\u3066\u65e5\u672c\u8a9e\u306e\u3082\u306e\u306f\u73fe\u5728\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u82f1\u8a9e\u304c\u89e3\u3089\u306a\u3044\u79c1\u306f\u7ffb\u8a33\u652f\u63f4\u30bd\u30d5\u30c8\u3092\u983c\u308a\u306b\u60a9\u307f\u306a\u304c\u3089\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3080\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306b\u6b8b\u5ff5\u306a\u3053\u3068\u306b\u6bd4\u8f03\u7684\u65b0\u3057\u3044 Windows OS \u5c02\u7528\u3068\u3044\u3046\u3053\u3068\u3082\u3042\u308a\u3001\u308f\u3056\u308f\u3056\u30de\u30eb\u30c1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u5bfe\u5fdc\u306e Java \u8a00\u8a9e\u3067\u958b\u767a\u3059\u308b\u3068\u3044\u3063\u305f\u4eba\u3082\u307b\u3068\u3093\u3069\u898b\u3089\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>Intel \u3082\u672c\u6c17\u3067 Java \u8a00\u8a9e\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u6c17\u306f\u7121\u3044\u3089\u3057\u304f Intel RealSense SDK \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u9593\u9055\u3044\u3060\u3089\u3051\u3067\u5516\u7136\u3068\u3057\u307e\u3059\u3002<\/p>\n<p>12\u6708\u306b\u5165\u3063\u3066\u65b0\u3057\u304f R5 \u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u304c\u65e2\u5b58\u306e\u30d0\u30b0\u304c\u76f4\u308b\u3069\u3053\u308d\u304b\u5897\u3048\u3066\u3044\u305f\u306e\u3067\u4eca\u56de\u306f R4 \u3092\u4f7f\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u983c\u308a\u306e\u30b0\u30fc\u30b0\u30eb\u5148\u751f\u306b\u805e\u3044\u3066\u6559\u3048\u3066\u3082\u3089\u3046\u60c5\u5831\u306f\u79c1\u3068\u540c\u3058\u3088\u3046\u306b\u30d0\u30b0\u3092\u8e0f\u3093\u3067\u56f0\u3063\u3066\u3044\u308b Java \u958b\u767a\u8005\u306e\u3069\u3046\u3057\u305f\u3089\u3044\u3044\u3093\u3060\uff1f\u3063\u3066\u306e\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u3053\u3046\u3044\u3046\u72b6\u6cc1\u306a\u306e\u3067\u3001\u3044\u3064\u3082\u306e\u3053\u3068\u3067\u3059\u304c\u9593\u9055\u3044\u3084\u304a\u304b\u3057\u306a\u3053\u3068\u3092\u3057\u3066\u3044\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u306e\u3067\u3042\u3057\u304b\u3089\u305a\uff01 (^_^;<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u5168\u90e8\u8f09\u305b\u308b\u3068\u9577\u304f\u306a\u308b\u306e\u3067 RealSenseController.java \u3060\u3051\u3067\u3059\u3002<\/p>\n<p><pre title=\"RealSenseController.java\">\r\npackage jp.yucchi.intelrealsense;\r\n\r\nimport intel.rssdk.PXCMCapture;\r\nimport intel.rssdk.PXCMImage;\r\nimport intel.rssdk.PXCMSenseManager;\r\nimport intel.rssdk.pxcmStatus;\r\nimport java.awt.image.BufferedImage;\r\nimport java.net.URL;\r\nimport java.util.ResourceBundle;\r\nimport javafx.animation.KeyFrame;\r\nimport javafx.animation.KeyValue;\r\nimport javafx.animation.Timeline;\r\nimport javafx.application.Platform;\r\nimport javafx.beans.property.DoubleProperty;\r\nimport javafx.beans.property.SimpleDoubleProperty;\r\nimport javafx.beans.property.SimpleStringProperty;\r\nimport javafx.beans.property.StringProperty;\r\nimport javafx.concurrent.Service;\r\nimport javafx.concurrent.Task;\r\nimport javafx.embed.swing.SwingFXUtils;\r\nimport javafx.event.ActionEvent;\r\nimport javafx.event.EventHandler;\r\nimport javafx.fxml.FXML;\r\nimport javafx.fxml.Initializable;\r\nimport javafx.scene.control.Alert;\r\nimport javafx.scene.control.Button;\r\nimport javafx.scene.control.ButtonType;\r\nimport javafx.scene.control.RadioButton;\r\nimport javafx.scene.control.TextArea;\r\nimport javafx.scene.control.ToggleGroup;\r\nimport javafx.scene.image.Image;\r\nimport javafx.scene.image.ImageView;\r\nimport javafx.scene.layout.AnchorPane;\r\nimport javafx.stage.StageStyle;\r\nimport javafx.util.Duration;\r\n\r\n\/**\r\n *\r\n * @author Yucchi\r\n *\/\r\npublic class RealSenseController implements Initializable {\r\n\r\n    @FXML\r\n    private AnchorPane anchorPane;\r\n\r\n    @FXML\r\n    private ImageView imageView;\r\n\r\n    @FXML\r\n    private ToggleGroup toggleGroup;\r\n\r\n    @FXML\r\n    private RadioButton colorRadioButton;\r\n\r\n    @FXML\r\n    private RadioButton depthRadioButton;\r\n\r\n    @FXML\r\n    private RadioButton irRadioButton;\r\n\r\n    @FXML\r\n    private Button startButton;\r\n\r\n    @FXML\r\n    private Button stopButton;\r\n\r\n    @FXML\r\n    private Button exitButton;\r\n\r\n    private PXCMSenseManager senseManager;\r\n    private StreamService streamService;\r\n    private pxcmStatus pxcmStatus;\r\n    private static final int WIDTH = 640;\r\n    private static final int HEIGHT = 480;\r\n    private Image image;\r\n    private final StringProperty errorContent = new SimpleStringProperty();\r\n\r\n    @FXML\r\n    private void handleStartButtonAction(ActionEvent event) {\r\n\r\n        streamService = new StreamService();\r\n\r\n        streamService.setOnSucceeded(wse -> {\r\n            if (streamService.getValue() != null) {\r\n                imageView.setImage(image);\r\n                streamService.restart();\r\n            }\r\n        });\r\n\r\n        streamService.setOnFailed(wse -> {\r\n            if (errorContent.getValue() == null) {\r\n                errorContent.setValue(\"Error!\\n\" + \"StreamService Failed.\");\r\n            }\r\n            errorProcessing();\r\n        });\r\n\r\n        \/\/ SenseManager\u3092\u751f\u6210\u3059\u308b\r\n        senseManager = PXCMSenseManager.CreateInstance();\r\n\r\n        \/\/ \u30ab\u30e9\u30fc\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b\r\n        senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, WIDTH, HEIGHT);\r\n        \/\/ Depth \u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b\r\n        senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH, WIDTH, HEIGHT);\r\n        \/\/ IR \u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b\r\n        senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_IR, WIDTH, HEIGHT);\r\n\r\n        \/\/ PXCM_STATUS \u521d\u671f\u5316\r\n        pxcmStatus = senseManager.Init();\r\n\r\n        \/\/ \u30df\u30e9\u30fc\u30e2\u30fc\u30c9\u306b\u3059\u308b\r\n        senseManager.QueryCaptureManager().QueryDevice().SetMirrorMode(PXCMCapture.Device.MirrorMode.MIRROR_MODE_HORIZONTAL);\r\n\r\n        if (!streamService.isRunning()) {\r\n            streamService.reset();\r\n            streamService.start();\r\n        }\r\n\r\n        startButton.disableProperty().bind(streamService.runningProperty());\r\n        stopButton.disableProperty().bind(streamService.runningProperty().not());\r\n\r\n    }\r\n\r\n    @FXML\r\n    private void handleStoptButtonAction(ActionEvent event) {\r\n\r\n        if (streamService.isRunning()) {\r\n            streamService.cancel();\r\n        }\r\n\r\n        senseManager.Close();\r\n\r\n        imageView.setImage(new Image(this.getClass().getResourceAsStream(\"resources\/duke_cake.jpg\")));\r\n\r\n    }\r\n\r\n    @FXML\r\n    private void handleExittButtonAction(ActionEvent event) {\r\n        exitProcessing();\r\n    }\r\n\r\n    @Override\r\n    public void initialize(URL url, ResourceBundle rb) {\r\n\r\n        imageView.setImage(new Image(this.getClass().getResourceAsStream(\"resources\/duke_cake.jpg\")));\r\n\r\n        \/\/ \u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30bf\u30a4\u30d7\u9078\u629e\u30e9\u30b8\u30aa\u30b9\u30a4\u30c3\u30c1\r\n        colorRadioButton.setUserData(\"Color\");\r\n        depthRadioButton.setUserData(\"Depth\");\r\n        irRadioButton.setUserData(\"IR\");\r\n\r\n    }\r\n\r\n    class StreamService extends Service<Image> {\r\n\r\n        @Override\r\n        protected Task<Image> createTask() {\r\n\r\n            Task<Image> task = new Task<Image>() {\r\n\r\n                @Override\r\n                protected Image call() throws Exception {\r\n\r\n                    if (pxcmStatus == pxcmStatus.PXCM_STATUS_NO_ERROR) {\r\n\r\n                        \/\/ \u30d5\u30ec\u30fc\u30e0\u53d6\u5f97\r\n                        if (senseManager.AcquireFrame(true).isSuccessful()) {\r\n\r\n                            \/\/ \u30d5\u30ec\u30fc\u30e0\u30c7\u30fc\u30bf\u53d6\u5f97\r\n                            PXCMCapture.Sample sample = senseManager.QuerySample();\r\n\r\n                            \/\/ \u9078\u629e\u3055\u308c\u305f\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u3088\u308b\u753b\u50cf\u30c7\u30fc\u30bf\u51e6\u7406\r\n                            switch (toggleGroup.getSelectedToggle().getUserData().toString()) {\r\n\r\n                                case \"Color\":\r\n                                    if (sample.color != null) {\r\n                                        \/\/ \u30c7\u30fc\u30bf\u53d6\u5f97\r\n                                        PXCMImage.ImageData cData = new PXCMImage.ImageData();\r\n                                        \/\/ \u30a2\u30af\u30bb\u30b9\u6a29\u3092\u53d6\u5f97\uff08\u30a2\u30af\u30bb\u30b9\u6a29\u306e\u7a2e\u985e\u3001\u753b\u50cf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3001\u30c7\u30fc\u30bf\uff09\r\n                                        pxcmStatus = sample.color.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, cData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) < 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to AcquireAccess of ColorImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n\r\n                                        \/\/ BufferedImage \u306b\u5909\u63db \uff11\u30d4\u30af\u30bb\u30eb\u3042\u305f\u308a\uff14\u30d0\u30a4\u30c8\u306b\u6ce8\u610f\u3001PXCMImage.PixelFormat.PIXEL_FORMAT_RGB24 \u3060\u3068\uff13\u30d0\u30a4\u30c8\r\n                                        int cBuff[] = new int[cData.pitches[0] \/ 4 * HEIGHT];\r\n                                        cData.ToIntArray(0, cBuff);\r\n                                        BufferedImage bImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\r\n                                        bImage.setRGB(0, 0, WIDTH, HEIGHT, cBuff, 0, cData.pitches[0] \/ 4);\r\n\r\n                                        \/\/ ImageView \u306b\u30bb\u30c3\u30c8\u3067\u304d\u308b\u3088\u3046\u306b Image \u306b\u5909\u63db\r\n                                        image = SwingFXUtils.toFXImage(bImage, null);\r\n\r\n                                        \/\/ \u30c7\u30fc\u30bf\u3092\u89e3\u653e\r\n                                        pxcmStatus = sample.color.ReleaseAccess(cData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) > 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to ReleaseAccess of ColorImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n                                    }\r\n                                    break;\r\n                                case \"Depth\":\r\n                                    if (sample.depth != null) {\r\n\r\n                                        PXCMImage.ImageData dData = new PXCMImage.ImageData();\r\n                                        sample.depth.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, dData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) < 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to AcquireAccess of DepthImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n\r\n                                        int dBuff[] = new int[dData.pitches[0] \/ 4 * HEIGHT];\r\n                                        dData.ToIntArray(0, dBuff);\r\n                                        BufferedImage bImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\r\n                                        bImage.setRGB(0, 0, WIDTH, HEIGHT, dBuff, 0, dData.pitches[0] \/ 4);\r\n\r\n                                        image = SwingFXUtils.toFXImage(bImage, null);\r\n\r\n                                        pxcmStatus = sample.depth.ReleaseAccess(dData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) < 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to ReleaseAccess of DepthImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n                                    }\r\n                                    break;\r\n                                case \"IR\":\r\n                                    if (sample.ir != null) {\r\n\r\n                                        PXCMImage.ImageData dData = new PXCMImage.ImageData();\r\n                                        sample.ir.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, dData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) < 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to AcquireAccess of IRImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n\r\n                                        int dBuff[] = new int[dData.pitches[0] \/ 4 * HEIGHT];\r\n                                        dData.ToIntArray(0, dBuff);\r\n                                        BufferedImage bImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\r\n                                        bImage.setRGB(0, 0, WIDTH, HEIGHT, dBuff, 0, dData.pitches[0] \/ 4);\r\n\r\n                                        image = SwingFXUtils.toFXImage(bImage, null);\r\n\r\n                                        pxcmStatus = sample.ir.ReleaseAccess(dData);\r\n\r\n                                        if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) < 0) {\r\n                                            errorContent.setValue(\"Error!\\n\" + \"Failed to ReleaseAccess of IRImage Data.\");\r\n                                            throw new Exception();\r\n                                        }\r\n                                    }\r\n\r\n                                    break;\r\n                                default:\r\n\r\n                            }\r\n\r\n                            \/\/ \u6b21\u306e\u30d5\u30ec\u30fc\u30e0\u30c7\u30fc\u30bf\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u30d5\u30ec\u30fc\u30e0\u3092\u89e3\u653e\u3059\u308b\r\n                            senseManager.ReleaseFrame();\r\n                        } else {\r\n                            \/\/ \u6975\u307e\u308c\u306b\u30d5\u30ec\u30fc\u30e0\u53d6\u5f97\u5931\u6557\u3059\u308b\r\n\/\/                            errorContent.setValue(\"Failed to acquire frame.\");\r\n\/\/                            errorProcessing();\r\n                        }\r\n\r\n                    } else {\r\n                        errorContent.setValue(\"Error!\\n\" + \"Failed to Initialize.\");\r\n                        errorProcessing();\r\n                    }\r\n\r\n                    return image;\r\n\r\n                }\r\n\r\n            };\r\n\r\n            return task;\r\n        }\r\n\r\n    }\r\n\r\n    private void errorProcessing() {\r\n        Alert alert = new Alert(Alert.AlertType.ERROR);\r\n        TextArea textArea = new TextArea(errorContent.get());\r\n        textArea.setEditable(false);\r\n        alert.getDialogPane().setExpandableContent(textArea);\r\n        alert.initStyle(StageStyle.TRANSPARENT);\r\n        alert.setTitle(\"ERROR\");\r\n        alert.setHeaderText(\"Error!\\n\"\r\n                + \"An unexpected error has occurred.\");\r\n        alert.setContentText(\"Exit the application.\");\r\n        alert.showAndWait()\r\n                .filter(response -> response == ButtonType.OK)\r\n                .ifPresent(response -> exitProcessing());\r\n    }\r\n\r\n    private void exitProcessing() {\r\n\r\n        \/\/ \u30af\u30ed\u30fc\u30b8\u30f3\u30b0\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\r\n        DoubleProperty closeOpacityProperty = new SimpleDoubleProperty(1.0);\r\n        anchorPane.getScene().getWindow().opacityProperty().bind(closeOpacityProperty);\r\n\r\n        Timeline closeTimeline = new Timeline(\r\n                new KeyFrame(\r\n                        new Duration(100),\r\n                        new KeyValue(closeOpacityProperty, 1.0)\r\n                ), new KeyFrame(\r\n                        new Duration(2_500),\r\n                        new KeyValue(closeOpacityProperty, 0.0)\r\n                ));\r\n\r\n        EventHandler<ActionEvent> eh = ae -> {\r\n\r\n            if (streamService != null && streamService.isRunning()) {\r\n                streamService.cancel();\r\n            }\r\n            if (pxcmStatus != null) {\r\n                senseManager.Close();\r\n            }\r\n            Platform.exit();\r\n            System.exit(0);\r\n        };\r\n\r\n        closeTimeline.setOnFinished(eh);\r\n        closeTimeline.setCycleCount(1);\r\n        closeTimeline.play();\r\n    }\r\n\r\n}\r\n<\/pre>\n<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u5168\u4f53\u306f\u4e0b\u8a18 GitHub \u3067\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a title=\"https:\/\/github.com\/Yucchi-1995\/Intel_RealSense_First\" href=\"https:\/\/github.com\/Yucchi-1995\/Intel_RealSense_First\">https:\/\/github.com\/Yucchi-1995\/Intel_RealSense_First<\/a><\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f START \u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u30ab\u30e1\u30e9\u753b\u50cf\u3092 ImageView \u306b\u30bb\u30c3\u30c8\u3059\u308b\u305f\u3081\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u3092 javafx.concurrent.Service&lt;V&gt; \u30af\u30e9\u30b9 \u3092\u5229\u7528\u3057\u3066\u51e6\u7406\u3059\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>Service&lt;V&gt; \u30af\u30e9\u30b9\u306f\u3053\u306e\u3088\u3046\u306a\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u304a\u3053\u306a\u3046\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u3092\u4fbf\u5229\u306b\u5b89\u5168\u306b\u5229\u7528\u3059\u308b\u306b\u306f\u6700\u9069\u3067\u3059\u3002<\/p>\n<p>Service&lt;V&gt; \u30af\u30e9\u30b9\u306f\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9Worker&lt;V&gt; \u3092\u5b9f\u88c5\u3057\u3066\u3044\u3066\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30bf\u30b9\u30af\u306e\u72b6\u614b\u3092\u76e3\u8996\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u64cd\u4f5c\u3092\u53d6\u308a\u6d88\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Service&lt;V&gt; \u30af\u30e9\u30b9\u306f\u518d\u5229\u7528\u53ef\u80fd\u306a Worker \u3067\u3042\u308a\u3001\u30ea\u30bb\u30c3\u30c8\u304a\u3088\u3073\u518d\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a Service&lt;V&gt; \u30af\u30e9\u30b9\u306b\u3088\u3063\u3066\u5f97\u3089\u308c\u305f\u7d50\u679c\u304c STOP \u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u308b\u304b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d42\u4e86\u3055\u305b\u308b\u307e\u3067\u7e70\u308a\u8fd4\u3057 ImageView \u306b\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f ImageView \u306b\u30bb\u30c3\u30c8\u3055\u308c\u308b\u30ab\u30e1\u30e9\u304b\u3089\u53d6\u5f97\u3055\u308c\u305f\u753b\u50cf\u306f\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u3055\u308c\u308b\u306e\u304b\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>Intel RealSense SDK \u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u305f\u3081\u306b SenseManager \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/strong><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"#666666\">senseManager = PXCMSenseManager.CreateInstance();<\/font><\/p>\n<p><strong>\u4f7f\u7528\u3059\u308b\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b\u3002<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">\/\/ \u30ab\u30e9\u30fc\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b<br \/>senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, WIDTH, HEIGHT);<br \/>\/\/ Depth \u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b<br \/>senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH, WIDTH, HEIGHT);<br \/>\/\/ IR \u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u6709\u52b9\u306b\u3059\u308b<br \/>senseManager.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_IR, WIDTH, HEIGHT);<\/font><\/p>\n<\/blockquote>\n<p><strong>Intel RealSense SDK \u306e\u521d\u671f\u5316<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">\/\/ PXCM_STATUS \u521d\u671f\u5316<br \/>pxcmStatus = senseManager.Init();<\/font><\/p>\n<\/blockquote>\n<p><strong>\u30df\u30e9\u30fc\u30e2\u30fc\u30c9\u306b\u8a2d\u5b9a<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">\/\/ \u30df\u30e9\u30fc\u30e2\u30fc\u30c9\u306b\u3059\u308b<br \/>senseManager.QueryCaptureManager().QueryDevice().SetMirrorMode(PXCMCapture.Device.MirrorMode.MIRROR_MODE_HORIZONTAL);<\/font><\/p>\n<\/blockquote>\n<p>\u3053\u3053\u307e\u3067\u306f\u30ab\u30e1\u30e9\u95a2\u4fc2\u306e\u521d\u671f\u5316\u51e6\u7406\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u3053\u304b\u3089\u306f Service \u306b\u3088\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u306b\u3088\u308b\u51e6\u7406\u304c\u306f\u3058\u307e\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">if (!streamService.isRunning()) {<br \/>&nbsp;&nbsp;&nbsp; streamService.reset();<br \/>&nbsp;&nbsp;&nbsp; streamService.start();<br \/>}<br \/><\/font><\/p>\n<\/blockquote>\n<p><strong>Intel RealSense SDK \u306e\u521d\u671f\u5316\u51e6\u7406\u304c\u6b63\u5e38\u306b\u304a\u3053\u306a\u308f\u308c\u305f\u304b\u5224\u5b9a\u3057\u307e\u3059\u3002<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">if (pxcmStatus == pxcmStatus.PXCM_STATUS_NO_ERROR) { \u2026<\/font><\/p>\n<\/blockquote>\n<p><strong>\u30d5\u30ec\u30fc\u30e0\u304c\u6b63\u5e38\u306b\u53d6\u5f97\u3067\u304d\u305f\u304b\u5224\u5b9a\u3057\u307e\u3059\u3002<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">if (senseManager.AcquireFrame(true).isSuccessful()) { \u2026<\/font><\/p>\n<\/blockquote>\n<p><strong>AcquireFrame(true) \u3067\u30d5\u30ec\u30fc\u30e0\u306e\u66f4\u65b0\u3092\u884c\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u7121\u3057\u3001\u5f15\u6570\u4e00\u3064\u3001\u5f15\u6570\u4e8c\u3064\u306e3\u7a2e\u985e\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u5168\u3066\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u66f4\u65b0\u51e6\u7406\u3092\u5f85\u3064\u3088\u3046\u306b\u5f15\u6570\u4e00\u3064\u306e\u3082\u3092 true \u306b\u3057\u3066\u6e21\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f15\u6570\u4e8c\u3064\u306e\u3082\u306e\u306f\u3055\u3089\u306b\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u30df\u30ea\u79d2 ( int )\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u5224\u5b9a\u306b boolean isSuccessful() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u30d5\u30ec\u30fc\u30e0\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/strong><\/p>\n<blockquote>\n<p><font color=\"#666666\">PXCMCapture.Sample sample = senseManager.QuerySample();<\/font><\/p>\n<\/blockquote>\n<p>QuerySample() \u30e1\u30bd\u30c3\u30c9\u3067\u5168\u3066\u306e\uff08Color, Depth, IR) \u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>QuerySample() \u30e1\u30bd\u30c3\u30c9\u306b\u306f\u5f15\u6570\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u3092\u9078\u629e\u3067\u304d\u308b QuerySample(int mid) \u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u306b\u3088\u3063\u3066\u9078\u629e\u3055\u308c\u305f\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3057\u307e\u3059\u3002\u30ab\u30e9\u30fc\u30e2\u30fc\u30c9\u3060\u3051\u629c\u7c8b\u3057\u898b\u3066\u3044\u304d\u3059\u3002<\/strong><\/p>\n<p><font color=\"#666666\">if (sample.color != null) {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ \u30c7\u30fc\u30bf\u53d6\u5f97<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PXCMImage.ImageData cData = new PXCMImage.ImageData();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ \u30a2\u30af\u30bb\u30b9\u6a29\u3092\u53d6\u5f97\uff08\u30a2\u30af\u30bb\u30b9\u6a29\u306e\u7a2e\u985e\u3001\u753b\u50cf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3001\u30c7\u30fc\u30bf\uff09<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pxcmStatus = sample.color.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, cData);<\/font><\/p>\n<p><font color=\"#666666\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) &lt; 0) {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorContent.setValue(&#8220;Error!\\n&#8221; + &#8220;Failed to AcquireAccess of ColorImage Data.&#8221;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new Exception();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/font><\/p>\n<p><font color=\"#666666\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ BufferedImage \u306b\u5909\u63db \uff11\u30d4\u30af\u30bb\u30eb\u3042\u305f\u308a\uff14\u30d0\u30a4\u30c8\u306b\u6ce8\u610f\u3001PXCMImage.PixelFormat.PIXEL_FORMAT_RGB24 \u3060\u3068\uff13\u30d0\u30a4\u30c8<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int cBuff[] = new int[cData.pitches[0] \/ 4 * HEIGHT];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cData.ToIntArray(0, cBuff);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BufferedImage bImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bImage.setRGB(0, 0, WIDTH, HEIGHT, cBuff, 0, cData.pitches[0] \/ 4);<\/font><\/p>\n<p><font color=\"#666666\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ ImageView \u306b\u30bb\u30c3\u30c8\u3067\u304d\u308b\u3088\u3046\u306b Image \u306b\u5909\u63db<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image = SwingFXUtils.toFXImage(bImage, null);<\/font><\/p>\n<p><font color=\"#666666\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ \u30c7\u30fc\u30bf\u3092\u89e3\u653e<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pxcmStatus = sample.color.ReleaseAccess(cData);<\/font><\/p>\n<p><font color=\"#666666\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pxcmStatus.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR) &gt; 0) {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorContent.setValue(&#8220;Error!\\n&#8221; + &#8220;Failed to ReleaseAccess of ColorImage Data.&#8221;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new Exception();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/><\/font><\/p>\n<p>\u30ab\u30e9\u30fc\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u30d5\u30ec\u30fc\u30e0\u30c7\u30fc\u30bf\u304c null \u3067\u306a\u3044\u304b\u5224\u5b9a\u3057\u3066\u304b\u3089\u51e6\u7406\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>PXCMImage.ImageData \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210<\/p>\n<p>pxcmStatus AcquireAccess(Access access, PixelFormat format, ImageData data) \u30e1\u30bd\u30c3\u30c9\u3067\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u30a2\u30af\u30bb\u30b9\u6a29\u306b\u8aad\u307f\u53d6\u308a\u3001\u753b\u50cf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f 32bit RGB \u3092\u5f15\u6570\u306b\u3088\u308a\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e09\u3064\u76ee\u306e\u5f15\u6570 PXCMImage.ImageData cData \u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30af\u30bb\u30b9\u6a29\u306e\u7a2e\u985e\u3084\u753b\u50cf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u95a2\u3057\u3066\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001AcquireAccess \u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u306e\u6570\u304c\u9055\u3046\u7269\u3082\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u3082\u8a73\u3057\u304f\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u5f15\u6570\u4e09\u3064\u306e\u3053\u306e pxcmStatus AcquireAccess(Access access, PixelFormat format, ImageData data) \u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3067 32bit RGB \u30c7\u30fc\u30bf\u53d6\u5f97\u5b8c\u4e86<\/p>\n<p>\u305d\u3057\u3066\u51e6\u7406\u304c\u6b63\u5e38\u306b\u3067\u304d\u305f\u304b\u5224\u5b9a<\/p>\n<p>BufferedImage \u306b\u5909\u63db\u6e96\u5099<\/p>\n<p>1\u30d4\u30af\u30bb\u30eb\u3042\u305f\u308a4\u30d0\u30a4\u30c8\u3001cData.pitches[0] \u306b1\u30e9\u30a4\u30f3\u3042\u305f\u308a\u306e\u30d0\u30a4\u30c8\u6570\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306e\u3067\uff14\u3067\u5272\u3063\u3066 WIDTH \u5024\u3092\u7b97\u51fa<\/p>\n<p>\u30c7\u30fc\u30bf\u30b3\u30f3\u30d0\u30fc\u30c8\u7528 int[] \u3092\u751f\u6210<\/p>\n<blockquote>\n<p><font color=\"#666666\">int cBuff[] = new int[cData.pitches[0] \/ 4 * HEIGHT];<\/font><\/p>\n<\/blockquote>\n<p>32bit RGB \u30c7\u30fc\u30bf\u3092 int[] \u306b\u5909\u63db<\/p>\n<p>BufferedImage \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210<\/p>\n<p>public void setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) \u30e1\u30bd\u30c3\u30c9\u3067 BufferedImage \u306b\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8<\/p>\n<p>BufferedImage \u306e\u307e\u307e\u3067\u306f ImageView \u306b\u30bb\u30c3\u30c8\u3067\u304d\u306a\u3044\u306e\u3067 public static WritableImage toFXImage(BufferedImage bimg, WritableImage wimg) \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<\/p>\n<p><font color=\"#666666\">\u3000image = SwingFXUtils.toFXImage(bImage, null);<\/font><\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f Swing\/AWT\u3068JavaFX\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u9593\u3067\u30c7\u30fc\u30bf\u578b\u3092\u5909\u63db\u3059\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30af\u30e9\u30b9\u3067\u3042\u308b SwingFXUtils \u306e\u4e8c\u3064\u306e\u3046\u3061\u306e\u4e00\u3064\u3067\u3042\u308b\u3002<\/p>\n<p>\u3082\u3046\u4e00\u3064\u306f\u3001public static BufferedImage fromFXImage(Image img, BufferedImage bimg) \u30e1\u30bd\u30c3\u30c9\u3067\u3001<\/p>\n<p>\u6307\u5b9a\u3055\u308c\u305fJavaFX Image\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e\u30d4\u30af\u30bb\u30eb\u306e\u30b3\u30d4\u30fc\u3092BufferedImage\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u683c\u7d0d\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001Image.getPixelReader()\u30e1\u30bd\u30c3\u30c9\u306e\u6761\u4ef6\u306b\u5f93\u3063\u3066\u8aad\u307f\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308bJavaFX Image\u306e\u307f\u3092\u5909\u63db\u3057\u307e\u3059\u3002\uff08\u4e0d\u53ef\u306a\u3089 null \u3092\u8fd4\u3059\uff09<\/p>\n<p>BufferedImage \u3092\u6271\u3046\u4e0a\u3067 SwingFXUtils \u30af\u30e9\u30b9\u306e\u3053\u306e\u4e8c\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u308c\u3067 Image \u3092\u8fd4\u3057\u3066\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u306f\u7d42\u4e86\u3068\u306a\u308b\u306e\u3067\u3059\u304c\u3001AcquireFrame(true) \u3067\u53d6\u5f97\u3057\u305f\u30d5\u30ec\u30fc\u30e0\u3092\u89e3\u653e\u3059\u308b\u306e\u5fd8\u308c\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u89e3\u653e\u3057\u306a\u3044\u3068\u6b21\u306e\u30d5\u30ec\u30fc\u30e0\u304c\u53d6\u5f97\u3067\u304d\u306a\u3044\u304b\u3089\u3067\u3059\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">pxcmStatus = sample.color.ReleaseAccess(cData);<\/font><\/p>\n<\/blockquote>\n<p>Service \u3088\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u304c\u6210\u529f\u3057\u305f\u3089 ImageView \u306b ImageView \u306b Image \u3092\u30bb\u30c3\u30c8\u3057\u3066 Service \u3092\u518d\u3073\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">streamService.setOnSucceeded(wse -&gt; {<br \/>&nbsp;&nbsp;&nbsp; if (streamService.getValue() != null) {<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; imageView.setImage(image);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; streamService.restart();<br \/>&nbsp;&nbsp;&nbsp; }<br \/>});<br \/><\/font><\/p>\n<\/blockquote>\n<p>STOP \u30dc\u30bf\u30f3\u306b\u3088\u308b\u505c\u6b62\u51e6\u7406\u3067\u306f<\/p>\n<blockquote>\n<p><font color=\"#666666\">if (streamService.isRunning()) {<br \/>&nbsp;&nbsp;&nbsp; streamService.cancel();<br \/>}<\/font><\/p>\n<\/blockquote>\n<blockquote>\n<p><font color=\"#666666\">senseManager.Close();<\/p>\n<\/blockquote>\n<p><\/font> <\/p>\n<p>cancel() \u30e1\u30bd\u30c3\u30c9\u306b\u3066\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u3092\u53d6\u308a\u6d88\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001PXCMSenseManager senseManager \u3092 Close() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u89e3\u653e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u5148\u982d\u304c\u5927\u6587\u5b57\u306a\u306e\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u3067 Intel RealSence SDK \u3092\u4f7f\u3063\u3066 WebCam \u306b\u3088\u308b\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u51e6\u7406\u306f\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u601d\u3063\u305f\u3088\u308a\u7c21\u5358\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u308c\u3067\u7d42\u308f\u308a\u3060\u3068\u3059\u308b\u3068 JavaFX \u6210\u5206\u304c\u5c11\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u8d85\u5c0f\u30cd\u30bf\u3092\u30fb\u30fb\u30fb(^_^;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>START \u30dc\u30bf\u30f3\u3068 STOP \u30dc\u30bf\u30f3\u306e\u6d3b\u6027\u5316\u72b6\u614b\u3092\u81ea\u52d5\u7684\u306b\u3059\u308b\u306b\u306f<\/strong><\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8d77\u52d5\u3057\u3066 STOP \u30dc\u30bf\u30f3\u306f\u975e\u6d3b\u6027\u5316\u72b6\u614b\u3001 START \u30dc\u30bf\u30f3\u306f\u6d3b\u6027\u5316\u72b6\u614b<\/p>\n<p>\u305d\u3057\u3066 START \u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u308b\u3068 STOP \u30dc\u30bf\u30f3\u304c\u6d3b\u6027\u5316\u72b6\u614b\u306b\u3001 START \u30dc\u30bf\u30f3\u306f\u975e\u6d3b\u6027\u5316\u72b6\u614b\u306b\u3057\u305f\u3044\u3002<\/p>\n<p>\u3053\u308c\u3063\u3066 void bind(ObservableValue&lt;? extends T&gt; observable) \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">startButton.disableProperty().bind(streamService.runningProperty());<br \/>stopButton.disableProperty().bind(streamService.runningProperty().not());<br \/><\/font><\/p>\n<\/blockquote>\n<p>START \u30dc\u30bf\u30f3\u306f\u3001Service \u306e runningProperty() \u3068\u4e00\u65b9\u5411\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3048\u3070\u3044\u3044\u306e\u3067\u3059\u3002<\/p>\n<p>STOP \u30dc\u30bf\u30f3\u306f START \u30dc\u30bf\u30f3\u3068\u76f8\u53cd\u3059\u308b\u52d5\u4f5c\u306b\u3059\u308c\u3070\u3044\u3044\u3060\u3051\u306a\u306e\u3067 runningProperty() \u306b not() \u30e1\u30bd\u30c3\u30c9\u3092\u3064\u3051\u3066\u5426\u5b9a\u8a08\u7b97\u3055\u305b\u3066\u3057\u307e\u3048\u3070\u3044\u3044\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30d7\u30ed\u30b0\u30e9\u30e0\u8d77\u52d5\u6642\u306b\u30d5\u30a7\u30fc\u30c9\u30a4\u30f3\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u3059\u308b\u306b\u306f<\/strong><\/p>\n<p>JavaFX \u306e FX \u306f\u6620\u753b\u306a\u3069\u306e\u7279\u6b8a\u64ae\u5f71\u3001\u30c8\u30ea\u30c3\u30af\u64ae\u5f71\u52b9\u679c\u3001\u7279\u6b8a\u52b9\u679c\u306a\u3069\u306e\u82f1\u8a9e\u306e\u7565\u79f0\u304b\u3089\u4ed8\u3051\u3089\u308c\u305f\u3089\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u306a\u308b\u3060\u3051\u5c11\u3057\u3067\u3082 FX \u8981\u7d20\u3092\u542b\u307e\u305b\u3088\u3046\u3068\u65e5\u3005\u52aa\u529b\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u30f2\u30d2\uff01<\/p>\n<p>\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u3067\u304d\u308b\u306e\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8d77\u52d5\u3001\u7d42\u4e86\u6642\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p>\u8d77\u52d5\u6642\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\uff08\u30d5\u30a7\u30fc\u30c9\u30a4\u30f3\uff09\u3092\u307f\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">\/\/ \u30aa\u30fc\u30d7\u30cb\u30f3\u30b0\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3<br \/>DoubleProperty openOpacityProperty = new SimpleDoubleProperty(0.0);<br \/>stage.opacityProperty().bind(openOpacityProperty);<br \/>Timeline openTimeline = new Timeline(<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new KeyFrame(<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new Duration(100),<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new KeyValue(openOpacityProperty, 0.0)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ), new KeyFrame(<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new Duration(2_500),<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new KeyValue(openOpacityProperty, 1.0)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ));<br \/>openTimeline.setCycleCount(1);<br \/>openTimeline.play();<br \/><\/font><\/p>\n<\/blockquote>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092 Timeline \u3092\u4f7f\u3063\u3066\u304a\u3053\u306a\u3044\u307e\u3059\u3002<\/p>\n<p>Timeline \u306f\u3001API \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u6b21\u306e\u3088\u3046\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><font color=\"#666666\">Timeline\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u3059\u3079\u3066\u306eJavaFX\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u3069\u3001\u3042\u3089\u3086\u308bWritableValue\u306e\u81ea\u7531\u5f62\u5f0f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<br \/>&nbsp;<br \/>Timeline\u306f\u30011\u3064\u4ee5\u4e0a\u306eKeyFrame\u3067\u5b9a\u7fa9\u3057\u3001\u500b\u3005\u306eKeyFrame\u3092KeyFrame.time\u3067\u6307\u5b9a\u3057\u305f\u9806\u5e8f\u3067\u9806\u756a\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/font><\/p>\n<p><font color=\"#666666\">\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u5316\u3055\u308c\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001KeyFrame.values\u3067\u30ad\u30fc\u5024\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001Timeline\u306e\u521d\u671f\u4f4d\u7f6e(Timeline\u306e\u65b9\u5411\u306b\u3088\u3063\u3066\u7570\u306a\u308b)\u3092\u57fa\u6e96\u306b\u3057\u3066KeyFrame\u306e\u6307\u5b9a\u6642\u9593\u306b\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30ad\u30fc\u5024\u306b(\u307e\u305f\u306f\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30ad\u30fc\u5024\u304b\u3089)\u88dc\u9593\u3055\u308c\u307e\u3059\u3002 <\/font><\/p>\n<p>\u3064\u307e\u308a\u3001\u30ad\u30fc\u30d5\u30ec\u30fc\u30e0\u3068\u6642\u9593\u3068\u5024\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u5236\u5fa1\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>Stage stage \u306e opacityProperty() \u3092 \u521d\u671f\u5024 0.0 \u306b\u8a2d\u5b9a\u3055\u308c\u305f DoubleProperty openOpacityProperty \u306b\u30d0\u30a4\u30f3\u30c9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>Timeline \u3067 new Duration(100) \u306b\u3088\u3063\u3066100 \u30df\u30ea\u79d2\u9593\u304b\u3051\u3066 opacityProperty() \u306e\u5024\u3092 KeyValue(openOpacityProperty, 0.0) \u3067\u8a2d\u5b9a\u3055\u308c\u305f 0.0 \u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3057\u3087\u308a\u3057\u307e\u3059\u3002\uff08\u3053\u306e\u5834\u5408 0.0 \u304b\u3089 0.0 \u5909\u5316\u7121\u3057\u3067\u3059\uff09<\/p>\n<p>\u6b21\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u306f new Duration(2_500) \u3067 2500 \u30df\u30ea\u79d2\u304b\u3051\u3066 opacityProperty() \u306e\u5024\u3092 new KeyValue(openOpacityProperty, 1.0) \u3067\u8a2d\u5b9a\u3055\u308c\u305f 1.0 \u307e\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8d77\u52d5\u6642\u51e6\u7406\u306a\u306e\u3067\u8907\u6570\u56de\u306e\u5b9f\u884c\u306f\u5fc5\u8981\u306a\u304f\u4e00\u5ea6\u3060\u3051\u3067\u3044\u3044\u306e\u3067 setCycleCount(1); \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3042\u3068\u306f play() \u30e1\u30bd\u30c3\u30c9\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u59cb\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u3060\u3051\u3067\u3059\u3002\uff08start(Stage stage) \u30e1\u30bd\u30c3\u30c9\u5185\u306b\u8a18\u8ff0)<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u7d42\u4e86\u306e\u6642\u306f closeTimeline.setOnFinished(eh); \u3092\u5229\u7528\u3057\u3066\u30cf\u30f3\u30c9\u30e9\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u7d42\u4e86\u6642\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u7d42\u4e86\u51e6\u7406\u3092\u6e21\u3057\u3066\u3042\u3052\u308c\u3070\u3044\u3044\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u3001\u8d85\u5c0f\u30cd\u30bf\u3067\u3057\u305f\u3002<\/p>\n<p>\u7279\u6b8a\u52b9\u679c\u3067\u306f\u306a\u3044\u3067\u3059\u304c JavaFX \u306f CSS \u306b\u3088\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u898b\u6804\u3048\u3092\u5909\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30b6\u30a4\u30f3\u30bb\u30f3\u30b9\u306e\u3042\u308b\u65b9\u306f\u5f37\u529b\u306a\u6b66\u5668\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3042\u3044\u306b\u304f\u79c1\u306f\u30c7\u30b6\u30a4\u30f3\u30bb\u30f3\u30b9\u306f\u7121\u3044\u306e\u3067\u5fc3\u512a\u3057\u3044\u4eba\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b CSS \u3092\u4f7f\u308f\u305b\u3066\u3044\u305f\u3060\u3044\u3066\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f <a href=\"https:\/\/pixelduke.wordpress.com\/\">Pixel Duke<\/a> \u3055\u3093\u306e <a href=\"https:\/\/pixelduke.wordpress.com\/category\/metro\/\" target=\"_blank\">JMetro<\/a> \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u6642\u306e Windows OS \u306b\u3088\u304f\u4f3c\u5408\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001\u30ab\u30e1\u30e9\u753b\u50cf\u3092\u6620\u3059\u3060\u3051\u306e\u3053\u3068\u306f\u3067\u304d\u305f\u306e\u3067\u3059\u304c\u9854\u691c\u51fa\u3084\u3001\u9854\u8a8d\u8b58\u3001\u9854\u306e\u50be\u304d\u5177\u5408\u3001\u5fc3\u62cd\u6570\u3001\u8868\u60c5\u306a\u3069\u306e\u30c7\u30fc\u30bf\u3082\u53d6\u5f97\u3057\u3066\u5229\u7528\u3057\u305f\u304f\u306a\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u3067\u3001\u5148\u307b\u3069\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30d9\u30fc\u30b9\u306b\u3053\u306e\u4ed8\u52a0\u4fa1\u5024\u3092\u5b9f\u88c5\u3067\u304d\u308b\u3088\u3046\u306a\u306e\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u9854\u306e\u30d1\u30fc\u30c4\u60c5\u5831\uff08LandMark \u30c7\u30fc\u30bf\uff09\u306f\u4ee5\u524d\u304b\u3089\u306e\u30d0\u30b0\u304c\u653e\u7f6e\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e R5 (SDK version 7.0) \u3067\u306f\u30e9\u30f3\u30c9\u30de\u30fc\u30af\u306b\u52a0\u3048\u3066 FacialExpression \u30c7\u30fc\u30bf\u3082\u53d6\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u306e\u3067 R4 (SDK version 6.0) \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u672c\u5f53\u306f\u97f3\u58f0\u8a8d\u8b58\u3082\u3067\u304d\u308b\u306f\u305a\u306a\u306e\u3067\u3059\u304c\u30cf\u30f3\u30c9\u30e9\u30af\u30e9\u30b9\u306e OnRecognition(PXCMSpeechRecognition.RecognitionData data) \u30e1\u30bd\u30c3\u30c9\u304c\u60b2\u3057\u3044\u3053\u3068\u306b\u52d5\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>OnAlert(PXCMSpeechRecognition.AlertData data) \u306f\u97f3\u58f0\u306e\u958b\u59cb\u3084\u7d42\u4e86\u3001\u97f3\u91cf\u304c\u4f4e\u3044\u3068\u304b\u3061\u3083\u3093\u3068\u8fd4\u3057\u3066\u304f\u308c\u305f\u3060\u3051\u306b\u6b8b\u5ff5\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f R5 \u3067\u76f4\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u3044\u307e\u305b\u3093\u3002\uff08\u305f\u3076\u3093\u3053\u308c\u3082\u653e\u7f6e\u3067\u3057\u3087\u3046\u3002\uff09<\/p>\n<p>\u97f3\u58f0\u8a8d\u8b58\u304c\u3067\u304d\u308c\u3070\u30ea\u30c3\u30c1\u306a UI \u306e JavaFX \u3092\u97f3\u58f0\u3067\u64cd\u308b\u672a\u6765\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u5bb9\u6613\u306b\u53ef\u80fd\u306b\u306a\u308b\u304b\u306a\u3063\u3066\u601d\u3063\u3066\u3044\u305f\u3060\u3051\u306b\u6b8b\u5ff5\u3067\u3059\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3067\u304d\u308b\u7bc4\u56f2\u3067\u30c8\u30e9\u30a4\u3057\u3066\u3067\u304d\u3042\u304c\u3063\u305f\u306e\u304c\u6b21\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f GitHub \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a title=\"https:\/\/github.com\/Yucchi-1995\/IntelRealSenseFacialExpression\" href=\"https:\/\/github.com\/Yucchi-1995\/IntelRealSenseFacialExpression\">https:\/\/github.com\/Yucchi-1995\/IntelRealSenseFacialExpression<\/a><\/p>\n<p>\u79c1\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u3082\u306e\u51c4\u304f\u30b7\u30e3\u30a4\u3067\u30b3\u30df\u30e5\u969c\u306a\u306e\u3067\u4f5c\u308a\u7269\u306e\u9854\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u52d5\u304b\u3057\u3066\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/nwpDC7ftyh4?rel=0\" frameborder=\"0\" width=\"640\" allowfullscreen><\/iframe><\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u304c\u30d5\u30a7\u30a4\u30b9\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30e2\u30fc\u30c9\u3092 Depth \u30e2\u30fc\u30c9\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3068\u4e00\u822c\u7684\u306a WebCam \u3067\u3082\u52d5\u304d\u307e\u3059\u3002<\/p>\n<p>faceConfig.SetTrackingMode(PXCMFaceConfiguration.TrackingModeType.FACE_MODE_COLOR_PLUS_DEPTH); \u3092<\/p>\n<p>faceConfig.SetTrackingMode(PXCMFaceConfiguration.TrackingModeType.FACE_MODE_COLOR); \u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u5168\u3066\u306e\u6a5f\u80fd\u304c\u6b63\u3057\u304f\u52d5\u304f\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u9854\u8a8d\u8b58\u306f\u3067\u305f\u3089\u3081\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u52d5\u4f5c\u306e\u8aac\u660e\u306f\u9577\u304f\u306a\u308b\u306e\u3067\u3057\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u5185\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u53c2\u8003\u306b\u63a8\u7406\uff08\u30f2\u30d2\uff01 \u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3042\u3068\u3001Intel RealSense SDK \u306e\u9762\u767d\u3044\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u3060\u307e\u3060 JavaFX \u6163\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u96d1\u3044\u3053\u3068\u3092\u3044\u308d\u3044\u308d\u3084\u3063\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u3067 Image \u8fd4\u3057\u3066 \u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u30bf\u30b9\u30af\u5185\u3067 Platform.runLater() \u3092\u4f7f\u3063\u3066\u3044\u308d\u3044\u308d\u66f4\u65b0\u304b\u3051\u3066\u307e\u3059\u3002<\/p>\n<p>Task&lt;Void&gt; \u3068\u3057\u3066\u5bc6\u306a\u95a2\u4fc2\u306b\u3057\u305f\u307b\u3046\u304c\u3088\u304b\u3063\u305f\u306e\u304b\u306a\u3068\u304b\u601d\u3063\u305f\u308a\u3082\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u306b\u304b\u304a\u304b\u3057\u306a\u3068\u3053\u308d\u304c\u3042\u3063\u305f\u3089\u3054\u6307\u6458\u3044\u305f\u3060\u3051\u308b\u3068\u3046\u308c\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3082\u3046\u4e00\u3064\u8d85\u5c0f\u30cd\u30bf\u3092\uff01<\/p>\n<p>JavaFX \u3067 Dialog \u304c\u6a19\u6e96\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u4fbf\u5229\u306b\u4f7f\u3063\u3066\u3044\u308b\u3068\u307b\u3093\u306e\u4e9b\u7d30\u306a\u3053\u3068\u304c\u6c17\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>TextInputDialog \u306a\u3093\u3067\u3059\u304c TextField \u306b\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u5165\u529b\u3092\u3082\u3089\u3046\u6642\u306b\u4f7f\u3044\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u306a\u306e\u306b TextField \u304c\u7a7a\u306e\u72b6\u614b\u3067\u3082 OK \u30dc\u30bf\u30f3\u304c\u62bc\u305b\u308b\u3088\u3046\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f TextField \u304c\u7a7a\u3067\u306a\u304f\u3001\u9854\u691c\u51fa\u3055\u308c\u3066\u3044\u308c\u3070\u62bc\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u30cd\u30bf\u3068\u3057\u3066 TextField \u304c\u7a7a\u3067\u306f OK \u30dc\u30bf\u30f3\u3092\u62bc\u305b\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<blockquote>\n<p><font color=\"#666666\">TextInputDialog dialog = new TextInputDialog(&#8220;&#8221;);<br \/>dialog.getDialogPane().lookupButton(ButtonType.OK).disableProperty().bind(dialog.getEditor().textProperty().isEmpty());<\/font><\/p>\n<\/blockquote>\n<p>\u7c21\u5358\u3067\u3059\u306d\uff01<\/p>\n<p>OK \u30dc\u30bf\u30f3\u306e disableProperty() \u3092 textProperty().isEmpty() \u3067\u8fd4\u3055\u308c\u308b\u5024\u3068\u30d0\u30a4\u30f3\u30c9\u3059\u308c\u3070\u3044\u3044\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u7c21\u5358\u306b\u4f7f\u3048\u308b\u306e\u306b\u610f\u5916\u3068\u4f7f\u308f\u308c\u3066\u306a\u3044\u3093\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3044\u308d\u3044\u308d\u697d\u3057\u307e\u305b\u3066\u304f\u308c\u305f Intel \u3055\u3093\u306b Java \u304c\u5f97\u610f\u306a\u30b5\u30f3\u30bf\u30af\u30ed\u30fc\u30b9\u304c\u305f\u304f\u3055\u3093\u306e\u30d7\u30ec\u30bc\u30f3\u30c8\u3092\u5c4a\u3051\u308b\u3053\u3068\u3092\u7948\u3063\u3066\u7d42\u308f\u308a\u306b\u3057\u307e\u3059\u3002<\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5fa85bb9-9c02-4130-9cf1-85a854e8d83a\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">Hatena \u30bf\u30b0: <a href=\"http:\/\/b.hatena.ne.jp\/t\/JavaFX\" rel=\"tag\">JavaFX<\/a>,<a href=\"http:\/\/b.hatena.ne.jp\/t\/Intel+RealSense\" rel=\"tag\">Intel RealSense<\/a><\/div>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=http%3A%2F%2Fyucchi.jp%2Fblog%2F%3Fp%3D2143&title=Intel%20RealSense%203D%E3%82%AB%E3%83%A1%E3%83%A9%E3%82%92%20JavaFX%20%E3%81%A7%E5%8B%95%E3%81%8B%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F%E3%80%82' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/yucchi.jp\/blog\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/hatena.gif' alt='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' width='16' height='12' class='wp_social_bookmarking_light_img' \/><\/a><\/div>\n            <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=http%3A%2F%2Fyucchi.jp%2Fblog%2F%3Fp%3D2143&t=Intel%20RealSense%203D%E3%82%AB%E3%83%A1%E3%83%A9%E3%82%92%20JavaFX%20%E3%81%A7%E5%8B%95%E3%81%8B%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F%E3%80%82' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='http:\/\/yucchi.jp\/blog\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"http:\/\/yucchi.jp\/blog\/?p=2143\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"http:\/\/yucchi.jp\/blog\/?p=2143\" data-text=\"Intel RealSense 3D\u30ab\u30e1\u30e9\u3092 JavaFX \u3067\u52d5\u304b\u3057\u3066\u307f\u305f\u3002\" data-lang=\"ja\">Tweet<\/a><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001JavaFX Advent Calendar 2015 \u306e14\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002 \u6628\u65e5\u306f tomo_taka01 \u3055\u3093\u306e \u300cServer Event Client Sample\u300d \u3067\u3059\u3002\u660e\u65e5\u306f&nbsp; kimukou \u3055\u3093\u306e\u300c\u8a66\u7528\u3082\u3075\u304f\u3081\u3066 basilisk-fw \u3042\u305f\u308a\u306e\u8a71\u3092\u66f8\u3053\u3046\u304b\u3068\u300d\u3067\u3059\u3002 \u4eca\u5e74\u306f Windows 10 \u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u751f\u4f53\u8a8d\u8a3c\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b Windows Hello \u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002 Windows OS \u306b\u3053\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u642d\u8f09\u3055\u308c\u3066\u3057\u307e\u3063\u305f\u304b\u3089\u306b\u306f\u3053\u3046\u3044\u3063\u305f\u6642\u4ee3\u306b\u306a\u308b\u3093\u3060\u308d\u3046\u306a\u3063\u3066\u3053\u3068\u3067\u3001 \u3068\u308a\u3042\u3048\u305a WebCam \u3067\u3082\u8cb7\u3063\u3066\u8a66\u3057\u3066\u307f\u3088\u3046\u304b\u3068\u601d\u3063\u305f\u3089\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[21],"class_list":["post-2143","post","type-post","status-publish","format-standard","hentry","category-javafx","tag-javafx"],"_links":{"self":[{"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2143"}],"version-history":[{"count":3,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2143\/revisions"}],"predecessor-version":[{"id":2146,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2143\/revisions\/2146"}],"wp:attachment":[{"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2143"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yucchi.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}