Specifications

sharpVISION™ Camera
sharpVISION VISION SDK
11
2.4. Configuring a camera
The camera state is represented by the opaque SV_SETTINGS structure. You can read the
default state, read the state from the camera, or send the state to the camera. Parameters
are read and written to a SV_SETTINGS structure with functions SvGetParameter and
SvSetParameter. The functions SvGetParameterMin and SvGetParameterMax provide
information on a parameter's range. Here is an example of setting the camera to 100 ms
exposure time:
SV_SETTINGS svCfg;
svCfg.size = sizeof(SV_SETTINGS ); // Don't forget this!
// Read default settings from the camera.
SvReadDefaultSettings( hCamera, &svCfg );
// Change svCfg: set exposure to 10 ms.
SvSetParameter( &svCfg, SVP_EXPOSURE, 10000 );
// Send settings to the camera
SvSendCameraSettings( hCamera, &svCfg );
Not all parameters are supported by all cameras. When you query or set a parameter (or get
the parameter maximum/minimum) and that parameter is not supported, the error code
SVC_NOTSUPPORTED is returned.
Not all parameters are valid in a particular state. A good example of this is readout speed
(see Readout Speed subsection below). When you call SvSendCameraSettings or
SvValidateSettings, the parameters in your SV_SETTINGS structure are adjusted to valid
values if necessary.