 |
|
HALCON 10 Image Acquisition Interface for Crevis USB 2.0 Cameras
This page provides the documentation of the HALCON Crevis image acquisition
interface for accessing the USB 2.0 cameras from
Crevis corporation.
Registered
customers can download the
latest revision
of this interface from the
MVTec WWW server.
Revision: 4.3
System Requirements
-
Intel compatible PC with Windows XP/Vista
and USB 2.0 interface.
-
Installed MCamU_Basic SDK and driver (version 2.0.0.2 or
higher) from Crevis. Typically, these files reside in
the directory %CREVIS_CAM_ROOT%.
-
HALCON image acquisition interface hAcqCrevis.dll or
hAcqCrevisxl.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
-
Multiple cameras.
-
Synchronous and asynchronous grabbing.
-
HRS and binning mode.
-
External trigger with adjustable trigger delay.
-
Software control of exposure and gain.
-
Software control of the strobe parameters.
Limitations
-
grab_data and grab_data_async are not supported.
-
No LUTs.
When using multiple Crevis cameras, please make sure that each cameras
has an unique Device ID. You can manually set these Device IDs
using the auxiliary program AdjCam.exe which is part of
the Crevis installation S/W.
Description
Parameters for
open_framegrabber():
|
Name
|
|
'Crevis'
|
|
The name of the HALCON image acquisition interface.
|
|
HorizontalResolution
|
1, 2
|
The desired horizontal image resolution.
Use 1 for full resolution, or 2 for binning horizontal.
Note that this parameter will be ignored if the used
camera model does not support binning.
Default: 1.
|
|
VerticalResolution
|
1, 2, 3, 4, 17, 18, 19, 20
|
The desired vertical image resolution. Use 1 for full resolution,
or 2~4 for HRS, 17 for binning vertical, and 18~20 for binning
vertical with HRS. Note that this parameter will be ignored if the
used camera model does not support this feature.
Default: 1.
|
|
ImageWidth
|
---
|
Ignored.
|
|
ImageHeight
|
0, height
|
The height of the desired image part (0 stands for the complete
image). Note that height will be ignored if the used
camera model does not support this feature.
Default: 0.
|
|
StartRow
|
0, row
|
The row coordinate of the upper left pixel within the desired image
part. Note that row will be ignored if the used
camera model does not support this feature.
Default: 0.
|
|
StartColumn
|
0, column
|
The column coordinate of the upper left pixel within the desired image
part. Note that column will be ignored if the used
camera model does not support this feature.
Default: 0.
|
|
Field
|
---
|
Ignored.
|
|
BitsPerChannel
|
-1, 8, 10
|
Number of bits per image channel. Please note that this parameter
must correspond to the PixelFormat setting in the camera, e.g.,
use 8 in case of PixelFormat=Mono8 and 10 for PixelFormat=Mono16.
To change the value in the camera, specify PixelFormat to Mono8
or Mono16 by using AdjCam.exe and re-start the camera.
Default: '-1' (saved value in camera).
|
|
ColorSpace
|
'default','gray', 'rgb', 'bayer'
|
Specifies the desired color space and thus the number of image
channels of the resulting HALCON image.
Default: 'default' (saved value in camera).
|
|
Generic
|
---
|
Ignored.
|
|
ExternalTrigger
|
'true', 'false'
|
Activate/deactivate external triggering. Default: 'false'.
|
|
CameraType
|
'default',
'MV-BS20U',
'MV-BX30U',
'MV-BV20U',
'MV-BV30U',
'MV-CS20U',
'MV-CX30U',
'MV-CV30U',
'MV-BS27U',
'MV-BX37U',
'MV-BV27U',
'MV-BV37U',
'MV-CS27U',
'MV-CX37U',
'MV-CV37U',
'3B-CV37U',
'MV-BU10U',
'MV-BU17U',
'MV-CU10U',
'MV-CU17U'
|
The camera type will be detected automatically ('default').
Default: 'default'.
|
|
Device
|
'-1', DeviceId (string)
|
The ID of the desired camera, see also
'Using Multiple Cameras' above.
Default: '-1' (searches for the first unused camera).
|
|
Port
|
---
|
Ignored.
|
|
LineIn
|
---
|
Ignored.
|
|
Parameters for
set_framegrabber_param():
|
'acquisition_invalid_time'
|
|
min ... max (long)
|
|
Used to check the validity of grabbed image.
If the time difference between the grabbed image and "grab command"
is less than this time, it means that the grabbed image is not newer
than the old image before calling "grab command".
Default: One frame time (milliseconds).
|
|
'black_level'
|
0 ... 255 (long)
|
Controls the analog black level as a raw integer value.
This represents a DC offset applied to the video signal.
|
|
'continuous_grabbing'
|
'disable', 'enable'
|
Used for special acquisition mode of real-time performance.
-
'disable': "One frame time" is more than acquisition_invalid_time.
-
'enable': acquisition_invalid_time is ignored.
|
|
'default_parameter_set'
|
'factory', 'user_set1'
|
Selects the kind of page of parameters to be loaded
when camera is reset.
-
'factory': Select the factory setting page.
-
'user_set1': Select the 'user_set1' page.
|
|
'do_abort_grab'
|
---
|
Aborts the current grab.
|
|
'do_save_parameter'
|
---
|
Save the parameters to selected page by 'save_parameter_set'.
|
|
'do_strobe_out'
|
---
|
Generates a strobe signal in applications by setting 'strobe_source'
to 'strobe_software'. Strobe level is defined by the 'strobe_signal'.
|
|
'do_force_trigger'
|
---
|
Forces an event trigger in applications by setting 'external_trigger'
to 'true' and 'trigger_source' to 'software'.
|
|
'exposure_time'
|
min ... max (float)
|
Sets the exposure time in milliseconds.
|
|
'external_trigger'
|
'true', 'false'
|
Enables/disables the trigger mode.
|
|
'gain'
|
0 ... 100 (long)
|
Controls the gain as raw integer value.
This is an amplification factor applied to the video signal.
|
|
'grab_timeout'
|
1 ... 32768 (long)
|
Specifies the desired timeout for aborting a pending grab
in milliseconds. Default : 5000.
|
|
'save_parameter_set'
|
'user_set1'
|
Selects the kind of page to save the current parameter.
-
'user_set1': Select the 'user_set1' page.
|
|
'start_async_after_grab_async'
|
'disable' , 'enable'
|
By default, at the end of grab_image_async a new asynchronous
grab command is automatically executed. If the parameter
'start_async_after_grab_async' is set to 'disable'
this new grab command is omitted. Default: 'enable'.
|
|
'strobe_delay'
|
0.0 ... 9.174 (float)
|
Used to delay the strobe signal in milliseconds.
|
|
'strobe_mode'
|
'off', 'timed', 'exposure_width'
|
Specifies the operation mode of the strobe.
-
'off': Disables the strobe.
-
'timed': The strobe duration time is set using the 'strobe_time'.
-
'exposure_width': The strobe duration time is set by the width of
current frame or exposure pulse.
|
|
'strobe_signal'
|
'level_low', 'level_high'
|
Specifies the activation mode of the strobe.
-
'level_low': strobe signal is activated as low.
-
'level_high': strobe signal is activated as high.
|
|
'strobe_source'
|
'strobe_out', 'strobe_software'
|
Specifies the kind of source of strobe signal.
-
'strobe_out': The strobe signal is generated by the 'strobe_mode'.
-
'strobe_software': The strobe signal is generated by the software
using 'do_strobe_out' function.
|
|
'strobe_time'
|
0.0 ... 9.174 (float)
|
Sets the duration time of strobe signal in milliseconds when
'strobe_mode' is set as 'timed'.
|
|
'test_image'
|
'off', 'test_pattern'
|
Specifies the type of image that is output by the camera.
-
'off': Image is real and grabbed from the sensor.
-
'test_pattern': Image is artificial pattern data,
varying gradually from dark to bright.
|
|
'trigger_delay'
|
0.001 ... 1174.405 (float)
|
Used to set the trigger delay time in microseconds.
Received trigger is activated after this amount of delay.
|
|
'trigger_signal'
|
'falling', 'rising', 'level_low', 'level_high'
|
Specifies the activation mode of the trigger.
-
'falling': Trigger is considered as valid on the falling edge of
the source signal.
-
'rising': Trigger is considered as valid on the rising edge
of the source signal.
-
'level_low': Trigger is considered as valid as long as the
level of the source signal is low.
-
'level_high': Trigger is considered as valid as long as the
level of the source signal is high.
|
|
'trigger_source'
|
'line1', 'software'
|
Specifies the type of the trigger source when
external_trigger is true.
-
'line1': Trigger source will be physical line (or pin).
-
'software': Trigger source will be the software using the
'do_software_trigger' function.
|
|
'volatile'
|
'enable', 'disable'
|
Grayscale only.
In the volatile mode the two image acquisition interface buffers
are used directly to store HALCON images. This is the fastest mode
to avoid copying 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'.
|
|
'balance_white_auto'
|
'off', 'once','continuous'
|
Used to perform automatic white balancing between the color channels.
-
'off' : White balancing is manually controlled using 'gain_red' and 'gain_blue'.
-
'once' : White balancing is automatically adjusted once by the
device. Once it has converged, it automatically returns to the 'off' state.
-
'continuous' : White balancing is constantly adjusted by the device.
|
|
'gain_red'
|
min...max (float)
|
Control the values of red channel.
|
|
'gain_blue'
|
min ... max (float)
|
Control the values of blue channel.
|
|
'color_correction'
|
0 ... 10 (long)
|
Adjust the values of color pixels from those corresponding
to accurate scene reproduction to those corresponding
to visually pleasing scene reproduction.
|
|
'interpolation_mode'
|
'interpolation_3x3', 'interpolation_4x4', 'interpolation_5x5'
|
The Interpolation mode is done on the PC. If larger filter
mask is selected to get a higher image quality, the computational
load will be increased accordingly.
|
'line_selector'
|
'line2','line3'
|
Selects the physical line (or pin) of the external
device connector to configure.
|
|
'line_mode'
|
'input', 'output'
|
Controls if the physical line is used to input or
output a signal.
-
'input' : The selected physical line is used to
input an electrical signal.
-
'output' : The selected physical line is used to
output an electrical signal.
|
|
'line_source'
|
'user_output0', 'user_output1'
|
Used to select which internal acquisition or I/O source
signal to output on the selected line when its 'line_mode' is output.
-
'user_output0' : The chosen user output Bit0 state as
defined by its current user output register.
-
'user_output1' : The chosen user output Bit1 state as defined
by its current user output register.
|
|
'user_output_selector'
|
'user_output0', 'user_output1'
|
Selects which bit of the user output register
will be set by 'user_output_value'.
-
'user_output0' : Selects the first bit of
the user output register (Bit0).
-
'user_output1' : Selects the second bit of
the user output register (Bit1).
|
|
'user_output_value'
|
'true', 'false'
|
Sets the value of the selected bit of the user output register.
-
'true' : Sets the bit to High.
-
'false' : Sets the bit to Low.
|
|
'user_output_value_all'
|
0 ... 2 (long)
|
Sets the value of all the bits of the user output register.
|
|
'iris_reference'
|
min ... max (long)
|
Used to control the auto-dc-iris lens to fit the brightness.
|
|
'gamma_correction'
|
min ... max (long)
|
Used to perform gamma correction of pixel intensity.
|
|
Parameters for
get_framegrabber_param():
Additional parameters supported by get_framegrabber_param only.
Note that all parameters supported by set_framegrabber_param
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_time_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.
|
'device_firmware_version'
|
|
firmware_version (string)
|
|
Provides the version of the firmware in the camera.
|
|
'device_unique_id'
|
device_full_id (string)
|
Specifies the model name and serial number of the camera.
|
|
'image_available'
|
0, 1 (long)
|
Used to check the status of last asycnhornous grab command.
The value 1 means that the image is already acquired.
|
|
'revision'
|
revision (string)
|
The revision number of the HALCON Crevis interface.
|
|
'sensor_type'
|
sensor_type (string)
|
Specifies the scan type of the sensor.
|
|
'line_status'
|
'true', 'false'
|
Read the current status of the selected input line.
-
'true' : The level of the line signal is High
-
'false' : The level of the line signal is Low
|
|
'line_status_all'
|
0 ... 2 (long)
|
Current logical state of all available line signals at time
of polling in a single bitfield. The order is line2, line3, ...
|
|
Release Notes
-
Revision 4.3 (Apr 30, 2012):
-
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.
-
Revision 4.2 (Aug 10, 2010):
-
Adaptation to McamU driver V2.0.0.2.
-
Added support for 'MV-BU10U', 'MV-BU17U', 'MV-CU10U', and 'MV-CU17U'
camera models.
-
Changed open_framegrabber parameters
'HorizontalResolution', 'VerticalResolution',
'ImageHeight', 'StartRow', and 'StartColumn'.
-
HALCON 10 version of the interface (included in HALCON 10 DVD).
-
Revision 4.1 (Feb 2, 2010):
-
Adaptation to McamU driver V2.0.0.1.
-
Add color and board type models
-
Add new parameters for color and board type models.
-
Fixed behavior of grab_image and grab_image_start.
When calling grab_image or grab_image_start,
terminate asynchronous job and start a new grab.
-
The 'default' operation of ColorSpace parameter is changed
from 'gray' to saved value of camera.
-
Revision 4.0 (May 27, 2009):
-
First official release.
-
Bugfixes in parameters 'exposure_time', 'strobe_delay',
'strobe_time', and 'trigger_delay'.
-
Renamed the parameters to keep the HALCON naming convention.
-
Added new parameters 'acquisition_invalid_time',
'continuous_grabbing', 'save_parameter_set', 'do_abort_grab',
and 'start_async_after_grab_async'.
-
Added parameters with postfix '_description', '_range', and
'_values' to enable the easy parameterization via a generic
graphical user interface.
-
Revision 3.1 (Mar 2, 2009):
-
Bugfix in 'exposure_time' function, the exposure time value
was not applied correctly (fixed in MCamU_Basic_V1.0.0.8).
-
Revision 3.0 (Feb 09, 2009):
|