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.

418 questions
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…
5
votes
1 answer

OpenCV: use solvePnP to determine homography

Over the past weeks I've tried learning to rectify images and with the help of the people here I've managed to understand it better. About a week ago I set up a test example which I wanted to rectify (view the image from above). This worked fine…
Yorian
  • 2,002
  • 5
  • 34
  • 60
5
votes
2 answers

three.js rotate camera in plane

I have a camera in my app: camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); camera.position.z = 1; camera.position.y = -5; camera.rotateOnAxis(new THREE.Vector3(1, 0, 0), degInRad(90)); camera.up = new…
ostapische
  • 1,572
  • 2
  • 12
  • 26
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:…
4
votes
0 answers

Android Augmented reality Cameraview convert to screen coordinates

I'm currently developing my own augmented reality app. I'm trying to write my own AR Engine, since all frameworks I've seen so far are just usable with GPS data. It's going to be used indoors, I'm getting my position data from another system. What I…
Martin
  • 41
  • 3
4
votes
1 answer

Is glm::perspective's fov parameter defined as half the angle of the field of view?

I'm at the optimization phase of a renderer I've been writing in OpenGL, and my next step is to cull everything I can't see. When reading this and other resources, I see the visual depiction of the frustum like: Image from:…
Water
  • 3,245
  • 3
  • 28
  • 58
4
votes
2 answers

Ray Tracer Camera - Orthographic to Perspective Projection

I am implementing a ray tracer and it currently has an orthographic projection. I want to make it into a perspective projection. I know in orthographic you send out a ray from every pixel and check for intersections. In perspective projection, the…
4
votes
0 answers

Box Scaling in JavaFX 3D improperly reflects light

My goal is to reproduce a gif in JavaFX. Everything is great, except for when changing so many box heights at once, it slows the machine down. I have decided to remedy this by scaling by the y axis instead of altering the height so they can be…
4
votes
5 answers

WPF flickering during animation in Viewport3D

I'm having some strange behaviour inside a WPF app I'm writing. When I run an animation on the camera position (a Point3DAnimation on PerspectiveCamera.PositionProperty), I get really bad flickering artifacts inside the application. The 3D-rendered…
aardvarkk
  • 14,955
  • 7
  • 67
  • 96
4
votes
1 answer

What's the fourth dimension in a GLSL gl_Position?

I'm learning OpenGL, and currently I'm writing a shader, but I'm confused as to why the gl_Position variable is a vec4 instead of a vec3, as I'd expect. I'd expect this of course because it uses 3D space, not 4D. I hope I'm at least right in…
Jacob Garby
  • 773
  • 7
  • 22
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…
4
votes
1 answer

How does near/far clipping planes in gluPerspective()/glm::perspective() work?

I have a question about how the standard perspective projection matrix works, the one you get from gluPerspective() or glm::perspective(). Specifically, I'm wondering about the near/far clipping planes. I was under the impression that after…
4
votes
1 answer

rotating perspective camera around an object in javaFX

How can I make camera rotate in circle around a 3d object in javaFX? I know i can rotate it around itself using camera.setRotate(angle); but i want an object to be still and the camera to rotate and point to the same spot like the rotation axis is…
tokyo
  • 328
  • 4
  • 12
4
votes
1 answer

Finding the angle of a perspective image

I'm working on a floor design app that allows the user to pick preset floor images and view them within a preset room image. My problem is I'm struggling to get the perspective of the floor image to match the room image properly. I have played…
4
votes
1 answer

Load a 3d Object from obj file and fit it inside the camera using Three.Js

I am trying to load(dynamically) object files using THREE.OBJLoader and place them in the center of a scene(or canvas), so that the whole object can be visible in the Camera. Objects are dynamic, so I don't have fixed height or width data. What I…
Sandeep
  • 712
  • 1
  • 10
  • 22
1 2
3
27 28