FAQ Database Discussion Community


Matrices and projection in webgl

opengl-es,webgl,projection-matrix
// Upload Projection, ModelView matrices gl.uniformMatrix4fv(shaderProgram.uMVMatrix, false, pMVMatrix); gl.uniformMatrix4fv(shaderProgram.uPMatrix, false, perspM); In the above lines, I understand that the projection matrix and modelview matrix are being uploaded. I would like to know the math behind this. I have some 3d vertices (overlayvertices) which are later passed in this manner: //...

OpenGL ES Screen Projection Matrix and Camera Projection Matrix

ios,matrix,opengl-es,projection-matrix
I have a projection matrix derived from the camera calibration in an augmented reality app and as long as the screen aspect ratio matches the camera image aspect ratio everything is fine. When the camera image doesn't match the screen edge-for-edge you'll get distortion in the tracking. The problem scenarios:...

3D : keep horizon drawn on screen at the same height regardless camera's zoom

math,3d,camera,projection-matrix
I have this strange use case. These variables are known: Camera zoom (or fov) Camera rotation (orientation) around Y and Z axis = 0 Now, I want the horizon (horizon position = (0,0,Infinite)) to be drawn on screen at a specific 2D height "YY". What must be the Camera X-axis...

Perspective projection seems wrong, closer parts of a model appear smaller and vice versa

directx,directx-11,perspectivecamera,projection-matrix,assimp
I'm trying out D3D11 and struggling to render a model correctly. Here's my problem; while my world and view transformations seem right, my perspective transformation seems to be wrong. When I first rendered a model, something felt wrong, so I tried rotating the model to see what it was. Then...

What does MATLAB's estimateUncalibratedRectification do expressed mathematically ? What does it calculate exactly?

matlab,geometry,computer-vision,matlab-cvst,projection-matrix
What does MATLAB's estimateUncalibratedRectification do in mathematical/geometrical terms ? What does it calculate exactly ? As far as I understand, if the camera parameters are unknown then only the fundamental matrix can be computed from two images, not the essential matrix. So, as far as I understand, estimateUncalibratedRectification's result should...