SaveBkg
Top  Previous  Next

Description

Stores a dark or bright background image on the hard drive. The background image is produced as a result of temporal frame averaging.

 
Syntax

[VB]
objActiveDcam.SaveBkg Type [, Frames = 8 ] 


[C/C++]
HRESULT SaveBkg( short Type, short Frames );


Data Types
[VB]

Type: Integer
Frames: Integer

Parameters [C/C++]

Type [in]  
Enumerated integer indicating the type of background to be saved: 1 - Dark Field, 2 - Bright Field  
Frames [in]  
Number of consecutive frames to be averaged for background calculation.  
 
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  

Example


The following VB example uses two buttons to save dark and bright background images:

Private Sub
SaveDark_Click
ActiveDcam1.SaveBkg (1)
End Sub


Private Sub
SaveBright_Click
ActiveDcam1.SaveBkg (2)
End Sub



Remarks

In general, to perform the background correction you have to prepare two auxiliary images: dark field and bright field. Dark field is a background image captured with no light transmitted through the camera lens; it is a measure of the dark current in the CCD. The bright field is a background image captured with the maximum light transmitted and no objects in the filed of view; it is a measure of the difference in pixel-to-pixel sensitivity as well as the uniformity of illumination While capturing the bright field image you should adjust the light intensity so that it stays just below the saturation level of the camera. That will provide the maximum dynamic range for the image acquisition. To control the saturation for monochrome cameras, use the Saturated Palette. For more information on the background correction see BkgCorrect
.

When the background saving is complete, the FrameRecorded event is fired.

Background data are stored as raw image files in the Bkgnd subfolder of ActiveDcam program directory. See BkgName for more details.

Note that this function will only work if the Acquire property is set to True or the Grab method is repeatedly called.