Module Camera

The module Camera contains the following static classes:

Class Description
CameraBufferConverter  

The module Camera contains the following classes:

Class Description
Camera Camera to acquire images.
CameraBuffer A non-generic buffer with runtime description of its content.
CameraInfo  
CameraInfoEnumerator  
CameraInfoList  
CameraManager The camera manager.
CameraParameterBase  
CameraParameterBaseEnumerator  
CameraParameterBaseList  
CameraParameterIboolean  
CameraParameterIcategory  
CameraParameterIcommand  
CameraParameterIenumeration  
CameraParameterIenumEntry  
CameraParameterIinteger  
CameraParameterIfloat  
CameraParameterIstring  
CameraPixelformatInfo  
CameraPixelformatInfoEnumerator  
CameraPixelformatInfoList  

Class Camera

Camera to acquire images.

Namespace: Ngi

Module: Camera

The class Camera contains the following properties:

Property Get Set Description
IsOpen *   Is the camera open ?
Parameters *    
Pixelformats *   Pixelformats of the camera that are compatible with the buffer type.
PixelformatInfo * * Get the current pixelformat of the camera.
Aoi *   The size of the acquired image.

The class Camera contains the following methods:

Method Description
Open Open a specific camera as described by camera_info.
Open Open a specific camera as described by camera_info.
Close  
StartAcquisition Start the acquisition.
StopAcquisition Stop the acquisition.

Description

Default Constructor

Constructor Camera

Camera()

Properties

Property IsOpen

System.Boolean IsOpen

Is the camera open ?

Property Parameters

CameraParameterBaseList Parameters

Property Pixelformats

CameraPixelformatInfoList Pixelformats

Pixelformats of the camera that are compatible with the buffer type.

Camera must be open.

Property PixelformatInfo

CameraPixelformatInfo PixelformatInfo

Get the current pixelformat of the camera.

Property Aoi

BoxInt32 Aoi

The size of the acquired image.

Only the size of the box is relevant.

Methods

Method Open

void Open(CameraInfo cameraInfo)

Open a specific camera as described by camera_info.

The method Open has the following parameters:

Parameter Type Description
cameraInfo CameraInfo Specifies the camera to open.

Method Open

void Open(CameraInfo cameraInfo, CameraPixelformatInfo pixelformat)

Open a specific camera as described by camera_info.

The method Open has the following parameters:

Parameter Type Description
cameraInfo CameraInfo Specifies the camera to open.
pixelformat CameraPixelformatInfo  

Method Close

void Close()

Method StartAcquisition

void StartAcquisition(System.Int32 numberOfFrames)

Start the acquisition.

The method StartAcquisition has the following parameters:

Parameter Type Description
numberOfFrames System.Int32 Number of frames to acquire. 0 to acquire

stop_acquisition has always to be called, even if a finite number of frames is acquired.

Method StopAcquisition

void StopAcquisition()

Stop the acquisition.

Always call stop_acquisition when done.

Events

Class CameraBuffer

A non-generic buffer with runtime description of its content.

Namespace: Ngi

Module: Camera

The class CameraBuffer contains the following properties:

Property Get Set Description
Data *    
Width *    
Height *    
LinePitch *    
PixelformatInfo *    
Frameid *    
Timestamp *    
ChunkData *    

Description

Properties

Property Data

System.IntPtr Data

Property Width

System.Int32 Width

Property Height

System.Int32 Height

Property LinePitch

System.Int32 LinePitch

Property PixelformatInfo

CameraPixelformatInfo PixelformatInfo

Property Frameid

System.UInt64 Frameid

Property Timestamp

System.UInt64 Timestamp

Property ChunkData

System.UInt32 ChunkData

Class CameraBufferConverter

Namespace: Ngi

Module: Camera

Description

Static Methods

Method RgbFlipRg

ImageRgbByte RgbFlipRg(ViewLocatorRgbByte source)

Flips the R and G compnenets of an RGB image.

The method RgbFlipRg has the following parameters:

Parameter Type Description
source ViewLocatorRgbByte  

Method RgbFlipRg

ImageRgbUInt16 RgbFlipRg(ViewLocatorRgbUInt16 source)

Flips the R and G compnenets of an RGB image.

The method RgbFlipRg has the following parameters:

Parameter Type Description
source ViewLocatorRgbUInt16  

Method RgbFlipRg

ImageRgbUInt32 RgbFlipRg(ViewLocatorRgbUInt32 source)

Flips the R and G compnenets of an RGB image.

The method RgbFlipRg has the following parameters:

Parameter Type Description
source ViewLocatorRgbUInt32  

Method RgbFlipRg

ImageRgbDouble RgbFlipRg(ViewLocatorRgbDouble source)

Flips the R and G compnenets of an RGB image.

The method RgbFlipRg has the following parameters:

Parameter Type Description
source ViewLocatorRgbDouble  

Method RgbFlipRg

Image RgbFlipRg(View source)

Flips the R and G compnenets of an RGB image.

The method RgbFlipRg has the following parameters:

Parameter Type Description
source View  

Method Demosaic

ImageRgbByte Demosaic(ViewLocatorByte source, System.Int32 cfaOffset)

De-bayer raw image data to produce an RGB image.

The method Demosaic has the following parameters:

Parameter Type Description
source ViewLocatorByte  
cfaOffset System.Int32  

Method Demosaic

ImageRgbUInt16 Demosaic(ViewLocatorUInt16 source, System.Int32 cfaOffset)

De-bayer raw image data to produce an RGB image.

The method Demosaic has the following parameters:

Parameter Type Description
source ViewLocatorUInt16  
cfaOffset System.Int32  

Method Demosaic

Image Demosaic(View source, System.Int32 cfaOffset)

De-bayer raw image data to produce an RGB image.

The method Demosaic has the following parameters:

Parameter Type Description
source View  
cfaOffset System.Int32  

Class CameraInfo

Namespace: Ngi

Module: Camera

The class CameraInfo contains the following properties:

Property Get Set Description
Id *    
Vendor *    
Model *    
Displayname *    
Pixelformats *    

Description

Properties

Property Id

System.String Id

Property Vendor

System.String Vendor

Property Model

System.String Model

Property Displayname

System.String Displayname

Property Pixelformats

CameraPixelformatInfoList Pixelformats

Class CameraInfoEnumerator

Namespace: Ngi

Module: Camera

The class CameraInfoEnumerator implements the following interfaces:

| Interface | |—— —-| | IEnumerator | | IEnumeratorCameraInfo |

The class CameraInfoEnumerator contains the following properties:

Property Get Set Description
Current *    

The class CameraInfoEnumerator contains the following methods:

Method Description
Reset  
MoveNext  

Description

Properties

Property Current

CameraInfo Current

Methods

Method Reset

void Reset()

Method MoveNext

System.Boolean MoveNext()

Class CameraInfoList

Namespace: Ngi

Module: Camera

The class CameraInfoList implements the following interfaces:

| Interface | |—— —-| | IListCameraInfo |

The class CameraInfoList contains the following properties:

Property Get Set Description
Count *    
IsFixedSize *    
IsReadOnly *    
[index] * *  

The class CameraInfoList contains the following methods:

Method Description
GetEnumerator  
Add  
Clear  
Contains  
Remove  
IndexOf  
Insert  
RemoveAt  
ToString  

Description

Default Constructor

Constructor CameraInfoList

CameraInfoList()

Properties

Property Count

System.Int32 Count

Property IsFixedSize

System.Boolean IsFixedSize

Property IsReadOnly

System.Boolean IsReadOnly

Property [index]

CameraInfo [index]

Methods

Method GetEnumerator

CameraInfoEnumerator GetEnumerator()

Method Add

void Add(CameraInfo item)

The method Add has the following parameters:

Parameter Type Description
item CameraInfo  

Method Clear

void Clear()

Method Contains

System.Boolean Contains(CameraInfo item)

The method Contains has the following parameters:

Parameter Type Description
item CameraInfo  

Method Remove

System.Boolean Remove(CameraInfo item)

The method Remove has the following parameters:

Parameter Type Description
item CameraInfo  

Method IndexOf

System.Int32 IndexOf(CameraInfo item)

The method IndexOf has the following parameters:

Parameter Type Description
item CameraInfo  

Method Insert

void Insert(System.Int32 index, CameraInfo item)

The method Insert has the following parameters:

Parameter Type Description
index System.Int32  
item CameraInfo  

Method RemoveAt

void RemoveAt(System.Int32 index)

The method RemoveAt has the following parameters:

Parameter Type Description
index System.Int32  

Method ToString

System.String ToString()

Class CameraManager

The camera manager.

Namespace: Ngi

Module: Camera

The class CameraManager contains the following properties:

Property Get Set Description
Availabl eModuleFil eIds *   The list of available camera support modules in the form of the lower case filename (without path and extension) of the dll.
ModuleId sToLoad * *  
Availabl eCamerasFl ag * *  
Availabl eCameras *   The list of available cameras.

The class CameraManager contains the following methods:

Method Description
UpdateAvailableCameras Scan for available cvameras.

Description

There should be only a single instance of the camera_manager.

Default Constructor

Constructor CameraManager

CameraManager()

Properties

Property AvailableModuleFileIds

StringList AvailableModuleFileIds

The list of available camera support modules in the form of the lower case filename (without path and extension) of the dll.

Used to identify the camera support modules without loading them (only then we could access their “Id”)

Property ModuleIdsToLoad

StringList ModuleIdsToLoad

Property AvailableCamerasFlag

System.Boolean AvailableCamerasFlag

Property AvailableCameras

CameraInfoList AvailableCameras

The list of available cameras.

Call update_available_cameras to search for cameras.

Methods

Method UpdateAvailableCameras

void UpdateAvailableCameras()

Scan for available cvameras.

Only call once after creating the camera_manager.

Class CameraParameterBase

Namespace: Ngi

Module: Camera

The class CameraParameterBase contains the following properties:

Property Get Set Description
Name *    
ToolTip *    
Description *    
DisplayName *    
AccessMode *    
Visibility *    
IsDeprecated *    
IsFeature *    
IsReadable *    
IsWritable *    
IsImplemented *    
IsAvailable *    

The class CameraParameterBase contains the following methods:

Method Description
ToString  

The class CameraParameterBase contains the following enumerations:

Enumeration Description
AccessModeType  
VisibilityType  
IncModeType  
RepresentationType  
DisplayNotationType  

Description

Properties

Property Name

System.String Name

Property ToolTip

System.String ToolTip

Property Description

System.String Description

Property DisplayName

System.String DisplayName

Property AccessMode

CameraParameterBase.AccessModeType AccessMode

Property Visibility

CameraParameterBase.VisibilityType Visibility

Property IsDeprecated

System.Boolean IsDeprecated

Property IsFeature

System.Boolean IsFeature

Property IsReadable

System.Boolean IsReadable

Property IsWritable

System.Boolean IsWritable

Property IsImplemented

System.Boolean IsImplemented

Property IsAvailable

System.Boolean IsAvailable

Methods

Method ToString

System.String ToString()

Enumerations

Enumeration AccessModeType

enum AccessModeType

The enumeration AccessModeType has the following constants:

Name Value Description
NI 0 Not implemented.
NA 1 Not available.
WO 2 Write Only.
RO 3 Read Only.
RW 4 Read and Write.
enum AccessModeType
{
  NI = 0,
  NA = 1,
  WO = 2,
  RO = 3,
  RW = 4,
};

Enumeration VisibilityType

enum VisibilityType

The enumeration VisibilityType has the following constants:

Name Value Description
beginner 0 Always visible.
expert 1 Visible for experts or Gurus.
guru 2 Visible for Gurus.
invisible 3 Not Visible.
undefinedVisibility 99  
enum VisibilityType
{
  beginner = 0,
  expert = 1,
  guru = 2,
  invisible = 3,
  undefinedVisibility = 99,
};

Enumeration IncModeType

enum IncModeType

The enumeration IncModeType has the following constants:

Name Value Description
noIncrement 0  
fixedIncrement 1  
listIncrement 2  
enum IncModeType
{
  noIncrement = 0,
  fixedIncrement = 1,
  listIncrement = 2,
};

Enumeration RepresentationType

enum RepresentationType

The enumeration RepresentationType has the following constants:

Name Value Description
linear 0 Slider with linear behavior.
logarithmic 1 Slider with logarithmic behaviour.
boolean 2 Check box.
pureNumber 3 Decimal number in an edit control.
hexNumber 4 Hex number in an edit control.
ipv4Address 5 IP-Address.
macAddress 6 MAC-Address.
enum RepresentationType
{
  linear = 0,
  logarithmic = 1,
  boolean = 2,
  pureNumber = 3,
  hexNumber = 4,
  ipv4Address = 5,
  macAddress = 6,
};

Enumeration DisplayNotationType

enum DisplayNotationType

The enumeration DisplayNotationType has the following constants:

Name Value Description
fnAutomatic 0  

| fnFixed | 1 |

the notation if either scientific or fixed depending on what is shorter

| | fnScientific | 2 |

the notation is fixed, e.g. 123.4

|

enum DisplayNotationType
{
  fnAutomatic = 0,
  fnFixed = 1,
  fnScientific = 2,
};

Class CameraParameterBaseEnumerator

Namespace: Ngi

Module: Camera

The class CameraParameterBaseEnumerator implements the following interfaces:

| Interface | |—— —-| | IEnumerator | | IEnumeratorCameraParameterBase |

The class CameraParameterBaseEnumerator contains the following properties:

Property Get Set Description
Current *    

The class CameraParameterBaseEnumerator contains the following methods:

Method Description
Reset  
MoveNext  

Description

Properties

Property Current

CameraParameterBase Current

Methods

Method Reset

void Reset()

Method MoveNext

System.Boolean MoveNext()

Class CameraParameterBaseList

Namespace: Ngi

Module: Camera

The class CameraParameterBaseList contains the following properties:

Property Get Set Description
Count *    
IsFixedSize *    
IsReadOnly *    

The class CameraParameterBaseList contains the following methods:

Method Description
GetEnumerator  
Add  
Clear  
Contains  
Remove  
IndexOf  
Insert  
RemoveAt  
ToString  

Description

Default Constructor

Constructor CameraParameterBaseList

CameraParameterBaseList()

Properties

Property Count

System.Int32 Count

Property IsFixedSize

System.Boolean IsFixedSize

Property IsReadOnly

System.Boolean IsReadOnly

Methods

Method GetEnumerator

CameraParameterBaseEnumerator GetEnumerator()

Method Add

void Add(CameraParameterBase item)

The method Add has the following parameters:

Parameter Type Description
item CameraParameterBase  

Method Clear

void Clear()

Method Contains

System.Boolean Contains(CameraParameterBase item)

The method Contains has the following parameters:

Parameter Type Description
item CameraParameterBase  

Method Remove

System.Boolean Remove(CameraParameterBase item)

The method Remove has the following parameters:

Parameter Type Description
item CameraParameterBase  

Method IndexOf

System.Int32 IndexOf(CameraParameterBase item)

The method IndexOf has the following parameters:

Parameter Type Description
item CameraParameterBase  

Method Insert

void Insert(System.Int32 index, CameraParameterBase item)

The method Insert has the following parameters:

Parameter Type Description
index System.Int32  
item CameraParameterBase  

Method RemoveAt

void RemoveAt(System.Int32 index)

The method RemoveAt has the following parameters:

Parameter Type Description
index System.Int32  

Method ToString

System.String ToString()

Class CameraParameterIboolean

Namespace: Ngi

Module: Camera

The class CameraParameterIboolean contains the following properties:

Property Get Set Description
Value * *  

Description

Properties

Property Value

System.Boolean Value

Class CameraParameterIcategory

Namespace: Ngi

Module: Camera

The class CameraParameterIcategory contains the following properties:

Property Get Set Description
Features *    

Description

Properties

Property Features

CameraParameterBaseList Features

Class CameraParameterIcommand

Namespace: Ngi

Module: Camera

The class CameraParameterIcommand contains the following methods:

Method Description
Execute  

Description

Methods

Method Execute

void Execute()

Class CameraParameterIenumeration

Namespace: Ngi

Module: Camera

The class CameraParameterIenumeration contains the following properties:

Property Get Set Description
Value * *  
Symbolics *    
IntValue * *  

Description

Properties

Property Value

System.String Value

Property Symbolics

StringList Symbolics

Property IntValue

System.Int64 IntValue

Class CameraParameterIenumEntry

Namespace: Ngi

Module: Camera

The class CameraParameterIenumEntry contains the following properties:

Property Get Set Description
Value *    
Symbolic *    
NumericValue *    

Description

Properties

Property Value

System.Int64 Value

Property Symbolic

System.String Symbolic

Property NumericValue

System.Double NumericValue

Class CameraParameterIinteger

Namespace: Ngi

Module: Camera

The class CameraParameterIinteger contains the following properties:

Property Get Set Description
Value * *  
Min *    
Max *    
IncMode *    
Inc *    
Representation *    
Unit *    

Description

Properties

Property Value

System.Int64 Value

Property Min

System.Int64 Min

Property Max

System.Int64 Max

Property IncMode

CameraParameterBase.IncModeType IncMode

Property Inc

System.Int64 Inc

Property Representation

CameraParameterBase.RepresentationType Representation

Property Unit

System.String Unit

Class CameraParameterIfloat

Namespace: Ngi

Module: Camera

The class CameraParameterIfloat contains the following properties:

Property Get Set Description
Value * *  
Min *    
Max *    
HasInc *    
IncMode *    
Inc *    
Representation *    
DisplayPrecision *    
Unit *    
DisplayNotation *    

Description

Properties

Property Value

System.Double Value

Property Min

System.Double Min

Property Max

System.Double Max

Property HasInc

System.Boolean HasInc

Property IncMode

CameraParameterBase.IncModeType IncMode

Property Inc

System.Double Inc

Property Representation

CameraParameterBase.RepresentationType Representation

Property DisplayPrecision

System.Int64 DisplayPrecision

Property Unit

System.String Unit

Property DisplayNotation

CameraParameterBase.DisplayNotationType DisplayNotation

Class CameraParameterIstring

Namespace: Ngi

Module: Camera

The class CameraParameterIstring contains the following properties:

Property Get Set Description
Value * *  
MaxLength *    

Description

Properties

Property Value

System.String Value

Property MaxLength

System.Int64 MaxLength

Class CameraPixelformatInfo

Namespace: Ngi

Module:

The class CameraPixelformatInfo implements the following interfaces:

| Interface | |—— —-| | IEquatableCameraPixelformatInfo |

The class CameraPixelformatInfo contains the following properties:

Property Get Set Description
Id *   The numerical id of the pixelformat.
Description *   Human readable description of the pixelformat.
IsColor *   Indicate if this is a color or monochrome format.

The class CameraPixelformatInfo contains the following methods:

Method Description
ToString  

The class CameraPixelformatInfo contains the following enumerations:

Enumeration Description
Pixelformat Pixelformats of the camera.

Description

Default Constructor

Constructor CameraPixelformatInfo

CameraPixelformatInfo()

Constructors

Constructor CameraPixelformatInfo

CameraPixelformatInfo(CameraPixelformatInfo.Pixelformat id, System.String description, System.Boolean isColor)

The constructor has the following parameters:

Parameter Type Description
id CameraPixelformatInfo.Pixelformat  
description System.String  
isColor System.Boolean  

Properties

Property Id

CameraPixelformatInfo.Pixelformat Id

The numerical id of the pixelformat.

Property Description

System.String Description

Human readable description of the pixelformat.

Property IsColor

System.Boolean IsColor

Indicate if this is a color or monochrome format.

Methods

Method ToString

System.String ToString()

Enumerations

Enumeration Pixelformat

enum Pixelformat

Pixelformats of the camera.

The enumeration Pixelformat has the following constants:

Name Value Description
unknown 0  
mono8 1  
mono10 2  
mono10Packed 3  
mono12 4  
mono12Packed 5  
mono14 6  
mono16 7  
bgr8 8  
rgb8 9  
bgra8 10  
bayerGr8 11  
bayerRg8 12  
bayerGb8 13  
bayerBg8 14  
bayerGr10 15  
bayerRg10 16  
bayerGb10 17  
bayerBg10 18  
bayerGr12 19  
bayerRg12 20  
bayerGb12 21  
bayerBg12 22  
bayerGr14 23  
bayerRg14 24  
bayerGb14 25  
bayerBg14 26  
bayerGr16 27  
bayerRg16 28  
bayerGb16 29  
bayerBg16 30  
enum Pixelformat
{
  unknown = 0,
  mono8 = 1,
  mono10 = 2,
  mono10Packed = 3,
  mono12 = 4,
  mono12Packed = 5,
  mono14 = 6,
  mono16 = 7,
  bgr8 = 8,
  rgb8 = 9,
  bgra8 = 10,
  bayerGr8 = 11,
  bayerRg8 = 12,
  bayerGb8 = 13,
  bayerBg8 = 14,
  bayerGr10 = 15,
  bayerRg10 = 16,
  bayerGb10 = 17,
  bayerBg10 = 18,
  bayerGr12 = 19,
  bayerRg12 = 20,
  bayerGb12 = 21,
  bayerBg12 = 22,
  bayerGr14 = 23,
  bayerRg14 = 24,
  bayerGb14 = 25,
  bayerBg14 = 26,
  bayerGr16 = 27,
  bayerRg16 = 28,
  bayerGb16 = 29,
  bayerBg16 = 30,
};

Currently a subset of GenICam PixelFormat but numerical values are not the same.

Class CameraPixelformatInfoEnumerator

Namespace: Ngi

Module: Camera

The class CameraPixelformatInfoEnumerator implements the following interfaces:

| Interface | |—— —-| | IEnumerator | | IEnumeratorCameraPixelformatInfo |

The class CameraPixelformatInfoEnumerator contains the following properties:

Property Get Set Description
Current *    

The class CameraPixelformatInfoEnumerator contains the following methods:

Method Description
Reset  
MoveNext  

Description

Properties

Property Current

CameraPixelformatInfo Current

Methods

Method Reset

void Reset()

Method MoveNext

System.Boolean MoveNext()

Class CameraPixelformatInfoList

Namespace: Ngi

Module: Camera

The class CameraPixelformatInfoList implements the following interfaces:

| Interface | |—— —-| | IListCameraPixelformatInfo |

The class CameraPixelformatInfoList contains the following properties:

Property Get Set Description
Count *    
IsFixedSize *    
IsReadOnly *    
[index] * *  

The class CameraPixelformatInfoList contains the following methods:

Method Description
GetEnumerator  
Add  
Clear  
Contains  
Remove  
IndexOf  
Insert  
RemoveAt  
ToString  

Description

Default Constructor

Constructor CameraPixelformatInfoList

CameraPixelformatInfoList()

Properties

Property Count

System.Int32 Count

Property IsFixedSize

System.Boolean IsFixedSize

Property IsReadOnly

System.Boolean IsReadOnly

Property [index]

CameraPixelformatInfo [index]

Methods

Method GetEnumerator

CameraPixelformatInfoEnumerator GetEnumerator()

Method Add

void Add(CameraPixelformatInfo item)

The method Add has the following parameters:

Parameter Type Description
item CameraPixelformatInfo  

Method Clear

void Clear()

Method Contains

System.Boolean Contains(CameraPixelformatInfo item)

The method Contains has the following parameters:

Parameter Type Description
item CameraPixelformatInfo  

Method Remove

System.Boolean Remove(CameraPixelformatInfo item)

The method Remove has the following parameters:

Parameter Type Description
item CameraPixelformatInfo  

Method IndexOf

System.Int32 IndexOf(CameraPixelformatInfo item)

The method IndexOf has the following parameters:

Parameter Type Description
item CameraPixelformatInfo  

Method Insert

void Insert(System.Int32 index, CameraPixelformatInfo item)

The method Insert has the following parameters:

Parameter Type Description
index System.Int32  
item CameraPixelformatInfo  

Method RemoveAt

void RemoveAt(System.Int32 index)

The method RemoveAt has the following parameters:

Parameter Type Description
index System.Int32  

Method ToString

System.String ToString()