 |
HALCON 6.0 Virtual Frame Grabber Interface |
This page provides the documentation of the HALCON
virtual frame grabber interface which allows reading images from file(s)
by using the regular operators of the HALCON frame grabber interface.
Registered
customers can download the
latest
revision of this interface from the
MVTec WWW server.
Revision: 2.6
Introduction
The HALCON virtual frame grabber interface
allows you to load images and image sequences from files by using
the regular frame grabber operators open_framegrabber(), grab_image(),
grab_image_async(), and close_framegrabber().
Thus, you are able to test and debug your frame grabber application
without having installed a real frame grabber board in your computer.
All you have to do is to choose "File" in the parameter
Name of open_framegrabber() and to give the proper
file name of the image(s) to be loaded in the parameter CameraType.
The CameraType parameter can be either the file name of a
-
Single image: In this case every subsequent call of the operator
grab_image() or grab_image_async() will load this image file.
Note that the image name can either be given absolutely
(e.g., "C:\\MyImages\\MyPicture") or relatively to your
environment setting %HALCONIMAGES% (e.g., "MyPicture").
Furthermore, you can also choose to specify the full image name
(e.g., "MyPicture.tif") or you can omit the file extension
(e.g., "MyPicture"). In the latter case HALCON automatically
appends the usual file extensions of the supported image formats
(tiff, tif, jpg, jpeg, pbm, pnm, pgm, ppm, gif, bmp, pcx,
ras, ima, xwd).
-
Sequence file: A sequence file is a file which contains
in each line the name of a single image file. In this case
the first call of the operator grab_image() or grab_image_async(),
respectively, will load the first image file, the second call will load
the second one etc. In case of a failure loading an image an error
will be returned and the next call will load the succeeding file.
After the last entry in the sequence file has been reached
grab_image() will start from the first image file again (looping).
Both the name of the sequence file as the image file names
within the sequence file can either be given absolutely
(e.g., "C:\\MyImages\\MySequence") or relatively to your
environment setting %HALCONIMAGES%. Usually, the sequence file has
the extension ".seq" (you can also omit to specify this file
extension).
-
AVI file: Running a Windows operating system the virtual frame
grabber interface also provides reading
video streams in AVI file format. In this case
the first call of the operator grab_image() or grab_image_async(),
respectively, will load the first image file, the second call will
load the second one etc. After the last frame of the AVI file
has been reached grab_image() will start with the first frame
again (looping).
The name of the AVI file can either be given absolutely
(e.g., "C:\\MyImages\\MyAVIFile") or relatively to your
environment setting %HALCONIMAGES%. The AVI file has
the extension ".avi" (you can also omit to specify this file
extension).
An example for using the HALCON virtual frame grabber interface
can be found in the examples/hdevelop/Image/Framegrabber
and in the examples/hdevelop/Applications/FA directory,
e.g., "pattern.dev". An example for a sequence file can be found
in %HALCONROOT%\images\pendulum\.
System Requirements
-
HALCON virtual frame grabber interface HFGFile.dll for
Windows systems (or parHFGFile.dll for use with Parallel HALCON)
or HFGFile.so for most UNIX systems, respectively.
Depending on your system architecture, this file should
reside either in bin\%ARCHITECTURE% (Windows) or in
lib/$ARCHITECTURE (UNIX systems) within the HALCON base directory
%HALCONROOT% you have chosen during the installation of HALCON.
Description
Parameters for
open_framegrabber():
|
Name
|
'File'
|
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
|
---
|
Ignored.
|
|
Gain
|
---
|
Ignored.
|
|
ExternalTrigger
|
---
|
Ignored.
|
|
CameraType
|
'filename'
|
The camera type parameter is used to specify the file name of
either a single image file, an AVI file, or a sequence file
containing the file names of a whole image sequence
(see introduction above).
Default: 'fabrik'.
|
|
Device
|
---
|
Ignored.
|
|
Port
|
---
|
Ignored.
|
|
LineIn
|
---
|
Ignored.
|
|
Parameters for
set_framegrabber_param():
|
'frame_number'
|
number
|
AVI format only. The parameter sets the number of the next frame to be grabbed by grab_image() (grab_image_async() respectively).
|
|