interfaces mvtec

Dokumentation

Image Acquisition Interface for Sentech STC USB 2.0 and USB 3.0 Cameras

Interface: Sentech
Revision: 5.5
Date: 2016-09-09
HALCON Version: 11.0

General

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

System Requirements

  • Intel compatible PC with Windows XP/Vista/7 or Windows XP/Vista/7 x64 and USB 2.0 or USB 3.0 interface. Note hat in case of USB 3.0, the use of some older onboard USB 3.0 controllers may lead to timeout errors during image acquisition.
  • USB 2.0: Sentech USB driver StUSB.sys (32bit or 64bit) with the version 3.0.0.3 or higher. Typically, this file resides in the directory %WINDIR%\system32\drivers.
  • USB 3.0: Sentech USB driver StUSB.sys (32bit or 64bit) with the version 3.0.0.5 or higher. Typically, this file resides in the directory %WINDIR%\system32\drivers.
  • Sentech DLL StTrgApi.dll (32-bit or 64-bit) with the version number 1.0.0.7 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.
  • Software control of various camera parameters like exposure and gain.

Limitations

  • No image cropping.

Parameters for info_framegrabber

Parameter Value List Type Kind Description
'bits_per_channel' 8 integer pre-defined Values for bits per channel.
'camera_type' [] Unused.
'color_space' ['default', 'gray', 'raw', 'rgb'] string pre-defined Values for color space.
'defaults' [1, 1, 0, 0, 0, 0, 'progressive', 8, 'default', -1.0, 'false', 'default', '0', 0, 0] mixed pre-defined Default values for open_framegrabber.
'device' ['<device_id>'] string dynamic List with device id of all connected cameras.
'external_trigger' ['false', 'true'] string pre-defined Values for the external trigger.
'field' [] Unused.
'general' [] string pre-defined Information about the HALCON Sentech interface.
'generic' [] Unsupported query!
'horizontal_resolution' [] Unsupported query!
'image_height' [] Unsupported query.
'image_width' [] Unsupported query.
'info_boards' ['device:<device_id> model_name:<name>'] string dynamic Shows device id and model name of all connected cameras. To open a specific device, the device id has to be used.
'parameters' ['<parameters>'] string pre-defined Pre-defined parameters of the HALCON interface.
'parameters_readonly' ['<parameters>'] string pre-defined Pre-defined read-only parameters of the HALCON interface.
'parameters_writeonly' ['<parameters>'] string pre-defined Pre-defined write-only parameters of the HALCON interface.
'port' [] Unused.
'revision' '<revision>' string pre-defined Revision number of the Sentech interface.
'start_column' [] Unsupported query.
'start_row' [] Unsupported query.
'vertical_resolution' [] Unsupported query!

Parameters for open_framegrabber

Parameter Values Default Type Description
Name 'Sentech' string Name of the HALCON interface.
HorizontalResolution 1 1 integer Full horizontal resolution.
VerticalResolution 1 1 integer Full vertical resolution.
ImageWidth --- Ignored.
ImageHeight --- Ignored.
StartRow --- Ignored.
StartColumn --- Ignored.
Field --- Ignored.
BitsPerChannel --- Ignored.
ColorSpace 'default', 'gray', 'raw', 'rgb' 'default' string 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.
Generic --- Ignored.
ExternalTrigger 'false', 'true' 'false' string Status of the external trigger.
CameraType --- Ignored.
Device '0', '<device_id>' '0' string The device id of the desired camera (passed as a string).
Port --- Ignored.
LineIn --- Ignored.

Parameters for set_framegrabber_param

Parameter Values Default Type Description
'bayer_pattern' 'bggr', 'gbrg', 'grbg', 'rggb' string Bayer pattern. Note that in open_framegrabber the camera will be initialized with the corresponding pattern.
'color_interpolation' 'bicubic', 'bilinear', 'color_reduction', 'nearest_neighbor', 'none_color', 'none_mono'
  • 'none_color' (for monochrome cameras)
  • 'bilinear' (for color cameras).
string Color interpolation.
'continuous_grabbing' 'disable', 'enable' 'enable' string If the continuous grabbing mode is enabled, the camera grabs all the time. In this mode the operator grab_image does not grab synchronously, but behaves similar to grab_image_async. Using this mode you can achieve full frame rate. If the continuous grabbing mode is disabled, the camera is set to single frame capture.
'digital_gain' 0 ... 511 0 integer Digital gain value which is controlled by the FPGA.
'do_abort_grab' --- Cancel the current grab and clear the buffer.
'do_force_trigger' --- Forces an event trigger when using the external trigger. To use the software trigger functionality it is necessary to set the 'external_trigger' parameter to 'true' and to disable the 'continuous_grabbing' parameter. Note that this feature can only be used if the camera model supports the trigger mode.
'exposure' <time> integer Exposure time of the camera.
'exposure_delay' <delay> integer Delay of the exposure start. (see sentech documentation for more details).
'external_trigger' 'false', 'true' 'false' string Enables/disables the trigger mode. Set the parameter to 'false' will enable the 'continuous_grabbing' mode. This feature can only be used if the camera model supports the trigger mode.
'gain' 0 ... 255 0 integer Gain value.
'grab_timeout' <milliseconds> 5000 integer Desired timeout (milliseconds) for aborting a pending grab. If -1 is specified, the timeout is set to INFINITE.
'io_pin_direction0' 'input', 'output' string Sets the I/O setting of pin 0.
'io_pin_direction1' 'input', 'output' string I/O setting of pin 1.
'io_pin_direction2' 'input', 'output' string I/O setting of pin 2.
'io_pin_direction3' 'input', 'output' string I/O setting of pin 3.
'io_pin_mode0' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string I/O setting of pin 0.
'io_pin_mode1' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string I/O setting of pin 1.
'io_pin_mode2' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string I/O setting of pin 2.
'io_pin_mode3' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string I/O setting of pin 3.
'io_pin_polarity0' 'positive', 'negative' string I/O setting of pin 0.
'io_pin_polarity1' 'positive', 'negative' string I/O setting of pin 1.
'io_pin_polarity2' 'positive', 'negative' string I/O setting of pin 2.
'io_pin_polarity3' 'positive', 'negative' string I/O setting of pin 3.
'readout_delay' <delay> integer 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' string 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.
'start_async_after_grab_async' 'disable', 'enable' 'enable' string By default a new asynchronous grab command is automatically given to the acquisition device at the end of grab_image_async. If the parameter 'start_async_after_grab_async' is set to 'disable', this new grab command is omitted.
'strobe_end_duration' <duration> integer Pulse duration of the output strobe control signal.
'strobe_start_delay' <delay> integer Delay of the output strobe control signal.
'trigger_pulse_delay' <delay> integer Delay of the output trigger signal.
'trigger_pulse_duration' <duration> integer Pulse duration of the output trigger signal.
'trigger_signal' 'falling', 'rising' 'rising' string Type of the trigger signal.
'volatile' 'disable', 'enable' 'disable' string Grayscale only. In the volatile mode the two 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!
'white_balance' 'disable', 'enable' 'disable' string Enables/disables the white balancing.
'white_balance_gain_b' 0 ... 640 128 integer Blue gain parameter for the white balance.
'white_balance_gain_gb' 0 ... 640 128 integer Green and blue gain parameter for the white balance.
'white_balance_gain_gr' 0 ... 640 128 integer Green and red gain parameter for the white balance.
'white_balance_gain_r' 0 ... 640 128 integer Red gain parameter for the white balance.
'whtie_balance_mode' 'auto', 'manual', 'oneshot' string White balance mode.

Parameters for get_framegrabber_param

There may exist additional read-only parameters with the following postfixes:
  • '_description': These parameters provide the tool-tip of the corresponding parameter as a string.
  • '_range': These parameters provide the minimum, maximum, step width, and default values for the corresponding integer or float parameter as a tuple with 4 elements, e.g., get_framegrabber_param(.., 'Shutter_range', ..) will return the output tuple [min, max, step, default].
  • '_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.

Parameter Values Default Type Kind Description
'bayer_pattern' 'bggr', 'gbrg', 'grbg', 'rggb' string dynamic Bayer pattern. Note that in open_framegrabber the camera will be initialized with the corresponding pattern.
'bits_per_channel' <default> 8 integer pre-defined The value is not used, so a default value is returned.
'camera_firmware_version' <version> integer dynamic Camera firmware version.
'camera_fpga_version' <version> integer dynamic Camera FPGA version.
'camera_model' 'STC-MB202USB', 'STC-MC202USB', 'STC-TB202USB', 'STC-TC202USB', 'STC-B33USB', 'STC-C33USB', 'STC-MB33USB', 'STC-MC33USB', 'STC-TB33USB', 'STC-TC33USB', 'STC-B83USB', 'STC-C83USB', 'STC-MB83USB', 'STC-MC83USB', 'STC-TB83USB', 'STC-TC83USB', 'STC-MB133USB', 'STC-MC133USB', 'STC-TB133USB', 'STC-TC133USB', 'STC-MB152USB', 'STC-MC152USB', 'STC-TB152USB', 'STC-TC152USB', 'STC-MBA5MUSB3', 'STC-MCA5MUSB3' string pre-defined Camera model.
'camera_type' '<default>' 'default' string pre-defined The value is not used, so a default value is returned.
'camera_vendor_id' <id> integer dynamic Camera vendor id.
'color_interpolation' 'bicubic', 'bilinear', 'color_reduction', 'nearest_neighbor', 'none_color', 'none_mono'
  • 'none_color' (for monochrome cameras)
  • 'bilinear' (for color cameras).
string dynamic Color interpolation.
'color_space' 'gray', 'raw', 'rgb' 'default' string pre-defined Desired color space and thus the number of image channels of the resulting HALCON image.
'continuous_grabbing' 'disable', 'enable' 'enable' string pre-defined If the continuous grabbing mode is enabled, the camera grabs all the time. In this mode the operator grab_image does not grab synchronously, but behaves similar to grab_image_async. Using this mode you can achieve full frame rate. If the continuous grabbing mode is disabled, the camera is set to single frame capture.
'device' '<device_id>' '0' string dynamic Current device id.
'digital_gain' 0 ... 511 0 integer dynamic Digital gain value which is controlled by the FPGA.
'exposure' <time> integer dynamic Exposure time of the camera.
'exposure_delay' <delay> integer dynamic Delay of the exposure start. (see sentech documentation for more details).
'external_trigger' 'false', 'true' 'false' string pre-defined Status of the external trigger.
'field' '<default>' 'progressive' string pre-defined The value is not used, so a default value is returned.
'frame_clock' <clock> float dynamic Horizontal clock.
'frame_clock_totallines' <lines> float dynamic Total number of lines including the blanking.
'gain' 0 ... 255 0 integer dynamic Gain value.
'generic' <default> -1 integer pre-defined The value is not used, so a default value is returned.
'grab_timeout' <milliseconds> 5000 integer pre-defined Current grab timeout in milliseconds.
'horizontal_resolution' <resolution> 1 integer pre-defined Current value of horizontal resolution.
'image_available' 0, 1 integer dynamic 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.
'image_height' <height> 0 integer pre-defined Height of the desired image part ('0' stands for the complete image).
'image_width' <width> 0 integer pre-defined Width of the desired image part ('0' stands for the complete image).
'io_pin_direction0' 'input', 'output' string dynamic Sets the I/O setting of pin 0.
'io_pin_direction1' 'input', 'output' string dynamic I/O setting of pin 1.
'io_pin_direction2' 'input', 'output' string dynamic I/O setting of pin 2.
'io_pin_direction3' 'input', 'output' string dynamic I/O setting of pin 3.
'io_pin_mode0' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string dynamic I/O setting of pin 0.
'io_pin_mode1' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string dynamic I/O setting of pin 1.
'io_pin_mode2' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string dynamic I/O setting of pin 2.
'io_pin_mode3' 'out_disable', 'out_general_output', 'out_trigger_output_programmable', 'trigger_output_loop_through', 'out_exposure_end', 'out_ccd_read_end_output', 'out_strobe_output_programmable', 'out_strobe_output_exposure', 'in_disable', 'in_general_input', 'in_trigger_input', string dynamic I/O setting of pin 3.
'io_pin_polarity0' 'positive', 'negative' string dynamic I/O setting of pin 0.
'io_pin_polarity1' 'positive', 'negative' string dynamic I/O setting of pin 1.
'io_pin_polarity2' 'positive', 'negative' string dynamic I/O setting of pin 2.
'io_pin_polarity3' 'positive', 'negative' string dynamic I/O setting of pin 3.
'line_in' <default> 0 integer pre-defined The value is not used, so a default value is returned.
'name' 'Sentech' string pre-defined Name of the HALCON interface.
'port' <default> 0 integer pre-defined The value is not used, so a default value is returned.
'readout_delay' <delay> integer dynamic Image readout delay (time between the exposure end and starting the image readout).
'revision' '<revision>' string pre-defined Revision number of the Sentech interface.
'scan_mode' 'normal', 'partial_1', 'partial_2', 'partial_4', 'binning', 'binning_partial', 'binning_partial_1', 'binning_partial_2', 'binning_partial_4' string dynamic 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.
'start_async_after_grab_async' 'disable', 'enable' 'enable' string pre-defined Status of 'start_async_after_grab_async'.
'start_column' <column> 0 integer pre-defined Returns the current start column of the HALCON image.
'start_row' <row> 0 integer pre-defined Returns the current start row of the HALCON image.
'strobe_end_duration' <duration> integer dynamic Pulse duration of the output strobe control signal.
'strobe_start_delay' <delay> integer dynamic Delay of the output strobe control signal.
'trigger_pulse_delay' <delay> integer dynamic Delay of the output trigger signal.
'trigger_pulse_duration' <duration> integer dynamic Pulse duration of the output trigger signal.
'trigger_signal' 'falling', 'rising' 'rising' string pre-defined Type of the trigger signal.
'vertical_resolution' <resolution> 1 integer pre-defined Current value of vertical resolution.
'volatile' 'disable', 'enable' 'disable' string pre-defined Grayscale only. In the volatile mode the two 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!
'white_balance' 'disable', 'enable' 'disable' string pre-defined Enables/disables the white balancing.
'white_balance_gain_b' 0 ... 640 128 integer dynamic Blue gain parameter for the white balance.
'white_balance_gain_gb' 0 ... 640 128 integer dynamic Green and blue gain parameter for the white balance.
'white_balance_gain_gr' 0 ... 640 128 integer dynamic Green and red gain parameter for the white balance.
'white_balance_gain_r' 0 ... 640 128 integer dynamic Red gain parameter for the white balance.
'whtie_balance_mode' 'auto', 'manual', 'oneshot' string dynamic White balance mode.

Operator set_framegrabber_lut

Not supported by this interface.

Operator get_framegrabber_lut

Not supported by this interface.

Operator set_framegrabber_callback

Not supported by this interface.

Operator get_framegrabber_callback

Not supported by this interface.

Operator grab_image_start

Starts a new asynchronous grab. See also grab_image_start.

Operator grab_image

grab_image starts a new synchronous grab. See also grab_image. Note that the interface converts the image from the device to the desired image format specified by the parameters 'image_width', 'image_height', 'start_row', 'start_column', 'bits_per_channel', and 'color_space'.

Operator grab_image_async

grab_image_async returns an image and starts the next asynchronous grab. See also grab_image_async. Note that the interface converts the image from the device to the desired image format specified by the parameters 'image_width', 'image_height', 'start_row', 'start_column', 'bits_per_channel', and 'color_space'.

Operator grab_data

Not supported by this interface.

Operator grab_data_async

Not supported by this interface.

Operator close_framegrabber

This operator closes the device. See also close_framegrabber.

HDevelop Examples

For this interface there are the following examples available:
  • sentech.hdev - Benchmark
  • sentech_2cameras.hdev - Concurrent grabbing from two connected cameras.
  • sentech_parameters.hdev - Lists all parameters of a device.
  • sentech_simple.hdev - A simple example to show the usage of the interface.
  • sentech_trigger.hdev - Example for grabbing images with external triggering.

Release Notes

  • Revision 5.5 (Sep 9, 2016):
  • Revision 5.4 (Aug 28, 2013):
    • Improved implementation of info_framegrabber(..., 'info_boards', ...) to return also the name of the camera model.
    • Improved open_framegrabber to enable opening cameras in any particular order.
    • Added HDevelop example program sentech_2cameras.hdev.
  • Revision 5.3 (Jul 1, 2013):
    • Fixed memory leak in close_framegrabber.
    • Fixed bug in info_framegrabber(..., 'device', ...) in case it was called after a device has already been opened.
    • Fixed bug in info_framegrabber(..., 'bits_per_channel', ...).
    • Fixed bug in open_framegrabber to prevent opening the same device a second time.
    • Adapted the input parameters of open_framegrabber inside the HDevelop examples programs sentech_simple.hdev and sentech_parameters.hdev.
  • Revision 5.2 (Jun 12, 2013):
    • Extended parameter 'color_interpolation' by adding parameter value 'color_reduction'.
    • Improved error handling in open_framegrabber if external triggering is not supported.
  • Revision 5.1 (Jan 8, 2013):
    • Added support of new USB 3.0 camera models.
    • Fixed bug in software trigger mode. The acquired image was not the requested image.
    • Added missing entries in the documentation of the parameter 'camera_model'.
    • Fixed bug in info_framegrabber(..., 'parameters', ...). The parameter 'external_trigger' was erroneously reported twice.
  • Revision 5.0 (May 15, 2012):
    • HALCON 11 version of the interface (included in HALCON 11 DVD).
    • Fixed thread safety problem in grab_image and grab_image_async that could occur if a pending grab was aborted via the 'do_abort_grab' parameter of set_framegrabber_param.
    • Adapted to Sentech SDK version 1.0.0.7.
    • Added missing 'io_pin_*' parameter descriptions to documentation.
    • Added support of Windows x64.
  • Revision 4.0 (Sep 22, 2009):
    • HALCON 10 version of the interface (included in HALCON 10 DVD).
    • First official release.