Format
Top  Previous  Next

Description

Returns or sets the index of the currently selected pixel format.


Syntax


[VB]
objActiveGeni.Format [= Value]


[C/C++]
HRESULT get_Format( long *pFormat );
HRESULT put_Format( long Format );



Data Type
[VB]

Long

Parameters
[C/C++]

pFormat [out,retval]  
Pointer to the format's index  
Format [in]  
The index of the format to be selected  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
The index is out of range  
 

Example


This VB example initializes a combo box with the descriptions of available pixel formats and uses it to select a specific format:

Private Sub
 Form_Load()
FormatLst = ActiveGeni1.GetFormatList
For
 i = 0 
To
 
UBound
(FormatLst)
Combo1.AddItem (FormatLst(i))
Next

Combo1.ListIndex = 0
ActiveGeni1.Acquire = 
True
End Sub

Private Sub
 Combo1_Click()
ActiveGeni1.Format = Combo1.ListIndex
End Sub

 

Remarks


The value of the property is a zero-based index into the list of pixel formats supported by the currently selected Camera. The list of formats can be retrieved with GetFormatList. If you use the property window of your development environment or ActiveGeni's property pages, the Format property field will be presented as a list box containing all supported video formats. The format list is built in the acceding order by browsing through all pixel formats supported by the current camera.

ActiveGeni supports the following pixel formats:

Pixel Format
Description
Bits per pixel
Mono8
8-bit monochrome unsigned
8
Mono8Signed
8-bit monochrome signed
8
Mono10
10-bit monochrome unpacked
16
Mono10Packed
10-bit monochrome packed
12
Mono12
12-bit monochrome unpacked
16
Mono12Packed
12-bit monochrome packed
12
Mono14
14-bit monochrome unpacked
14
Mono16
16-bit monochrome
16
Bayer**8
8-bit raw Bayer
8
Bayer**10
10-bit raw Bayer unpacked
16
Bayer**12
12-bit raw Bayer unpacked
16
RGB8Packed
24-bit RGB color
24
BGR8Packed
24-bit BGR color
24
RGBA8Packed
24-bit RGB color with alpha channel
32
BGRA8Packed
24-bit BGR color with alpha channel
32
RGB10Packed
30-bit RGB color
48
BGR10Packed
30-bit BGR color
48
RGB12Packed
36-bit RGB color
48
BGR12Packed
36-bit BGR color
48
BGR10V1Packed
30-bit BGR color packed
32
BGR10V2Packed
30-bit BGR color packed
32
YUV411Packed
12-bit YUV color
12
YUV422Packed
16-bit YUV color
16
YUV444Packed
24-bit YUV color
24
RGB8Planar
24-bit RGB in form of three 8-bit planes
24
RGB10Planar
30-bit BGR in form of three 16-bit planes
48
RGB12Planar
36-bit BGR in form of three 16-bit planes
48
RGB16Planar
48-bit BGR in form of three 16-bit planes
48


Note - ** in the Bayer format names stands for GR, RG, GB or BG type of Bayer layout.

Depending on your camera, some manufacturer-specific formats can also be supported by ActiveGeni.

For more information refer to "GigE Vision Camera Interface Standard For Machine Vision, Version 2.0" published by the Automated Imaging Associationn.