camera_orientation_from_sun_candidates — GEOCAM sun op

• Data kinds: keypoints × signal × signal → table

• Call: import fullseye as fs; fs.ledger.camera_orientation_from_sun_candidates(candidates, frame_index, unix_times, lat_deg, lon_deg, shape, K=None, hfov_range_deg=(25.0, 120.0), tol_px=20.0, roll_max_deg=12.0, pitch_range_deg=(-40.0, 0.0), min_dt=1800.0, max_pairs=600, seed=0) (implementation को सीधे call करना हो तो import geocam; geocam.camera_orientation_from_sun_candidates(candidates, frame_index, unix_times, lat_deg, lon_deg, shape, K=None, hfov_range_deg=(25.0, 120.0), tol_px=20.0, roll_max_deg=12.0, pitch_range_deg=(-40.0, 0.0), min_dt=1800.0, max_pairs=600, seed=0), registry से लेना हो तो opsgeocam.get("camera_orientation_from_sun_candidates"))

उपयोग

हर frame के कई "चमकीले blob" candidate (सूर्य, सफ़ेद कार, sign, text मिले हुए) में से RANSAC से समय के अनुसार चलने वाला 1 track चुनता है, और (yaw, pitch, roll) और focal length एक साथ तय करता है → table। fixed camera में केवल सूर्य ही सूर्य की गति से चलता है, इसलिए सूर्य को रूप से नहीं बल्कि गति से तय किया जाता है (Fintraffic weather camera पर रूप वाले gate ने 24/24 गलत detection दिए, 2026-09-21)।

hypothesis = time difference ≥ min_dt वाले 2 frames से 1-1 candidate → camera_orientation_from_sun जैसा ही Wahba का 2-point solution। जो hypotheses road cameras के prior knowledge (|roll| ≤ roll_max_deg, pitch pitch_range_deg में, horizontal field of view hfov_range_deg में) को पूरा नहीं करतीं, उन्हें छोड़ दिया जाता है -- 4 degrees of freedom (rotation 3 + focal length) के सामने candidates ज़्यादा हों तो संयोग से मिले 3 points अभौतिक pose को पास करा सकते हैं। votes = उन frames की संख्या जिनमें predicted position से tol_px के अंदर candidate हो (horizon के नीचे वाले समय vote नहीं करते)। असली bloom centers 5 से 13 px तक हिलते हैं (बादल, exposure), इसलिए default 20 px। सबसे अच्छी hypothesis के inliers से focal length को 1 dimension में optimise किया जाता है, और rotation सभी points से दोबारा निकाला जाता है (2 बार)।

गीली सड़क पर दिखने वाला सूरज का reflection भी सूरज की speed से चलता है (mirror image), इसलिए केवल motion से इन्हें अलग नहीं किया जा सकता। reflection image के निचले हिस्से (road surface) में होता है, इसलिए उसे सूरज मानकर fit करने पर "camera ऊपर देख रहा है" वाला pose (pitch > 0) बनता है -- default pitch_range_deg की ऊपरी सीमा 0 इसी का gate है (road cameras ऊपर नहीं देखते)। ऊपर देखने वाला camera हो तो इसे बढ़ाएँ। एक स्वतंत्र cross-check (lane के vanishing point की elevation ≈ 0) की भी सलाह है।

K देने पर वही इस्तेमाल होता है (focal length search नहीं होती)। K=None पर principal point image का center होता है, और fx = fy = f को hfov_range_deg की range में search किया जाता है -- public cameras में आमतौर पर intrinsic parameters नहीं होते।

Args:

candidates: (N, 2) के (u, v)। सभी frames के candidates जोड़कर बने (sun_bloom_fit या sun_pixel_position का output)।

frame_index: (N,) हर candidate किस frame का है (unix_times का index, integer values)।

unix_times: (F,) हर frame के UNIX seconds (UTC)।

lat_deg, lon_deg: camera की position।

shape: (H, W)।

K: (fx, fy, cx, cy) या None।

Returns:

table: yaw_deg / pitch_deg / roll_deg / f_px / hfov_deg / K (4,) / inlier (N,, 1 = स्वीकार) /

n_inliers / n_frames / n_frames_with_candidates / residual_deg (स्वीकार किए points का angular residual RMS) /

max_residual_deg / residual_px / loo_px (leave-1-out prediction error का औसत) / loo_max_px / span_h

(स्वीकार किए points की time span) / n_hypotheses (prior knowledge पास करने वाली hypotheses की संख्या) / at_prior_bound (1 = जवाब prior knowledge के किनारे पर चिपका है: भरोसा न करें)।

Raises:

ValueError: candidates 2 से कम frames में हों, prior knowledge पास करने वाली कोई hypothesis न हो, inliers 3 से कम हों।

उपयोग की विस्तृत guide

• geocam family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• poc_public_camera_heading_real — py -3.11 examples/poc_public_camera_heading_real.py

वे अगले ops जिनसे type जुड़ता है (table को input के रूप में लेते हैं)

render_skyline_view · camera_orientation_from_skyline

इसी category के (sun)

sun_position · sun_pixel_position · camera_orientation_from_sun · sun_bloom_fit


*Provenance: geocam.py — GEOCAM operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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