Now that we had a good solution to process the images from our scanned notes, Professor Gleicher wanted to devise a method that would automate the entire process from input images to web site creation using the final output images. This was accomplished in several steps.
The scanner we used in the vision lab is an HP scanner with an auto document feeder, and, subsequently, our solution has been tailored to best suit our needs. Although, the code can easily be modified to suit any setup.
Our implementation has been set up to take tif files in 150 DPI format as scanned input images, apply our algorithms, and produce a web site with the final images in gif format at 72 DPI, which puts them in approximately 8 1/2 by 11 inch format. Since the HP scanner's automated features scan not only the image, but the surrounding scannable areas as well, our image was extracted to a ~1275 by ~2100 pixel image by appropriately removing unnecessary regions of the image.
Also, when using the auto document feeder, the HP software produces files numbered as follows:
initial_name.tif, initial_name1.tif, initial_name2.tif, ....., intial_name11.tif, .....
The scripting interface to our Note Python class handles renaming of files, but the input image file names must include this type of numbering system or a numbering system such as:
initial_name01.tif, initial_name02.tif, ....., initial_name11.tif, .....
At the very least, they must be alphabetical to sort correctly when outputting the web site content. Also, the current implementation will only handle up to 99 or 100 images, depending on the numbering system used above. This should be more than enough for most uses.
Now that we have sorted input images with irrelevant edges removed from our scanned image, we can apply our image processing algorithms, resize the image using our BSpline filter, and output the final images and corresponding web pages.
One of the few down sides to our solution, is that PIL does not output compressed gif files, since CompuServe's compression algorithm is patented. This is easily fixed using a program such as Paint Shop Pro which can quickly compress them and resave them using their batch processing tool. The average output image after processing, and storing in a compressed gif format was 30 to 40 KB.