Mobile Phone Astrometry Explorer

Finds stars in a mobile phone night sky image using median-subtraction and peak-finding and compares to results from
Updated 17 Apr 2023

View License

Mobile phones use image registration and stacking to generate effective exposure times of several seconds, enabling remarkable night sky photos. This Live Script illustrates how to find hundreds (even thousands) of stars in a mobile phone image using median filtering and 2d peak-finding [1], examines star colors, identifies candidate visual binaries, shows how stars in mobile phone images may be identified using an astrometry service [2], and compares the results of MATLAB image processing and star finding to those from a professional service.
Students armed with mobile device cameras and this script can learn "hands-on" a bit about image processing as well as how to access a public astrometry service and an astronomical look-up service. Additionally, they will learn how to crack open a FITS file with MATLAB. Hopefully, they may appreciate better the technologies behind mobile phone cameras, sky-watching apps, and research telescopes.
'Try this' suggestions and 'Challenges' are included for further exploration.
Visit File Exchange for additional physics and astronomy tutorials.

Cite As

Duncan Carlsmith (2024). Mobile Phone Astrometry Explorer (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Version Published Release Notes

Forgot to update file.


Added clustering of peaks found to more accurately represent count of star candidates.


Image not showing


Added background subtraction to lower the star search threshold, a look at star color, how to extract information from FITS files, and (favorable) comparisons of this simple star identification algorithm to the professional one.


Acknowledgment added in the submission. I blanked it