User Manual for Machine Vision Cameras
105
Here is the API code for the setup the exposure time:
Toupcam_put_AutoExpoEnable(HToupCam h, int bAutoExposure);
Toupcam_put_AutoExpoTarget(HToupCam h, unsigned short Target);
Toupcam_put_ExpoTime(HToupCam h, unsigned Time); /* in microseconds */
11.8.2
Gain control
The gain value range is specified in the camera technical specifications section in Sec.1. When the gain increases, the
image noise increases.
The following is the API code for the setup of the gain control:
Toupcam_put_ExpoAGain(HToupCam h, unsigned short AGain); /* percent */
11.8.3
White balance
White balance means that the camera performs color adjustment under different light source. The user can make the
white area always white at different color temperatures by adjusting the “R”, “B” component’s gain on the image. Ideally,
the ratio of R, G and B components in the white region is 1:1:1.
The white balance setting is shown in Figure 11
26. Click "Config" on the control menu at the top of democpp and
click "White Balance One Push" to automatically balance white once.
Figure 11
-
26
White balance setup
The following is the API code for the setup of the white balance one push:
//auto white balance "one push". This feature must be called AFTER Toupcam_StartXXXX
Toupcam_AwbOnePush(HToupCam h,PITOUPCAM_TEMPTINT_CALLBACK fnTTProc, void* pTTCtx);
11.8.4
Color adjustment
User can adjust hue, saturation, brightness, contrast and gamma value.
The following is the API code for the color adjustment:
Toupcam_put_Hue(HToupCam h, int Hue);
Toupcam_put_Saturation(HToupCam h, int Saturation);
Toupcam_put_Brightness(HToupCam h, int Brightness);
Toupcam_put_Contrast(HToupCam h, int Contrast);