Skip to content

Centering and Cropping

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

Planetary Centering & Dynamic Cropping

Due to telescope mount periodic errors, atmospheric dispersion, and wind gusts, planetary targets wander inside the sensor field of view. CassiniFlow centers the target and crops the frame to optimize downstream processing.


Planetary Centering Engine

The centering domain service computes the sub-pixel Center of Gravity (CoG) and planetary limb geometry:

  1. Thresholding & Object Isolation:
    • Isolates the planetary disc against sky background noise.
    • Rejects isolated dead pixels or noise bursts.
  2. Center of Gravity (CoG):
    • Evaluates weighted pixel intensity centroids: $$\bar{x} = \frac{\sum x \cdot I(x,y)}{\sum I(x,y)}, \quad \bar{y} = \frac{\sum y \cdot I(x,y)}{\sum I(x,y)}$$
  3. Phase & Limb Compensation:
    • For gibbous or crescent targets (e.g. Venus, Mercury), standard CoG shifts toward the illuminated limb. CassiniFlow compensates using circular edge detection to find the true geometric planet center.
  4. Rejection of Invalid Frames:
    • Empty / Lost Target: If clouds obscure the target or tracking drifts off-sensor, frames are rejected.
    • Overexposure: Frames corrupted by cosmic rays or camera transfer flashes exceeding --overexposed pixel thresholds are automatically discarded.

Cropping Strategies

Cropping reduces frame size to the strict bounding box around the planet:

Mode Behavior Best Used For
Auto-Detect Planet Size Analyzes planetary diameter via PlanetSizeAnalyzer and adds a safety margin padding. Automated batch processing across different planets.
Fixed Box (e.g. 512×512) Forces every frame to strict identical dimensions centered on the target. Recommended for alignment grids and uniform stacking canvases.
Offset Adjustments ($X, Y$) Shifts the center by a specified offset in pixels. Framing planetary moons (e.g. Io, Europa, Titan) alongside the main planet.

Visual Feedback in AstroViewer

  • Yellow Crosshair: Represents the calculated planetary centroid.
  • Bounding Box: Outlines the cropped region that will be exported to disk.
  • Auto-Preview: Moving through the scrubber updates the detection in real time.

Clone this wiki locally