User manual
Small Vision System User Manual 57
5.7 Host file functions
unsigned char *svsReadFile(char *name, unsigned char *buffer,
int *height, int *width, int *num)
This function reads from the SSI file given by the string name into the unsigned
character buffer specified in buffer. If buffer is NULL, then a new one will be created,
and is the return value of the function. The arguments height, width, and num are all
pointers to integers where the size of the images, along with the number of stereo pairs will
be stored.
unsigned char *svsReadFile2BMP(char *name, unsigned char *buffer,
int *height, int *width)
This function reads from the two BMP files given by the string name into the unsigned
character buffer specified in buffer. If buffer is NULL, then a new one will be created,
and is the return value of the function. The two images are stored consecutively in the
buffer. The arguments height and width are pointers to integers where the size of the
images will be stored.
By convention, stereo pairs are stored as two BMP files, with names XXX-L.bmp and
XXX-R.bmp. svsReadFile2BMP will accept either the base name XXX or either full name,
and retrieve both files.
int svsReadFileBMP(char *name, unsigned char *buffer,
int *height, int *width)
This function reads from the BMP file given by the string name into the unsigned
character buffer specified in buffer. If buffer is NULL, then a new one will be created,
and is the return value of the function. The arguments height and width are pointers to
integers where the size of the images will be stored.
int svsReadParamFile(char *fname, svsSP *sp)
Reads in a parameter file with path fname and stores the values in the structure sp. If
sp is NULL, the values are stored in the global svsParams. For a description of the parameter
file format, see Section 2.6.
int svsWriteParamFile(char *fname, svsSP *sp)
Saves the parameter settings in sp into the file with path fname.










