Sei sulla pagina 1di 17

HALCON 11.

0 / Image Acquisition Interfaces

Image Acquisition Interface for Silicon Software Boards


Interface: Revision: Date: HALCON Version: SiliconSoftware 5.4 2013-06-12 11.0

General System Requirements Features Limitations Parameters for info_framegrabber Parameters for open_framegrabber Parameters for set_framegrabber_param Parameters for get_framegrabber_param Operator set_framegrabber_lut Operator get_framegrabber_lut Operator set_framegrabber_callback Operator get_framegrabber_callback Operator grab_image_start Operator grab_image Operator grab_image_async Operator grab_data Operator grab_data_async Operator close_framegrabber Parameterization of GigE Vision Cameras Support of Binarization SmartApplet Family Support of Segmentation SmartApplet Family Support of 3D Triangulation SmartApplet Family Support of Multi RoI Visual Applet Modules HDevelop Examples Release Notes

General
This page provides the documentation of the HALCON SiliconSoftware interface for accessing the microEnable III, IV-A, and IV-V boards from Silicon Software GmbH. Registered customers can download the latest revision of this interface from the MVTec W W W server.

System Requirements
Intel compatible PC with W indows XP/Vista/7 or W indows XP/Vista/7 x64 Edition. Successfully installed Silicon Software driver (version 5.2.1 or higher). Make sure the environment variable %SISODIR5% is set correctly to the Silicon Software base directory. Visual Studio C++ 2008 Redistributable Runtime Package, particularly msvcp90.dll. If this package is not installed please download and install it from the Microsoft Download Center for W indows x86 or W indows x64. Note: It is not sufficient to copy the missing files! Suitable hardware applet, e.g., an acquisition applet, SmartApplet or a specific applet generated by Silicon Software VisualApplets together with the corresponding mcf-file. This configuration file can be easily created via the Silicon Software microDisplay application. HALCON image acquisition interface hAcqSiliconSoftware.dll or hAcqSiliconSoftwarexl.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
1

Support of microEnable frame grabber boards from Silicon Software with Camera Link and GigE interface. Support of acquisition applets with more than one DMA channel. Approach of multiple frame grabber boards. Support of pre-processing functionality via SmartApplets and VisualApplets. Support of Segmentation SmartApplets via grab_data and grab_data_async to get also the preprocessed blob data. Support of Binarization SmartApplets via grab_image and grab_image_async to get the gray-value and the binary image. Support of 3D Triangulation SmartApplets via grab_data and grab_data_async to get a disparity image that is calculated on the base of a laser line. Support of coprocessor functionality with microEnable IV-V frame grabber boards. Synchronous and asynchronous grabbing. External and software trigger. Cropping of image parts. Software control of the digital input and output lines.

Limitations
The knee lut functionality not yet supported.

Parameters for info_framegrabber


Parameter
'bits_per_channel' 'camera_type' 'color_space' 'defaults' 'device' 'external_trigger' 'field' 'general' 'generic' [] ['CAMFILE:', 'mcf', 'C:\\'] [] [1, 1, 0, 0, 0, 0, 'interlaced', 8, 'gray', -1.0, 'false', '', '0', 0, 0] ['0', '1', '2', '3'] ['false', 'true'] [] [] [' ', 'discovery_timeout= <ms> ', 'num_buffers= <num> ', 'num_dma_channels= <num> '] 1 [] [] ['device: <device_id> board_type: <board_type> '] ['<parameters> '] ['<parameters> '] string string string string dynamic string string mixed string string string

Value List

Type

Kind
Ignored.

Description

pre-defined Syntax for the camera configuration file. Ignored. pre-defined Default values for open_framegrabber. pre-defined Pre-defined list of possible device numbers. pre-defined Values for the external trigger. Unused. pre-defined Information about the HALCON SiliconSoftware interface. pre-defined Value list for the Generic parameter.

'horizontal_resolution' 'image_height' 'image_width' 'info_boards' 'parameters' 'parameters_readonly'

integer pre-defined Value list for horizontal resolution. Unsupported query. Unsupported query. A list of the available devices.

pre-defined Pre-defined parameters of the HALCON interface. pre-defined Pre-defined read-only parameters of the HALCON interface. pre-defined Pre-defined write-only parameters of the HALCON interface.

'parameters_writeonly' ['<parameters> '] 'port' 'revision' [0, 1, 2, 3] '<revision> '

integer pre-defined Pre-defined list of possible port numbers. string pre-defined Revision number of the SiliconSoftware

interface. 'start_column' 'start_row' 'vertical_resolution' [] [] 1 Unsupported query. Unsupported query. integer pre-defined Value list for vertical resolution.

Parameters for open_framegrabber


Parameter
Name HorizontalResolution 1

Values
'SiliconSoftware'

Default Type
string 1

Description
Name of the HALCON interface.

integer Ignored (the desired image resolution is set via the microEnable configuration file specified in the CameraType parameter!). integer Ignored (the desired image resolution is set via the microEnable configuration file specified in the CameraType parameter!). integer Width of the desired image part ('0' stands for the maximum image height). This value has to be equal or smaller than the maximum image height. If the value does not fit in the step width, it is rounded to next valid value. integer Height of the desired image part ('0' stands for the maximum image height). This value has to be equal or smaller than the maximum image height. If the value does not fit in the step width, it is rounded to next valid value. integer Row coordinate of the upper left pixel within the desired image part. integer Column coordinate of the upper left pixel within the desired image part. Ignored. Ignored (the desired pixel depth will be set accordingly to the parameter settings in the microEnable configuration file). Ignored (the desired color space will be set accordingly to the parameter settings in the microEnable configuration file).

VerticalResolution

ImageWidth

0, <width>

ImageHeight

0, <height>

StartRow StartColumn Field BitsPerChannel

<row> <column> -----

0 0

ColorSpace

---

Generic

' ', ['discovery_timeout= <ms> ', 'num_buffers= <num> ', 'num_dma_channels= <num> '], -1

-1

mixed

discovery_timeout With the Generic parameter 'discovery_timeout' a time in ms can be specified to detect the devices connected to a Silicon Software GigE Vision board. Default: 2000. num_buffers With the Generic parameter 'num_buffers' the actual number of image buffers used in the HALCON acquisition interface can be set before the camera is initialized. Note that the parameter must be specified as a string, e.g., 'num_buffers=5'. Note that depending on the image size of the used camera a large number of buffers can exceed the available memory size of your computer. Default: 2. num_dma_channels With the Generic parameter 'num_dma_channels' the user can specify the number of actual used DMA channels supported by the applet (see also the use of

DmaToPC or SmartApplets). If an applet uses multiple DMA channels, the parameter 'num_dma_channels' has to match this number, e.g., if a SmartApplet with two output DMA channels is used, the user must set 'num_dma_channels=2'. With the Port parameter value set to 0, the HALCON SiliconSoftware interface will provide a multichannel image on the microEnable DMA channels 0 and 1 on every call of grab_image or grab_image_async. Default: 1. ExternalTrigger 'false', 'true' 'false' string If set to 'true', the trigger mode will be set to 'async_trigger', otherwise the configuration of the camera file will be used. Specify the name (including the full path name) of the desired camera configuration file (mcf file). To configure a specific camera setup please use the microDisplay program which is part of microEnable software. Number of the frame grabber board (passed as a string!).

CameraType

'<mcf_file> '

''

string

Device Port

'0', '1', ... 0, 1, 2, 3

'0' 0

string

integer Specify the port the camera is connected to. Corresponds to the internally used DMA channel (0 for Port A, 1 for Port B, ...) Ignored.

LineIn

---

Parameters for set_framegrabber_param


Note that most parameters of this interface are generic, i.e. all implemented HALCON parameters can be queried by calling info_framegrabber(...,'parameters',...). All actually available parameters and also the generic applet parameters can be queried by calling get_framegrabber_param(...,'available_param_names',...). Parameter
'blob_area'

Values
'disable', 'enable'

Type
string

Description
Controls the grab_data/grab_data_async data tuple. The area represents the number of pixels from a detected blob. If this feature is disabled the information is not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). Controls the grab_data/grab_data_async data tuple. The bounding box is represented by the upper-left row, upper-left column, lower-left row, and lower-left column of each blob. If this feature is disabled the four coordinates are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). Controls the grab_data/grab_data_async data tuple. Returns the coordinate row and coordinate column from the center of gravity of each blob. If this feature is disabled the two coordinates are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). Controls the grab_data/grab_data_async data tuple. The contour length is divided into a orthogonal and diagonal contour length. If this feature is disabled the two contour length values are not present. Note that this functionality is only

'blob_bounding_box'

'disable', 'enable'

string

'blob_center_of_gravity'

'disable', 'enable'

string

'blob_contour_length'

'disable', 'enable'

string

available in combination with a Segmentation SmartApplet (Blob). 'blob_region' 'disable', 'enable' string Controls the grab_data/grab_data_async HALCON regions. The region information is derived by the bounding box given by the Segmentation SmartApplet. If this feature is disabled the HALCON regions are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). Assign a particular signal to Camera Link's CC0 line. Assign a particular signal to Camera Link's CC1 line. Assign a particular signal to Camera Link's CC2 line. Assign a particular signal to Camera Link's CC3 line. Activate or deactivate the continuous grabbing mode. If the continuous mode is enabled, the frame grabber board will grab all the time and the images will queued in the internal given buffers (see parameter 'num_buffers'). Note that in this mode you can acquire images also from line scan cameras without losing any image data. Default: 'disable'. Activate or deactivate the coprocessor mode. If the coprocessor mode is active the parameter 'do_process_image' can be used to send an image to the frame grabber. The frame grabber specific applet will process the image immediately. The processed image must be fetched via grab_image_async. During the activation of the coprocessor mode the current image processing will be stopped to adapt the buffer settings accordingly. Please check the Silicon Software documentation to get further information about generating an applet containing the coprocessor functionality. Up to now this functionality is only available with microEnable IV fx1/VD1 frame grabber.

'cc0_select' 'cc1_select' 'cc2_select' 'cc3_select' 'continuous_grabbing'

'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'disable', 'enable'

string string string string string

'coprocessor'

'disable', 'enable'

string

'current_buffer_index' 'digital_output' 'do_abort_grab' 'do_exsync' 'do_flash' 'do_force_trigger'

0 ... <num_buffers> -1 0, 1, 2, 3 --'disable', 'enable' 'disable', 'enable' ---

integer Index of the current image buffer, see also parameter 'num_buffers'. integer Combination of the two digital output signals. Cancel current grab. string string Switch on/off the exsync signal to the camera. Switch on/off the flash signal to the camera. Send a software trigger from the application to the camera. This action parameter is only applicable when the trigger mode is set to 'async_software_trigger'. integer Sends a HALCON image surrogate to the frame grabber for processing, see also parameter 'coprocessor'. This surrogate should be generated by calling the operator obj_to_integer. integer Exposure time in microseconds. string string Polarity of the exposure signal. Polarity of the flash signal.

'do_process_image'

<surrogate>

'exposure' 'exposure_signal' 'flash_signal'

0 ... 1000000 'high_active', 'low_active' 'high_active', 'low_active'

'frame_rate' 'grab_timeout'

0.5 ... 20000.0 <milliseconds>

float

Number of images per second.

integer Specify the desired timeout in milliseconds for aborting a pending grab. Only values divisible by 1000 are accepted. In any other case the value will be rounded to the next lower value. If -1 is specified, the timeout is set to INFINITE. The smallest possible timeout value is 2000. Default: 5000. integer Height of the desired image part. Note that due to image buffer re-allocation this setting may take some time. string Enable or disable the image trigger.

'image_height'

<height>

'image_trigger' 'image_trigger_input' 'image_trigger_mode'

'disable', 'enable' 0, 1, 2, 3 'async_gated', 'async_trigger', 'free_run'

integer Input source, if the image trigger is in external mode. string Image trigger for line scan cameras generates a so-called Image Gate, which groups all lines to a valid frame, if it is active. Specify the desired image trigger mode: 'async_gated': Image Gate is as long active as the external trigger source is active. 'async_trigger': Image Gate is started by an external trigger signal. 'free run': Image Gate is valid all the time. In all modes the Image Gate becomes inactive after reaching an image height of N lines.

'image_trigger_signal' 'image_width'

'falling', 'rising' <width>

string

Input signal of the image trigger, in case external mode.

integer Width of the desired image part. Note that due to image buffer re-allocation this setting may take some time. integer If your external trigger signal is too fast, you can set the value of how often the frequency of the trigger signal has to be divided. integer In additional to the downscale value you can set the phase position. For example, a value of 4 means to turn the phase position about 90. integer Line exposure. float float Line period. Delay of the line trigger.

'line_downscale'

1 ... 255

'line_downscale_phase'

1 ... 255

'line_exposure' 'line_period' 'line_trigger_delay' 'line_trigger_input' 'line_trigger_mode'

0 ... 20000 0 ... 4369.05 0 ... 2184.517 0, 1, 2, 3 'grabber_controlled', 'async_trigger', 'grabber_controlled_gated'

integer Input source of the line trigger. string Specify the line trigger mode: 'grabber_controlled' means that a periodical signal is created, which defines the line frequency. In 'async_trigger' mode the signal is created by an external trigger. 'grabber_controlled_gated' is similar to the 'grabber_controlled' mode, except that it is only active, if the Image Gate is active. Polarity of the line trigger signal. Specifies the base name of the RoI module. This functionality is only supported if a RoI module from VisualApplets is used.

'line_trigger_signal' 'multi_roi_module_name'

'falling', 'rising' <string>

string string

'multi_roi_num'

1 ... <num>

integer Specifies the number of RoIs to request. This functionality is only supported if a RoI module from VisualApplets is used.

'multi_roi_xlength'

1 ... <image_width>

integer Specifies the xlength (width) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. integer Specifies the xoffset (start column) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. integer Specifies the ylength (height) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. integer Specifies the yoffset (start row) for each RoI In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. integer Some generic applet parameter values are provided as parameter fields. To readout the parameter fields the number of parameter values has to set in advance since querying this information internally is currently not supported by the Silicon Software SDK. The number of field parameters can be determined by querying the generic parameter which contains the number of field parameters. It is also sufficient to remember the number of parameters if the values were set before. Please note that in case of a erroneously set number, e.g., a to height value, a misleading result will be returned. integer Controls the number of scans to define the height of the disparity image. This parameter is only needed by the 3D Triangulation SmartApplets in combination with the operators grab_data and grab_data_async. In any other case this parameter is ignored. Per default the 'num_scans' parameter is 1. In this case only one disparity image with one disparity line and one camera image will be created. Please note that the 'num_scans' parameter affects the number of internal grabbed images. In case of a slow camera a high number of scans needs time to achieve the images. See also the section "Support of 3D Triangulation SmartApplet Family" below. integer Switch to the camera with the specified number (0 for Port A, 1 for Port B). string Switch the shaft encoder on/off. By enabling it the encoder compensation is reset.

'multi_roi_xoffset'

1 ... <image_width>

'multi_roi_ylength'

1 ... <image_height>

'multi_roi_yoffset'

1 ... <image_heigth>

'num_field_parameter'

1 ... <num>

'num_scans'

1 ... <num>

'port' 'shaft_encoder' 'shaft_encoder_input'

0, 1 'disable', 'enable' 0, 1, 2, 3

integer Selects the input signal for source B of the shaft encoder. integer Determines the leading signal (direction) of the shaft encoder filter. 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.

'shaft_encoder_leading_source' 0, 1, 2, 3 'start_async_after_grab_async' 'disable', 'enable'

'start_column'

<column>

integer Column coordinate of the upper left pixel within the desired image part.

'start_row' 'strobe_delay' 'trigger_input' 'trigger_mode'

<row> <microseconds> 0, 1, 2, 3 'async_software_trigger', 'async_trigger', 'free_run', 'grabber_controlled'

integer Row coordinate of the upper left pixel within the desired image part. integer Strobe pulse delay in microseconds. integer Channel of the trigger input signal. string Specify the desired trigger mode: 'async_software_trigger': the image acquisition is performed by software via the action parameter 'do_force_trigger'. 'async_trigger': the image acquisition is forced by an external trigger signal. 'free_run': no signals are sent to the camera. 'grabber_controlled': the frame grabber sends a signal to the camera in order to control the image acquisition. string string Polarity of the trigger signal. 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!

'trigger_signal' 'volatile'

'falling', 'rising' 'disable', 'enable'

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]. 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. Parameter
'applet_type'

Values
'<type> '

Default

Type
string string

Kind
dynamic dynamic

Description
Type of the used applet if this parameter is actually supported by the used applet. A tuple containing the names of all available parameters. In contrast to this, the call of info_framegrabber(...'parameters',...)' returns only the pre-defined list of parameters, without the additional applet-specific parameters.

'available_param_ ['<names> '] names'

'bits_per_channel' 'blob_area'

<default> 'disable', 'enable'

8 'enable'

integer pre-defined The value is not used, so a default value is returned. string pre-defined Controls the grab_data/grab_data_async data tuple. The area represents the number of pixels from a detected blob. If this feature is disabled the information is not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). pre-defined Controls the grab_data/grab_data_async data tuple.

'blob_bounding_b

'disable', 'enable'

'disable'

string

ox'

The bounding box is represented by the upper-left row, upper-left column, lower-left row, and lower-left column of each blob. If this feature is disabled the four coordinates are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). 'enable' string pre-defined Controls the grab_data/grab_data_async data tuple. Returns the coordinate row and coordinate column from the center of gravity of each blob. If this feature is disabled the two coordinates are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). pre-defined Controls the grab_data/grab_data_async data tuple. The contour length is divided into a orthogonal and diagonal contour length. If this feature is disabled the two contour length values are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). pre-defined Controls the grab_data/grab_data_async HALCON regions. The region information is derived by the bounding box given by the Segmentation SmartApplet. If this feature is disabled the HALCON regions are not present. Note that this functionality is only available in combination with a Segmentation SmartApplet (Blob). dynamic Actual board type. Camera status on the used port: If the return value is 1 an active camera on the specified port is found, otherwise the return value is 0.

'blob_center_of_gr 'disable', 'enable' avity'

'blob_contour_len gth'

'disable', 'enable'

'enable'

string

'blob_region'

'disable', 'enable'

'enable'

string

'board_type' 'camera_status'

'<type> ' <status>

string

integer dynamic

'camera_type' 'cc0_select'

'<mcf_file> ' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' 'clk', 'exsync', '!exsync', 'exsync2', '!exsync2', 'flash', '!flash', 'gnd', 'vcc' '<color_space> ' 'disable', 'enable'

'<mcf_file>' string string

pre-defined Current camera type. dynamic Assign a particular signal to Camera Link's CC0 line.

'cc1_select'

string

dynamic

Assign a particular signal to Camera Link's CC1 line.

'cc2_select'

string

dynamic

Assign a particular signal to Camera Link's CC2 line.

'cc3_select'

string

dynamic

Assign a particular signal to Camera Link's CC3 line.

'color_space' 'continuous_grabb ing'

'gray' 'disable'

string string

pre-defined The value is not used, so a default value is returned. pre-defined Activate or deactivate the continuous grabbing mode. If the continuous mode is enabled, the frame grabber board will grab all the time and the images will queued in the internal given buffers (see parameter 'num_buffers'). Note that in this mode you can acquire images also from line scan cameras without losing any image data. Default: 'disable'. pre-defined Activate or deactivate the coprocessor mode. If the coprocessor mode is active the parameter 'do_process_image' can be used to send an image to the frame grabber. The frame grabber specific applet will process the image immediately. The processed image must be fetched via grab_image_async. During the activation of the coprocessor mode the current

'coprocessor'

'disable', 'enable'

'disable'

string

image processing will be stopped to adapt the buffer settings accordingly. Please check the Silicon Software documentation to get further information about generating an applet containing the coprocessor functionality. Up to now this functionality is only available with microEnable IV fx1/VD1 frame grabber. 'current_buffer_in dex' 'device' 'digital_input' 'digital_output' 'exposure' 'exposure_signal' 'external_trigger' 'field' 'flash_signal' 'frame_rate' 'generic' 0 ... <num_buffers> -1 '0', '1', ... <digin> 0, 1, 2, 3 <microseconds> 'high_active', 'low_active' 'false', 'true' '<default> ' 'high_active', 'low_active' 0.5 ... 20000.0 ' ', ['discovery_timeout = <ms> ', 'num_buffers= <num > ', 'num_dma_channel s= <num> '], -1 <milliseconds> -1 4000 '0' integer dynamic string Index of the current image buffer, see also parameter 'num_buffers'.

pre-defined Current device id. Read the current status of the digital input lines. Combination of the two digital output signals. Exposure time in microseconds.

integer dynamic integer dynamic integer dynamic

'low_active' string 'false' 'interlaced' string string

pre-defined Polarity of the exposure signal. pre-defined Status of the external trigger. pre-defined The value is not used, so a default value is returned. pre-defined Polarity of the flash signal. dynamic Number of images per second.

'low_active' string float mixed

pre-defined Values of the Generic parameter.

'grab_timeout'

5000 1

integer pre-defined Current grab timeout in milliseconds. integer pre-defined Current value of horizontal resolution. 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.

'horizontal_resolut <resolution> ion' 'image_available' 0, 1

'image_height' 'image_tag' 'image_trigger' 'image_trigger_in put' 'image_trigger_m ode' 'image_trigger_sig nal' 'image_width' 'internal_device_p ointer' 'line_downscale'

<height> <number> 'disable', 'enable' 0, 1, 2, 3 'async_gated', 'async_trigger', 'free_run' 'falling', 'rising' <width> <pointer> 1 ... 255

integer pre-defined Height of the desired image part ('0' stands for the complete image). integer dynamic string dynamic Image tag of the most recently grabbed image. Enable or disable the image trigger. Input source, if the image trigger is in external mode. Image trigger mode.

integer dynamic string dynamic

string 0

dynamic

Input signal of the image trigger, in case external mode.

integer pre-defined Width of the desired image part ('0' stands for the complete image). integer dynamic integer dynamic Pointer to the device which enables direct device access. Use at your own risk! If your external trigger signal is too fast, you can set the value of how often the frequency of the trigger signal has to be divided.

10

'line_downscale_p hase' 'line_exposure' 'line_in' 'line_period' 'line_trigger_dela y' 'line_trigger_input ' 'line_trigger_mod e'

1 ... 255

integer dynamic

In additional to the downscale value you can set the phase position. For example, a value of 4 means to turn the phase position about 90. Line exposure.

0 ... 20000 <default> 0 ... 4369.05 0 ... 2184.517 0, 1, 2, 3 'grabber_controlled', 'async_trigger', 'grabber_controlled _gated' 0

integer dynamic

integer pre-defined The value is not used, so a default value is returned. float float dynamic dynamic Line period. Delay of the line trigger. Input source of the line trigger. Specify the line trigger mode: 'grabber_controlled' means that a periodical signal is created, which defines the line frequency. In 'async_trigger' mode the signal is created by an external trigger. 'grabber_controlled_gated' is similar to the 'grabber_controlled' mode, except that it is only active, if the Image Gate is active. Polarity of the line trigger signal. Specifies the base name of the RoI module. This functionality is only supported if a RoI module from VisualApplets is used. Specifies the number of RoIs to request. This functionality is only supported if a RoI module from VisualApplets is used. Specifies the xlength (width) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. Specifies the xoffset (start column) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. Specifies the ylength (height) for each RoI. In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used. Specifies the yoffset (start row) for each RoI In case of multiple RoIs, the parameter values are specified as tuple. This functionality is only supported if a RoI module from VisualApplets is used.

integer dynamic string dynamic

'line_trigger_signa l' 'multi_roi_module _name' 'multi_roi_num'

'falling', 'rising' <string>

string string

dynamic dynamic

1 ... <num>

integer dynamic

'multi_roi_xlength' 1 ... <image_width>

integer dynamic

'multi_roi_xoffset'

1 ... <image_width>

integer dynamic

'multi_roi_ylength'

1 ... <image_height>

integer dynamic

'multi_roi_yoffset'

1 ... <image_heigth>

integer dynamic

'name' 'num_buffers' 'num_dma_chann els' 'num_field_param eter'

'SiliconSoftware' <number> <number> 1 ... <num> 2

string

pre-defined Name of the HALCON interface.

integer pre-defined Number of buffers used for the image acquisition. integer dynamic integer dynamic Number of internally used DMA channels. Some generic applet parameter values are provided as parameter fields. To readout the parameter fields the number of parameter values has to set in advance since querying this information internally is currently not supported by the Silicon Software SDK. The number of field parameters can be determined by querying the generic parameter which contains the number of field parameters. It is also sufficient to remember the number of parameters if the values were set before. Please note that in case of a erroneously set number, e.g., a to height value, a misleading result will be returned.

11

'num_scans'

1 ... <num>

integer dynamic

Controls the number of scans to define the height of the disparity image. This parameter is only needed by the 3D Triangulation SmartApplets in combination with the operators grab_data and grab_data_async. In any other case this parameter is ignored. Per default the 'num_scans' parameter is 1. In this case only one disparity image with one disparity line and one camera image will be created. Please note that the 'num_scans' parameter affects the number of internal grabbed images. In case of a slow camera a high number of scans needs time to achieve the images. See also the section "Support of 3D Triangulation SmartApplet Family" below.

'port' 'revision' 'serial_number' 'shaft_encoder' 'shaft_encoder_in put' 'shaft_encoder_le ading_source' 'start_async_after_ grab_async' 'start_column'

0, 1, 2, 3 '<revision> ' '<serial> ' 'disable', 'enable' 0, 1, 2, 3 0, 1, 2, 3 'disable', 'enable' <column>

integer pre-defined Port number. string string string pre-defined Revision number of the SiliconSoftware interface. dynamic dynamic Serial number of the board. Switch the shaft encoder on/off. By enabling it the encoder compensation is reset. Selects the input signal for source B of the shaft encoder. Determines the leading signal (direction) of the shaft encoder filter.

integer dynamic integer dynamic 'enable' 0 string

pre-defined Status of 'start_async_after_grab_async'.

integer pre-defined Column coordinate of the upper left pixel of the desired image part. If the value does not fit in the step width, it is rounded to next valid value. integer pre-defined Row coordinate of the upper left pixel of the desired image part. If the value does not fit in the step width, it is rounded to next valid value. integer dynamic integer dynamic Strobe pulse delay in microseconds. Gets the timestamp (32bit) from the previously grabbed image in microseconds. If 'continuous_grabbing' is enabled, the parameter returns always the most recent timestamp. Channel of the trigger input signal. Specify the desired trigger mode: 'async_software_trigger': the image acquisition is performed by software via the action parameter 'do_force_trigger'. 'async_trigger': the image acquisition is forced by an external trigger signal. 'free_run': no signals are sent to the camera. 'grabber_controlled': the frame grabber sends a signal to the camera in order to control the image acquisition.

'start_row'

<row>

'strobe_delay' 'timestamp'

<microseconds> <microseconds>

'trigger_input' 'trigger_mode'

0, 1, 2, 3 'async_software_tri gger', 'async_trigger', 'free_run', 'grabber_controlled'

integer dynamic string dynamic

'trigger_signal' 'vertical_resolutio n' 'volatile'

'falling', 'rising' <resolution> 'disable', 'enable'

'falling' 1 'disable'

string

pre-defined Polarity of the trigger signal.

integer pre-defined Current value of vertical resolution. 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 sideeffect. Thus, you can only process one image while you grab another image. Older images are invalid!

12

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
The behavior of the operator depends on the used SmartApplets family. The operator is needed to work with the Segmentation and Triangulation SmartApplets family. Please see the section "Support of Segmentation SmartApplets Family" or "Support of Binarization SmartApplets Family" to get further information.

Operator grab_data_async
Same return values as grab_data, but here an asynchronous grab is started.

Operator close_framegrabber
This operator closes the device. See also close_framegrabber.

Parameterization of GigE Vision Cameras


The generic parameters of a GigE Vision camera can also be handled via the HALCON operators get_framegrabber_param and set_framegrabber_param. In this case the user has to add the prefix 'gbe:' to the parameter name, e.g., use set_framegrabber_param(...,'gbe:Gain',42) to set the camera parameter "Gain" to the value 42 or get_framegrabber_param(...,'gbe:Gain',...) to query the current value. To execute a write-only GigE Vision command parameter via the operator set_framegrabber_param, the user has to add the prefix 'gbex:' to the parameter name, e.g., use 13

set_framegrabber_param(...,'gbex:TriggerSoftware',1) to send a software trigger to a GigE Vision camera. The value of the parameter will be ignored. Note that the list of available camera parameters can not be queried in advance, e.g., by calling get_framegrabber_param(...'available_param_names'...) or info_framegrabber(...,'parameters',...). To list all actually available camera parameters you can use the Silicon Software GigE Explorer application.

Support of Binarization SmartApplet Family


W ith the Binarization SmartApplets family, the HALCON SiliconSoftware interface will deliver also a binary image which is calculated by the FPGA. W ith the Port parameter value set to 0, the interface will provide for each call of grab_image or grab_image_async a multi-channel image corresponding to the microEnable DMA channels 0 and 1. The first channel contains the standard image data. The second channel provides the calculated binary image. The specific settings (e.g., the threshold) ca be adjusted in the configuration file or by setting the generic Binarization SmartApplets parameters via set_framegrabber_param.

Support of Segmentation SmartApplet Family


W ith the Segmentation SmartApplets family, the user has the possibility to get preprocessed blob information by calling grab_data or grab_data_async. A Segmentation SmartApplet will find blobs which are based on a user specific parameterisation. The specific settings can be adjusted in the the configuration file or by setting the generic Segmentation SmartApplets parameter via set_framegrabber_param. To accelerate the call of grab_data/grab_data_async the calculation of these features can be disabled via the parameters 'blob_region', 'blob_center_of_gravity', 'blob_contour_length', 'blob_area', and 'blob_bounding_box'. By default, all features except the integer values for the bounding box are enabled. If all features are enabled, the region tuple will return the detected blobs and the data tuple will return the following integer values for each blob: cogx, cogy, conto, contd, area, bbx0, bby0, bbx1, bby1. Parameter
'image' 'contours' 'region' 'data' tuple with integers

Type

Count
1 not used

Description
Returns the grabbed image from DMA channel 0.

HALCON regions which are based on the bounding boxes of the blobs which are delivered by the Segmentation SmartApplets. Special data about each blob. The provided information about each blob will be delivered successively by one HALCON Tuple. Each blob provides the following information: Center of gravity (cogx,cogy) Contour length of the blob (conto,contd) Area size of the blob (area) Bounding box (bbx0,bby0,bbx1,bby1).

Support of 3D Triangulation SmartApplet Family


W ith the 3D Triangulation SmartApplets family, the HALCON SiliconSoftware interface will deliver also a disparity image that is calculated by the FPGA. The user has the possibility to receive this pre-processed image by calling grab_data or grab_data_async. To receive an image with multiple disparity lines at once, the number of disparity lines can be set via set_framerabber_param(...,'num_scans',...). The default is 1. Please use the generic 3D Triangulation SmartApplets parameter 'FG_3D_IMAGE_OUTPUT' to enable or disable the output of images which correspond to the calculated disparity image lines. By default, the parameter 'FG_3D_IMAGE_OUTPUT' is enabled, and grab_data or grab_data_async returns multiple 14

images. The first image is always the disparity image. Please note, if you change the parameter 'FG_3D_IMAGE_OUTPUT' after calling grab_data_async, a current pending grab will be aborted. Please use the generic 3D Triangulation SmartApplets parameter 'FG_3D_THRESHOLD' to set the threshold parameter that influences the detection of the laser line. The default value for this parameter is 155. The image width of the camera and the corresponding disparity image is always aligned (reduced) to a divisible value of 8 pixels. Parameter Type Count
'image' float

Description
Contains the disparity information in the first channel of the image parameter. The content of the image parameter is controlled by the HALCON parameter 'num_scans' and the generic SmartApplets parameter 'FG_3D_IMAGE_OUTPUT'. If the 'FG_3D_IMAGE_OUTPUT' parameter is set to 0 (laserline and image), the image parameter provides a multichannel image. not used not used not used

'contours' 'region' 'data'

Support of Multi RoI Visual Applet Modules


W ith the Multi RoI module provided by VisualApplets the HALCON SiliconSoftware image acquisition interface supports the request of multiple Region of Interests (RoI) for each buffered image. The RoIs are accessible via images returned by grab_data and grab_data_async. The configuration of the RoI module can be done by using the parameters listed in the table below. Please use the set_parameter_param and get_framegrabber_param operators as usual. To get further information about the RoI functionality, please read the module section provided in the VisualApplets documentation. Please use the following parameters to configure the RoI module:
multi_roi_module_name : Specifies multi_roi_num : Specifies multi_roi_xlength: Specifies multi_roi_xoffset: Specifies multi_roi_ylength: Specifies multi_roi_yoffset: Specifies the base name of the RoI module string the number of RoIs to request integer the xlength (width) for each RoI integer tuple the xoffset (start column) for each RoI integer tuple the ylength (height) for each RoI integer tuple the yoffset (start row) for each RoI integer tuple

Please note, if you have trouble setting the parameter 'multi_roi_num', please check the maximum number of RoIs provided by the RoI module. The maximum number can only be changed before the applet is generated. If an applet with RoI functionality is used, the parameter 'continuous_grabbing' is not supported. The multi RoI parameters are not accessible by the HALCON Image Acquisition Assistant.

HDevelop Examples
For this interface there are the following examples available: siliconsoftware_continuous.hdev - Grabbing images with continuous grabbing. siliconsoftware_gige_vision.hdev - Shows usage of a Silicon Software GigE Vision frame grabber. siliconsoftware.hdev - Benchmark siliconsoftware_parameters.hdev - Lists all parameters of a device. siliconsoftware_simple.hdev - A simple example to show the usage of the interface. siliconsoftware_smartapplets.hdev - Shows usage of Silicon Software SmartApplets. siliconsoftware_multiroi.hdev - Shows usage of Silicon Software VisualApplets' RoI functionality. siliconsoftware_fieldparameter.hdev - Shows how to access the Silicon Software generic field parameter. siliconsoftware_objectmodel3d.hdev - Shows usage of Silicon Software Triangulation SmartApplets, and how to create a HALCON 3D object model.

Release Notes
Revision 5.4 (Jun 12, 2013): Fixed bug in continuous grabbing mode. In case of a Standard Acquisition Applet with a single camera 15

that is not connected to Camera Link port A, a wrong DMA channel was internally selected. Fixed bug in buffer allocation during the activation of continuous grabbing. Added missing parameter 'do_process_image_values'. Fixed bug in close_framegrabber. Revision 5.3 (May 24, 2013): Adapted to Silicon Software SDK 5.2.1. Added support of VisualApplets modules with RoI functionality. Improved the 'generic' Silicon Software parameter configuration by adding access to field parameters. Added parameters 'multi_roi_module_name', 'multi_roi_num', 'multi_roi_xlength', 'multi_roi_xoffset', 'multi_roi_ylength', 'multi_roi_yoffset', and 'num_field_parameter'. Added new HDevelop example programs 'siliconsoftware_multiroi.hdev' and 'siliconsoftware_fieldparameter.hdev'. Fixed bug if an unknown 'description' parameter was used. Corrected documentation of the Generic parameter. Fixed bug in close_framegrabber when using more than one camera in case of Silicon Software GigE Vision boards. Fixed bug in open_framegrabber: The horizontal_resulution and vertical_resolution parameters are now ignored as documented. Adapted and unified all existing HDevelop example programs. Revision 5.2 (Oct 29, 2012): Fixed bug in parameter 'available_param_names'. Adapted evaluation of 'applet_type' parameter inside HDevelop example 'siliconsoftware_smartapplets.hdev'. Added generic parameter 'discovery_timeout'. Fixed bug in open_framegrabber. Cleanup the already opened device handles, if the initialization of a connected device or the initialization of the Silicon Software GigE Vision board fails. Added new example 'siliconsoftware_objectmodel3d.hdev'. Revision 5.1 (Jul 18, 2012): Extended grab_data and grab_data_async to support the 3D Triangulation SmartApplets family. Added parameter 'num_scans' to control the number of disparity lines. 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 can occur if grabbing was aborted via the 'do_abort_grab' parameter of set_framegrabber_param. Adapted return value if grab_image or grab_image_async was aborted by the user. The return value now is H_ERR_FGF ("Failed grabbing of an image"). Revision 4.4 (Feb 04, 2012): Fixed bug in the continuous grabbing mode. If a timeout occurred the internal used acquisition engine was erroneously restarted and the previously queued images were discarded. Added parameter 'image_available'. Improved error handling in open_framegrabber. Revision 4.3 (May 30, 2011): Improved continuous grabbing mode: Now, this mode supports to queue an arbitrary number of trigger signals (corresponding to the parameter 'num_buffers'). Added parameter 'image_tag'. Added support of GigE Vision command parameters. Revision 4.2 (Mar 15, 2011): Implemented grab_data and grab_data_async to enable the use of Segmentation SmartApplets (Blob). Added parameters 'blob_contour_length', 'blob_center_of_gravity', 'blob_area', 'blob_bounding_box', and 'blob_region' to control the Data and Region output parameters of grab_data and grab_data_async. Added parameter 'applet_type'. Fixed bug in 'continuous_grabbing'. Revision 4.1 (Sep 8, 2010): Adapted to Silicon Software SDK 5.1. 16

Support of Silicon Software GigE Vision boards including generic parameterization. Added functionality to use the SmartApplets or other applets with multiple DMA channels. Updated error handling in coprocessor mode, i.e., in this mode grab_image and grab_image_start will return the error H_ERR_FNS. Adapted the board names to new Silicon Software product names. HALCON 10 version of the interface (included in HALCON 10 DVD). Revision 4.0 (Mar 16, 2010): First official release.
Legal disclaimer regarding hyperlinks: This page may provide users with access by hypertext links to external, non-MVTec websites. Any such access is provided with the understanding that the contents of non-MVTec sites are beyond the control of MVTec Software GmbH, that MVTec Software GmbH makes no representations whatsoever about such sites, and that users shall proceed at their own risk. MVTec Software GmbH is not responsible for the privacy practices or the content of external, non-MVTec websites. Copyright notes: Copyright MVTec Software GmbH. All rights reserved. Unless otherwise stated, the copyright and similar rights in the contents of this page, including but not limited to all text, designs and images appearing herein, are copyrighted works owned by MVTec Software GmbH. "MVTec Software GmbH", "HALCON", and "ActivVisionTools" are registered trademarks of MVTec Software GmbH. All other brand names, designs, service marks and trademarks (whether or not registered) referenced or used herein are the property of their respective owners. acqdump 1.2 / hdoc 1.1 / Generated: Tue Jul 9 17:49:32 CEST 2013

17

Potrebbero piacerti anche