Skip to content

Instantly share code, notes, and snippets.

@jeremybep
Created March 6, 2023 20:17
Show Gist options
  • Save jeremybep/1fbf4aa42f427a1eac5600ac3ab1d383 to your computer and use it in GitHub Desktop.
Save jeremybep/1fbf4aa42f427a1eac5600ac3ab1d383 to your computer and use it in GitHub Desktop.
Sensor formula

Sensor formula / Stereo


note :

  • horizontal field of view (HFOV).
  • 57.296° = 1 Radian

Sensor width :

$$2 \times (FocalLength \times tan(\frac{0.5 \times HFOV}{57.296}))$$
2*(FocalLength*TAN((0.5*HFOV)/57.296))

HFOV :

$$(2\times arctan(\frac{SensorWidth}{2\times FocalLength})\times 57.296$$
(2*ATAN(SensorWidth/(2*FocalLength)))*57.296

FocalLenght :

$$\frac{0.5\times SensorWidth} {tan\frac{0.5\times HFOV}{57.296}}$$
(0.5*SensorWidth)/TAN((0.5*HFOV)/57.296)

Disparity Max :

$$\frac{interaxial \times focal \times widthFormat}{hAperture \times zeroParallax}$$
(interaxial * focal * widthFormat) / (hAperture * zeroParallax)

Disparity :

$$Disparity Max - \frac{interaxial \times focal \times widthFormat}{hAperture \times color.r}$$
disparity_max - ((interaxial * focal * widthFormat)/(hAperture * color.r))

color.r : donner une valeur (red) par defaut (ici 7.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment