Name
open_framegrabberT_open_framegrabberOpenFramegrabberOpenFramegrabber — Open and configure an image acquisition device.
open_framegrabber( : : Name, HorizontalResolution, VerticalResolution, ImageWidth, ImageHeight, StartRow, StartColumn, Field, BitsPerChannel, ColorSpace, Generic, ExternalTrigger, CameraType, Device, Port, LineIn : AcqHandle)
Herror T_open_framegrabber(const Htuple Name, const Htuple HorizontalResolution, const Htuple VerticalResolution, const Htuple ImageWidth, const Htuple ImageHeight, const Htuple StartRow, const Htuple StartColumn, const Htuple Field, const Htuple BitsPerChannel, const Htuple ColorSpace, const Htuple Generic, const Htuple ExternalTrigger, const Htuple CameraType, const Htuple Device, const Htuple Port, const Htuple LineIn, Htuple* AcqHandle)
void OpenFramegrabber(const HTuple& Name, const HTuple& HorizontalResolution, const HTuple& VerticalResolution, const HTuple& ImageWidth, const HTuple& ImageHeight, const HTuple& StartRow, const HTuple& StartColumn, const HTuple& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HTuple& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn, HTuple* AcqHandle)
void HFramegrabber::HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn)
void HFramegrabber::HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn)
void HFramegrabber::HFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn)
void HFramegrabber::OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn)
void HFramegrabber::OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn)
void HFramegrabber::OpenFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn)
static void HOperatorSet.OpenFramegrabber(HTuple name, HTuple horizontalResolution, HTuple verticalResolution, HTuple imageWidth, HTuple imageHeight, HTuple startRow, HTuple startColumn, HTuple field, HTuple bitsPerChannel, HTuple colorSpace, HTuple generic, HTuple externalTrigger, HTuple cameraType, HTuple device, HTuple port, HTuple lineIn, out HTuple acqHandle)
public HFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, HTuple bitsPerChannel, HTuple colorSpace, HTuple generic, string externalTrigger, HTuple cameraType, HTuple device, HTuple port, HTuple lineIn)
public HFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, int bitsPerChannel, string colorSpace, double generic, string externalTrigger, string cameraType, string device, int port, int lineIn)
void HFramegrabber.OpenFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, HTuple bitsPerChannel, HTuple colorSpace, HTuple generic, string externalTrigger, HTuple cameraType, HTuple device, HTuple port, HTuple lineIn)
void HFramegrabber.OpenFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, int bitsPerChannel, string colorSpace, double generic, string externalTrigger, string cameraType, string device, int port, int lineIn)
The operator open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber opens and configures the
chosen image acquisition device. During this process, the connection to
the image acquisition device is tested, the image acquisition device is
locked for other processes, and, if necessary, memory is
reserved for the data buffers. The actual image grabbing is done via the
operators grab_imagegrab_imageGrabImageGrabImageGrabImage, grab_datagrab_dataGrabDataGrabDataGrabData, grab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsyncGrabImageAsync,
or grab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsyncGrabDataAsync. If the image acquisition device is not needed
anymore, it should be closed via the operator close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberCloseFramegrabber,
releasing it for other processes. Some image acquisition devices allow
to open several instances of the same image acquisition device class.
For all parameters image acquisition device-specific default values can
be chosen explicitly (see the parameter description below). Additional
information for a specific image acquisition device is available via
info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber. A comprehensive documentation of all
image acquistion device-specific parameters can be found in the
corresponding interface documentation in the directory
'doc/html/reference/acquisition'"doc/html/reference/acquisition""doc/html/reference/acquisition""doc/html/reference/acquisition""doc/html/reference/acquisition".
The meaning of the particular parameters is as follows:
- HorizontalResolution, VerticalResolution
Desired resolution of the image acquisition
device.
- ImageWidth, ImageHeight
Size of the image part to be returned
by grab_imagegrab_imageGrabImageGrabImageGrabImage etc.
- StartRow, StartColumn
Upper left corner of the desired image area.
- Field
Desired half image ('first', 'second', or
'next') or selection of a full image.
- BitsPerChannel
Number of bits, which are transferred from the
image acquisition device per pixel and image
channel (typically 5, 8, 10, 12, or 16).
- ColorSpace
Output color format of the grabbed images
(typically 'gray' or 'raw' for single-channel
or 'rgb' or 'yuv' for three-channel images).
- Generic
Generic parameter with device-specific
meaning which can be queried
by info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber.
- ExternalTrigger
Activation of external triggering (if
available).
- CameraType
More detailed specification of the desired
image acquistion device (typically the type
of the analog video format or the name of the
desired camera configuration file).
- Device
Device name of the image acquistion device.
- Port
Port the image acquistion device is connected
to.
- LineIn
Camera input line of multiplexer (if available).
The operator open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber returns a handle
(AcqHandleAcqHandleAcqHandleAcqHandleacqHandle) to the opened image acquisition device.
Due to the multitude of supported image acquisition devices,
open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber contains a large number of parameters. However,
not all parameters are needed for a specific image acquisition device.
For a multithreaded application all image acquisition operators, i.e.,
info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber, open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber,
get_framegrabber_paramget_framegrabber_paramGetFramegrabberParamGetFramegrabberParamGetFramegrabberParam, set_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParamSetFramegrabberParam,
get_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackGetFramegrabberCallback, set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackSetFramegrabberCallback,
get_framegrabber_lutget_framegrabber_lutGetFramegrabberLutGetFramegrabberLutGetFramegrabberLut, set_framegrabber_lutset_framegrabber_lutSetFramegrabberLutSetFramegrabberLutSetFramegrabberLut,
grab_image_startgrab_image_startGrabImageStartGrabImageStartGrabImageStart, grab_imagegrab_imageGrabImageGrabImageGrabImage, grab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsyncGrabImageAsync,
grab_datagrab_dataGrabDataGrabDataGrabData, grab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsyncGrabDataAsync, close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberCloseFramegrabber and
close_all_framegrabbersclose_all_framegrabbersCloseAllFramegrabbersCloseAllFramegrabbersCloseAllFramegrabbers are an own group in which
info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber, open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber,
close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberCloseFramegrabber and close_all_framegrabbersclose_all_framegrabbersCloseAllFramegrabbersCloseAllFramegrabbersCloseAllFramegrabbers are
executed exclusively.
Thus, info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber, open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber,
close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberCloseFramegrabber and close_all_framegrabbersclose_all_framegrabbersCloseAllFramegrabbersCloseAllFramegrabbersCloseAllFramegrabbers block the
concurrent execution of all other operators within this group, but run in
parallel with all non-exclusive operators outside of this group.
On Windows Systems, error dialog boxes from the operating system can occur
when dependency modules of the interface are not found, e.g., the according
SDK was not installed. The occurrence of the error boxes can be controlled
by setting Windows' Error Mode. Please refer to the description of
SetErrorMode within the Windows MSDN documentation.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
HALCON image acquisition interface name, i.e.,
name of the corresponding DLL (Windows) or
shared library (Linux/macOS).
Default value:
'File'
"File"
"File"
"File"
"File"
Suggested values: 'ABS'"ABS""ABS""ABS""ABS", 'ADLINK'"ADLINK""ADLINK""ADLINK""ADLINK", 'Andor'"Andor""Andor""Andor""Andor", 'BitFlow'"BitFlow""BitFlow""BitFlow""BitFlow", 'Crevis'"Crevis""Crevis""Crevis""Crevis", 'DahengCAM'"DahengCAM""DahengCAM""DahengCAM""DahengCAM", 'DirectFile'"DirectFile""DirectFile""DirectFile""DirectFile", 'DirectShow'"DirectShow""DirectShow""DirectShow""DirectShow", 'Ensenso-NxLib'"Ensenso-NxLib""Ensenso-NxLib""Ensenso-NxLib""Ensenso-NxLib", 'File'"File""File""File""File", 'GenICamTL'"GenICamTL""GenICamTL""GenICamTL""GenICamTL", 'GigEVision2'"GigEVision2""GigEVision2""GigEVision2""GigEVision2", 'Ginga++'"Ginga++""Ginga++""Ginga++""Ginga++", 'GingaDG'"GingaDG""GingaDG""GingaDG""GingaDG", 'heliCamC3'"heliCamC3""heliCamC3""heliCamC3""heliCamC3", 'LinX'"LinX""LinX""LinX""LinX", 'LPS36'"LPS36""LPS36""LPS36""LPS36", 'LuCam'"LuCam""LuCam""LuCam""LuCam", 'MatrixVisionAcquire'"MatrixVisionAcquire""MatrixVisionAcquire""MatrixVisionAcquire""MatrixVisionAcquire", 'MILLite'"MILLite""MILLite""MILLite""MILLite", 'MultiCam'"MultiCam""MultiCam""MultiCam""MultiCam", 'O3D3xx'"O3D3xx""O3D3xx""O3D3xx""O3D3xx", 'Opteon'"Opteon""Opteon""Opteon""Opteon", 'pylon'"pylon""pylon""pylon""pylon", 'SaperaLT'"SaperaLT""SaperaLT""SaperaLT""SaperaLT", 'Sentech'"Sentech""Sentech""Sentech""Sentech", 'ShapeDrive'"ShapeDrive""ShapeDrive""ShapeDrive""ShapeDrive", 'SICK-3DCamera'"SICK-3DCamera""SICK-3DCamera""SICK-3DCamera""SICK-3DCamera", 'SICK-ScanningRuler'"SICK-ScanningRuler""SICK-ScanningRuler""SICK-ScanningRuler""SICK-ScanningRuler", 'SiliconSoftware'"SiliconSoftware""SiliconSoftware""SiliconSoftware""SiliconSoftware", 'TWAIN'"TWAIN""TWAIN""TWAIN""TWAIN", 'uEye'"uEye""uEye""uEye""uEye", 'USB3Vision'"USB3Vision""USB3Vision""USB3Vision""USB3Vision", 'Video4Linux2'"Video4Linux2""Video4Linux2""Video4Linux2""Video4Linux2", 'VRmUsbCam'"VRmUsbCam""VRmUsbCam""VRmUsbCam""VRmUsbCam"
Desired horizontal resolution of image acquisition
interface (absolute value or 1 for full resolution,
2 for half resolution, or 4 for quarter
resolution).
Default value: 1
Suggested values: 1, 2, 4, 1600, 1280, 768, 640, 384, 320, 192, 160, -1
Desired vertical resolution of image acquisition
interface (absolute value or 1 for full resolution,
2 for half resolution, or 4 for quarter
resolution).
Default value: 1
Suggested values: 1, 2, 4, 1200, 1024, 576, 480, 288, 240, 144, 120, -1
Desired half image or full image.
Default value:
'default'
"default"
"default"
"default"
"default"
Suggested values: 'first'"first""first""first""first", 'second'"second""second""second""second", 'next'"next""next""next""next", 'interlaced'"interlaced""interlaced""interlaced""interlaced", 'progressive'"progressive""progressive""progressive""progressive", 'default'"default""default""default""default"
Number of transferred bits per pixel and image
channel (-1: device-specific default value).
Default value: -1
Suggested values: 5, 8, 10, 12, 14, 16, -1
Output color format of the grabbed images,
typically 'gray' or 'raw' for single-channel
or 'rgb' or 'yuv' for three-channel images
('default': device-specific default value).
Default value:
'default'
"default"
"default"
"default"
"default"
Suggested values: 'gray'"gray""gray""gray""gray", 'raw'"raw""raw""raw""raw", 'rgb'"rgb""rgb""rgb""rgb", 'yuv'"yuv""yuv""yuv""yuv", 'default'"default""default""default""default"
Generic parameter with device-specific meaning.
Default value: -1
External triggering.
Default value:
'default'
"default"
"default"
"default"
"default"
List of values: 'default'"default""default""default""default", 'false'"false""false""false""false", 'true'"true""true""true""true"
Type of used camera
('default': device-specific default value).
Default value:
'default'
"default"
"default"
"default"
"default"
Suggested values: 'ntsc'"ntsc""ntsc""ntsc""ntsc", 'pal'"pal""pal""pal""pal", 'auto'"auto""auto""auto""auto", 'default'"default""default""default""default"
Device the image acquisition device is connected to
('default': device-specific default value).
Default value:
'default'
"default"
"default"
"default"
"default"
Suggested values: '-1'"-1""-1""-1""-1", '0'"0""0""0""0", '1'"1""1""1""1", '2'"2""2""2""2", '3'"3""3""3""3", 'default'"default""default""default""default"
Port the image acquisition device is connected to
(-1: device-specific default value).
Default value: -1
Suggested values: 0, 1, 2, 3, -1
Camera input line of multiplexer
(-1: device-specific default value).
Default value: -1
Suggested values: 1, 2, 3, 4, -1
Handle of the opened image acquisition device.
* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Open image acquisition device using the default settings, see
* documentation of the actually used interface for more details
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
'default','default','default',-1,-1,AcqHandle)
grab_image(Image,AcqHandle)
close_framegrabber(AcqHandle)
/* Select a suitable image acquisition interface name AcqName */
info_framegrabber(AcqName,"port",&Information,&Values) ;
/* Open image acquisition device using the default settings, see
documentation of the actually used interface for more details */
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0,
'default','default','default',-1,-1,&AcqHandle) ;
grab_image(Image,AcqHandle) ;
close_framegrabber(AcqHandle) ;
* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Open image acquisition device using the default settings, see
* documentation of the actually used interface for more details
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
'default','default','default',-1,-1,AcqHandle)
grab_image(Image,AcqHandle)
close_framegrabber(AcqHandle)
* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Open image acquisition device using the default settings, see
* documentation of the actually used interface for more details
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
'default','default','default',-1,-1,AcqHandle)
grab_image(Image,AcqHandle)
close_framegrabber(AcqHandle)
* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Open image acquisition device using the default settings, see
* documentation of the actually used interface for more details
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
'default','default','default',-1,-1,AcqHandle)
grab_image(Image,AcqHandle)
close_framegrabber(AcqHandle)
If the parameter values are correct and the desired image acquisition
device could be opened, open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberOpenFramegrabber returns the value
2 (H_MSG_TRUE). Otherwise an exception is raised.
info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber
grab_imagegrab_imageGrabImageGrabImageGrabImage,
grab_datagrab_dataGrabDataGrabDataGrabData,
grab_image_startgrab_image_startGrabImageStartGrabImageStartGrabImageStart,
grab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsyncGrabImageAsync,
grab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsyncGrabDataAsync,
set_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParamSetFramegrabberParam,
set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackSetFramegrabberCallback
info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberInfoFramegrabber,
close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberCloseFramegrabber,
grab_imagegrab_imageGrabImageGrabImageGrabImage
Foundation