RICOHのTHETAが来たので、全方位画像をOpenGLで表示出来るようにしてみます。いつものように、openFrameworksのpointCloudExampleを改造して作ります。おそらく単純な極座標変換で大丈夫なので*1、画像座標を極座標(球面座標)値と見立てて、半径Rの球状の点群として3次元位置を計算しています。 #include "testApp.h" #define _USE_MATH_DEFINES #include <math.h> //-------------------------------------------------------------- void testApp::setup() { ofSetVerticalSync(true); // load an image from disk img.loadImage("R0010032.JPG");
![おまけ:RICOH THETAのJPG画像を平面-球変換してOpenGLで表示する - cvl-robot's diary](https://cdn-ak-scissors.b.st-hatena.com/image/square/34c5f662fba68c920ffcf20dd2ef519b64120488/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fc%2Fcvl-robot%2F20131031%2F20131031202038.jpg)