The NASA Near-earth Object program tracks asteroids that may collide with the Earth. Before there were digital cameras, astronomers would search for asteroids by taking two photographs of the sky in succession and then compare each point of light in the photographs to see if it moved. The assumption is that stars, which are far away, move slowly, and asteroids which are close, move quickly. With digital telescopes the process of finding asteroids in images of star fields can be automated. This allows astronomers to search more of the sky and find more asteroids in neighborhood of the Earth.
Write a program that can analyze two telescopic images of a star field to find asteroids. The names of the two image files should be specified as command line arguments. The program should modify both of the input images to draw red rectangle around a light area that is not present in the other image. Note, due to camera image sensor noise almost no two corresponding pixels in the two images will be the same. They will, however, be of a similar brightness. Assume that there is at most one asteroid in a pair of images.
You should test your program on small hand-generated image files first. Once it is working with with the test images you can test it on the large star field images star_field_1.ppm and star_field_2.ppm.
Submission: Submit your code as a zip file on the course Inquire site by 5PM on Friday December 7th.
The test data for the program should consist of four ppm files. The files should be created manually in a text editor so they should be fairly small. Most pixels in the two input images should be similar to the corresponding pixel in the other image, but not the same. In one of the input images there should be a couple of pixels that are bright and the corresponding pixels in the other image should be dark. The two output images should be nearly the same as the two input images. However, one of the input images should have a red rectangle around the unique bright area.
Submission: Submit your test data as a zip file on the course Inquire site by 9AM on Monday December 3rd.
Distance: Use the parallax phenomenon to compute how far away the asteroid is. Assume that a single pixel is equivalent to 1 arc-second and that the two images were takes simultaneously at distance of 1000 kilometers from each other.