Skip to content

krites straighten

Description

Detect a frame's tilt and record a level correction on its edit record — proposed, never auto-applied, and baked to pixels only on krites export (0006 R-DEV-½; R-EDIT-1). krites proposes; you dispose.

Detection is an edge-orientation histogram (0006 §9-Q3): a level frame's edges cluster on the horizontal and vertical axes, so the dominant deviation from those axes is the tilt to undo — pure, reproducible, no ML (R-GLOBAL-7). The correction is clamped to a sane maximum (default ±8°), and the raw detected angle is kept on the record as the basis, so the proposal is explainable and the Phase-4 learner can relate your overrides to it (R-EDIT-4).

Non-destructive: only the frame's .krites/edits/<frame>.yaml record changes — the original is never touched (R-ND-1). Undo it with krites reset.

The shoot must already be culled with krites cull (--all proposes across the keepers).

Usage

krites straighten [frame] [flags]

Name a single frame, or pass --all to propose across every keeper — exactly one of the two. The shoot is taken from --shoot, or the current working directory if omitted (R-SCOPE-1).

Flags

Flag Description Default
--shoot Shoot directory to scope to the current directory
--all Propose a correction for every keeper frame false
--max-angle Maximum correction in degrees (clamp) the shoot's develop config (8)
--output Output format: text or json text

Examples

# Propose a level correction for one frame
krites straighten --shoot ~/shoots/smith-wedding 044-ceremony.jpg

# Batch-propose across every keeper
krites straighten --shoot ~/shoots/smith-wedding --all

A frame with no dominant horizontal/vertical structure to level (a flat sky, say) is reported and left untouched; a frame already level within the clamp proposes nothing.

See also