Binning and ROI Functions


Functions

BOOL dvcCanRoi (HANDLE hDevice)
BOOL dvcGetBinning (HANDLE hDevice, PInt32 pBinning)
BOOL dvcGetHVBin (HANDLE hDevice, PInt32 pHBin, PInt32 pVBin)
BOOL dvcGetRoi (HANDLE hDevice, PInt32 pOnOff, RECT *prGet)
Int32 dvcGetXDim (HANDLE hDevice)
Int32 dvcGetYDim (HANDLE hDevice)
BOOL dvcSetBinning (HANDLE hDevice, Int32 nBinning)
BOOL dvcSetHVBin (HANDLE hDevice, Int32 nHBin, Int32 nVBin)
BOOL dvcSetRoi (HANDLE hDevice, Int32 nOnOff, RECT *prSet)

Function Documentation

BOOL dvcCanRoi ( HANDLE  hDevice  ) 

Returns TRUE is the camera supports hardware ROI operations.

Parameters:
hDevice camera handle returned from dvcOpenCamera().
Hardware region of interest or ROI operations result in a smaller area being transferred from the CCD to the host at a higher frame rate than full image transfers.

DVC 710 and 131X series cameras do not support ROI operations.

BOOL dvcGetBinning ( HANDLE  hDevice,
PInt32  pBinning 
)

Get the current binning index.

Parameters:
hDevice camera handle returned from dvcOpenCamera().
pBinning is the binning index set on return.
See also:
dvcSetBinning(), dvcGetHVBin().

BOOL dvcGetHVBin ( HANDLE  hDevice,
PInt32  pHBin,
PInt32  pVBin 
)

Parameters:
hDevice handle returned from dvcOpenCamera().
pHBin returns the horizontal binning factor in CCD pixels.
pVBin returns the vertical binning factor in CCD pixels.
See also:
dvcSetHVBin(), dvcGetBinning(), dvcSetBinning().
dvcGetHVBin() returns the binning factors as the number of CCD pixels summed vertically or horizontally to produce a single output pixel.

BOOL dvcGetRoi ( HANDLE  hDevice,
PInt32  pOnOff,
RECT *  prGet 
)

Get the camera's hardware region of interest.

Parameters:
hDevice camera handle returned from dvcOpenCamera().
pOnOff returns with a value of [1] when enabled, otherwise [0].
prGet returns filled with the current ROI.
Returns:
TRUE if camera supports ROI operations.
See also:
dvcCanRoi(), dvcSetRoi().

Int32 dvcGetXDim ( HANDLE  hDevice  ) 

Parameters:
hDevice handle from dvcOpenCamera().
Returns:
the current horizontal (binned) width in pixels of the image to capture.
See also:
dvcGetYDim(), dvcGetImageWidth(), dvcGetCCDWidth(), dvcSetROI(), dvcSetBinning(), dvcSetHVBin().
Examples:
avgdvc.cpp, FullScreen.cpp, MultiCamera.cpp, RamCapture.cpp, snapdvc.cpp, and testEvent.cpp.

Int32 dvcGetYDim ( HANDLE  hDevice  ) 

Parameters:
hDevice handle from dvcOpenCamera().
Returns:
the current vertical (binned) height in pixels of the image to capture.
See also:
dvcGetXDim(), dvcGetImageHeight(), dvcGetCCDHeight(), dvcSetROI(), dvcSetBinning(), dvcSetHVBin().
Examples:
avgdvc.cpp, FullScreen.cpp, MultiCamera.cpp, RamCapture.cpp, snapdvc.cpp, and testEvent.cpp.

BOOL dvcSetBinning ( HANDLE  hDevice,
Int32  nBinning 
)

Sets an enumerated binning factor for the CCD readout. The camera binning may not be changed during continuous readouts.

Parameters:
hDevice camera handle returned from dvcOpenCamera().
nBinning can be any of the following ;
     DVC_BIN_1x1  default 1 x 1 binning
     DVC_BIN_1x2  binning 1(H) x 2(V)
     DVC_BIN_2x2  binning 2(H) x 2(V)
     DVC_BIN_3x3  binning 3(H) x 3(V) ( DVC 2000/4000 only )
     DVC_BIN_4x4  binning 4(H) x 4(V)
     DVC_BIN_8x8  binning 8(H) x 8(V) ( DVC 1312/1412 only )
See also:
dvcSetHVBin(), dvcGetBinning(), dvcGetHVBin().
Examples:
avgdvc.cpp, MultiCamera.cpp, RamCapture.cpp, snapdvc.cpp, and testEvent.cpp.

BOOL dvcSetHVBin ( HANDLE  hDevice,
Int32  nHBin,
Int32  nVBin 
)

Set the horizontal and vertical binning factors. Increasing the binning sums the charge from adjacent pixels before conversion by the ADC, increasing the sensitivity and signal to noise ratio of the resulting image at the expense of spatial resolution.

DVC 2000 and 4000 cameras support horizontal binning factors of 1,2,3 or 4, and vertical binning between 1 and the height of the area being read out. DVC 131X and 1412 cameras support only the options available in dvcSetBinning().

Parameters:
hDevice camera handle returned from dvcOpenCamera().
nHBin is the horizontal binning factor.
nVBin is the vertical binning factor.
See also:
dvcSetBinning(), dvcGetBinning().
Calling this function stops any active acquisition.

BOOL dvcSetRoi ( HANDLE  hDevice,
Int32  nOnOff,
RECT *  prSet 
)

Set the camera's hardware region of interest.

Parameters:
hDevice camera handle returned from dvcOpenCamera().
nOnOff is [1] to enable an ROI or [0] to disable.
prSet is a RECT structure with the coordinates of the region to be digitized and transferred to host memory.
The prSet->left, prSet->top pixel is included in the ROI and the prSet->right, prSet->bottom column and row are excluded from the ROI. When called, if nOnOff is 1 and prSet contains a RECT out of range for the given hardware, dvcSetROI() returns FALSE and prSet returns modified with the smallest ROI including the requested region. If either nOnOff is 0 or prSet is NULL, the camera's hardware ROI feature is disabled. As with binning, if the camera is actively acquiring images when this function is called, the acquisition is stopped and not restarted.

Currently, DVC camera ROI functions ignore left and right parameters, and always return these as 0 and the width ( dvcGetXDim() ) of the CCD.

DVC 1412 cameras do not allow setting a ROI when binning is enabled. 710, 1310 and 1312 cameras do not support hardware ROI operations.

Example:

   BOOL
   myROI( HANDLE hDevice, Int32 left, Int32 top, Int32 width, Int32 height )
   {
       RECT r ;
       BOOL bOK ;
       r.left = left ;
       r.top = top ;
       r.right = left + width ;
       r.bottom = top + height ;
       bOK = dvcSetRoi(hDevice, 1, &r) ;
       if( bOK == FALSE )
       {
           // r contains values we can use..
           bOK = dvcSetRoi(hDevice, 1, &r) ;
       }
       return bOK ;
   }
See also:
dvcCanRoi(), dvcGetRoi().


©DVC Company, 2006. All rights reserved.    www.dvcco.com   Created Thu Nov 16 10:07:22 2006