ADIL
ADIL-Flowchart.png

What is ADIL?
ADIL stands for ADIL Determines Image Lightness. It will read the raw RGB data saved from the camera and attempt to determine whether the image is of space (black or near-black) or of something interesting (earth, sun, etc.). If the image is of space, it would be very wasteful to spend time and power on encoding the image to JPEG format and transmitting it; ADIL attempts to prevent this.

How Does ADIL Work?
The main procedure involves determining the lightness of a pixel. This is done by treating the red, green and blue values separately, determining which value is highest, lowest and in between. Then lightness = (highest + lowest) / 2. This will return a value between 0 and 255, which can be rounded to the nearest integer. ADIL assumes that a lightness below 32 is likely to be a pixel showing either space or the dark side of earth. If the pixel being examined has a lightness above 32 then the value of the variable which holds the total image’s lightness is increased by 1. This threshold of 32 should be sufficient to cover for general image grain.

The image will have pixel dimensions 640x480, so it will contain 307,200 pixels. Examining each pixel is time consuming and unnecessary, so for the sake of binary simplicity, 255 pixels will be examined and the final value for the image’s lightness will be between 0 and 255. Dividing 307,200 by 255 and rounding up gives a value of 1205, so ADIL will only examine every 1205th pixel.

Strictly speaking, this does not represent the image’s lightness, but rather how many pixels (out of 255 chosen pixels) are above a certain threshold (in this case, a lightness of 32). However, this should still make it easy to detect which photos are worth transmitting and which are not.

Although ADIL should be able to accurately determine which images are worth transmitting, the actual decision of whether to transmit or not will be made by the ground station. This is to avoid the possibility of ADIL claiming that each image is useless and refusing to transmit any images at all. ADIL will simply let the ground station know the lightness value of each image, and the ground station will choose which image to be transmitted.

What Will ADIL Output?
Each image’s lightness will be approximated by an integer between 0 and 255. If a value of 0 is returned, the image is likely to be of black space. A value of less than 10 may suggest some visible stars or the moon. A value of around 100 may suggest that the sun and/or parts of the earth is visible. A value of 200 or more would strongly suggest a shot looking directly back down to earth.

Possible Improvements
Some images might be completely whited-out due to sun glare, and ADIL will be unhelpful in trying to distinguish between useful images of earth and whited-out images. ADIL may be improved to give a more accurate representation of image lightness, without using the threshold technique.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.