Interface for acquiring images from a line scan device (deprecated!). More...
Typedefs | |
typedef cvbbool_t __stdcall * | pLSBLOCKCALLBACK(cvbval_t NumBlocksPending, cvbdim_t StartLine, cvbdim_t NumLines, cvbbool_t LastBlock, void *pPrivate) |
This function is invoked when an image segment has been acquired. The number of calls depends on how many blocks have been defined with the LSSetBlocksPerFrame function. pLSBLOCKCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions. To process a large line camera image better it is possible to subdivide the image logically into several small blocks. This means it is not necessary to wait until the entire image has been acquired before processing the image data. Instead, individual parts of the image can be processed one after another depending on the rate of acquisition. More... | |
typedef cvbbool_t __stdcall * | pLSERRORCALLBACK(LSErrorCodes ErrorNumber, cvbval_t Data, void *pPrivate) |
This function is invoked when an error has occurred during acquisition. pLSERRORCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions. More... | |
typedef cvbbool_t __stdcall * | pLSIMAGECALLBACK(cvbval_t NumImagesPending, cvbdim_t NumLines, void *pPrivate) |
This function is invoked when an entire image has been acquired. pLSBLOCKCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions. More... | |
Enumerations | |
enum | LSErrorCodes { CVC_LS_OK = 0 , CVC_LS_OVERRUN = 1 , CVC_LS_ERRORMAXCODES } |
Defines the error codes of the LineScan Interface. More... | |
enum | LSLineTriggerMode { CVC_LS_FREERUN = 0 , CVC_LS_EXTTRIGGER = 1 , CVC_LS_LINETRIGGERMAXMODES } |
Defines options of the polarity for ExSync/Prin. More... | |
enum | LSPolarity { CVC_LS_LO = 0 , CVC_LS_HI = 1 , CVC_LS_POLMAXMODES } |
Defines options of the polarity for ExSync/Prin. More... | |
Functions | |
cvbbool_t | CanLineScan (IMG Image) |
This function verifies whether the image supports the LineScan interface. More... | |
cvbres_t | LSFreeze (IMG Image) |
Stops continuous image acquisition that was started with the LSGrab function. More... | |
cvbres_t | LSGetBlocksPerFrame (IMG Image, cvbval_t &lNumBlocks) |
Returns the number of blocks into which an image is subdivided. More... | |
cvbres_t | LSGetBlocksPerFrameRange (IMG Image, cvbval_t &lMin, cvbval_t &lMax) |
Returns the minimum and maximum number of blocks into which an image can be subdivided. More... | |
cvbres_t | LSGetExposureTime (IMG Image, cvbval_t &lExposureTime) |
Returns the current exposure time set for a single line. More... | |
cvbres_t | LSGetExposureTimeRange (IMG Image, cvbval_t &lMin, cvbval_t &lMax) |
Returns the minimum and maximum exposure time possible for a single line. More... | |
cvbres_t | LSGetExSyncPol (IMG Image, LSPolarity &lPol) |
Returns the current EXSYNC polarity. More... | |
cvbres_t | LSGetImageHeight (IMG Image, cvbval_t &Lines) |
Returns the height of the current image in lines. More... | |
cvbres_t | LSGetImageWidth (IMG Image, cvbdim_t &lStart, cvbdim_t &lWidth) |
Returns the width of the current image in pixels. More... | |
cvbres_t | LSGetImageWidthRange (IMG Image, cvbdim_t &lMin, cvbdim_t &lMax) |
Returns the minimum and maximum image width. More... | |
cvbres_t | LSGetLineRate (IMG Image, cvbval_t &lLineRate) |
Returns the current line rate. More... | |
cvbres_t | LSGetLineRateRange (IMG Image, cvbval_t &lMin, cvbval_t &lMax) |
Returns the minimum and maximum line rate for a single line. More... | |
cvbres_t | LSGetLineTriggerMode (IMG Image, LSLineTriggerMode &Mode) |
Returns the current linetrigger mode. More... | |
cvbres_t | LSGetPrinPol (IMG Image, LSPolarity &lPol) |
Checks the PRIN polarity. More... | |
cvbres_t | LSGrab (IMG Image, pLSBLOCKCALLBACK CBBlock, pLSIMAGECALLBACK CBImage, pLSERRORCALLBACK CBError, void *pPrivate) |
Starts continuous image acquisition. More... | |
cvbres_t | LSSetBlocksPerFrame (IMG Image, cvbval_t lNumBlocks) |
Set the number of blocks into which an image is subdivided. More... | |
cvbres_t | LSSetExposureTime (IMG Image, cvbval_t lExposureTime) |
Sets the exposure time for a single line. More... | |
cvbres_t | LSSetExSyncPol (IMG Image, LSPolarity lPol) |
Sets the EXSYNC polarity. More... | |
cvbres_t | LSSetImageHeight (IMG Image, cvbval_t Lines) |
Sets the height of the current image in lines. More... | |
cvbres_t | LSSetImageWidth (IMG Image, cvbdim_t lStart, cvbdim_t lWidth) |
Returns the width of the current image in pixels. More... | |
cvbres_t | LSSetLineRate (IMG Image, cvbval_t lLineRate) |
Defines the current line rate. More... | |
cvbres_t | LSSetLineTriggerMode (IMG Image, LSLineTriggerMode Mode) |
Sets the linetrigger mode. More... | |
cvbres_t | LSSetPrinPol (IMG Image, LSPolarity lPol) |
Sets the PRIN polarity. More... | |
cvbres_t | LSSnap (IMG Image, pLSBLOCKCALLBACK CBBlock, pLSIMAGECALLBACK CBImage, pLSERRORCALLBACK CBError, void *pPrivate) |
Acquires a single image. More... | |
cvbres_t | LSStatus (IMG Image, cvbval_t &lStatus) |
Returns the current line status. This is the line that was acquired at the time of the call. More... | |
Interface for acquiring images from a line scan device (deprecated!).
typedef cvbbool_t __stdcall * pLSBLOCKCALLBACK(cvbval_t NumBlocksPending, cvbdim_t StartLine, cvbdim_t NumLines, cvbbool_t LastBlock, void *pPrivate) |
This function is invoked when an image segment has been acquired.
The number of calls depends on how many blocks have been defined with the LSSetBlocksPerFrame function.
pLSBLOCKCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions. To process a large line camera image better it is possible to subdivide the image logically into several small blocks. This means it is not necessary to wait until the entire image has been acquired before processing the image data. Instead, individual parts of the image can be processed one after another depending on the rate of acquisition.
[in] | NumBlocksPending | Number of blocks waiting for processing. |
[in] | StartLine | The start line of the current block in the picture as a whole. |
[in] | NumLines | The number of lines in the block. |
[in] | LastBlock | Flag for indicating the last block. |
[in] | pPrivate | A pointer to private data passed by LSGrab and LSSnap. |
TRUE
if succeeded, otherwise FALSE
. typedef cvbbool_t __stdcall * pLSERRORCALLBACK(LSErrorCodes ErrorNumber, cvbval_t Data, void *pPrivate) |
This function is invoked when an error has occurred during acquisition.
pLSERRORCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions.
[in] | ErrorNumber | Error code (see LSErrorCodes for more information). |
[in] | Data | Not used at present. |
[in] | pPrivate | A pointer to private data passed by LSGrab and LSSnap. |
TRUE
if succeeded, otherwise FALSE
. typedef cvbbool_t __stdcall * pLSIMAGECALLBACK(cvbval_t NumImagesPending, cvbdim_t NumLines, void *pPrivate) |
This function is invoked when an entire image has been acquired.
pLSBLOCKCALLBACK is a pointer to a callback function of the LineScan interface which is used by the LSGrab and LSSnap functions.
[in] | NumImagesPending | Number of images that have not been processed yet. |
[in] | NumLines | The number of lines in the block. |
[in] | pPrivate | A pointer to private data passed by LSGrab and LSSnap. |
TRUE
if succeeded, otherwise FALSE
. enum LSErrorCodes |
Defines the error codes of the LineScan Interface.
Enumerator | |
---|---|
CVC_LS_OK | No error occurred. |
CVC_LS_OVERRUN | Overrun in the LSGrab or LSSnap function, blocks have been acquired but not processed. |
CVC_LS_ERRORMAXCODES | Maximum numbers of error codes. Do not use it in the functions of the LineScan interface. |
enum LSLineTriggerMode |
Defines options of the polarity for ExSync/Prin.
Enumerator | |
---|---|
CVC_LS_FREERUN | line trigger in free run mode. |
CVC_LS_EXTTRIGGER | External line trigger. |
CVC_LS_LINETRIGGERMAXMODES | Maximum numbers. |
enum LSPolarity |
Defines options of the polarity for ExSync/Prin.
Enumerator | |
---|---|
CVC_LS_LO | LOW polarity active. |
CVC_LS_HI | HI polarity active. |
CVC_LS_POLMAXMODES | Maximum numbers of polarity modes. Do not use it in the functions of the LineScan interface. |
cvbbool_t CanLineScan | ( | IMG | Image | ) |
This function verifies whether the image supports the LineScan interface.
[in] | Image | Handle of image object. |
TRUE
if the image supports the LineScan interface, FALSE
otherwise. cvbres_t LSFreeze | ( | IMG | Image | ) |
Stops continuous image acquisition that was started with the LSGrab function.
[in] | Image | Handle of image object. |
cvbres_t LSGetBlocksPerFrame | ( | IMG | Image, |
cvbval_t & | lNumBlocks | ||
) |
Returns the number of blocks into which an image is subdivided.
To process a large image acquired from a linescan camera it is possible to subdivide the image logically into several small blocks, each block can be processed before the entire image acquisition is complete.
[in] | Image | Handle of image object. |
[out] | lNumBlocks | Number of blocks into which an image is subdivided. |
cvbres_t LSGetBlocksPerFrameRange | ( | IMG | Image, |
cvbval_t & | lMin, | ||
cvbval_t & | lMax | ||
) |
Returns the minimum and maximum number of blocks into which an image can be subdivided.
[in] | Image | Handle of image object. |
[out] | lMin | Minimum number of blocks. |
[out] | lMax | Maximum number of blocks. |
cvbres_t LSGetExposureTime | ( | IMG | Image, |
cvbval_t & | lExposureTime | ||
) |
Returns the current exposure time set for a single line.
[in] | Image | Handle of image object. |
[out] | lExposureTime | Exposure time for a single line in ms. |
cvbres_t LSGetExposureTimeRange | ( | IMG | Image, |
cvbval_t & | lMin, | ||
cvbval_t & | lMax | ||
) |
Returns the minimum and maximum exposure time possible for a single line.
[in] | Image | Handle of image object. |
[out] | lMin | Minimum exposure time for one line in ms. |
[out] | lMax | Maximum exposure time for one line in ms. |
cvbres_t LSGetExSyncPol | ( | IMG | Image, |
LSPolarity & | lPol | ||
) |
Returns the current EXSYNC polarity.
The EXSYNC plolarity defines the start pulse from the frame grabber to the camera to read out a line.
[in] | Image | Handle of image object. |
[out] | lPol | Current EXSYNC polarity. Possible values are: CVC_LS_HI CVC_LS_LO (description of parameters see LSPolarity). |
cvbres_t LSGetImageHeight | ( | IMG | Image, |
cvbval_t & | Lines | ||
) |
Returns the height of the current image in lines.
[in] | Image | Handle of image object. |
[out] | Lines | Image height in lines. |
cvbres_t LSGetImageWidth | ( | IMG | Image, |
cvbdim_t & | lStart, | ||
cvbdim_t & | lWidth | ||
) |
Returns the width of the current image in pixels.
The Start value defines the start position of the data in the line, the horizontal offset.
[in] | Image | Handle of image object. |
[out] | lStart | Start position of the data in the line (horizontal offset). |
[out] | lWidth | Image width in pixels. |
cvbres_t LSGetImageWidthRange | ( | IMG | Image, |
cvbdim_t & | lMin, | ||
cvbdim_t & | lMax | ||
) |
Returns the minimum and maximum image width.
[in] | Image | Handle of image object. |
[out] | lMin | Minimum image width. |
[out] | lMax | Maximum image width. |
cvbres_t LSGetLineRate | ( | IMG | Image, |
cvbval_t & | lLineRate | ||
) |
Returns the current line rate.
[in] | Image | Handle of image object. |
[out] | lLineRate | Line rate in Hz. |
cvbres_t LSGetLineRateRange | ( | IMG | Image, |
cvbval_t & | lMin, | ||
cvbval_t & | lMax | ||
) |
Returns the minimum and maximum line rate for a single line.
[in] | Image | Handle of image object. |
[out] | lMin | Minimum line rate. |
[out] | lMax | Maximum line rate. |
cvbres_t LSGetLineTriggerMode | ( | IMG | Image, |
LSLineTriggerMode & | Mode | ||
) |
Returns the current linetrigger mode.
[in] | Image | Handle of image object. |
[out] | Mode | Current PRIN polarity. Possible values are: CVC_LS_FREERUN CVC_LS_EXTTRIGGER (description of parameters see LSLineTriggerMode). |
cvbres_t LSGetPrinPol | ( | IMG | Image, |
LSPolarity & | lPol | ||
) |
Checks the PRIN polarity.
The PRIN plolarity is the pulse to control exposure time for a line from the frame grabber to the camera.
[in] | Image | Handle of image object. |
[out] | lPol | Current PRIN polarity. Possible values are: CVC_LS_HI CVC_LS_LO (description of parameters see LSPolarity). |
cvbres_t LSGrab | ( | IMG | Image, |
pLSBLOCKCALLBACK | CBBlock, | ||
pLSIMAGECALLBACK | CBImage, | ||
pLSERRORCALLBACK | CBError, | ||
void * | pPrivate | ||
) |
Starts continuous image acquisition.
In addition to the image object, special callback functions to handle block, image and error events are passed to this function.
[in] | Image | Handle of image object. |
[in] | CBBlock | This callback function is invoked when an image segment has been aquired and the block is in memory ready for processing (see LSSetBlocksPerFrame). The number of calls depends on how many blocks have been defined with the LSSetBlocksPerFrame function. If, for example, a frame consists of 10 blocks this function is invoked for every block i.e. 10 times per image. |
[in] | CBImage | This callback function is invoked when a frame (entire image) has been acquired and is in memory ready for processing. Note: The time between the end of one frame and the beginning of the next is very short as far as line cameras are concerned, normally too short to analyse the entire image. |
[in] | CBError | This callback function is invoked when an error occurs e.g. there is an overrun or a timeout. An overrun occurs when image blocks are acquired faster than they can be processed. |
[in] | pPrivate | Pointer to private data (e.g. class pointer) which is passed to the callback functions. This private data can then be used in these Callback functions. |
cvbres_t LSSetBlocksPerFrame | ( | IMG | Image, |
cvbval_t | lNumBlocks | ||
) |
Set the number of blocks into which an image is subdivided.
[in] | Image | Handle of image object. |
[in] | lNumBlocks | Number of blocks into which an image is subdivided. |
cvbres_t LSSetExposureTime | ( | IMG | Image, |
cvbval_t | lExposureTime | ||
) |
Sets the exposure time for a single line.
[in] | Image | Handle of image object. |
[in] | lExposureTime | Exposure time for a single line in ms. |
cvbres_t LSSetExSyncPol | ( | IMG | Image, |
LSPolarity | lPol | ||
) |
Sets the EXSYNC polarity.
The EXSYNC plolarity defines the start pulse from the frame grabber to the camera to read out a line.
[in] | Image | Handle of image object. |
[in] | lPol | Current EXSYNC polarity. Possible values are: CVC_LS_HI CVC_LS_LO (description of parameters see LSPolarity). |
cvbres_t LSSetImageHeight | ( | IMG | Image, |
cvbval_t | Lines | ||
) |
Sets the height of the current image in lines.
[in] | Image | Handle of image object. |
[in] | Lines | Image height in lines. |
cvbres_t LSSetImageWidth | ( | IMG | Image, |
cvbdim_t | lStart, | ||
cvbdim_t | lWidth | ||
) |
Returns the width of the current image in pixels.
The Start value defines the start position of the data in the line, the horizontal offset.
[in] | Image | Handle of image object. |
[in] | lStart | Start position of the data in the line (horizontal offset). |
[in] | lWidth | Image width in pixels. |
cvbres_t LSSetLineRate | ( | IMG | Image, |
cvbval_t | lLineRate | ||
) |
Defines the current line rate.
[in] | Image | Handle of image object. |
[in] | lLineRate | Line rate in Hz. |
cvbres_t LSSetLineTriggerMode | ( | IMG | Image, |
LSLineTriggerMode | Mode | ||
) |
Sets the linetrigger mode.
[in] | Image | Handle of image object. |
[in] | Mode | Current PRIN polarity. Possible values are: CVC_LS_FREERUN CVC_LS_EXTTRIGGER (description of parameters see LSLineTriggerMode). |
cvbres_t LSSetPrinPol | ( | IMG | Image, |
LSPolarity | lPol | ||
) |
Sets the PRIN polarity.
The PRIN plolarity is the pulse to control exposure time for a line from the frame grabber to the camera.
[in] | Image | Handle of image object. |
[in] | lPol | Current PRIN polarity. Possible values are: CVC_LS_HI CVC_LS_LO (description of parameters see LSPolarity). |
cvbres_t LSSnap | ( | IMG | Image, |
pLSBLOCKCALLBACK | CBBlock, | ||
pLSIMAGECALLBACK | CBImage, | ||
pLSERRORCALLBACK | CBError, | ||
void * | pPrivate | ||
) |
Acquires a single image.
In addition to the image object, special callback functions to handle block, image and error events are passed to this function.
[in] | Image | Handle of image object. |
[in] | CBBlock | This callback function is invoked when an image segment has been aquired and the block is in memory ready for processing (see LSSetBlocksPerFrame). The number of calls depends on how many blocks have been defined with the LSSetBlocksPerFrame function. If, for example, a frame consists of 10 blocks this function is invoked for every block i.e. 10 times per image. |
[in] | CBImage | This callback function is invoked when a frame (entire image) has been acquired and is in memory ready for processing. Note: The time between the end of one frame and the beginning of the next is very short as far as line cameras are concerned, normally too short to analyse the entire image. |
[in] | CBError | This callback function is invoked when an error occurs e.g. there is a timeout. |
[in] | pPrivate | Pointer to private data (e.g. class pointer) which is passed to the callback functions. This private data can then be used in these Callback functions. |
cvbres_t LSStatus | ( | IMG | Image, |
cvbval_t & | lStatus | ||
) |
Returns the current line status. This is the line that was acquired at the time of the call.
[in] | Image | Handle of image object. |
[out] | lStatus | Line number. |