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
7
votes
2 answers

how do I determine the locations of the points after perspective transform, in the new image plane?

I'm using OpenCV+Python+Numpy and I have three points in the image, I know the exact locations of those points. (P1, P2); N1 I am going to transform the image to another view, (for example I am transforming the perspective view to side view). If I…
user11719635
7
votes
2 answers

Switching from perspective to orthogonal keeping the same view size of model and zooming

I have fov angle = 60, width = 640 and height = 480 of window, near = 0.01 and far = 100 planes and I get projection matrix using glm::perspective() glm::perspective(glm::radians(fov), width / height, …
NikBond
  • 743
  • 1
  • 5
  • 20
7
votes
1 answer

How to compute the size of the rectangle that is visible to the camera at a given coordinate?

I made a small three.js app that moves a bunch of circles from the bottom of the canvas to the top: let renderer, scene, light, circles, camera; initialize(); animate(); function initialize() { renderer = new THREE.WebGLRenderer({ alpha:…
XåpplI'-I0llwlg'I -
  • 21,649
  • 28
  • 102
  • 151
7
votes
1 answer

Field of view + Aspect Ratio + View Matrix from Projection Matrix (HMD OST Calibration)

I'm currently working on an Augmented reality application. The targetted device being an Optical See-though HMD I need to calibrate its display to achieve a correct registration of virtual objects. I used that implementation of SPAAM for android to…
Raoul
  • 153
  • 1
  • 2
  • 8
7
votes
1 answer

Three.js - Good z distance of camera for full view of box

I display with Three.js a scene of size 700x700. In this scene, I generate a system of particles with random positions between -250 and 250 (for x,y,z), so the box is 500x500 size. to compute the right distance of camera (for an adapted full view of…
user1773603
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…
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
  • 395
  • 3
  • 13
6
votes
1 answer

ThreeJS: Calculating FOV for perspective camera after browser window resize

I need to obtain the correct Three.JS camera FOV after the browser window size has changed. I have viewed the following questions, but can't seem to find an answer for my question: How to calculate fov for the Perspective camera in three…
kdtop
  • 541
  • 1
  • 7
  • 22
6
votes
2 answers

Bounding Camera to Content Javafx

I am trying to set restrictions on the movement of a camera in JavaFX such that when it moves, it does not allow the user to move in such a way that only the content of the subscene is visible. Currently, my movement code looks as follows and has no…
6
votes
1 answer

How to adjust a three.js perspective camera's field of view to fit a sphere?

I have a sphere centered in front of my camera with a known radius and distance from the camera. How can I adjust the camera's field of view (FOV) to exactly fit the the camera to the sphere within an arbitrary viewport size? This answer is similar…
btjakes
  • 405
  • 3
  • 13
6
votes
1 answer

Translate/Rotate 2D points to change perspective

I am recording a video of a users eye, and then using computer vision to track their eyes in an attempt to estimate their gaze, however the angle I am able to record the user at is not straight on and the representation of the data needs to be…
Aphire
  • 1,621
  • 25
  • 55
5
votes
3 answers

OpenGL - gluPerspective / glFrustum - zNear & zFar problems

I'm writing a space exploration application. I've decided on light years being the units and have accurately modeled the distances between stars. After tinkering and a lot of arduous work (mostly learning the ropes) I have got the camera working…
Curious Coder
  • 51
  • 1
  • 4
5
votes
1 answer

THREE.js PerspectiveCamera focalLength off by a factor of two, inconsistent with FOV

In THREE.js we construct a camera using the following function const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000); We know from optics that the field of view of a camera is related to the focal length by the following…
Carpetfizz
  • 8,707
  • 22
  • 85
  • 146
5
votes
1 answer

Transformation of 3D objects related to vanishing points and horizon line

I'm trying to computing the exact prospective transformation of a 3D object starting from a vanishing points and horizon line of a picture. What I want is, fixed the vanishing points and horizontal line of a picture, I want rotate and skew an 3D…
5
votes
2 answers

ARKit Perspective Correction

I'm working on a project with ARKit and I'm trying to do a perspective correction of the ARFrame.capturedImage to orient a piece of paper sitting on a detected plane so I can feed that into a CoreML model which expects images to be taken from…
Brad Dwyer
  • 6,305
  • 8
  • 48
  • 68
1
2
3
27 28