This page contains hints and help for the project.

1. code for reading a binary file.

2. The image files are contained in five files in my public directory: /home/radon1/rth/public.They are called page1.raw through page5.raw and are in order of complexity. I would be happy if your program manages to find the zones for the first two (page1.raw and page2.raw). The others are of increasing complexity, especially the last one, page5.raw. DO NOT COPY THESE FILES TO YOUR OWN DIRECTORY SPACE. Each one is 8Mb, making a total of 40Mb, which is too large for your space quota. Your program only needs to read the files and process the image in main memory, and I have given you access to the files in my own directory.

3. Each file is an image 2560 pixels wide by 3328 pixels long. You can use these numbers in your program. Each pixel is stored as one byte (use the char type) with one of two values: 0 means a black pixel and 255 (or -1, as a signed byte) means a white pixel.

4. I have placed small versions of each file in GIF format in the same directory (/home/radon1/rth/public) so that you can view the file on-line. They can be viewed with either xv, or with StarOffice, or by clicking below:

page 1, page 2, page 3, page 4, page 5

5. You will need two or three classes for this project to make good use of C++. There should be a class that represents the raw image itself. This is essentially a two-dimensional array of unsigned characters (8 bit integers). A second can represent the histograms used to count pixels. This contains a single dimensioned array of integers. You may also want to use a class to represent each of the zones located by your program. If you start with these classes, and think through the task sequence for the project, you will be able to add appropriate methods to the classes. One sequence that will work is: