This DIY System Uses Computer Vision to Identify Stars
Daniel Hingston developed a system that uses OpenCV to recognize the stars for you.
While there are an almost unfathomable number of stars in the universe — something like 1,000,000,000,000,000,000,000,000 total (there are 24 zeros following that one) — only a few thousand are visible from any single point on Earth at any specific time. How many you can actually see on a particular night depends on a lot of factors, but astronomers estimate that it probably isn’t any more than 5,000 even when conditions are ideal. But that is still a lot of stars, and identifying any more than a few that are in constellations is difficult. That why Daniel Hingston developed a system that uses computer vision to identify the stars for you.
The amateur astronomers reading this are already well aware that there is software you can use to located or identify stars in the night sky, and you can even get smartphone apps to do that. But those work by determining your exact location and the direction that your telescope or phone is pointing, which can then be used along with the current day and time in order to calculate what you’re pointing at. Hingston’s system works by looking at the stars themselves, which means it can work in near real time or with older photos where the time and location may not even be known.
Hingston’s system, which is described in his Instructables tutorial and available for you to use on GitHub, is built on OpenCV. That’s open source computer vision software that can analyze images or videos with various kinds of machine learning algorithms. In this case, it’s using Haar cascades to identify the stars. Stellarium astronomy software was used to generate simulated images for training. Other than brightness and slight color variations, all stars look the same from the Earth, so this actually looks at the patterns of bright stars in the image. While stars move across the sky, their relative positions stay the same. That makes this method fairly reliable, though Hingston points out that there are small problems. Those are mostly caused by the angle of the picture and issues with the pixilation in the photos, both of which can potentially be addressed.