Simple formula for pixels per degree for Field of View

Talk about Head Mounted Displays (HMDs), augmented reality, wearable computing, controller hardware, haptic feedback, motion tracking, and related topics here!
Post Reply
budda
Sharp Eyed Eagle!
Posts: 389
Joined: Thu May 22, 2008 9:13 pm

Simple formula for pixels per degree for Field of View

Post by budda »

Hi,

People are wondering if there is a simple way to estimate the screen pixel density as seen by the viewer.

It is assumed the screen is located at the focal plane of the lens, to produce a virtual image projected at infinity.

The pixel resolution will vary with the viewing angle away from the optical centre of the screen, because of the oblique view of the pixels themselves and the lens distortion present.


For now, the following calculation is for the apparent pixel resolution as seen by the viewer along the lens optical axis only.

I will use inch units to make the calculation simpler.


Pixels per degree of view = ( lens focal length in inches * screen pixels per inch ) / 57.26


Thats it.


Example:

Lens Focal length => 75 mm => 2.953 inch

Screen pixel Density (DPI) => 400 dots per inch

Pixels per degree of view => 2.953 * 400 / 57.26

................................. => 20.63 pixels per degree of view



Please note that longer focal lengths INCREASE pixels per degree of view. So there is a trade-off between field of view and image quality. Larger screens with higher pixel densities are therefore required for better field of view and better image quality.


Thanks.
geekmaster
Petrif-Eyed
Posts: 2708
Joined: Sat Sep 01, 2012 10:47 pm

Re: Simple formula for pixels per degree for Field of View

Post by geekmaster »

budda wrote:...
Pixels per degree of view = ( lens focal length in inches * screen pixels per inch ) / 57.26
...
Pixels per degree of view => 2.953 * 400 / 57.26
................................. => 20.63 pixels per degree of view
I found that 11 to 12 PPD (pixels per degree) works best while testing my GMsphere program. Less than that and the display seems to move with your head a bit, but much more than that and it is like looking through high magnification binoculars, where moving your head makes a lot of pixels fly past in the opposite direction.

Later (in another thread about PPD) I did the calculations, and came up with the Rift DK using 11.4 PPD, based on Rift LCD PPI (pixels per inch) and specified 110-degree FoV (field of view).
At https://developer.oculusvr.com/forums/viewtopic.php?f=20&t=262&p=9490#p8427, geekmaster wrote:
KingK76 wrote:
Sebbi wrote:Doubling the resolution, yes ... doubling the pixel density, no ;-)

I hope the mobile phone/tablet industry will provide us with even more cheap pixels in the years to come. Shouldn't be a problem to render simple worlds in 2560x1600 ... i mean an Android tablet can do it and iPads could probably do it if they had such a display. :)
Okay your comment about going from 1280x720 to 1920x1080 only doubling resolution and not pixel density doesn't make sense to me. If you have a 7" screen with a 720p resolution (1024000 pixels) and then on the same size 7" screen go to 1080p (2073600 pixels) how are you "not" doubling the pixel density? Same size screen+double the pixels=double the pixel density. Is that not correct? If I am incorrect, where is the flaw in my logic. Please explain. :|
Well, yeah, if you measure "pixel density" in Pixels Per SQUARE INCH, then you are correct. But the numbers you are disputing are PPI (Pixels Per INCH), which is like comparing Apples and Kittens (different units of measurement).

So instead, let's compare PPI, which is how "pixel density" is typically measured.

Doubling the PPI would double both X and Y dimensions, which would quadruple (4x) the pixels per square inch. A 1080p display has TWICE as many pixels (2x) as a 720p display, not 4x.

The diagonal 7-inch dimension is only approximate, so I do some rounding here:

1280x720 display PPI calculation:
Horizontal x = 1280 pixels.
Vertical y = 720 pixels.
Diagonal d = sqrt(x*x + y*y) = sqrt(1280*1280 + 720*720) = sqrt(1638400 + 518400) = sqrt(2156800) = 1469 pixels.
PPI = 1469 pixels / 7 inches = 210 PPI.

1920x1080 display PPI calculation:
Horizontal x = 1920 pixels.
Vertical y = 1080 pixels.
Diagonal d = sqrt(x*x + y*y) = sqrt(1920*1920 + 1080*1080) = sqrt(368400 + 1166400) = sqrt(4852800) = 2203 pixels.
PPI = 2203 pixels / 7 inches = 315 PPI.

720p to 1080p PPI increase:
(315 - 210)/210 * 100% = 50% increase in PPI.

What is curious is why doubling the pixels per square inch did not increase the PPI by a ratio of sqrt(2) as I had expected (i.e. 41% increase). Hmm... EDIT: Ahh... I see. 1080p has slightly more than twice the pixels of a 1280x800 display like the Rift DK uses, but the calculations above were for the 720p display (less pixels) that was being discussed. That accounts for the difference between 50% and 41% increase in PPI...
:D

And now, for something COMPLETELY DIFFERENT!

Image
So your estimated PPD would look be a bit like looking through 2x magnification binoculars.

EDIT: I analyzed the code I borrowed from (Deskope) more thoroughly, and it looks like the PPD value may actually be pixels per TWO degrees, which means the best actual PPD in my experience may be about 6 (close to Michael Abrash's claim of 14 pixels per two degrees). That makes the estimated PPD more like 4x than the 2x I had concluded above.
Last edited by geekmaster on Sun Jul 28, 2013 12:13 am, edited 2 times in total.
budda
Sharp Eyed Eagle!
Posts: 389
Joined: Thu May 22, 2008 9:13 pm

Re: Simple formula for pixels per degree for Field of View

Post by budda »

Hi,


Please look more deeply into the numbers :idea:

..... and the implications for virtual reality.
Pixels per degree of view = ( lens focal length in inches * screen pixels per inch ) / 57.26
Sorry to be cryptic, but I will have more to say later.

Just to give you something to think about:

Why do different calculations based on a 5 inch wide display ( per eye ) in the previous example give either a 100 degree field of view, or an 80 degree field of view (approximately).


Thanks.
geekmaster
Petrif-Eyed
Posts: 2708
Joined: Sat Sep 01, 2012 10:47 pm

Re: Simple formula for pixels per degree for Field of View

Post by geekmaster »

budda wrote:Hi,
Please look more deeply into the numbers :idea:
..... and the implications for virtual reality.
Pixels per degree of view = ( lens focal length in inches * screen pixels per inch ) / 57.26
Sorry to be cryptic, but I will have more to say later.

Just to give you something to think about:

Why do different calculations based on a 5 inch wide display ( per eye ) in the previous example give either a 100 degree field of view, or an 80 degree field of view (approximately).

Thanks.
I fully explained my personal observations while adjusting the PPD until the pixels were perceived as anchored in the VR world and not magnified. Then I did the calculations while explaining every step and every number. And they matched. So my number is correct.

Your conflicting number has no such supporting evidence, and no explanation of where you got that 57.26 "magic number" that your calculation relies on. What does that unexplained numerical denominator represent? Where did you get it? How accurate is it? Perhaps that is the cause of your error...

You need to think about this more yourself...
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Simple formula for pixels per degree for Field of View

Post by AngelJ »

I think you guys aren't on the same page. It seems to me that budda is talking about visible screen pixels per degree of field of view, while geekmaster is talking about pixels of virtual camera rotation per degree of head rotation.
geekmaster
Petrif-Eyed
Posts: 2708
Joined: Sat Sep 01, 2012 10:47 pm

Re: Simple formula for pixels per degree for Field of View

Post by geekmaster »

AngelJ wrote:I think you guys aren't on the same page. It seems to me that budda is talking about visible screen pixels per degree of field of view, while geekmaster is talking about pixels of virtual camera rotation per degree of head rotation.
In that case, the pixels per degree of FoV is smallest in the center, and expands toward the edges as described by the radial lens distortion correction forumla and its coefficients. In the center of the screen, where the physical screen pixels match the virtual camera rotation per degree of head rotation, and are also about 12 PPD. But the pixel size expands toward the edge of your visible FoV, making the PPD even smaller, whereas what budda suggested is almost double what I am using. And regarding phyisical screen PPD, not only is it lower at the peripheral edges of the FoV, but it also screen PPD depends on the color (blue has a lower PPD than red, for example).

So whichever "page" I am on (head tracking or screen pixels), I get numbers that are half or smaller than what budda's post mentioned.

Image
Ceiling Cat has a great FoV... :D

EDIT: I analyzed the code I borrowed from (Deskope) more thoroughly, and it looks like the PPD value may actually be pixels per TWO degrees, which means the best actual PPD in my experience may be about 6 (close to Michael Abrash's claim of 14 pixels per two degrees). That makes the estimated PPD more like 4x than the 2x I had concluded above.
Post Reply

Return to “General VR/AR Discussion”