AstroTech: Developing asteroid detection technology for the CSA.

Mustafa Khan
6 min readDec 25, 2019

From the 18th to the 20th of October, 2019, programmers, students, designers, engineers and entrepreneurs from all over the world got together to create computer applications for the CSA and NASA’s Space Apps Challenge. My team and I took on the NEOSSsat Challenge and were finalists in this international competition!

The NEOSSat, also known as Canada’s Sentinel in the Sky

The NEOSSat is a dual-mission microsatellite designed to detect potentially hazardous Earth-orbit-crossing asteroids and track objects that reside in deep space.

What exactly was the NEOSSat Challenge?

The CSA needed a solution to effectively search the NEOSSat database and identify images based on various criteria. The CSA also needed a solution to locate asteroids or other types of objects on images captured by the NEOSSat. In other words, the task was to explore asteroid data, find solutions to optimize their use as well as consider how to visualize this data.

What was our solution?

The landing page of AstroTech’s website.

Our solution was AstroTech, a platform with asteroid detection and visualization capabilities. The video shown below explains our solution in detail:

A video explaining what AstroTech is and how it works.

AstroTech employs Edge Segmentation and False Colour Time-lapses in order to detect and effectively visualize asteroids in space. Let’s understand what each of these detection and visualization techniques are.

An example of segmentation.

Firstly, segmentation is the separation of one or more regions or objects in an image based on a particular discontinuity. The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze.

Various methods of image segmentation.

There are many methods of segmentation. For our solution, we employed Open CV’s Canny edge detection, a technique to extract useful structural information from different vision objects and dramatically reduce the amount of data to be processed. As I will explain further, this form of preprocessing was done as it allowed us to effectively detect moving astronomical bodies in space.

The Canny edge detector is a renowned edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986. The process of the Canny edge detection algorithm can be broken down into the following steps:

An explanation of how the canny edge detector works.

We implemented the Canny edge detection algorithm on the images the NEOSSat took.

Applying the Canny Edge Detection Filter to NEOSSat images.
Our program in Python that applies the Canny edge detection filter and identifies changes in the NEOSSat images from one frame to the next.

Now that we had implemented an edge detection filter we were able to use this new, filtered image to detect the movement of astronomical bodies. The NEOSSat takes images at set intervals of time. Moving objects in space appear in different locations in each new image taken by the NEOSSat. On the other hand, stars and objects in the distance appear stationary. Upon realizing this, we wrote a program that tracked changes in the frame of each image that the NEOSSat took. By doing so, we were able to identify which objects moved and which objects didn’t move. An example of this can be seen below:

By tracking these changes over the course of several, consecutive images we start to see a better picture of what is and isn’t moving. This is a visual of only those objects that have moved in frame:

We realized that this would not be sufficient to understand what is actually happening in space! So, we decided to implement a second visualization technique: False Colour Time-lapses in order to make it easier to understand NEOSSat data. False colour was first used when radio astronomers were generating images of sources. They would essentially get images that had different shades of grey – ranging from black to pure white. Different shades of grey were representative of a radio emission with a particular intensity. Now, when looking at a photograph, the human eye can only distinguish about 16 shades of grey from one another. However, by using a range of false colours we can often bring out details in an image that we might otherwise miss. The steps below detail how we went about not just applying a false colour but also creating a time lapse of the NEOSSat images.

We began by writing a program that accessed the NEOSSat database:

A function that returned images taken by the NEOSSat.

After creating a function that could return the images (and the metadata associated with each image) that the NEOSSat had taken, the next step was to apply a colour map to the images. We decided to select the viridis colourmap (shown on left), a perceptually uniform colourmap that makes looking at space easy on the human eye.

Our program applying the viridis colormap onto the NEOSSat images.

The result of applying the viridis colourmap to the NEOSSat images was a much more effective visualization of the given data set. The following is an example of a false colour time lapse generated using our program:

The only thing left was to make all this accessible to the scientific community, ordinary citizens, asteroid gazers and anyone else interested in NEOSSat data! To do that I created a web interface: where our program and the NEOSSat visualizations are stored:

Screenshots from AstroTech’s website.

So what are the key takeaways from this project?

Firstly, I gained a deeper understanding of how segmentation and edge detection works. While creating AstroTech, I read a paper titled “Which Edges Matter?” that further explained when and where different segmentation techniques are most effectively utilized. The applications of the preprocessing my team and I did here can also be applied to a range of machine learning and computer vision projects as well.

– Next, I realized that the data provided by the CSA, though it was extensive, had its limitations and shortcomings as well. When given such a situation in the real world the effectiveness of one’s preprocessing significantly impacts what can be done with the data later on.

We live in an age with large amount of data! It is highly important to find visualization techniques for such data to be understood. Only through techniques such as edge segmentation, the generation of false colour time lapses, and the creation of an easy to use user interface, among other techniques can the data we collect be of any use.

– Finally, I also think it is worth considering unconventional methods of data processing and visualization in such problem areas. For example, there is the potential to use machine learning to do the classification of bodies in space and augmented reality to create a more intuitive visualization of NEOSSat data. Of course, as is the case with most things, we operate under constrained time, knowledge and resources. Nevertheless, I believe it is important to innovate and think outside the confines of what is typically done in any field for that is how progress is achieved!

Thanks for reading and be sure to check out my other work as well.

Github for this project.

Personal website.