interfaces mvtec

Interface Documentation

Image Acquisition Interface for Crevis USB 2.0 Cameras

Interface: Crevis
Revision: 13.0.1
Date: 2016-10-28
HALCON Version: 13.0

General

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.

System Requirements

  • Intel compatible PC with Windows 7 (32-bit) or newer that is also supported by the vendor-specific SDK, also WoW64 (using 32-bit HALCON on 64-bit Windows).
  • 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

Using Multiple Cameras

When using multiple Crevis cameras, please make sure that each camera 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 software.

Parameters for info_framegrabber

Parameter Value List Type Kind Description
'bits_per_channel' [8, 10] integer pre-defined Values for bits per channel.
'camera_type' ['MV-BS20U', 'MV-BV30U', 'MV-BV20U', 'MV-BX30U', 'MV-CS20U', 'MV-CV30U', 'MV-CV20U', 'MV-CX30U', 'MV-BS27U', 'MV-BV37U', 'MV-BX37U', 'MV-CX37U', 'MV-CS27U', 'MV-CV37U', '3B-CV37U', 'MV-BU10U', 'MV-BU17U', 'MV-CU10U', 'MV-CU17U'] string pre-defined Pre-defined list of possible values for camera type.
'color_space' ['default', 'bayer', 'gray', 'rgb'] string pre-defined Values for color space.
'defaults' [1, 1, 0, 0, 0, 0, 'progressive', 8, 'default', -1.0, 'false', 'default', 'default', 0, 0] mixed pre-defined Default values for open_framegrabber.
'device' ['-1', '0', '1', '2', ..., '14' string pre-defined Pre-defined list of possible device numbers.
'external_trigger' ['false', 'true'] string pre-defined Values for the external trigger.
'field' [] Unused.
'general' [] string pre-defined Information about the HALCON Crevis interface.
'generic' [] Unsupported query.
'horizontal_resolution' [1, 2] integer pre-defined Value list for horizontal resolution.
'image_height' [] Unsupported query.
'image_width' [] Unsupported query.
'info_boards' ['device:<id> camera_type:<name>'] string dynamic A list of the available devices.
'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 Crevis interface.
'start_column' [] Unsupported query.
'start_row' [] Unsupported query.
'vertical_resolution' [1, 2, 3, 4, 17, 18, 19, 20] integer pre-defined Value list for vertical resolution.

Parameters for open_framegrabber

Parameter Values Default Type Description
Name 'Crevis' string Name of the HALCON interface.
HorizontalResolution 1, 2 1 integer The desired horizontal image resolution.
  • 1: for full resolution
  • 2: for binning horizontal
Note that this parameter will be ignored if the used camera model does not support binning.
VerticalResolution 1, 2, 3, 4, 17, 18, 19, 20 1 integer Desired vertical image resolution.
  • 1: for full resolution
  • 2/3/4: for HRS
  • 17: for binning vertical
  • 18/19/20: for binning vertical with HRS
Note that this parameter will be ignored if the used camera model does not support this feature.
ImageWidth --- Ignored.
ImageHeight 0, <height> 0 integer 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.
StartRow 0, <row> 0 integer Row coordinate of the upper left pixel within the desired image part. Note that this parameter will be ignored if the used camera model does not support this feature.
StartColumn 0, <column> 0 integer Column coordinate of the upper left pixel within the desired image part. Note that this parameter will be ignored if the used camera model does not support this feature.
Field --- Ignored.
BitsPerChannel -1, 8, 10 -1 integer 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.
ColorSpace 'default', 'bayer', 'gray', 'rgb' 'default' string Desired color space and thus the number of image channels of the resulting HALCON image.
Generic --- Ignored.
ExternalTrigger 'false', 'true' 'false' string Status of the external trigger.
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' 'default' string The camera type will be detected automatically ('default').
Device '-1', '<device_id>' 'default' string The ID of the desired camera, see also section 'Using Multiple Cameras' above.
Port --- Ignored.
LineIn --- Ignored.

Parameters for set_framegrabber_param

Parameter Values Default Type Description
'acquisition_invalid_time' <milliseconds> One frame time (milliseconds). integer 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".
'balance_white_auto' 'continuous', 'off', 'once' string Used to perform automatic white balancing between the color channels.
  • 'continuous': White balancing is constantly adjusted by the device.
  • '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.
'black_level' 0...255 integer Controls the analog black level as a raw integer value. This represents a DC offset applied to the video signal.
'color_correction' 0...10 integer Adjust the values of color pixels from those corresponding to accurate scene reproduction to those corresponding to visually pleasing scene reproduction.
'continuous_grabbing' 'disable', 'enable' 'disable' string 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' string 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' --- Cancel current grab.
'do_force_trigger' --- Forces an event trigger in applications by setting 'external_trigger' to 'true' and 'trigger_source' to 'software'.
'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'.
'exposure_time' <milliseconds> float Exposure time in milliseconds.
'external_trigger' 'false', 'true' string Status of the external trigger.
'gain' 0 ... 100 -1.0 mixed Controls the gain as raw integer value. This is an amplification factor applied to the video signal.
'gain_blue' <min...max> float Control the values of blue channel.
'gain_red' <min...max> float Control the values of red channel.
'gamma_correction' <gamma> integer Used to perform gamma correction of pixel intensity.
'grab_timeout' 1 ... 32768 5000 integer Desired timeout (milliseconds) for aborting a pending grab. If -1 is specified, the timeout is set to INFINITE.
'interpolation_mode' 'interpolation_3x3', 'interpolation_4x4', 'interpolation_5x5' string 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.
'iris_reference' <iris> integer Used to control the auto-dc-iris lens to fit the brightness.
'line_mode' 'input', 'output' string 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_selector' 'line2', 'line3' string Selects the physical line (or pin) of the external device connector to configure.
'line_source' 'user_output0', 'user_output1' string 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.
'save_parameter_set' 'user_set1' string Selects the kind of page to save the current parameter.
  • 'user_set1': Select the 'user_set1' page.
'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_delay' 0.0 ... 9.174 float Used to delay the strobe signal in milliseconds.
'strobe_mode' 'exposure_width', 'off', 'timed' string Operation mode of the strobe.
  • 'exposure_width': The strobe duration time is set by the width of current frame or exposure pulse.
  • 'off': Disables the strobe.
  • 'timed': The strobe duration time is set using the 'strobe_time'.
'strobe_signal' 'level_high', 'level_low' string 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' string 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 Duration time of strobe signal in milliseconds when 'strobe_mode' is set as 'timed'.
'test_image' 'off', 'test_pattern' string 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 Trigger delay time in microseconds. Received trigger is activated after this amount of delay.
'trigger_signal' 'falling', 'rising', 'level_low', 'level_high' 'rising' string 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' string 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.
'user_output_selector' 'user_output0', 'user_output1' string 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' 'false', 'true' string Sets the value of the selected bit of the user output register.
  • 'false': Sets the bit to Low.
  • 'true': Sets the bit to High.
'user_output_value_all' 0...2 integer Value of all the bits of the user output register.
'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!

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
'acquisition_invalid_time' <milliseconds> One frame time (milliseconds). integer dynamic 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".
'balance_white_auto' 'continuous', 'off', 'once' string pre-defined Used to perform automatic white balancing between the color channels.
'bits_per_channel' 8, 10 -1 integer pre-defined Number of bits per channel of the resulting HALCON image. In case of -1 the current bit depth of the camera is used. By specifying a value greater than 8 the grabbed images are delivered as uint2 images.
'black_level' 0...255 integer dynamic Controls the analog black level as a raw integer value. This represents a DC offset applied to the video signal.
'camera_type' '<camera_type>' 'default' string pre-defined Current camera type.
'color_correction' 0...10 integer dynamic Adjust the values of color pixels from those corresponding to accurate scene reproduction to those corresponding to visually pleasing scene reproduction.
'color_space' '<color_space>' 'default' string pre-defined Desired color space and thus the number of image channels of the resulting HALCON image.
'continuous_grabbing' 'disable', 'enable' 'disable' string pre-defined Used for special acquisition mode of real-time performance.
'default_parameter_set' 'factory', 'user_set1' string pre-defined Kind of page of parameters to be loaded when camera is reset.
'device' '<device_id>' 'default' string pre-defined Current device ID.
'device_firmware_version' '<firmware_version>' string dynamic Provides the version of the firmware in the camera.
'device_unique_id' '<device_full_id>' string dynamic Specifies the model name and serial number of the camera.
'exposure_time' <milliseconds> float dynamic Exposure time in milliseconds.
'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.
'gain' 0 ... 100 -1.0 mixed dynamic Controls the gain as raw integer value. This is an amplification factor applied to the video signal.
'gain_blue' <min...max> float dynamic Control the values of blue channel.
'gain_red' <min...max> float dynamic Control the values of red channel.
'gamma_correction' <gamma> integer dynamic Used to perform gamma correction of pixel intensity.
'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).
'interpolation_mode' 'interpolation_3x3', 'interpolation_4x4', 'interpolation_5x5' string pre-defined 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.
'iris_reference' <iris> integer dynamic Used to control the auto-dc-iris lens to fit the brightness.
'line_in' <default> 0 integer pre-defined The value is not used, so a default value is returned.
'line_mode' 'input', 'output' string pre-defined Controls if the physical line is used to input or output a signal.
'line_selector' 'line2', 'line3' string pre-defined Selects the physical line (or pin) of the external device connector to configure.
'line_source' 'user_output0', 'user_output1' string pre-defined Used to select which internal acquisition or I/O source signal to output on the selected line when its 'line_mode' is output.
'line_status' 'false', 'true' string pre-defined 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 integer dynamic Current logical state of all available line signals at time of polling in a single bitfield. The order is line2, line3, ...
'name' 'Crevis' 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.
'revision' '<revision>' string pre-defined Revision number of the Crevis interface.
'save_parameter_set' 'user_set1' string pre-defined Current parameter set.
'sensor_type' '<sensor_type>' string dynamic Specifies the scan type of the sensor.
'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_delay' 0.0 ... 9.174 float dynamic Used to delay the strobe signal in milliseconds.
'strobe_mode' 'exposure_width', 'off', 'timed' string pre-defined Operation mode of the strobe.
'strobe_signal' 'level_high', 'level_low' string pre-defined Activation mode of the strobe.
'strobe_source' 'strobe_out', 'strobe_software' string pre-defined Kind of source of strobe signal.
'strobe_time' <milliseconds> float dynamic Duration time of strobe signal in milliseconds when 'strobe_mode' is set as 'timed'.
'test_image' 'off', 'test_pattern' string pre-defined Type of image that is output by the camera.
'trigger_delay' <milliseconds> float dynamic Trigger delay time in microseconds. Received trigger is activated after this amount of delay.
'trigger_signal' 'falling', 'rising', 'level_low', 'level_high' 'rising' string pre-defined Activation mode of the trigger.
'trigger_source' 'line1', 'software' string pre-defined Type of the trigger source when external_trigger is true.
'user_output_selector' 'user_output0', 'user_output1' string pre-defined Selects which bit of the user output register will be set by 'user_output_value'.
'user_output_value' 'false', 'true' string pre-defined Value of the selected bit of the user output register.
'user_output_value_all' 0...2 integer pre-defined Value of all the bits of the user output register.
'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!

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:
  • crevis_binning.hdev - Example for grabbing images from a Crevis USB camera (HRS 1/4 binning mode)
  • crevis.hdev - Benchmark
  • crevis_parameters.hdev - Lists all parameters of a device
  • crevis_simple.hdev - A simple example to show the usage of the interface
  • crevis_trigger.hdev - Grabbing images from a Crevis USB camera with different trigger modes

Release Notes

  • Revision 13.0.1 (Oct 28, 2016):
    • HALCON 13 version of the interface.
  • Revision 6.0 (Oct 31, 2014):
    • HALCON 12 version of the interface.
  • Revision 5.0 Addendum (Aug 27, 2014):
    • Adapted System Requirements section.
    • Added Limitation section.
  • Revision 5.0 (May 15, 2012):
    • HALCON 11 version of the interface (included in HALCON 11 DVD).
  • Revision 4.3 (Apr 30, 2012):
  • 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.
    • Bug fixes 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):
    • Bug fix in 'exposure_time' function, the exposure time value was not applied correctly (fixed in MCamU_Basic_V1.0.0.8).
  • Revision 3.0 (Feb 9, 2009):
    • First release.