MVTec Software GmbH
  Building Vision For Business
Halcon

HALCON 9.0 Interface for Sentech STC USB 2.0 Cameras

This page provides the documentation of the HALCON Sentech image acquisition interface for the STC USB 2.0 cameras from Sentech. Registered customers can download the latest revision of this interface from the MVTec WWW server.

Revision: 4.0

System Requirements

  • Intel compatible PC with Windows 2000/XP and USB 2.0 interface.
  • Sentech USB driver StUSB.sys version 3.0.0 or higher. Typically, this file resides in the directory %WINDIR%\system32\drivers.
  • Sentech DLL StTrgApi.dll version 1.0.0.2 or higher. This DLL must be within your search path %PATH% (typically, it resides in the directory %WINDIR%\system32).
  • HALCON image acquisition interface hAcqSentech.dll or hAcqSentechxl.dll, respectively. If you have properly installed the interface, both DLLs should reside in bin\%HALCONARCH% within the HALCON base directory %HALCONROOT% you have chosen during the installation of HALCON.

Features

  • Synchronous and asynchronous grabbing.
  • Continuous and software trigger mode.
  • Support of multiple cameras. Note that to use multiple cameras, the camera with the highest device ID value has to be opened first.
  • Software control of various camera parameters like exposure and gain.

Limitations

  • grab_region and grab_region_async not supported.
  • No LUTs.
  • No image cropping.

Description

Parameters for open_framegrabber():

Name 'Sentech' The name of the HALCON image acquisition interface.
HorizontalResolution 1 Full horizontal resolution.
VerticalResolution 1 Full vertical resolution.
ImageWidth --- Ignored.
ImageHeight --- Ignored.
StartRow --- Ignored.
StartColumn --- Ignored.
Field --- Ignored.
BitsPerChannel --- Ignored.
ColorSpace 'default', 'gray', 'rgb', 'raw' Specifies the desired color space and thus the number of image channels of the resulting HALCON image. If ColorSpace is set to 'default', the color space is set to 'rgb' in case of color cameras, and to 'gray' otherwise. The 'raw' color space causes a color camera to produce the raw Bayer pattern image as output. Default: 'default'.
Generic --- Ignored.
ExternalTrigger 'true', 'false' Enables/disables the trigger mode. This feature can only be used if the camera model supports the trigger mode.
CameraType -- Ignored.
Device '0', DeviceId The device ID of the desired camera (passed as a string). Important: To use multiple cameras, the camera with the highest device ID value has to be opened first. Default: '0' (searches for the first unused camera).
Port --- Ignored.
LineIn --- Ignored.

Parameters for set_framegrabber_param():

'bayer_pattern' 'bggr', 'rggb', 'grbg', 'gbrg' Specifies the desired bayer pattern. Note that in open_framegrabber the camera will be initialized with the corresponding pattern.
'color_interpolation' 'bilinear', 'bicubic', 'none_mono', 'none_color', 'nearest_neighbor' Sets the desired color interpolation. Default: 'none_color' (for monochrome cameras), 'bilinear' (for color cameras).
'continuous_grabbing' 'enable', 'disable' Use 'enable' to turn the 'continuous_grabbing' feature on or 'disable' to turn it off. Disabled continuous grabbing requires the software trigger mode, i.e., this feature can only be disabled if the camera model supports the trigger mode. Default: 'enable'.
'digital_gain' 0 ... 511 Sets the digital gain value which is controlled by the FPGA. Default: 0
'do_force_trigger' --- Forces an event trigger when using the external trigger. Note that this feature can only be used if the camera model supports the trigger mode.
'do_abort_grab' --- Cancel the current grab and clear the buffer.
'exposure' time Sets the exposure time of the camera.
'exposure_delay' delay Sets the delay of the exposure start. (see Sentech documentation for more details).
'external_trigger' 'true', 'false' Enables/disables the trigger mode. This feature can only be used if the camera model supports the trigger mode.
'gain' 0 ... 255 Sets the gain value. Default: 0
'grab_timeout' 100 ... 327680 Specifies the desired timeout (milliseconds passed as an integer) for aborting a pending grab. Default: 5000.
'io_pin_direction0' 'input', 'output' Sets the I/O setting of pin 0.
'io_pin_direction1' 'input', 'output' Sets the I/O setting of pin 1.
'io_pin_direction2' 'input', 'output' Sets the I/O setting of pin 2.
'io_pin_direction3' 'input', 'output' Sets the I/O setting of pin 3.
'readout_delay' delay (long) Sets the image readout delay (time between the exposure end and starting the image readout).
'scan_mode' 'normal', 'partial_1', 'partial_2', 'partial_4', 'binning', 'binning_partial', 'binning_partial_1', 'binning_partial_2', 'binning_partial_4' Sets the scanning mode. The supported scanning modes are different for each camera model. Changing the scanning mode stops the image transfer and will clear the buffers.
'strobe_start_delay' delay (long) Sets the delay of the output strobe control signal.
'strobe_end_duration' duration (long) Sets the pulse duration of the output strobe control signal.
'trigger_pulse_delay' delay (long) Sets the delay of the output trigger signal.
'trigger_pulse_duration' duration (long) Sets the pulse duration of the output trigger signal.
'trigger_signal' 'falling', 'rising' Specifies the desired type of the trigger signal. Default: 'rising'.
'volatile' 'enable', 'disable' Grayscale only. In the volatile mode the image acquisition interface buffers are used directly to store HALCON images. This is the fastest mode avoiding to copy raw images in memory. However, be aware that older images are overwritten again and again as a side-effect. Thus, you can only process one image while you grab another image. Older images are invalid! Default: 'disable'.
'white_balance' 'enable', 'disable' Enables/disables the white balancing. Default: 'disable'.
'white_balance_gain_r' 0 ... 640 (long) Sets the red gain parameter for the white balance. Default: 128.
'white_balance_gain_gr' 0 ... 640 (long) Sets the green and red gain parameter for the white balance. Default: 128.
'whtie_balance_gain_gb' 0 ... 640 (long) Sets the green and blue gain parameter for the white balance. Default: 128.
'white_balance_gain_b' 0 ... 640 (long) Sets the blue gain parameter for the white balance. Default: 128.
'white_balance_mode' 'manual', 'auto', 'oneshot' Specifies the white balance mode.

Parameters for get_framegrabber_param():

Additional parameters supported by get_framegrabber_param only. Note that all parameters supported by set_framegrabber_param except the ones with prefix 'do_' can also be accessed by get_framegrabber_param. Furthermore, corresponding to the parameters supported by set_framegrabber_param, there may exist additional read-only parameters with the following postfixes:

  • '_description': These parameters provide the tooltip of the corresponding parameter as a string.
  • '_range': These parameters provide the minimum, maximum, stepwidth, and default values for the corresponding integer or float parameter as a tuple with 4 elements, e.g., get_framegrabber_param(..,'exposure_range',..) will return the output tuple [min,max,step,default]. Optionally, this tuple can also contain additional valid string values like 'auto' or 'manual'.
  • '_values': These parameters provide the valid value list for the corresponding parameter as a tuple, e.g., get_framegrabber_param(..,'volatile_values',..) will return the output tuple ['enable','disable'].
All these postfixed parameter names are not returned when calling info_framegrabber(..,'parameters',..) and are used to enable the easy parameterization via a generic graphical user interface, particularly the HDevelop Image Acquisition Assistant.

'camera_vendor_id' id Gets the camera vendor ID.
'camera_model' 'STC_B33USB', 'STC_C33USB', 'STC_B83USB', 'STC_C83USB', 'STC_TB33USB', 'STC_TC33USB', 'STC_TB83USB', 'STC_TC83USB', 'STC_TB133USB', 'STC_TC133USB', 'STC_TB152USB', 'STC_TC152USB', 'STC_TB202USB', 'STC_TC202USB' Gets the camera model.
'camera_fpga_version' version Gets the camera FPGA version.
'camera_firmware_version' version Gets the camera firmware version.
'frame_clock' clock Gets the horizontal clock.
'frame_clock_totallines' lines Gets the total number of lines including the blanking.
'image_available' 0, 1 (long) Returns the status of the last asynchronous grab command. The value 1 means that the image is already acquired and thus can be fetched by grab_image_async without delay. Note that this parameter is especially useful in combination with external triggering.
'revision' revision The revision number of the HALCON Sentech interface.

Release Notes

  • Revision 4.0 (Sep 22, 2009):
    • First official release.
© Copyright 2010, MVTec Software GmbH, corporate/legal/privacy information