Impact Acquire SDK Python
CameraDescriptionBase Class Reference

A base class to describe a camera (Device specific interface layout only) connected to a frame grabber (deprecated. More...

Inheritance diagram for CameraDescriptionBase:
[legend]

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 copyDescription (self, newName)
 Creates a new camera description list as a copy of the current one.
 
 exportDescription (self)
 Stores the current camera description on disk.
 
 getClassName (self)
 Returns the class this description is belonging to.
 
 importDescription (self)
 Updates a camera description with the data stored in a previous session or with the original default data.
 

Properties

 aoiHeight = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiHeight_get, doc=)
 An integer property defining the number of active lines to capture from the camera.
 
 aoiStartX = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiStartX_get, doc=)
 An integer property defining the X-offset in pixels to the first active pixel to capture.
 
 aoiStartY = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiStartY_get, doc=)
 An integer property defining the Y-offset in lines to the first active line to capture.
 
 aoiWidth = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiWidth_get, doc=)
 An integer property defining the number of active pixels to capture per line.
 
 className = property (getClassName, None, None, None)
 A string property (read-only) which holds the class this description is belonging to.
 
 interlacedType = property(lib_mvIMPACT_acquire.CameraDescriptionBase_interlacedType_get, doc=)
 An enumerated integer property defining how the camera transmits image data.
 
 name = property(lib_mvIMPACT_acquire.CameraDescriptionBase_name_get, doc=)
 A string property read-only containing the name of this camera description list.
 
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 videoOutput = property(lib_mvIMPACT_acquire.CameraDescriptionBase_videoOutput_get, doc=)
 An enumerated integer property defining the type of video outputs this camera offers.
 

Detailed Description

A base class to describe a camera (Device specific interface layout only) connected to a frame grabber (deprecated.

Deprecated
Beginning with the release of 3.0.0 of Impact Acquire everything specifically related to frame grabber boards will be considered as deprecated and might be removed without further notice!

A camera description object provides an abstract way to prepare the capture device (e.g. a frame grabber) for the connected imaging device (e.g. a camera).

By selecting one of the available camera descriptions the underlying hardware will use the information provided in the camera description to prepare the image capture. Therefore it is crucial to select a camera description that matches the connected video signal as close as possible. If no description for the camera connected to a frame grabber is available a new description should be generated from one of the existing ones. This can be achieved by calling the function mvIMPACT.acquire.CameraDescriptionBase.copyDescription. A new camera description with the name that is passed to the function will be created.

Note
The name must be unique. There can't be two descriptions with the same name belonging to the same generic class (i.e. 'Standard' or 'CameraLink'®). However it's perfectly legal to have a camera description for standard analogue video signals and one for e.g. CameraLink® signals with the same name.

This new description will be an exact copy of the one the copy function has been executed for. After creation this description can be selected e.g. by setting the property mvIMPACT.acquire.CameraSettingsFrameGrabber.type to the name of the new description.

Note
Please note that the name passed to the property mvIMPACT.acquire.CameraSettingsFrameGrabber.type does NOT exactly correspond to the name assigned to the new camera description. It is a combination of the class the camera is belonging to (e.g. 'Standard') and the actual name. So to select a camera description the name must be build from the return value of a call to mvIMPACT.acquire.CameraDescriptionBase.getClassName, an underscore ('_') and the actual name of the description: <class name>_<desc. name>

Example: For a standard description with the name 'MyCam' the full name would be 'Standard_MyCam'.

try:
# the next line will raise an exception if this device does not
# support camera descriptions (e.g. if it is a USB camera rather than a frame grabber)
cdm = acquire.CameraDescriptionManager(pDev)
pCam = cdm.cameraDescriptionStandard("Generic")
pCam.copyDescription("MyCam")
# Get access to the newly created description
pMyCam = cdm.cameraDescriptionStandard("MyCam")
# Modify something
pMyCam.videoStandard.write(acquire.vsRS170)
pMyCam.scanStandard.write(acquire.ssITU601)
# now save the description to make it available in all future sessions
pMyCam.exportDescription()
# select the newly created description
cs = acquire.CameraSettingsFrameGrabber(pDev)
# the name for this property is always a combination of the class the camera
# description is belonging to and the actual name:
cs.type.writeS(pMyCam.getClassName() + "_" + pMyCam.name.readS())
except Exception as e:
print("An exception occurred: " + e.getErrorString())
Note
This class will only be available if mvIMPACT.acquire.Device.interfaceLayout is set to mvIMPACT.acquire.dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ copyDescription()

copyDescription ( self,
newName )

Creates a new camera description list as a copy of the current one.

This function can be used to create a new camera description list. It will create a deep copy of the properties referenced by this camera description and will append the new description to the list of camera descriptions.

Note
This will NOT store the new description permanently. After the driver has been closed, this data will be lost. To store the new list in a way that it will be available the next time the driver/device is opened again, mvIMPACT.acquire.CameraDescriptionBase.exportDescription must be called with the handle of the newly created description after this function.
See also
mvIMPACT.acquire.CameraDescriptionBase.exportDescription,
mvIMPACT.acquire.CameraDescriptionBase.importDescription
Returns
Parameters
newName[in] The name for the newly created camera description. This name MUST NOT match a description already existing.

◆ exportDescription()

exportDescription ( self)

Stores the current camera description on disk.

This function can be used to store the current settings of a camera description permanently so that the next time the driver is initialized these settings are restored.

When exporting a camera description a file in XML format will be written to disk.

  • On Windows® camera descriptions will be stored under PUBLIC%/Documents/Balluff/ImpactAcquire/CameraFiles (or MVIMPACT_ACQUIRE_DATA_DIR%/CameraFiles, which will point to the same folder)
  • On Unix based systems this directory will be /opt/ImpactAcquire/data/camerafiles
  • On other platforms these files will end up in the current working directory.

This behaviour can be modified by writing the property mvIMPACT.acquire.Device.customDataDirectory before initialising the device.

See also
mvIMPACT.acquire.CameraDescriptionBase.copyDescription,
mvIMPACT.acquire.CameraDescriptionBase.importDescription
Returns

◆ getClassName()

getClassName ( self)

Returns the class this description is belonging to.

Returns
The class this description is belonging to.

◆ importDescription()

importDescription ( self)

Updates a camera description with the data stored in a previous session or with the original default data.

When importing a camera description the device driver will try to retrieve the parameters needed from a XML file.

  • On Windows® camera descriptions MUST be stored under PUBLIC%/Documents/Balluff/ImpactAcquire/CameraFiles (or MVIMPACT_ACQUIRE_DATA_DIR%/CameraFiles, which will point to the same folder)
  • n Unix based systems this directory will be /opt/ImpactAcquire/data/camerafiles
  • On other platforms these files MUST be located in the current working directory.

This behaviour can be modified by writing the property mvIMPACT.acquire.Device.customDataDirectory before initialising the device. To get access to an XML description file within the application, these file must be copied to this directory BEFORE the device is initialized. During the initialisation process the device driver will process every file located under this location and will add them to the internal list of descriptions. Every camera located during this process and also descriptions created later on during the program operation can be selected via the property mvIMPACT.acquire.CameraSettingsFrameGrabber.type.

Note
In order not to bloat the device driver with redundant data it's wise only to store the descriptions needed for the application to run under this location.
Only camera descriptions supported by the capture device will be added to the device drivers internal list and will therefore be accessible via the mvIMPACT.acquire.CameraDescriptionManager.

To restore the default values valid during the driver was initialized the function mvIMPACT.acquire.ComponentCollection.restoreDefault can be used as well.

See also
mvIMPACT.acquire.CameraDescriptionBase.exportDescription,
mvIMPACT.acquire.CameraDescriptionBase.copyDescription
Returns

Property Documentation

◆ aoiHeight

aoiHeight = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiHeight_get, doc=)
static

An integer property defining the number of active lines to capture from the camera.

◆ aoiStartX

aoiStartX = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiStartX_get, doc=)
static

An integer property defining the X-offset in pixels to the first active pixel to capture.

◆ aoiStartY

aoiStartY = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiStartY_get, doc=)
static

An integer property defining the Y-offset in lines to the first active line to capture.

◆ aoiWidth

aoiWidth = property(lib_mvIMPACT_acquire.CameraDescriptionBase_aoiWidth_get, doc=)
static

An integer property defining the number of active pixels to capture per line.

◆ className

className = property (getClassName, None, None, None)
static

A string property (read-only) which holds the class this description is belonging to.

See mvIMPACT.acquire.CameraDescriptionBase.getClassName()

◆ interlacedType

interlacedType = property(lib_mvIMPACT_acquire.CameraDescriptionBase_interlacedType_get, doc=)
static

An enumerated integer property defining how the camera transmits image data.

Valid values for this property may be: mvIMPACT.acquire.citNone, mvIMPACT.acquire.citInterlaced, mvIMPACT.acquire.citInvertedInterlaced.

◆ name

name = property(lib_mvIMPACT_acquire.CameraDescriptionBase_name_get, doc=)
static

A string property read-only containing the name of this camera description list.

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

◆ videoOutput

videoOutput = property(lib_mvIMPACT_acquire.CameraDescriptionBase_videoOutput_get, doc=)
static

An enumerated integer property defining the type of video outputs this camera offers.

Valid values for this property may be: mvIMPACT.acquire.coUndefined, mvIMPACT.acquire.coAuto, mvIMPACT.acquire.coComposite, mvIMPACT.acquire.coBase, mvIMPACT.acquire.coDigital, mvIMPACT.acquire.coSVideo, mvIMPACT.acquire.coMedium, mvIMPACT.acquire.coRGB, mvIMPACT.acquire.co2xComposite, mvIMPACT.acquire.co3xComposite, mvIMPACT.acquire.co4xComposite, mvIMPACT.acquire.coFull, mvIMPACT.acquire.coSDSDI, mvIMPACT.acquire.coHDSDI, mvIMPACT.acquire.co3GSDI.

Note
This property will be (read-only) for camera descriptions of type mvIMPACT.acquire.CameraDescriptionCameraLink and mvIMPACT.acquire.CameraDescriptionSDI as for these camera types the video output depends on certain other parameters according to the corresponding standard.