The software implementation consists of converting a known standard format to raw pixel data, sending the pixels to FPGA via the Parallel port, retrieving the raw pixels from FPGA and finally converting it back to a standard format.
The process of image extraction, transmission and reception of the extracted data and converting back the processed data into the image is done using softwares that run on the GNU/Linux platform. Using GNU/Linux has the advantage of being able to access the computer parallel port both at the user level and at a higher or kernel level. This is not the case with other operating systems like Windows. A problem that plagues Windows NT/2000/XP, is it's strict control over I/O ports. Unlike Windows 95 & 98, Windows NT/2000/XP will cause an exception (Privileged Instruction) if an attempt is made to access an I/O port that your program is not privileged to access.
In GNU/Linux environment, for a user-space program there are two options: use PPDEV generic parallel port driver via ioctl functions, or use direct low level port IO through the inb/outb family of macros provided with the GNU C library. The latter option was used.
The image manipulation is done using programs written in C (with libraries libjpeg,libpng). The software were compiled and executed on Debian based Ubuntu and Fedora.
Conversion of the various image formats are done with the help of the imtools program written for linux in GNU C, for more details check out
the imtools section. The imtools program can convert formats to and from raw format and other common formats, in addition convert images from jpeg to bmp, bmp to jpeg in linux using the libjpeg library. The program can also display images on the screen using OpenGL library.
The software can also do a software edge detection on sobel, prewitt or roberts or any custom edge detection algorithm by specifying its own custom masks.
./imtools source.(jpg|png|bmp) COPY destination.txt
./imtools images/source.jpg COPY images/destination.txt