Skip to content

Quality Grading

Stéphane Pilloy edited this page Nov 4, 2026 · 1 revision
Language: English | Français 🇫🇷

Atmospheric Seeing & Quality Grading

Atmospheric turbulence (seeing) is the primary limiter of high-resolution astrophotography. A 2-minute video capture of 10,000 frames typically contains moments of sharp stillness mixed with intervals of severe atmospheric boiling.

CassiniFlow objectively measures image sharpness across all frames and selects only the top performers.


Quality Grading Algorithms

Algorithm Method Description & Usage
Gradient Sharpness (Default) Sobel / Scharr 2D spatial gradients Measures energy in high-frequency spatial transitions. Excellent for planetary surface details, cloud belts, and lunar craters.
Laplacian Variance 2D Laplacian operator Evaluates edge variance across the frame. Robust against global brightness fluctuations.
Peak Histogram Contrast spread distribution Measures dynamic contrast expansion. Ideal for high-contrast lunar limbs and solar spots.
Original Ninox Historical Ninox/Castrator metric Preserved for backward compatibility with historical workflows.

Low-Memory Top-K Selection Architecture

In conventional software, sorting 10,000 frames by quality requires loading all frames into RAM or writing hundreds of gigabytes of intermediate files to disk.

CassiniFlow uses a Single-Pass Bounded Top-K Min-Heap:

flowchart TD
    Frame["Input Frame (Streamed)"] --> Metric["Compute Sharpness Score Q"]
    Metric --> HeapCheck{"Heap full & Q < Min(Heap)?"}
    HeapCheck -- "Yes" --> Discard["Discard Frame Immediately (Zero RAM penalty)"]
    HeapCheck -- "No" --> PushHeap["Insert into Min-Heap (size = K)<br/>Evict worst element if full"]
Loading
  • RAM Footprint: Under 900 MB regardless of capture duration or video size.
  • I/O Efficiency: The disk is read sequentially without random thrashing.
  • Selection Flexibility: Keep a percentage (e.g., top 25%) or an absolute frame quota (e.g., top 1,200 frames).

Clone this wiki locally