Nodes/ComfyUI-PanoTools/Camera Calibration
ComfyUI Node

Camera Calibration

A ComfyUI node in PanoTools with 9 inputs and 6 outputs.

By 9nate-drake·Created 8 months ago·Updated 8 months ago· 7
Camera Calibration
  • image
  • roll
  • pitch
  • vfov
  • focal_length
  • focal_length_mm
  • calibration_info
calibration_method
manual_roll0.00
manual_pitch0.00
manual_vfov60.0
horizon_roi_top0.30
horizon_roi_bottom0.70
min_line_length100
angle_threshold5.0
CategoryPanoTools

Inputs (9)

NameTypeDefaultDescription
imageIMAGESingle image or first frame to analyze for camera calibration parameters
calibration_methodCOMBOCalibration method: 'geocalib_auto' (AI-based, works for all scenes - recommended), 'horizon_detection' (for outdoor/ocean scenes), 'vertical_lines' (for architecture/buildings), or 'manual' (specify values manually)
manual_rolloptFLOAT0.00-180–180Camera roll (rotation around viewing axis) in degrees. Positive = clockwise tilt. Only used when method is 'manual'.
manual_pitchoptFLOAT0.00-180–180Camera pitch (up/down angle) in degrees. Positive = tilted up, negative = tilted down. Only used when method is 'manual'.
manual_vfovoptFLOAT60.010–170Vertical field of view in degrees. Typical values: 40-60° (standard lens), 70-90° (wide angle), 10-30° (telephoto). Used when method is 'manual' or as fallback for geometric methods.
horizon_roi_topoptFLOAT0.300–1Top boundary of search region for horizon (0.0 = image top, 1.0 = image bottom). Adjust to focus on area where horizon is expected. Only for 'horizon_detection' method.
horizon_roi_bottomoptFLOAT0.700–1Bottom boundary of search region for horizon (0.0 = image top, 1.0 = image bottom). Should be below the horizon line. Only for 'horizon_detection' method.
min_line_lengthoptINT10020–500Minimum length (in pixels) for lines to be detected. Increase for images with noise or small details. Only for 'vertical_lines' method.
angle_thresholdoptFLOAT5.00.1–15Maximum angle deviation from perfectly vertical (in degrees). Lower = stricter vertical alignment. Increase if camera has significant roll. Only for 'vertical_lines' method.

Outputs (6)

NameTypeDescription
rollFLOATCamera roll rotation in degrees
pitchFLOATCamera pitch rotation in degrees
vfovFLOATVertical field of view in degrees
focal_lengthFLOATFocal length in pixels (used for projection calculations)
focal_length_mmFLOAT35mm equivalent focal length (e.g., 24mm wide, 50mm standard, 85mm portrait). Useful for comparing with real camera lenses.
calibration_infoSTRINGDiagnostic information about the calibration method used and detected parameters