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.getType() to the name of the new description.
- Note
- Please note that the name passed to the property mvIMPACT.acquire.CameraSettingsFrameGrabber.getType() 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'.
import mvIMPACT.acquire.*;
public class CameraDescriptionManagerExample
{
static
{
try
{
System.loadLibrary( "mvIMPACT_Acquire.java" );
}
catch( UnsatisfiedLinkError e )
{
System.err.println( "Native code library failed to load. Make sure the 'mvIMPACT_Acquire.java' library can be found in the systems search path.\n" + e );
System.exit( 1 );
}
}
public static void main( String[] args )
{
DeviceManager devMgr = new DeviceManager();
Device pDev = mvIMPACT.acquire.examples.helper.DeviceAccess.getDeviceFromUserInput( devMgr );
if( pDev == null )
{
System.out.print( "Unable to continue!" );
mvIMPACT.acquire.examples.helper.DeviceAccess.waitForENTER();
System.exit( 1 );
}
System.out.println( "Initialising the device. This might take some time..." );
try
{
pDev.open();
}
catch( ImpactAcquireException e )
{
System.out.println( "An error occurred while opening device " + pDev.getSerial().read() +
"(error code: " + e.getMessage() + ")." );
mvIMPACT.acquire.examples.helper.DeviceAccess.waitForENTER();
System.exit( 1 );
}
try
{
CameraDescriptionManager cdm = new CameraDescriptionManager( pDev );
CameraDescriptionStandard pCam = cdm.cameraDescriptionStandard( "Generic" );
pCam.copyDescription( "MyCam" );
CameraDescriptionStandard pMyCam = cdm.cameraDescriptionStandard( "MyCam" );
pMyCam.getVideoStandard().write( TVideoStandard.vsRS170 );
pMyCam.getScanStandard().write( TScanStandard.ssITU601 );
pMyCam.exportDescription();
CameraSettingsFrameGrabber cs = new CameraSettingsFrameGrabber( pDev );
cs.getType().writeS( pMyCam.getClassName() + "_" + pMyCam.getName().read() );
}
catch( ImpactAcquireException e )
{
System.out.println( "An error occurred: " + e.getMessage() + "." );
mvIMPACT.acquire.examples.helper.DeviceAccess.waitForENTER();
System.exit( 1 );
}
}
}
- Note
- This class will only be available if mvIMPACT.acquire.Device.getInterfaceLayout() is set to mvIMPACT.acquire.TDeviceInterfaceLayout.dilDeviceSpecific before the device is opened.