skyline_extract — GEOCAM skyline op

• Data kinds: image2d → signal

• Call: import fullseye as fs; fs.ledger.skyline_extract(image, sky_is_bright=True, smooth=1.5, max_jump=3, jump_penalty=0.5) (to call the implementation directly, import geocam; geocam.skyline_extract(image, sky_is_bright=True, smooth=1.5, max_jump=3, jump_penalty=0.5); from the registry, opsgeocam.get("skyline_extract"))

Usage

Extracts from a photo, by dynamic programming, 1 line giving the row of the sky–terrain boundary for each column → signal (W,).

The same idea as Lie, Lin and Hsu 2005 (*Pattern Recognition*: robust skyline extraction for navigation):

the vertical change in brightness (positive I[v−1] − I[v+1] if the sky above is brighter) is taken as "boundary-likeness", and among continuous paths whose row does not jump by max_jump or more from the neighbouring column, the one with minimum cost is chosen (jump_penalty × row jump). Even if clouds or vertical edges of buildings give locally strong responses, the continuity of the path keeps the real ridge line.

Args:

image: (H, W) float. RGB is converted to grey first.

sky_is_bright: the sky is brighter than the terrain (daytime). False if inverted in night scenes or backlight.

smooth: vertical Gaussian σ [pixels] (noise). 0 disables it.

max_jump: row jump allowed between neighbouring columns [pixels].

jump_penalty: cost per 1 pixel of jump (boundary-likeness is normalised to 0 to 1).

Returns:

signal (W,) float: the boundary row for each column (0 is the top). For images that show only sky, or only terrain, the boundary response is weak and the mean path cost is close to 0, so it stops with ValueError

(it does not silently return a line of noise).

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

sun_position · camera_orientation_from_sun · camera_orientation_from_sun_candidates · camera_orientation_from_skyline

Same category (skyline)

dem_skyline · render_skyline_view


*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.