Using camera definitions in your own application

mvCAM3, mvCAM4, mvDELTA, mvGAMMA-G, mvSIGMA-SLC, mvSIGMA-SLG, mvSIGMA-SQ, mvTITAN-C16, mvTITAN-C8, mvTITAN-CL, mvTITAN-DIG, mvTITAN-G1, mvTITAN-RGB/G4, pcIMAGE-SC, pcIMAGE-SDIG, pcIMAGE-SG/SGVS, pcIMAGE-SRGB

To work with camera definitions it is needed to include the following files to the program"s project:
- camdefs.c -> include in project
- camtype.c -> include in project
- camtype.h -> include in file (#include...) which communicates with the Frame Grabber.
You can find these files after the installation of MVtutorial in its subdirectory ..DllDrv.
With this all functions descibed in the chapter 6 "Camera Adatption" are useful in the INI files and in the program.

There must be at least the following lines in the INI file which is defined in the command to initialise the hardware (mvOpenDevice(...)) to use the cameradefinitions:
...
InitBoard
...
InterpretIni "camdefs.ini" 0L "[CameraDefs]"
...
SelCamera "NewCamera"
...
With the command InterpretIni the driver opens the file camdefs.ini while initialising the hardware and looks for the indicator [CameraDefs]. All camera definitions from this indicator on will be read. There must be enough memory reserved by the program to hold all camera definitions. This is done by the command mvInitCamTypeDefinitions( 500 ); before the hardware was opened. Here, this command reserves space for 500 definitions.
After reading all camera definitions one of them can be activated by the command mvSelCamera(...) in the program or with SelCamera"..." in the INI file. All images which are acquired after this command will use the settings of this camera definition.
Before closing the hardware with mvCloseDevice(...) the reserved space for the definitions must be freed by the command mvFreeCamTypeDefinitions ();

Back