Sharp DIGITAL CAMERA Manuale Utente

Pagina di 33
sharpVISION™ Digital Camera 
sharpVISION
 User Manual
 
33 
 
 
typedef struct _RCIMG_HEADER 
 { 
 
 
unsigned long nSize;   
 
 
// size of this header 
 
 
unsigned long nPages; 
   // 
number 
of 
pages/frames 
 
 
unsigned long nWidth; 
   // 
image 
width 
 
 
unsigned long nHeight;   
 
// image height 
 
 
unsigned long nBPP;   
 
 
// bits per pixel 
 
 
unsigned long userData[64]; 
 
// user data array 
 
} RCIMG_HEADER, *PRCIMG_HEADER; 
 
 
Members 
nSize: size of the structure in bytes. It should be 84. 
nPages: number of images contained in the file 
nWidth: width of each image in pixels. 
nHeight: height of each image in pixels. 
nBPP: number of bits per pixels (8, 10 or12) 
userData: an array of 64 unsigned long that may be user by the user to store other 
information. 
 
8.1.9.3. Data 
arrays 
The image header is followed by the images data. Images are stored contiguously in 
compressed format. The first four bytes contains the size of the compressed buffer, followed 
by image data. 
Data compression is done using ZLIB library version 1.1.4, which is free and available for 
download at the URL 
The compression algorithm used by ZLIB is a variation of LZ77 (Lempel-Ziv 1977). It finds 
duplicated strings in the input data.  The second occurrence of a string is replaced by a 
pointer to the previous string, in the form of a pair (distance, length).  Distances are limited to 
32K bytes, and lengths are limited to 258 bytes. When a string does not occur anywhere in 
the previous 32K bytes, it is emitted as a sequence of literal bytes. 
8.1.10. 
Note on 16 bit grayscale formats 
10-bit images acquired from the camera may be saved in different 16 bit formats. These 
formats include TIF, PNG, MPT, MRF and MCF. Since 16 bit grayscale format is not a 
standard, not all the applications for image processing may correctly display the saved 
images.