Questions tagged [perspectivecamera]

Perspective camera projection projects points onto the image plane along lines that emanate from a single point, called the center of projection. This means that an object has a smaller projection when it is far away from the center of projection and a larger projection when it is closer.

Perspective Projection describes the mapping from 3D points in the world as they are seen from of a pinhole camera, to 2D points on a viewport.

At perspective projection the viewing volume is a frustum (a truncated pyramid), where the top of the pyramid is the viewing position.

392 questions
46
votes
1 answer

gluPerspective parameters- what do they mean?

I wonder about the gluPerspective parameters. In all examples I see fovy is set to around 45-60degrees I've tried to set it to different values and the object just disappears what's the explanation for it? The aspect value should always be the…
Despair
  • 665
  • 1
  • 5
  • 14
36
votes
1 answer

Why does the focal length in the camera intrinsics matrix have two dimensions?

In the pinhole camera model there is only one focal length which is between the principal point and the camera center. However, after calculating the camera's intrinsic parameters, the matrix contains (fx, 0, offsetx, 0, 0, fy, offsety, 0, …
binzhang
  • 971
  • 2
  • 10
  • 20
33
votes
3 answers

What is the difference between the fundamental, essential and homography matrices?

I have two images that are taken from different positions. The 2nd camera is located to the right, up and backward with respect to 1st camera. So I think there is a perspective transformation between the two views and not just an affine transform…
20
votes
3 answers

How to calculate perspective transform for OpenCV from rotation angles?

I want to calculate perspective transform (a matrix for warpPerspective function) starting from angles of rotation and distance to the object. How to do that? I found the code somewhere on OE. Sample program is below: #include…
Suzan Cioc
  • 26,725
  • 49
  • 190
  • 355
14
votes
1 answer

Setting up a 2D view in Three.js

I'm new to three.js and am trying to set up what amounts to a 2D visualization (for an assortment of layered sprites) using these 3D tools. I'd like some guidance on the PerspectiveCamera() arguments and camera.position.set() arguments. I already…
gromiczek
  • 2,608
  • 4
  • 24
  • 46
12
votes
2 answers

OpenCV extrinsic camera from feature points

How do I retrieve the rotation matrix, the translation vector and maybe some scaling factors of each camera using OpenCV when I have pictures of an object from the view of each of these cameras? For every picture I have the image coordinates of…
12
votes
1 answer

OpenCV: 4 camera Bird's Eye view?

I am having quite a lot of trouble thinking of how to make a four camera bird's eye view like that seen in luxury cars. Here is the original that I will be using as an example for this question... Right now, I have made it so the image is skewed…
user3818089
  • 335
  • 2
  • 17
11
votes
2 answers

Trying to understand the math behind the perspective matrix in WebGL

All matrix libraries for WebGL have some sort of perspective function that you call to get the perspective matrix for the scene. For example, the perspective method within the mat4.js file that's part of gl-matrix is coded as such: mat4.perspective…
HartleySan
  • 6,152
  • 11
  • 46
  • 89
9
votes
1 answer

Python - Perspective transform for OpenCV from a rotation angle

I'm working on depth map with OpenCV. I can obtain it but it is reconstructed from the left camera origin and there is a little tilt of this latter and as you can see on the figure, the depth is "shifted" (the depth should be close and no horizontal…
user3601754
  • 3,320
  • 9
  • 38
  • 64
9
votes
2 answers

Reprojection of pixels from one image into another

I have a number of calibrated cameras taking a pictures of planar scene. For simplicity let's assume there are 3 cameras. Those cameras are undergoing general motion but mostly translation plus some mild rotation. Example positions of cameras The…
8
votes
1 answer

libgdx: SpriteBatch not displayed with PerspectiveCamera

While I do have the basic knowledge of OpenGL I'm just starting with libgdx. My question is: why, having the exact same code but only switching from OrthographicCamera to PerspectiveCamera has the effect of no longer displaying any of my…
Shivan Dragon
  • 14,526
  • 9
  • 54
  • 96
7
votes
1 answer

How to rotate a THREE.PerspectiveCamera around on object

I am making this program where you can click on an object, zoom to it, then look at it from all angles by holding the right mouse button and dragging. I need the camera to be going around the object, not rotate the object with the camera looking at…
Andrew Fisher
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

java libgdx move perspective camera

I'm creating a 3D game but I don't know how to translate the camera according to my fingers. I'm creating a map(x = -30 to +30;y = -30 to 30;z = -1 to 1) where every coordinate is used for a model using .g3db files from my assets and put in place…
user2390121
  • 398
  • 3
  • 14
7
votes
2 answers

The coordinate system of pinhole camera model

Recently, I have been studying the pinhole camera model, but I was confused with the model provided by OpenCV and the "Multiple View geometry in computer vision" textbook. I know that the following photo is a simplified model which switch the…
Alex Lin
  • 385
  • 2
  • 12
7
votes
3 answers

How to recover view space position given view space depth value and ndc xy

I am writing a deferred shader, and am trying to pack my gbuffer more tightly. However, I cant seem to compute the view position given the view space depth correctly // depth -> (gl_ModelViewMatrix * vec4(pos.xyz, 1)).z; where pos is the model space…
aCuria
  • 6,205
  • 13
  • 46
  • 79
1
2 3
26 27