# Star Detector & FWHM Meter > Find stars in an astro image and measure centroids, FWHM, HFR and roundness. Upload a FITS, PNG, TIFF or JPEG frame to detect stars above a noise threshold, measure sub-pixel centroids, full width at half maximum, half-flux radius and roundness, and download a star list CSV and an overlay PNG. Useful for focusing, judging seeing and tracking, and checking frames before stacking. Lumina Astro Lab runs the same detector locally. Part of usefulweb.site (https://usefulweb.site/). Part of [Lumina](https://lumina.usefulweb.site/) (ownerApp: lumina). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminastardetector.usefulweb.site/ (interactive tool at https://luminastardetector.usefulweb.site/tool) - JSON API: POST https://luminastardetector.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://luminastardetector.usefulweb.site/api/v1/tool) - OpenAPI: https://luminastardetector.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://luminastardetector.usefulweb.site/mcp - tool `lumina_star_detector` ## Inputs - image (file, required): Image (FITS, PNG, TIFF or JPEG; up to 16 MB and 1 megapixel) - threshold (number): Detection threshold (σ above background) - minArea (integer): Minimum star area (pixels) - maxStars (integer): Stars to list (brightest first) - bayer (select): Bayer pattern of raw one-plane data - stretch (select): Preview stretch ## Method - Background: the image is split into tiles of about 64 pixels; each tile gets a sigma-clipped median (κ = 3). The tile grid is median-filtered and interpolated bilinearly. Noise σ is the median sigma-clipped standard deviation of the background-subtracted tiles. - Detection: the background-subtracted image is smoothed with a 3 × 3 binomial kernel; pixels above threshold × σ of the smoothed noise form 8-connected components. Components smaller than the minimum area, touching the border or narrower than 0.9 pixel FWHM (hot pixels, cosmic rays) are rejected. Overlapping stars are not separated. - Measurement: adaptive Gaussian-weighted moments (Bernstein & Jarvis 2002) give the centroid and the covariance; FWHM = 2.3548 × σ (geometric mean of the axes, corrected for pixel integration), roundness = minor/major axis. HFR is the radius enclosing half of the background-subtracted flux in an aperture of 3.5 σ. On synthetic Gaussian stars with signal-to-noise above 50, centroids are within 0.1 pixel. - Colour images are measured on the mean of R, G and B; raw one-plane frames with a Bayer pattern are debayered (bilinear) first. Coordinates are 0-based with pixel centres at whole numbers and y pointing down; the CSV also lists 1-based values.