Asteroid Light Curve Predictor by Keelhaul Labs

High-Level Project Summary

We developed a two-stage asteroid light curve predictor with the use of the animation software Blender and an image processing algorithm to calculate the intensity of the light reflected from a trojan asteroid.Through the use of Blender, 3D rendering and animations, we were able to produce accurate representations of the rotation, shape and lighting conditions that asteroids face in deep space. This video was then fed to our image processing algorithm, which outputted a light curve prediction for these conditions. This information was then sent to an API and displayed through out mobile app Light Curve, for anyone to see.

Detailed Project Description

This project was developed as a multistage app for the prediction of light curves generated by trojan asteroids floating in deep space.

It all starts with the acquisition of the 3D model of the desired asteroid. This is then fed into a Blender scene, where parameters such as axis of rotation, rotational speed, light intensity, surface texture and many others are inputted. Once everything is set correctly, an animation is rendered, creating an MP4 video of the rotating asteroid.

This asteroid is then sent to an image processing algorithm using FastAPI and Python. Here, the video is broken down into frames and each frame is analyzed, first, it is converted to grayscale, then the algorithm performs a polarization on the pixels, labeling them either bright or dim and then performing an intensity count on all the bright pixels. With this, the algorithm calculates how bright each frame of the animation is, which is stored in an array. For this analysis, libraries such as numpy and OpenCV were used, as they helped keep the code short and simple.

Once the whole video was processed, it was transmitted through a JSON file and through FastAPI to our mobile app, where the result could be visualized. In here, users can upload their own animations, have them sent to the image processing algorithm and have a polarized video and a light curve in return. Like this, everything is integrated through the app, where anyone around the world can virtually upload any video of any kind and a light curve for it will be calculated.

All in all, this project was lots of fun to develop and produce, being able to partner up with so many young and talented minds who seek to better understand the world we live in.

Space Agency Data

All the information used to validate and test this app was provided by NASA through the Resources tab of the Challenge. Throughout the project, these resources proved to be crucial in the advancement and validation of our progress. The use of multiple 3D models also allowed us to play around with our app and generate multiple light curve plots from a variety of different asteroids.

Regarding other sources of data, mainly open repositories and forums were consulted in order to address all of our doubts and necessities.

Hackathon Journey

The hackathon journey was complicated to say the least, with a team of 6 people, organizing, meeting fast deadlines, and making sure everyone was on the same page was the greatest challenge. In order to deal with this, we split into smaller teams, each one with a responsible in charge of reporting to the other teams what was going on, and each team focusing on a different part of our multistage journey. Throughout these 2 days we laughed and stressed together, helped each other out and managed to produce something we are proud of.

References

Our resources:




  • NASA’S Space Apps Challenge Resources.
  • B.S.B.P.I.D. (2007). Brightness Calculation in Digital Image Processing. Society for Imaging Science and Technology. Published. https://doi.org/10.2352/ISSN.2169-4672.2007.1.0.10


Our tools:




  • Python: python-math, numpy, matplotlib, tk, shapely, fastapi.
  • GitHub.
  • Blender.
  • Google Slides, Docs.
  • Microsoft 3D Viewer.

Tags

#light-curves, #asteroids, #trojans, #3D-Models, #python