Language / Dil: English (Default) | TΓΌrkΓ§e DokΓΌmantasyon (TR)
Note
Project Scope:
AstroCounter is an open-source desktop application designed for astrophotography analysis, full-resolution photometric source extraction, multi-panel mosaic stitching, blind geometric plate solving, 3D celestial sphere visualization, and real-time Stellarium synchronization. It ships with a trained neural network model (models/astro_yolo11n.onnx) fine-tuned on Sloan Digital Sky Survey (SDSS DR16) astronomical cutouts and an embedded J2000 reference star and deep-sky catalog.
High-resolution astrophotography frames and multi-panel sky mosaics frequently exceed 24 MP to 100 MP+ and exhibit extreme dynamic range variationsβfrom severely underexposed linear stacks to frames affected by urban sky glow or lossy JPEG compression. Standard object detection pipelines downscale full frames into small input tensors, causing faint stellar point sources and compact deep-sky objects to vanish.
AstroCounter v1.3.0 integrates four core astrophotography processing layers into a modern, minimalist Windows interface with movable in-app floating windows:
- Multi-Engine Source Detection (
Hybrid Fusion,Photometry,DirectML): Combines analytical point-spread-function signal-to-noise ratio photometry (DAOStarFinder standard) with Slicing Aided Hyper Inference (SAHI) powered by a hardware-acceleratedYOLO11n ONNXmodel via Windows DirectML. - Format-Aware Per-Photo Auto-Confidence & Simultaneous Multi-Photo Light Processing: Automatically computes optimal noise knee-point thresholds per photograph in the backgroundβapplying stricter filtering on lossy formats (
.jpg/.jpeg) to suppress compression artifacts while preserving faint2Οβ3Οstructures on lossless scientific formats (.tiff,.fits,.png). Display & Light adjustments (MTF Auto-Balance, Brightness, Exposure, Contrast) apply in real time across all selected photos in both 2D and 3D views. - Blind Geometric Plate Solving & Multi-Tile Mosaic Alignment: Extracts sub-pixel stellar centroids, matches scale- and rotation-invariant geometric invariants against an embedded J2000 catalog using RANSAC, bridges adjacent panels via pairwise star-correspondence homography, and deduplicates 100,000+ stars across overlapping mosaic frames in spherical sky coordinates (
RA/Dec). - 2D Infinite Sky Canvas, 3D Planetarium Dome & 2-Way Stellarium Sync: Provides unconstrained 2D infinite canvas panning, an interactive 360Β° 3D celestial dome, bidirectional real-time camera synchronization with Stellarium in both 2D and 3D modes, and 360Β° Γ 180Β° equirectangular panoramic exporting.
flowchart TD
A["Input Astrophotographs (FITS / TIFF / PNG / JPG / BMP)"] --> B["Radiometric Analysis & Format-Aware Noise Knee-Point"]
B --> C{"Exposure & Format State"}
C -->|Underexposed| D["Astronomical MTF Stretch"]
C -->|Overexposed| E["Bilinear Sky-Glow Subtraction"]
C -->|Lossy vs Lossless| F["Per-Photo Auto-Confidence Calibration"]
D --> G["Normalized Multi-Panel Image Buffers"]
E --> G
F --> G
G --> H["Photometric PSF / SNR Engine"]
G --> I["SAHI 640x640 Tiling + DirectML (YOLO11n ONNX)"]
G --> J["Integral-Image Bright Star Extractor"]
H --> K["Spherical RA/Dec Deduplication & Interactive Filtering"]
I --> K
J --> L["RANSAC Catalog Plate Solver + Pairwise Mosaic Bridging"]
L --> M["Gnomonic WCS Solution (RA, Dec, Scale, Rotation)"]
M --> N["2D Infinite Canvas & 3D Celestial Sphere Projection"]
M <--> O["Two-Way 1:1 Stellarium HTTP Synchronization (2D & 3D)"]
- In-Window Draggable Tool Panels: All utility drawersβView & Layers (
π·οΈ), Display & Light (βοΈ), Auto-Confidence (β‘), Mosaic Tiles Management (πΌοΈ), Advanced Export (π), and User Guide & Help Center (β)βare movable floating windows that can be dragged anywhere inside the workspace. - Multi-Photo Selection & Clean Borderless Rendering:
- Click photo cards in the Photos panel, use All (
β), or holdCtrl/Shiftwhile double-clicking photos on the 2D/3D canvas to select multiple panels simultaneously. - Unselected photos render cleanly with no artificial outline border; only selected photos display an active cyan highlight border.
- Double-clicking empty space in either 2D or 3D immediately clears all active selections.
- Click photo cards in the Photos panel, use All (
- Drag-and-Drop Layer Reordering: Reorder overlapping mosaic panels by dragging and dropping photo cards directly inside the Photos drawer or using quick layer buttons, paired with cosine S-curve feathered alpha blending.
- Real-Time Multi-Stage Backend Telemetry: The status bar reports exact background operations stage by stage (
[Stage 1/3 - Astrometry],[Stage 2/3 - Mosaic Alignment],[Stage 3/3 - Full-Resolution Star Counting]) so heavy multi-panel analyses remain responsive and transparent.
- Toolbar Engine Selector & AI Badge: Switch seamlessly between Hybrid Fusion, Photometry, and DirectML modes, backed by the embedded
AI Model: YOLO11n ONNX(models/astro_yolo11n.onnx) trained on real Sloan Digital Sky Survey (SDSS DR16) celestial cutouts (stars, galaxies, nebulae, and transient/satellite artifacts). - Format-Aware Per-Photo Auto-Confidence: Automatically calculates each photo's background noise knee-point upon import, adjusts sensitivity according to file format (lossy JPEG vs. lossless TIFF/FITS/PNG), and provides individual per-photo confidence sliders alongside global presets.
- 2D Region-of-Interest (ROI) Scan Tools: Draw rectangular or polygonal Include (
Scan only) and Exclude masks directly on the 2D canvas to isolate specific nebulae or mask out landscape foregrounds.
-
Non-Linear Astronomical MTF & Manual Grading: Adjust Opacity, Brightness, Exposure (Gamma), Contrast, and Auto Exposure & Color Balance (MTF) in real time:
$$\text{MTF}(t, m) = \frac{(m - 1)t}{(2m - 1)t - m}$$ -
Multi-Selection Synchronization: Adjustments made in the Display & Light (
βοΈ) panel apply simultaneously to all currently selected photos (or all loaded photos if none are explicitly selected) across both the 2D View and the 3D Celestial Dome.
- Unconstrained 2D Infinite Panning: Pan freely in any direction beyond photograph edges on the 2D canvas without hitting scroll boundaries, and zoom smoothly around the cursor from
5%to2000%. - Two-Way 1:1 Stellarium Synchronization (2D & 3D):
- Clicking Live Sync: Connect automatically connects to (or launches) Stellarium with its HTTP Remote Control service on port
8090. - Panning or zooming in either AstroCounter's 2D View or 3D Celestial Dome updates Stellarium's sky position and FOV in real time, and steering Stellarium's camera updates AstroCounter synchronously.
- Clicking Live Sync: Connect automatically connects to (or launches) Stellarium with its HTTP Remote Control service on port
- 2D Mosaic & 360Β° Equirectangular Panoramic Export: Export either the 2D Canvas / Mosaic or a full 360Β° Γ 180Β° Equirectangular Panoramic Sky Map (
1xor2x Super-Res 4K) inPNG,Lossless TIFF,JPG,CSV, orJSONformats with customizable overlay layers.
Sub-pixel stellar centroid extraction across signal-to-noise confidence tiers (>10Ο, 5-10Ο, 3-5Ο) with format-aware per-photo Auto-Confidence controls and drag-and-drop mosaic layer management.

Interactive 3D celestial sphere projection with Hipparcos reference stars, constellation lines, and real-time multi-photo brightness, gamma exposure, contrast, and MTF auto-balance adjustments.

Automatic scanning of embedded celestial catalogs filtered strictly to objects inside the camera's field of view, paired with the draggable View & Layers floating window.

Gnomonic tangent-plane World Coordinate System (WCS) solution projecting curved Right Ascension and Declination lines onto the 2D infinite canvas alongside the bilingual User Guide & Help Center (β).

Export annotated 2D mosaics or 360Β° Γ 180Β° equirectangular panoramic sky maps in PNG, Lossless TIFF, JPG, CSV, or JSON formats at 1x or 2x (4K) resolution.

To use two-way sky synchronization in 2D and 3D views, install the Stellarium desktop application on your system.
- Official Website: https://stellarium.org/
- Direct Windows 64-bit Installer (GitHub Releases): https://github.com/Stellarium/stellarium/releases/latest
If Stellarium is installed in its default directory (C:\Program Files\Stellarium), no manual configuration is required:
- Launch AstroCounter and click Live Sync: Connect on the top toolbar.
- AstroCounter automatically starts Stellarium in windowed mode with the HTTP Remote Control endpoint enabled on port
8090and establishes a live two-way connection.
- Extract the
AstroCounter-v1.3.0-Portabledirectory. - Run
AstroCounter.UI.exedirectly on Windows 10/11 x64. No Python, CUDA, or separate .NET runtime installation is required.
Requirements: Windows 10/11 x64 and .NET 10.0 SDK.
# Clone the repository
git clone https://github.com/ghostkronos/AstroCounter.git
cd AstroCounter
# Run the automated xUnit test suite
dotnet test AstroCounter.sln -c Release
# Launch the application
dotnet run --project src/AstroCounter.UI/AstroCounter.UI.csproj -c ReleaseTo build a self-contained portable release:
dotnet publish src/AstroCounter.UI/AstroCounter.UI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true -o ../AstroCounter-v1.3.0-PortableAstroCounter includes an automated dataset builder and training script (scripts/train_real_astro_dataset.py) that downloads real astronomical survey cutouts from the Sloan Digital Sky Survey (SDSS DR16 SkyServer) and fine-tunes models/astro_yolo11n.onnx:
pip install ultralytics onnx onnxruntime requests pillow numpy
python scripts/train_real_astro_dataset.pyAstroCounter/
βββ Directory.Build.props # Deterministic build configuration
βββ AstroCounter.sln # Solution file
βββ assets/ # UI logos, icons, sample images, and documentation screenshots
β βββ screenshots/ # v1.3.0 interface preview screenshots
βββ models/
β βββ astro_yolo11n.onnx # SDSS DR16 fine-tuned YOLO11n ONNX model
βββ scripts/
β βββ train_real_astro_dataset.py # SDSS DR16 real astronomical dataset builder & YOLO11 trainer
βββ src/
β βββ AstroCounter.Core/ # Core library (Photometry, SAHI, WCS, Mosaic, Stellarium API)
β β βββ Astrometry/ # RANSAC star-pattern solver, pairwise mosaic solver, WCS, catalog
β β βββ Export/ # 2D Mosaic, 360Β° Equirectangular Panorama, CSV & JSON exporters
β β βββ Inference/ # DirectML ONNX and photometric detection engines
β β βββ Models/ # Data contracts and ROI geometry
β β βββ Processing/ # FITS/TIFF decoders, MTF auto-brightness, SAHI tiler
β β βββ Stellarium/ # Stellarium HTTP client and windowed launcher
β βββ AstroCounter.UI/ # WPF desktop interface (MVVM, bilingual EN/TR, 2D & 3D Dome)
β βββ AstroCounter.Tests/ # xUnit automated test suite (108 tests)
βββ README.md # English documentation (Default)
βββ README.tr.md # Turkish documentation
This project is licensed under the MIT License. See the LICENSE file for details.