Nodes/ComfyUI-SplatKit/Estimate FOV
ComfyUI Node

Estimate FOV

Guess your camera's lens geometry from vanishing points, not EXIF

By mickmumpitz·Created about a month ago·Updated a day ago· 17
Estimate FOV
  • image
  • h_fov_deg
  • pitch_deg
  • status
  • debug
fallback_fov65

Before you warp a perspective photo into an equirect canvas (see Persp to ERP Warp), you need to know its horizontal field of view - and most photos you've dragged onto a disk carry no useful EXIF, or the EXIF lies. Estimate FOV works it out from the image's own geometry: it detects straight lines, finds the vanishing points, and back-solves focal length and camera pitch. No EXIF, no calibration board, no manual ruler-waving. Feed it the photo, wire its h_fov_deg and pitch_deg into the warp node, and your phone photo lands on the ERP canvas with roughly the right perspective distortion on the first try.

The mechanism is classical: under a pinhole model, parallel scene lines converge to vanishing points, and the focal length can be recovered from the geometry of the principal vanishing points (a 90° pair being the well-conditioned case). The node returns h_fov_deg, pitch_deg, a status string, and a debug IMAGE that overlays the detected lines and the two vanishing-point circles - so you can see exactly what the estimator believed about your photo.

And here's the honesty that makes this node likable: the author's own docstring says pitch is reliable (mean error ~4°) but h_fov_deg is only a starting estimate - mean error ~18°, and it can be far off (a 60° truth returning 121°) when the orthogonal vanishing-point pair is poorly conditioned. The status output tells you when it had to fall back: fallback_fov (default 65, a good 16:9 phone-frame guess) is returned whenever the geometry can't pin down the focal length - degenerate scenes, near-one-point perspective. That's the whole reason the input exists.

The input that matters

Just image and fallback_fov. The recommended workflow: run it, glance at debug, and if h_fov_deg looks wrong for your known camera (phone main ~70, wide ~90, ultrawide ~110–120), just type the number into the warp node. The node is a helper, not an oracle - the author explicitly tells you to sanity-check it against your camera and move on. It exists to save you the trial-and-error of guessing FOV blind, not to replace knowing your own lens.

Install

Standard pack install - this node has zero extra deps beyond the pack's own requirements:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-SplatKit
python_embeded\python.exe -m pip install -r ComfyUI-SplatKit/requirements.txt

Restart, run, done. No model downloads on this one - it's pure OpenCV geometry running on CPU. The most common "problem" is users treating its FOV as gospel for a wide-angle shot; if your ultrawide comes back at 65°, that's the 1-point-perspective fallback talking, not the lens. Trust the status string.

CategorySplatKit

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
fallback_fovFLOAT6520–170Returned when the geometry can't pin down the focal length (degenerate / 1-point perspective). ~65 suits a 16:9 phone frame.

Outputs (4)

NameTypeDescription
h_fov_degFLOAT
pitch_degFLOAT
statusSTRING
debugIMAGE