camera_orientation_from_sun — GEOCAM sun op

• Data kinds: keypoints × signal → table

• Call: import fullseye as fs; fs.ledger.camera_orientation_from_sun(sun_pixels, unix_times, lat_deg, lon_deg, K) (to call the implementation directly, import geocam; geocam.camera_orientation_from_sun(sun_pixels, unix_times, lat_deg, lon_deg, K); from the registry, opsgeocam.get("camera_orientation_from_sun"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

時刻つきの太陽の画素位置 ≥ 2 点 → カメラの (yaw, pitch, roll)(Wahba 問題の SVD 解 = Kabsch)。

各観測で、画素 → カメラ座標の光線 d_c(K から)、時刻 → 世界の太陽方向 s_w(`sun_position`、

屈折込みの仰角を使う: カメラが見るのは見かけの太陽)。`R = argmin Σ |R d_c − s_w|²` を

SVD で閉形式に解き(Kabsch 1976 / Markley 1988)、`(yaw, pitch, roll)` に分解する。

2 点で一意に決まる(2 本の方向が張る面が要る)。観測が 1 点、または全部が同じ方向(共線)なら

ValueError —— 例えば同じ時刻の 2 枚、あるいは正午だけを何日も。太陽は 1 日で方位が大きく

動くので、同じ日の朝と夕の 2 枚があれば足りる。

Args:

sun_pixels: (N, 2) の (u, v)。`sun_pixel_position` の出力を積んだもの。

unix_times: (N,) UNIX 秒(UTC)。

lat_deg, lon_deg: カメラの位置。

K: (fx, fy, cx, cy)。

Returns:

table: `yaw_deg / pitch_deg / roll_deg / residual_deg`(光線と太陽方向の

角度残差の RMS)/ `max_residual_deg / n / condition`(観測方向の張る面の広さ =

2 番目の特異値、0 に近いほど不定)。

Detailed usage guide

• geocam family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_public_camera_heading — py -3.11 examples/poc_public_camera_heading.py

Ops the type connects to (they accept table as input)

render_skyline_view · camera_orientation_from_skyline

Same category (sun)

sun_position · sun_pixel_position · sun_bloom_fit · camera_orientation_from_sun_candidates


*Provenance: geocam.py — GEOCAM operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.