The RAW Image FormatThe hardware implementation on FPGA requires raw pixel information. Therefore we have to convert a standard image format (such as JPEG, PNG, and BMP) to a raw image. In this format, we use 8 bits to represent a pixel, i.e, 00000000 represents a pixel which is completely black, while 11111111 represents a pixel which is completely white. The extracted image is represented as a 2-dimensional array of integer values ranging from 0 to 255 corresponding to the individual pixels of the image. For colour images the raw data requires three 8-bit data corresponding to each of the primary colours Red, Green and Blue and will have to be processed one by one in the FPGA. The source image is converted from encodings like JPEG,PNG using codes written in GNU C. BMP is a relatively raw format, but it is still converted to our plain text readable format after parsing the Bitmap Headers The file formatThe file is a plain text file (not binary, for readability) format used for our raw image format is as follows:Width Height Number of Colours(1 or 3) Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data .... . . . Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel Data Pixel DataPixel Data is a 3 digit integer < 255 if Number of Colours is 1 ie Monochrome or 3, 3 digit number < 255. Eg: 5x4 monochrome 5 4 1 168 168 168 183 183 168 168 168 183 183 168 168 168 183 183 168 168 168 183 1832x2 TriColour Image 2 2 3 168 168 168 183 183 200 168 168 168 183 183 200 Tags: Image Manipulation , BMP , JPEG , PNG , |