- Tue Nov 18, 2008 1:13 pm
#59359
Writing new structs and stuff for the AVR32 now (AP7000) but I am not sure I like it as it needs external memory.
Where electronics enthusiasts find answers.
16bit Bitmap Header for CIF (352x288) Image?
42 4D 42 18 03 00 00 00
00 FF 42 00 00 00 28 00
00 00 60 01 00 00 20 01
00 00 01 00 10 00 03 00
00 00 00 18 03 00 15 17
00 00 15 17 00 00 00 00
00 00 00 00 00 00
Do you know what could be causing the noise at the top? These pixels come from the data near the end of the transmission from the camera)?What framerate are you using?
struct BMP_HEADER_s {
union {
struct {
unsigned char B; // To contain "BM"
unsigned char M;
unsigned long SIZE; // Size of BMP file in bytes
unsigned int r1; //
unsigned int r2; //
unsigned long DOFFSET; // Offset to start of image data
unsigned long DIB_SIZE; // Size of this header (40)
signed long WIDTH; //
signed long HEIGHT; //
unsigned int COLORPLANES;//
unsigned int BPP; // Bits pr pixel (16 or 32 for bitfield)
unsigned long COMPRESSION;// Compression method. Bitfield=3
unsigned long DATASIZE; // Size of raw image data
signed long HREZ; // Horizontal rez in pixels pr meter
signed long VREZ; // Vertical rez in pixels pr meter
unsigned long PCOLORS; // Number of colors in color palette
unsigned long IMPCOLORS; // Number of important colors used
unsigned long RMASK; // Red bitfield mask
unsigned long GMASK; // Green bitfield mask
unsigned long BMASK; // Blue bitfield mask
};
unsigned char DATA[66]; // Access to all data as a char array for sending...
};
};
bmp.B = 'B';
bmp.M = 'M';
bmp.SIZE = (unsigned long)BMP_HEADERSIZE + (unsigned long)2*Xrez*Yrez; // BMP_HEADERSIZE = 66 !!!
bmp.DOFFSET = BMP_HEADERSIZE;
bmp.DIB_SIZE = 40; // Use MS header
bmp.WIDTH = Xrez;
bmp.HEIGHT = Yrez;
bmp.COLORPLANES = 1;
bmp.BPP = 16;
bmp.COMPRESSION = BMP_BI_BITFIELD; // BMP_BI_BITFIELD = 3 !!!
bmp.DATASIZE = (unsigned long)2*Xrez*Yrez;
bmp.HREZ = 5909; // Approx 150 dpi
bmp.VREZ = 5909; // Approx 150 dpi
bmp.PCOLORS = 0;
bmp.IMPCOLORS = 0;
bmp.BMASK = 0x1F;
bmp.GMASK = 0x7E0;
bmp.RMASK = 0xF800;
Color Masks (corrected)
1F 00 00 00 E0 07 00 00 00 F8 00 00