c++ - How to use openCV's SphericalWarper? -
i have equirectangular stitched panoramic image want display spherical projection. displaying image as-is (with equirectangular projection) using opencv's imshow
, top , bottom parts of image distorted (as equirectangular projection) , want rid of distortion.
i found sphericalwarper in opencv can possibly me this. i'm having problems understanding how use warp
.
for now, section of code warping looks this:
mat panorama; mat k = mat::zeros(3, 3, cv_32f); mat r = mat::eye(3, 3, cv_32f); detail::sphericalwarper warper = detail::sphericalwarper(1.0f); warper.warp(imgbgr, k, r, inter_linear, border_default,panorama); imshow("display frame", panorama); waitkey(0);
my source image, imgbgr
looks (not mine, example):
currently, output image get, panorama
, looks image image sensor without lens:
i guess makes sense because camera intrinsic matrix 3x3 matrix of zeros. question is: should camera intrinsic matrix contain? have camera intrinsic parameters cameras took images stitched produce source equirectangular image (imgbgr
), i'm not sure if warper
needs these same parameters. want view source image spherical projection distortion caused equirectangular projection not there anymore. want output image similar google street-view looks like.
Comments
Post a Comment