Click or drag to resize
Accord.NET (logo)

XimeaCamera Class

The class provides access to XIMEA cameras.
Inheritance Hierarchy
SystemObject
  Accord.Video.XimeaXimeaCamera

Namespace:  Accord.Video.Ximea
Assembly:  Accord.Video.Ximea (in Accord.Video.Ximea.dll) Version: 3.8.0
Syntax
public class XimeaCamera
Request Example View Source

The XimeaCamera type exposes the following members.

Constructors
  NameDescription
Public methodXimeaCamera
Initializes a new instance of the XimeaCamera class
Top
Properties
  NameDescription
Public propertyStatic memberCamerasCount
Get number of XIMEA camera connected to the system.
Public propertyDeviceID
ID of the the recently opened XIMEA camera.
Public propertyIsAcquisitionStarted
Specifies if camera's data acquisition is currently active for the opened camera (if any).
Public propertyIsDeviceOpen
Specifies if a camera is currently opened by the instance of the class.
Top
Methods
  NameDescription
Public methodClose
Close opened camera (if any) and release allocated resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImage
Get image from the opened XIMEA camera.
Public methodGetImage(Int32)
Get image from the opened XIMEA camera.
Public methodGetImage(Int32, Boolean)
Get image from the opened XIMEA camera.
Public methodGetParamFloat
Get camera's parameter as float value.
Public methodGetParamInt
Get camera's parameter as integer value.
Public methodGetParamString
Get camera's parameter as string value.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpen
Open XIMEA camera.
Public methodSetParam(String, Int32)
Set camera's parameter.
Public methodSetParam(String, Single)
Set camera's parameter.
Public methodStartAcquisition
Begin camera's work cycle and start data acquisition from it.
Public methodStopAcquisition
End camera's work cycle and stops data acquisition.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The class allows to perform image acquisition from XIMEA cameras. It wraps XIMEA'a xiAPI, which means that users of this class will also require m3api.dll and a correct TM file for the camera model connected to the system (both are provided with XIMEA API software package).

Sample usage:

XimeaCamera camera = new XimeaCamera( );

// open camera and start data acquisition
camera.Open( 0 );
camera.StartAcquisition( );

// set exposure time to 10 milliseconds
camera.SetParam( CameraParameter.Exposure, 10 * 1000 );

// get image from the camera
Bitmap bitmap = camera.GetImage( );
// process the image
// ...

// dispose the image when it is no longer needed
bitmap.Dispose( );

// stop data acquisition and close the camera
camera.StopAcquisition( );
camera.Close( );
See Also