1. reading the image file list and covert the color RGB image file to a 8bit grey scale image.
2. cropping a new box around the face bounding boxes. The new cropping area is no bigger than 192*192.
3. save the new cropping box as a rid file.
4. rid file : 4 bytes width, 4 bytes height, row-wise binary pixel data
please refer to python tutorial :
http://www.tutorialspoint.com/python/index.htm