MVTec Software GmbH
  Building Vision For Business
Halcon

HALCON 7.0 Frame Grabber Interface for DirectShow File Reader

This page provides the documentation about the HALCON DirectFile interface for the Microsoft DirectShow File Reader application programming interface. Registered customers can download the latest revision of this interface from the MVTec WWW server.

Revision: 2.2

System Requirements

  • Intel compatible PC with Windows 2000 / XP and DirectX 8.1 or later installed. You can check your installed DirectX version by running the dxdiag diagnosis program. Note that the HALCON DirectFile interface does not run under Windows NT 4.0.
  • HALCON frame grabber interface HFGDirectFile.dll or parHFGDirectFile.dll, respectively.
    If you have properly installed the interface, this DLL should reside in bin\i586-nt4 within the HALCON base directory %HALCONROOT% you have chosen during the installation of HALCON. You don't need to register this DLL manually. Instead, upon the first call to open_framegrabber() the DLL performs the necessary steps itself. However, note that it causes no error if the registration fails (e.g., because the application does not have sufficient rights to write to the registry). Thus it is possible to use parHFGDirectFile.dll with HFGDirectFile.dll still registered, or vice versa, which might cause serious crashes! You can use the operator set_system('do_low_error', 'true') to show warnings in case the registration fails.

Limitations

In general, whether a file can be opened with the HALCON DirectFile interface or not strongly depends on the configuration of the system your application is running on. Typically, it is necessary that a suitable codec is installed. As a rule of thumb, when you can replay a file with the Windows Media Player it is most likely that you can also open it with the HALCON DirectFile interface.

  • Only files that allow frame based positioning supported.
  • Image scaling and cropping not supported.
  • No LUTs.
  • grab_region and grab_region_async not supported.

Description

Parameters for open_framegrabber():

Name 'DirectFile' The name of the HALCON frame grabber interface.
HorizontalResolution --- Ignored.
VerticalResolution --- Ignored.
ImageWidth --- Ignored.
ImageHeight --- Ignored.
StartRow --- Ignored.
StartColumn --- Ignored.
Field --- Ignored.
BitsPerChannel --- Ignored.
ColorSpace 'gray', 'rgb' Specify the desired color space and thus the number of image channels of the resulting HALCON image. Default: 'rgb'.
Gain --- Ignored.
ExternalTrigger --- Ignored.
CameraType 'filename' The camera type parameter is used to specify the name of the video file to be opened. The name of the video file can either be given absolutely (e.g., "C:\\MyImages\\MyAVIFile.avi") or relatively to your environment setting %HALCONIMAGES%.
Device --- Ignored.
Port --- Ignored.
LineIn --- Ignored.

Parameters for set_framegrabber_param():

'frame_number' number The parameter sets the number of the next frame to be grabbed by grab_image or grab_image_async.
'grab_timeout' msec Specify the desired timeout (milliseconds passed as an integer) for aborting a pending grab. Default: 5000.

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.

'first_frame' number The parameter returns the number of the first frame of the video stream.
'last_frame' number The parameter returns the number of the last frame of the video stream.
'revision' revision The revision number of the HALCON DirectFile interface.

Release Notes

  • Revision 2.2 (Aug 14, 2006):
    • Bugfix in get_framegrabber_param('frame_number') in case of the last frame of the video stream.
  • Revision 2.1 (Sep 12, 2005):
    • Manual registration of HFGDirectFile.dll or parHFGDirectFile.dll no longer necessary.
  • Revision 2.0 (Sep 1, 2005):
    • First official release.

© Copyright 2008, MVTec Software GmbH, corporate/legal/privacy information