John Rousseau - Senior Capstone Experience



Introduction

Resume

Career Plan

CS Philosophy

Previous Work

Journal

Presentation

Source Code

 

 

 

 

 

 

 

 

Previous Work

Research

     The first part of the project could be, and was, completed without the need for any reseach. The only pre requirement was enough Visual Basic knowedlge and the time to learn and become comfortable with the SDK. Once a working knowldege of the SDK was obtained, a small program could be written in Visual Basic to test the camera speed and operation. The first program that I had working was a simple program that turned the camera on, and began saving snapshots sequentailly. It had the ability of storing over 2 billion snapshots! The calibration settings of the camera had to be entered manually based on the current situation. The first version of the software also converted the picture to a 1-bit bitmap before saving. The images are 320x240 pixels, creating about a 10KB file. See the software page for downloadable code.

     After I had gathered multiple sets of data that I was happy with, I began to research the BMP file format. This was the most practical format for our project since each pixel's data was stored sperately and uniquely. There were no compression algorithms in use like the JPEG file format. Plus, the Logitech SDK already supported the file format.

THE BMP FILE FORMAT:
    The BMP File structure has four disctinct sections. The first section, the BMP File Header, stores information about the bitmap like "BM" for Bitmap, size of the file, offset bits to image data, and more. The second structure is the BMP Info Header. This structure stores information about the actual image file like bit depth, width, height, and more. The third structure is important for all bitmaps that have a bit depth of less than 24bit. This structer is called the RGBQuad. This stores all of the colors used in the bitmap. Since 24bit can contain any combination of colors, there is no need to store the Quad since it would have to contain all of the colors.



     It would be redundant since the color would have to be redefined each time it was used. Think of a crayon box. If you only had 16 crayons to use, you would have to distinguish which crayon you used to color a particular part of the image. The sixteen crayons you have would have to be stored since there are more crayons that exsist than 16. If you had a crayon for every possible color, you would have to define that in your picture anyway, so there would be no need to store all possible colors.

     The fourth and final structure of the bitmap file is called the pixel data. It stores the pixel data for each pixel of the image. A peculiarity of bitmaps is that the picture is stored from the bottom up, left to right.

     If you simple read the pixel data, it would produce an inverted image. For this reason, bitmaps must be read "upside-down".

 

 

 

REFERENCES:

An in-depth BMP file format report

More about the BMP File

Notes about Compression - Broken Link

Nice and Visual w/Code

Good CS Based Example