Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Viz initialize camera position

$
0
0
How do I initialize the camera such that the scene in 3D is viewed like the image in 2D ? When I run my program, the camera starts off far off from the scene. I have to do a lot of dragging and scrolling before I get it to a decent position and viewing angle. I would like the camera to be initialized and view the 3D scene just like in the 2D image in the first figure. EDIT: I am able to get something decent by initializing the camera at the origin with the focal length extracted from stereorectify. I still had to drag the camera back a little just to be able to visualize things. Vec3d cam_pos(0, 0, 0), cam_focal_point(3155.774902, -1965.979706, 24912.193125), cam_y_dir(0.0f, 1.0f, 0.0f); Affine3f cam_pose = viz::makeCameraPose(cam_pos, cam_focal_point, cam_y_dir); myWindow.setViewerPose(cam_pose); I'm still hoping someone can suggest how I can initialize the camera such that the scene is viewed just like the image ![image description](/upfiles/14703790251545051.png) ![image description](/upfiles/14703789046911907.png)

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>