{"id":3017,"date":"2012-09-18T02:59:43","date_gmt":"2012-09-17T17:59:43","guid":{"rendered":"http:\/\/r-dimension.xsrv.jp\/classes_j\/?p=3017"},"modified":"2012-09-19T02:34:26","modified_gmt":"2012-09-18T17:34:26","slug":"of_image","status":"publish","type":"post","link":"https:\/\/r-dimension.xsrv.jp\/classes_j\/of_image\/","title":{"rendered":"openFrameworks\u5165\u95803\u3000\u753b\u50cf\u51e6\u7406"},"content":{"rendered":"<h2>\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u8aad\u307f\u8fbc\u307f<\/h2>\n<p>\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u3092\u8868\u793a\u3057\u305f\u308a\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u304b\u3051\u305f\u308a\u3001\u3055\u3089\u306b\u306f\u4eba\u306e\u9854\u3092\u8a8d\u8b58\u3057\u305f\u308a\u306a\u3069\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u7f6e\u3051\u308b\u753b\u50cf\u51e6\u7406\u306f\u69d8\u3005\u306a\u5fdc\u7528\u304c\u5229\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e2d\u3067\u753b\u50cf\u51e6\u7406\u306f\u6bd4\u8f03\u7684\u96e3\u3057\u3044\u90e8\u985e\u306b\u5165\u308a\u307e\u3059\u304c\u3001\u8fd1\u5e74\u306f\u69d8\u3005\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u3066\u3001\u3042\u307e\u308a\u8907\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u304f\u3066\u3082\u7c21\u5358\u306b\u9ad8\u5ea6\u306a\u753b\u50cf\u51e6\u7406\u6280\u8853\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u306e\u6388\u696d\u3067\u306f\u3001\u30a8\u30d5\u30a7\u30af\u30c8\u3084\u7269\u4f53\u8a8d\u8b58\u306a\u3069\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30a2\u30fc\u30c8\u4f5c\u54c1\u306b\u5fc5\u8981\u306a\u6280\u8853\u3092\u4e2d\u5fc3\u306b\u57fa\u672c\u7684\u306a\u3068\u3053\u308d\u304b\u3089\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nProcessing\u3067\u753b\u50cf\u51e6\u7406\u3092\u52c9\u5f37\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u4eba\u306f\u3001\u7d50\u69cb\u52c9\u5f37\u3057\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/image_processing1\/\">Processing\u306e\u753b\u50cf\u51e6\u7406\uff08\u57fa\u790e\u7de8\uff09<\/a><br \/>\n<a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/image_processing2\/\">\u5fdc\u7528\u7de8<\/a><br \/>\n<!--more--><br \/>\n\u4ee5\u4e0b\u306e\u30ec\u30b8\u30e5\u30e1\u306f\u3001\u300c<a href=\"http:\/\/www.openframeworks.cc\/versions\/v0.071\/of_0071_osx_release.zip\">of_0071_osx_release<\/a>\u300dMac\u7248\u3092\u5229\u7528\u3057\u3066\u304a\u3053\u306a\u3044\u307e\u3059\u3002\u30c6\u30b9\u30c8\u74b0\u5883\u306fOSX 10.7.4\u3067\u3059\u3002<\/p>\n<h4>\u6ce8\u610f\uff01\uff01\uff01<\/h4>\n<p>XCode4.4\u4ee5\u4e0a\u3068of_0071_osx_release\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u304c\u3067\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001openFrameworks\u304c\u53e4\u3044SDK\uff08OS X SDK 10.6\uff09\u304c\u5fc5\u8981\u306b\u3082\u95a2\u308f\u3089\u305aXCode4.4\u3067\u306f\u6a19\u6e96\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u306a\u3044\u305f\u3081\u3067\u3059\u3002\u53e4\u3044SDK\u3092\u30b3\u30d4\u30fc\u3059\u308c\u3070\u89e3\u6d88\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002XCode4.3.3\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/qiita.com\/items\/3980a9082a2631565065\">Mountain Lion + Xcode4.4\u3067openFrameworks\u3092\u30d3\u30eb\u30c9\u3059\u308b<\/a><\/p>\n<h3>\u30d4\u30af\u30bb\u30eb\u306e\u8272\u3092\u5909\u3048\u308b\uff08\u53cd\u8ee2\uff09<\/h3>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001320 x 340\u30d4\u30af\u30bb\u30eb\u3067\u5165\u529b\u3057\u305f\u6620\u50cf\u306e1\u30d4\u30af\u30bb\u30eb\u305a\u3064\u3092\u53cd\u8ee2\u3055\u305b\u3066\u65b0\u305f\u306a\u6620\u50cf\u3092\u4f5c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>testApp.h<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"ofMain.h\"\r\n\r\nclass testApp : public ofBaseApp{\r\n\t\r\n\tpublic:\r\n\t\t\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\t\t\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\t\t\r\n\t\t\r\n\t\tofVideoGrabber \t\tvidGrabber;\r\n\t\tunsigned char * \tvideoInverted;\r\n\t\tofTexture\t\t\tvideoTexture;\r\n\t\tint \t\t\t\tw;\r\n\t\tint \t\t\t\th;\r\n};\r\n<\/pre>\n<p><strong>testApp.cpp<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"testApp.h\"\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n\t\r\n\tw = 320;\t\/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u30b5\u30a4\u30ba\u3092\u6c7a\u5b9a\r\n\th = 240;\r\n\t\r\n\tvidGrabber.initGrabber(w,h);    \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u521d\u671f\u5316\r\n\t\r\n\tvideoInverted \t= new unsigned char[w*h*3]; \/\/\u53cd\u8ee2\u6620\u50cf\u7528\u306e\u5909\u6570\r\n\tvideoTexture.allocate(w, h, GL_RGB);    \/\/\u53cd\u8ee2\u6620\u50cf\u7528\u306e\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u914d\u7f6e\r\n}\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n\t\r\n\tofBackground(0,0,0);\r\n\t\r\n\tvidGrabber.grabFrame();     \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u5b9f\u884c\r\n\t\r\n\tif (vidGrabber.isFrameNew()){   \/\/\u65b0\u3057\u3044\u30d5\u30ec\u30fc\u30e0\u304c\u3042\u3063\u305f\u3089\r\n        \r\n        unsigned char * pixels = vidGrabber.getPixels();    \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u7528\u306e\u5909\u6570\r\n \r\n        for(int y = 0; y < h; y++){\r\n            for(int x = 0; x < w; x++){\r\n                \/\/\u305d\u308c\u305e\u308c\u306e\u30d4\u30af\u30bb\u30eb\u306er, g, b\u3092\u62bd\u51fa\r\n                \/\/\u8d64\r\n                videoInverted[y*3*w + x*3] = 255-pixels[y*3*w + x*3];\r\n                \/\/\u7dd1\r\n                videoInverted[y*3*w + x*3+1] = 255-pixels[y*3*w + x*3+1];\r\n                \/\/\u9752\r\n                videoInverted[y*3*w + x*3+2] = 255-pixels[y*3*w + x*3+2];\r\n            }\r\n        }\r\n        \/\/\u51e6\u7406\u5f8c\u306e\u6620\u50cf\u3092\u30bb\u30c3\u30c8\r\n        videoTexture.loadData(videoInverted, w, h, GL_RGB);        \r\n\t}\r\n    \r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n\tvidGrabber.draw(0, 0);    \/\/\u666e\u901a\u306e\u6620\u50cf\u3092\u63cf\u753b\r\n\tvideoTexture.draw(w, 0, w, h);    \/\/\u53cd\u8ee2\u6620\u50cf\u3092\u63cf\u753b\r\n}\r\n<\/pre>\n<h3>\u30d4\u30af\u30bb\u30eb\u306e\u8272\u3092\u56f3\u5f62\u306b\u7f6e\u304d\u63db\u3048\u308b<\/h3>\n<p>\u4e00\u822c\u7684\u306a\u30a8\u30d5\u30a7\u30af\u30c8\u306f\u3001\u4f8b\u3048\u3070\u307c\u304b\u3057\u305f\u308a\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u3092\u56f3\u5f62\u306b\u7f6e\u304d\u63db\u3048\u305f\u308a\u3057\u305f\u308a\u3057\u3066\u3001\u4e0d\u601d\u8b70\u306a\u52b9\u679c\u3092\u51fa\u3059\u3068\u3044\u3046\u30b1\u30fc\u30b9\u304c\u975e\u5e38\u306b\u591a\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u3002\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001\u305d\u306e\u3088\u3046\u306a\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u52b9\u7387\u3088\u304f\u304a\u3053\u306a\u3046\u305f\u3081\u306e\u53c2\u8003\u4f8b\u3092\u6319\u3052\u307e\u3059\u3002<\/p>\n<p><strong>testApp.h<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"ofMain.h\"\r\n\r\nclass testApp : public ofBaseApp{\r\n\t\r\n\tpublic:\r\n\t\t\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\t\t\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\t\t\r\n\t\t\r\n\t\tofVideoGrabber \t\tvidGrabber;\r\n\t\tint \t\t\t\tw;\r\n\t\tint \t\t\t\th;\r\n};\r\n<\/pre>\n<p><strong>testApp.cpp<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"testApp.h\"\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n\t\r\n\tw = 320;\t\/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u30b5\u30a4\u30ba\u3092\u6c7a\u5b9a\r\n\th = 240;\r\n\t\r\n\tvidGrabber.initGrabber(w,h);    \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u521d\u671f\u5316\r\n}\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n\t\r\n    ofBackground(0, 0, 0);  \/\/\u753b\u9762\u3092\u9ed2\u3067\u521d\u671f\u5316\r\n    \r\n    glEnable(GL_BLEND);     \/\/\u900f\u904e\u3092ON\r\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE);      \/\/\u30d6\u30ec\u30f3\u30c9\u65b9\u6cd5\u3092\u5b9a\u7fa9\r\n    \r\n    vidGrabber.grabFrame();     \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u5b9f\u884c\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n    \t\r\n    unsigned char * pixels = vidGrabber.getPixels();    \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u7528\u306e\u5909\u6570\r\n    \r\n    \/\/8pixel\u3054\u3068\u306b\u98db\u3070\u3057\u3066\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u8272\u3092\u62bd\u51fa\r\n    \/\/\u5b9f\u884c\u901f\u5ea6\u304c\u9045\u3044\u5834\u5408\u306b\u306f\u3001\u3053\u306e\u3088\u3046\u306b\u3001\u62bd\u51fa\u3059\u308b\u30d4\u30af\u30bb\u30eb\u3092\u9593\u5f15\u304f\u3068\u3044\u3044\u3002\r\n    \r\n    for(int y = 0; y < h; y+=8){\r\n        for(int x = 0; x < w; x+=8){\r\n            int r = pixels[y * 3 * w + x * 3];  \/\/\u305d\u308c\u305e\u308c\u306e\u30d4\u30af\u30bb\u30eb\u306er, g, b\u3092\u62bd\u51fa\r\n            int g = pixels[y * 3 * w + x * 3 + 1];\r\n            int b = pixels[y * 3 * w + x * 3 + 2];\r\n            \r\n            ofSetColor(r, g, b, 127);   \/\/\u900f\u904e\u5ea650%\u3067\u63cf\u753b\r\n            ofCircle(20 + x, 20 + y, 10);   \/\/\u5186\u3092\u63cf\u304f\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h2>OpenCV<\/h2>\n<p>OpenCV\u306f\u3001\u753b\u50cf\u51e6\u7406\u306e\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u3059\u3067\u306b\u5b9f\u7fd2\u3057\u305fopenFrameworks\u6a19\u6e96\u306e\u30d3\u30c7\u30aa\u6a5f\u80fd\u3067\u3082\u3001\u69d8\u3005\u306a\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u304b\u3051\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001OpenCV\u3092\u4f7f\u3046\u3068\u3088\u308a\u7269\u4f53\u306e\u8ffd\u8de1\u7b49\u304c\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002\u304c\u3001\u7c21\u6613\u306a\u3060\u3051\u306b\u67d4\u8edf\u6027\u306f\u5f31\u307e\u308a\u307e\u3059\u3002\u4e00\u9577\u4e00\u77ed\u306a\u306e\u3067\u3001\u4e21\u65b9\u6bd4\u3079\u3066\u76ee\u7684\u306b\u3042\u3063\u305f\u65b9\u6cd5\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4>\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u306e\u6620\u50cf<\/h4>\n<p>OpenCV\u306b\u304a\u3044\u3066\u306f\u3001\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u3092\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u7c21\u5358\u3067\u3059\u3002\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u7528\u306e\u5909\u6570\u3092\u7528\u610f\u3057\u3001\u305d\u306e\u5909\u6570\u306b\u30ab\u30e9\u30fc\u6620\u50cf\u306e\u60c5\u5831\u3092\u5165\u308c\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p><strong>testApp.h<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"ofMain.h\"\r\n#include \"ofxOpenCv.h\"\r\n\r\nclass testApp : public ofBaseApp{\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\t\t\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\t\t\r\n\r\n        ofVideoGrabber \t\tvidGrabber;\r\n        ofxCvColorImage\t\t\tcolorImg;   \/\/\u30ab\u30e9\u30fc\u753b\u50cf\u7528\u5909\u6570\r\n        ofxCvGrayscaleImage \tgrayImage;      \/\/\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u753b\u50cf\u7528\u5909\u6570\r\n        int w;      \/\/\u6620\u50cf\u306e\u5e45\r\n        int h;      \/\/\u6620\u50cf\u306e\u9ad8\u3055\r\n};\r\n\r\n};\r\n<\/pre>\n<p><strong>testApp.cpp<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"testApp.h\"\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n    \r\n    w = 320;\r\n    h = 240;\r\n\r\n    vidGrabber.setVerbose(true);\r\n    vidGrabber.initGrabber(w,h);\r\n\r\n    colorImg.allocate(w,h);\r\n    grayImage.allocate(w,h);\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n\tofBackground(0,0,0);\r\n\r\n    bool bNewFrame = false;\r\n\r\n       vidGrabber.grabFrame();\r\n\t   bNewFrame = vidGrabber.isFrameNew();\r\n\r\n\tif (bNewFrame){\r\n\r\n        colorImg.setFromPixels(vidGrabber.getPixels(), w,h);\r\n\r\n        grayImage = colorImg;       \/\/\u30ab\u30e9\u30fc\u6620\u50cf\u3092\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u306b\u5909\u63db\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n\r\n\tcolorImg.draw(20,20);       \/\/\u30ab\u30e9\u30fc\u6620\u50cf\u306e\u63cf\u753b\r\n\tgrayImage.draw(20+w,20);     \/\/\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u6620\u50cf\u306e\u63cf\u753b\r\n}\r\n<\/pre>\n<p>\u30d5\u30ec\u30fc\u30e0\u5dee\u5206\u3001\u7269\u4f53\u8a8d\u8b58<br \/>\n\u30d5\u30ec\u30fc\u30e0\u5dee\u5206\u3068\u306f\u3001\u30ab\u30e1\u30e9\u306b\u52d5\u304f\u3082\u306e\u304c\u6620\u3063\u305f\u5834\u5408\u306b\u52d5\u3044\u305f\u90e8\u5206\u3092\u62bd\u51fa\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u305d\u3057\u3066\u305d\u306e\u5dee\u5206\u3092\u8a08\u7b97\u3057\u3066\u52d5\u3044\u305f\u90e8\u5206\u304c\u7269\u4f53\u3060\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8a8d\u8b58\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6700\u521d\u304b\u3089\u5168\u3066\u81ea\u529b\u3067\u66f8\u304f\u3068\u975e\u5e38\u306b\u8907\u96d1\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u304c\u3001OpenCV\u3067\u306f\u7c21\u5358\u306a\u95a2\u6570\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u524d\u8ff0\u306e\u30b3\u30fc\u30c9\u306b\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>testApp.h<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"ofMain.h\"\r\n#include \"ofxOpenCv.h\"\r\n\r\nclass testApp : public ofBaseApp{\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\t\t\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\t\t\r\n\r\n\t\tofVideoGrabber \t\tvidGrabber;\r\n\t\tofxCvColorImage\t\t\tcolorImg;   \/\/\u30ab\u30e9\u30fc\u753b\u50cf\u7528\u5909\u6570\r\n\t\tofxCvGrayscaleImage \tgrayImage;      \/\/\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u753b\u50cf\u7528\u5909\u6570\r\n\t\tofxCvGrayscaleImage \tgrayBg;     \/\/\u80cc\u666f\u753b\u50cf\u7528\u5909\u6570\r\n\t\tofxCvGrayscaleImage \tgrayDiff;   \/\/\u80cc\u666f\u753b\u50cf\u3068\u306e\u5dee\u5206\u7528\u5909\u6570\r\n\r\n\t\tofxCvContourFinder \tcontourFinder;  \/\/\u7269\u4f53\u3092\u8a8d\u8b58\u3057\u305f\u6642\u7528\u306e\u5909\u6570\r\n\r\n\t\tint threshold;      \/\/\u3057\u304d\u3044\u5024\r\n\t\tbool bLearnBakground;       \/\/\u80cc\u666f\u753b\u50cf\u64ae\u5f71\u7528\u5909\u6570\r\n\t\tint w;      \/\/\u6620\u50cf\u306e\u5e45\r\n\t\tint h;      \/\/\u6620\u50cf\u306e\u9ad8\u3055\r\n};\r\n<\/pre>\n<p><strong>testApp.cpp<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"testApp.h\"\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n    \r\n    w = 320;\r\n    h = 240;\r\n\r\n    vidGrabber.setVerbose(true);\r\n    vidGrabber.initGrabber(w,h);\r\n\r\n    colorImg.allocate(w,h);\r\n\tgrayImage.allocate(w,h);\r\n\tgrayBg.allocate(w,h);\r\n\tgrayDiff.allocate(w,h);\r\n\r\n\tbLearnBakground = true;\r\n\tthreshold = 80;\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n\tofBackground(0,0,0);\r\n\r\n    bool bNewFrame = false;\r\n\r\n\t\tvidGrabber.grabFrame();\r\n\t\tbNewFrame = vidGrabber.isFrameNew();\r\n\r\n\tif (bNewFrame){\r\n\r\n\t\tcolorImg.setFromPixels(vidGrabber.getPixels(), w,h);\r\n\r\n\t\tgrayImage = colorImg;       \/\/\u30ab\u30e9\u30fc\u6620\u50cf\u3092\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u306b\u5909\u63db\r\n\t\t\/\/\u3082\u3057\u3001\u307e\u3060\u80cc\u666f\u753b\u50cf\u304c\u64ae\u5f71\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u3001\u80cc\u666f\u753b\u50cf\u3092\u64ae\u5f71\r\n\t\tif (bLearnBakground == true){\r\n\t\t\tgrayBg = grayImage;\r\n\t\t\tbLearnBakground = false;      \/\/\u64ae\u5f71\u3057\u305f\u3089false\u306b\u3057\u3066\u3001\u30ad\u30fc\u3092\u62bc\u3055\u306a\u3044\u9650\u308a\u306f\u80cc\u666f\u753b\u50cf\u306f\u64ae\u5f71\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\r\n\t\t}\r\n\r\n\t\t\/\/\u80cc\u666f\u753b\u50cf\u3068\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u5dee\u5206\u3092\u8a08\u7b97\u3057\u3001\u305d\u306e\u5dee\u5206\u304c\u3057\u304d\u3044\u5024\u3092\u8d85\u3048\u3066\u3044\u308b\u304b\u3092\u5206\u6790\r\n\t\tgrayDiff.absDiff(grayBg, grayImage);\r\n\t\tgrayDiff.threshold(threshold);\r\n        \r\n\t\t\/\/\u56f2\u307e\u308c\u3066\u3044\u308b\u9818\u57df\u304c\u3042\u308b\u304b\u3092\u8abf\u3079\u308b\u3002\u3053\u306e\u5834\u5408\u300120pixel\u304b\u3089\u6a2a*\u7e26\/3\u306e\u9593\u307e\u3067\u30d4\u30af\u30bb\u30eb\u306e\u9762\u3092\u63a2\u3059\u3002\u7a74\u3092\u63a2\u3059\u5834\u5408\u306b\u306f\u6700\u5f8c\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092true\u306b\u3059\u308b\r\n\t\tcontourFinder.findContours(grayDiff, 20, (w*h)\/3, 10, true);\t\/\/ find holes\r\n\t}\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n\r\n\tcolorImg.draw(20,20);       \/\/\u30ab\u30e9\u30fc\u6620\u50cf\u306e\u63cf\u753b\r\n\tgrayImage.draw(20+w,20);     \/\/\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u6620\u50cf\u306e\u63cf\u753b\r\n\tgrayBg.draw(20,20+h);       \/\/\u80cc\u666f\u753b\u50cf\r\n\tgrayDiff.draw(20+w,20+h);   \/\/\u80cc\u666f\u753b\u50cf\u3068\u306e\u5dee\u5206\r\n\r\n\t\/\/\u56db\u89d2\u5f62\u3092\u63cf\u304f\r\n\tofFill();\r\n\tofSetColor(50, 50, 50);\r\n\tofRect(20+w,20+h*2,w,h);\r\n\tofSetHexColor(0xffffff);\r\n\r\n\t\/\/ \u7a74\u3092\u63cf\u753b\r\n\tcontourFinder.draw(20+w,20+h*2);\r\n\r\n    \/\/\u3082\u3057\u304f\u306f\u30011\u30641\u3064\u306e\u9762\u3092\u63cf\u753b\r\n    for (int i = 0; i < contourFinder.nBlobs; i++){\r\n        contourFinder.blobs[i].draw(20+w,20+h*2);\r\n    }\r\n\r\n\t\/\/\u6700\u5f8c\u306b\u60c5\u5831\u3092\u63b2\u8f09\r\n\tofSetHexColor(0xffffff);\r\n\tchar reportStr[1024];\r\n\tsprintf(reportStr, \"bg subtraction and blob detection\\npress ' ' to capture bg\\nthreshold %i (press: +\/-)\\nnum \/\/blobs found %i, fps: %f\", threshold, contourFinder.nBlobs, ofGetFrameRate());\r\n\tofDrawBitmapString(reportStr, 20, 600);\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::keyPressed(int key){\r\n\r\n\tswitch (key){\r\n\t\tcase ' ':\r\n\t\t\tbLearnBakground = true;   \/\/\u30b9\u30da\u30fc\u30b9\u30ad\u30fc\u3092\u62bc\u3059\u3068\u80cc\u666f\u753b\u50cf\u306e\u64ae\u5f71\u3092\u6e96\u5099\u3059\u308b\r\n\t\t\tbreak;\r\n\t\tcase '+':\r\n\t\t\tthreshold ++;     \/\/\u3057\u304d\u3044\u5024\u3092\u4e0a\u3052\u308b\r\n\t\t\tif (threshold > 255) threshold = 255;\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tthreshold --;     \/\/\u3057\u304d\u3044\u5024\u3092\u4e0b\u3052\u308b\r\n\t\t\tif (threshold < 0) threshold = 0;\r\n\t\t\tbreak;\r\n\t}\r\n}\r\n<\/pre>\n<h4>\u9854\u691c\u51fa<\/h4>\n<p>\u9854\u691c\u51fa\u3082\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>testApp.h<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"ofMain.h\"\r\n#include \"ofxCvHaarFinder.h\"\r\n\r\nclass testApp : public ofBaseApp{\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\t\t\r\n\t\tvoid keyPressed(int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\t\t\r\n\r\n\t\tofVideoGrabber vidGrabber;      \/\/\u30ad\u30e3\u30d7\u30c1\u30e3\u7528\u5909\u6570\r\n\t\tofImage img;        \/\/\u753b\u50cf\u4e00\u6b21\u4fdd\u5b58\u7528\u5909\u6570\r\n\t\tofxCvHaarFinder finder;     \/\/\u9854\u691c\u51fa\u7528\u5909\u6570\r\n\t\tint w;      \/\/\u6620\u50cf\u306e\u5e45\r\n\t\tint h;      \/\/\u6620\u50cf\u306e\u9ad8\u3055\r\n};\r\n<\/pre>\n<p><strong>testApp.cpp<\/strong><\/p>\n<pre lang=\"java\" line=\"1\">\r\n#include \"testApp.h\"\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n\t\r\n\tw = 320;\r\n\th = 240;\r\n    \r\n\tvidGrabber.setVerbose(true);\r\n\tvidGrabber.initGrabber(w,h);\r\n    \r\n\timg.allocate(w, h, OF_IMAGE_COLOR);\r\n    \r\n\tfinder.setup(\"haarcascade_frontalface_default.xml\");    \/\/\u9854\u691c\u51fa\u521d\u671f\u5316\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n    \r\n\tofBackground(0,0,0);\r\n    \r\n\tvidGrabber.grabFrame();\r\n\r\n\tunsigned char *cdata = vidGrabber.getPixels();\r\n\tunsigned char *idata = img.getPixels();\r\n\tfor (int k = 0; k < w*h*3; k++)\r\n\t\tidata[k] = cdata[k];\r\n\timg.update();\r\n\r\n\tfinder.findHaarObjects(img, 40, 40);        \/\/\u9854\u691c\u51fa\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n\t\/\/ \u6620\u50cf\u63cf\u753b\r\n\tofSetColor(255, 255, 255);\r\n\timg.draw(0, 0);\r\n    \r\n\t\/\/\u56db\u89d2\u5f62\u3092\u63cf\u304f\r\n\tofSetColor(255, 0, 0);\r\n\tofSetLineWidth(1);\r\n    \r\n\tofNoFill();\r\n\tfor(int i = 0; i < finder.blobs.size(); i++) {\r\n\t\tofRectangle cur = finder.blobs[i].boundingRect;\r\n\t\tofRect(cur.x, cur.y, cur.width, cur.height);\r\n\t}\r\n}\r\n<\/pre>\n<h2>Kinect\u306e\u5229\u7528<\/h2>\n<p>\u4f55\u5e74\u304b\u524d\u306b\u6bd4\u3079\u308b\u3068\u3001openFrameworks\u306b\u304a\u3044\u3066Kinect\u306f\u304b\u306a\u308a\u4f7f\u3044\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\uff08\u305d\u308c\u3067\u3082\u3044\u304f\u3064\u304b\u4e0d\u53ef\u89e3\u306a\u70b9\u306f\u3042\u308a\u307e\u3059\u304c)\u3002Kinect\u306e\u63a5\u7d9a\u306b\u306fofxOpenNI\u3092\u4f7f\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>1. <a href=\"https:\/\/github.com\/gameoverhack\/ofxOpenNI\">ofxOpenNI<\/a>\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002<\/p>\n<p>2. \u30d5\u30a9\u30eb\u30c0\u540d\u3092\u300cofxOpenNI\u300d\u3068\u3057\u3001of_0071_osx_release > addon\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u308b\u3002<\/p>\n<p><a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI01-300x164.jpg\" alt=\"\" title=\"openNI01\" width=\"300\" height=\"164\" class=\"alignnone size-medium wp-image-3056\" srcset=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI01-300x164.jpg 300w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI01.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p>3. of_0071_osx_release > addons > ofxOpenNI > examples > openNI-demoAllFeatures\u30d5\u30a9\u30eb\u30c0\u3092\u3001openNI-of_0071_osx_release > apps > myApps(\u81ea\u8eab\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a9\u30eb\u30c0\uff09\u306b\u5165\u308c\u308b\u3002<\/p>\n<p><a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI02-300x127.jpg\" alt=\"\" title=\"openNI02\" width=\"300\" height=\"127\" class=\"alignnone size-medium wp-image-3057\" srcset=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI02-300x127.jpg 300w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI02-1024x436.jpg 1024w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI02.jpg 1055w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p>4. of_0071_osx_release > addons > ofxOpenNI > mac > copy_to_data_openni_path > lib\u30d5\u30a9\u30eb\u30c0\u3092\u3001of_0071_osx_release > apps > myApps(\u81ea\u8eab\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a9\u30eb\u30c0\uff09> openNI-demoAllFeatures > bin > data > openni\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3002<\/p>\n<p><a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI03-300x94.jpg\" alt=\"\" title=\"openNI03\" width=\"300\" height=\"94\" class=\"alignnone size-medium wp-image-3053\" srcset=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI03-300x94.jpg 300w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI03-1024x324.jpg 1024w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI03.jpg 1463w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p>5. Kinect\u3092\u63a5\u7d9a\u3057\u3066\u3001openNI-demoAllFeatures\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092XCode\u3067\u958b\u304d\u3001Build Setting\u3092Current OS\u306b\u3057\u3066\u304b\u3089\u3001OpenNISample007\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<p><a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI04-300x79.jpg\" alt=\"\" title=\"openNI04\" width=\"300\" height=\"79\" class=\"alignnone size-medium wp-image-3054\" srcset=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI04-300x79.jpg 300w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI04.jpg 946w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p>6. \u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002\u300ct\u300d\u30ad\u30fc\u3067\u9aa8\u683c\u306e\u8a8d\u8b58\u3001\u300ch\u300d\u30ad\u30fc\u3067\u624b\u306e\u8a8d\u8b58\u306a\u3069\u306e\u6a5f\u80fd\u304c\u3042\u308b\u306e\u3067\u3001\u69d8\u3005\u306a\u7528\u9014\u306b\u4f7f\u3048\u305d\u3046\u3067\u3059\u3002<br \/>\n&nbsp;<\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><br \/>\n\u30b3\u30f3\u30d1\u30a4\u30eb\u306f\u3067\u304d\u308b\u306e\u306b\u3001\u30ed\u30b0\u306e\u6700\u5f8c\u306b\u300cimage not found\u300d\u3068\u51fa\u3066\u3057\u307e\u3044\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u3068\u304d\u306f\u3001<\/p>\n<p>1.<a href=\"http:\/\/www.macports.org\/install.php\"> MacPorts<\/a>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<p>2. \u3059\u3067\u306b\u30b3\u30d4\u30fc\u3057\u305flib\u30d5\u30a9\u30eb\u30c0\u306elibusb-1.0.0.dylib\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u3001MacintoshHD > opt > local > lib\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3002<br \/>\n\u3053\u306e\u3053\u3068\u306b\u3088\u3063\u3066\u3001libusb-1.0.0.dylib\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u8a8d\u8b58\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI05.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI05-300x87.jpg\" alt=\"\" title=\"openNI05\" width=\"300\" height=\"87\" class=\"alignnone size-medium wp-image-3055\" srcset=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI05-300x87.jpg 300w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI05-1024x299.jpg 1024w, https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-content\/uploads\/2012\/09\/openNI05.jpg 1079w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u306e\u8aad\u307f\u8fbc\u307f \u30ad\u30e3\u30d7\u30c1\u30e3\u6620\u50cf\u3092\u8868\u793a\u3057\u305f\u308a\u30a8\u30d5\u30a7\u30af&#8230; <a href=\"https:\/\/r-dimension.xsrv.jp\/classes_j\/of_image\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,24],"tags":[],"class_list":["post-3017","post","type-post","status-publish","format-standard","hentry","category-media_third","category-openframeworks"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/3017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/comments?post=3017"}],"version-history":[{"count":33,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/3017\/revisions"}],"predecessor-version":[{"id":3042,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/3017\/revisions\/3042"}],"wp:attachment":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/media?parent=3017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/categories?post=3017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/tags?post=3017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}