MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / _glslFOV

Function _glslFOV

src/shaders/undistortion.ts:829–835  ·  view source on GitHub ↗
(p: Vec2, i: CameraIntrinsics)

Source from the content-addressed store, hash-verified

827
828// Mirrors distortFOV().
829function _glslFOV(p: Vec2, i: CameraIntrinsics): Vec2 {
830 const r = Math.hypot(p.x, p.y);
831 if (r < 0.00001 || Math.abs(i.omega) < 0.00001) return { x: p.x, y: p.y };
832 const rd = Math.atan(r * 2.0 * Math.tan(i.omega / 2.0)) / i.omega;
833 const factor = rd / r - 1.0;
834 return { x: p.x + p.x * factor, y: p.y + p.y * factor };
835}
836
837// Mirrors distortThinPrismFisheye() — covers all fisheye-class sub-models.
838function _glslThinPrismFisheye(p: Vec2, i: CameraIntrinsics): Vec2 {

Callers 1

glslForwardReferenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected