sun_pixel_position — GEOCAM sun op

• Data kinds: image2d → keypoints

• Call: import fullseye as fs; fs.ledger.sun_pixel_position(image, threshold=0.98, min_area=4) (to call the implementation directly, import geocam; geocam.sun_pixel_position(image, threshold=0.98, min_area=4); from the registry, opsgeocam.get("sun_pixel_position"))

Usage

Centroid of the sun in the image (a disk that saturates the sensor) → keypoints (1, 2) = (u, v).

The premise is "the sun saturates the sensor; clouds and snow stop short of saturation". Pixels whose value is at least threshold (absolute, image is 0 to 1) are connected in the 8-neighbourhood, and the luminance centroid of the largest blob is returned. If the blob is smaller than min_area, or there are no saturated pixels, it is "the sun is not in the picture" and raises ValueError (it does not silently return a cloud reflection -- a gate so that, in photos taken when the sun is hidden behind a mountain, a cloud is not read as the sun and does not corrupt the pose). It is not a ratio to the image maximum (with a ratio, in a photo without the sun the brightest cloud would always become "the sun"). Artificial light sources in night scenes and reflections of the sun on water can saturate, so it cannot be used in those scenes. The blob must be a compact disc (fill fraction ≥ 0.4, aspect ratio ≤ 2.5) -- a photo where an overexposed band of sky is saturated gives an elongated blob and is rejected.

Args:

image: (H, W) float, 0 to 1 (out of range is ValueError).

threshold: absolute value regarded as saturation (default 0.98).

min_area: minimum pixel count of a blob.

Returns:

keypoints (1, 2) float: (u, v).

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 keypoints as input)

camera_orientation_from_sun · camera_orientation_from_sun_candidates

Same category (sun)

sun_position · camera_orientation_from_sun · 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.