BayerLayout
Top  Previous  Next

Description

Returns or sets the layout of pixels in the CCD array of a Bayer camera. The values from 0 to 3 correspond to the following layouts:

0 - GB  
          G B G B G    
         R G R G R
     
1 - GR  
          G R G R G    
         B G B G B

2 - BG  
          B G B G B   
         G R G R G

3 - RG  
          R G R G R
         G B G B R    

Syntax


[VB]
objActiveDcam.BayerLayout [= Value]


[C/C++]
HRESULT get_BayerLayout( long *pBayerLayout );
HRESULT put_BayerLayout( long BayerLayout );



Data Type
[VB]

Long


Parameters
[C/C++]

pBayerLayout [out,retval]  
Pointer to the ordinal number of the currently selected layout  
BayerLayout [in]  
The number of the layout to be selected  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
Invalid property value.  
 

Example


This VB example demonstrates the use of a combo box for changing the Bayer layout:

Private Sub Form_Load()  
ActiveDcam1.Acquire = True  
ActiveDcam1.Bayer = True  
Combo1.AddItem ("GB")  
Combo1.AddItem ("GR")  
Combo1.AddItem ("BG")  
Combo1.AddItem ("RG")  
Combo1.ListIndex = 1  
End Sub  
 
Private Sub Combo1_Click()  
ActiveDcam1.BayerLayout = Combo1.ListIndex  
End Sub  

Remarks


This property works in combination with the Bayer filter. The layout of the CCD array is defined by your Bayer camera specifications. If you use on of the partial scan (Format 7) video Modes and apply an offset to the partial scan window (see StartX, StartY), you might need to select a different Bayer layout depending on the position of the top left corner of the window relative to the CCD mask.

If one of the raw Format 7 video modes is selected, BayerLayout will be set automatically to the one reported by the camera. For more information refer to "IIDC 1394-based Digital Camera Specification, Version 1.31" published by the 1394 Trade Association.


Note that this property is available only if the current video Mode is a monochrome or raw one.