Questions tagged [projection-matrix]
234 questions
5
votes
2 answers
OpenGL ES 2.0 equivalent of glOrtho()?
In my iphone app, I need to project 3d scene into the 2D coordinates of the screen for some calculations. My objects go through various rotations, translations and scaling. So I figured I need to multiply the vertices with ModelView matrix first,…

Sahil Sachdeva
- 442
- 3
- 5
- 12
5
votes
1 answer
OpenGL: Projecting view-space co-ordinates to NDCs, results seemingly outside of [-1,1] range
I've been attempting to implement screen-space ambient occlusion as instructed by this tutorial. I've been tackling problems with my implementation as I've come across them, but this one has me stumped at the moment.
My understanding of the method…

Richard Williams
- 291
- 2
- 11
5
votes
1 answer
Is the documentation for gluProject missing perspective division?
The OpenGL documentation for gluProject writes that the projection of point v is computed using the given projection and model-view matrix via v'' = P * M * v then window coordinates are derived using the current viewport, e.g. winZ = (v''(2) +…

Alec Jacobson
- 6,032
- 5
- 51
- 88
5
votes
2 answers
Different fundamental matrix from the same projection matrices
I use two projection matrices P1 and P2 (for example I'm using dinosaur dataset) and I need to compute the fundamental matrix F.
So I use two Matlab functions:
Peter Kovesi's function:…

Roberto Iacono
- 51
- 4
4
votes
1 answer
Unable to Draw 3D (Frustum) on top of 2D (Ortho) in OpenGL
I'm trying to render some meshes with Frustum projection on top of a background image (orthographic projection). No matter what I do, the background image keeps being on top of the scene (hiding the meshes).
I've tried a little test - when I've…

Amir
- 349
- 6
- 13
4
votes
2 answers
Why does my perspective implementation fails in displaying my cube's faces?
I wrote a program that takes in entry some points, expressed in 3D coordinates and that must be drawn in a 2D canvas. I use perspective projection, homogeneous coordinates and similar triangles to do that. However, my program does not work and I…

JarsOfJam-Scheduler
- 2,809
- 3
- 31
- 70
4
votes
2 answers
How to get the projection matrix from odometry/tf data?
I would like to compare my results of visual Odometry with the groundtruth provided by the KITTI dataset.
For each frame in the groundthruth, I have a projection matrix.
For example:
1.000000e+00 9.043683e-12 2.326809e-11 1.110223e-16 9.043683e-12…

lilouch
- 1,054
- 4
- 23
- 43
4
votes
1 answer
Project a 2D point from one camera view onto the corresponding 2D point in another camera view of the same scene
I'm using open cv in C++ in multi-view scene with two cameras. I have the intrinsic and extrinsic parameters for both cameras.
I would like to map a (X,Y) point in View 1 to the same point in the second View. I'm am slightly unsure how I should use…

Luke Zammit
- 175
- 2
- 13
4
votes
2 answers
Projection matrix to project a point in a plane
How to determinate the 4x4 S matrix so that the P gets projected into Q, on the XZ (Y=0) plane?
Q = S P

andrepcg
- 1,301
- 7
- 26
- 45
4
votes
2 answers
Zoom in OpenGL ES 2.0 - object disappearing
I like to know about how to correctly zoom in OpenGL ES 2.0. I've successfully drawn a model but it's pretty small and I'm not able to zoom into this model. What I like to have is to zoom "through" this model.
The model is a building with different…

Frame91
- 3,670
- 8
- 45
- 89
4
votes
1 answer
Projecting a 2D point into 3D space using camera calibration parameters in OpenCV
I get my camera parameters using calibrateCamera() and now I have cameraMatrix, distCoeffs, rotationMatrix, transformMatrix.
With these matrices I can build the Projection Matrix and convert 3D object points in the space into 2D image points.
Some…

Zhr Saghaie
- 1,031
- 2
- 16
- 41
4
votes
2 answers
OpenGL Render to texture Coordinates
I want to be able to render to a texture (for shaders, fonts), but I've got a problem a problem to position the quad properly (the framebuffer itself does what it should do). The resulting (copied) texture shows in most cases the upper left corder,…

DiddiZ
- 625
- 8
- 17
3
votes
2 answers
Why doesnt my orthogonal projection matrix work?
I am trying to render some quads that are located in the plane (z=0) with an orthogonal projection. I did set up a projection matrix after reading Formula for a orthogonal projection matrix? but I think I did something wrong.
My first attempt was…

Antoine Gersant
- 526
- 4
- 7
3
votes
1 answer
Image transformation from 2D coordinates to Cylindrical Coordinates
I would like to convert a Jpeg image (its coordinates (x,y)) into a Cylindrical coordinates..
Is there a function in opencv that can do this directly? or what functions in opencv can I use to create my own??
I am having confusion between 2d…

njm
- 51
- 1
- 2
- 7
3
votes
1 answer
The cause of uncontrolled camera movement in a mode 7 affine transformation?
I am trying to implement a mode 7 effect with C and SDL2. Eventually, I hope to be able to do cool effects, like change the height and field of view. But for now, I just want to get something simple working. This is what I have so far:
My problem…

Caspian Ahlberg
- 934
- 10
- 19