PL-A series cameras with the following limits:
PL-A740 Series: A maximum of 14 descriptors is permitted.
PL-A770 Series: A maximum of 10 descriptors is permitted.
PL-A780 Series: A maximum of 10 descriptors is permitted.
PL-B series cameras only support one descriptor.
A descriptor is a list of all the camera parameters. For cameras that support more than one descriptor, the descriptor feature is a way to control camera settings between frames without the need to communicate between the host computer and the camera for every acquisition. This allows for rapid changes of camera parameters in a deterministic manner.
Descriptors also provide information about the current camera settings. Most of the camera settings will be known to the host computer but a few, especially the features that are set to Auto, may change without the host’s knowledge. The descriptor structure is set up in two parts so that all the settings that can change are in the first part and all the known and static settings are in the second. The complete descriptor can be written or read from camera memory. It is important to check the version of the descriptor structure in order to use the correct structure.
The first part of the descriptor structure is always appended to each frame. For more information on the manner and format in which the data is appended to the frame, refer to Video Formats.
For camera control, descriptors can be created and stored in camera memory. The number of descriptors available is camera dependent (see table below). The camera will apply each descriptor in turn when capturing images. When multiple descriptors are in use, the camera will encode a synchronization number in the first 16 bytes of image data returned from the camera. The format of the synchronization code is shown in Video Formats. When in rolling shutter mode, if the changes affect the sensor, the camera will drop a frame and send the next following frame, effectively halving the frame rate.
|
|
|
Note |
The PL-B series of cameras only support one descriptor so no inter-frame changes are possible. The descriptor is used solely to convey information about the current camera settings. |
The API uses special functions to control descriptors. See PxLCreateDescriptor, PxLUpdateDescriptor and PxLRemoveDescriptor for more information. Also see the article on Creating and Using Custom Descriptors.
Descriptors are created by increasing the number of descriptors in the descriptor configuration CSR. A new descriptor will have the same values as the current descriptor or, if it is the first descriptor created, the camera settings. With more than one descriptor, the camera will cycle through the descriptors repetitively.
Descriptors can be changed by updating the descriptor values in camera memory.
How to determine which feature can change in a descriptor
All feature element inquiry registers (Offset 500h to 5FFh) use bit 2 to indicate if the feature can have different values in different descriptors as shown in the table below.
|
Offset |
Name |
Field |
Bit |
Description |
|
5XXh |
XX Inquiry Register |
|
[0..1] |
Same as IIDC Specification |
|
In_Desc_Inq |
[2] |
Can this feature have different values in different descriptors 1 = Yes, 0 = No | ||
|
|
[3..31] |
Same as IIDC Specification |
Feature Element Inquiry CSRs (Section 4.5 in the IIDC 1.31 Spec.)
The Color Coding Inquiry Register is slightly different. It uses bit 31 to indicate if the color coding can change between descriptors.
|
Offset |
Name |
Field |
Bit |
Description | |
|
014h |
Color Coding Inquiry Register |
Mono8 |
[0] |
Y only, Y=8bits, non compressed |
ID=0 |
|
4:1:1 YUV8 |
[1] |
4:1:1, Y=U=V=8bits, non compressed |
ID=1 | ||
|
4:2:2 YUV8 |
[2] |
4:2:2, Y=U=V=8bits, non compressed |
ID=2 | ||
|
4:4:4 YUV8 |
[3] |
4:4:4, Y=U=V=8bits, non compressed |
ID=3 | ||
|
RGB8 |
[4] |
R=G=B=8bits, non compressed |
ID=4 | ||
|
Mono16 |
[5] |
Y only, Y=16bits, non compressed |
ID=5 | ||
|
RGB16 |
[6] |
R=G=B=16bits, non compressed |
ID=6 | ||
|
Signed Mono16 |
[7] |
Y only, Y=16bits, non compressed (signed integer) |
ID=7 | ||
|
Signed RGB16 |
[8] |
R=G=B=16bits, non compressed (signed integer) |
ID=8 | ||
|
Raw8 |
[9] |
Raw data output of color filter sensor, 8bits/pixel (Bayer pattern) |
ID=9 | ||
|
Raw16 |
[10] |
Raw data output of color filter sensor, 16bits/pixel (Bayer pattern) |
ID=10 | ||
|
|
[9..30] |
| |||
|
In_Desc_Inq |
[31] |
Can the Color Coding ID have different values in different descriptors 1 = Yes, 0 = No | |||
Color Coding Inquiry CSR for Format_7 (Section 4.9 in the IIDC Spec.)
To delete a descriptor, reduce the number of descriptors in the descriptor configuration CSR. The highest indexed descriptors will be deleted first.
To delete a descriptor, reduce the number of descriptors in the descriptor configuration CSR. The highest indexed descriptors will be deleted first.
The Descriptor structure has two parts. The first part contains a list of all the features that can change between descriptors and all other features in the second. The first section of the structure is attached to the end of each frame sent to the driver. This part of the structure is required to be as small as possible so only features that could change from frame to frame and be unknown by the Host are included (i.e. features that could be in Auto mode).
The whole structure (first and second section) is used when accessing the Descriptor structure located at the Descriptor Offset (See Advanced CSRs).
The PL-B, PL_A780, and PL_A770 series cameras use Descriptor Version 3, the PL_A740 series cameras use Descriptor Version 2. Versions 0 through 1 are subsets of this structure and are used by previous version PixeLINK cameras. Refer to the PixeLINK API Reference Manual for more information.
typedef struct _DESCRIPTOR
{
const U16 wSize; // Size of this structure (in bytes)
const U16 wVersion = 0x0002; // Version of this structure
float fWhiteBalance; // White Balance
float fSaturation; // Saturation
float fBrightness; // Brightness
float fShutter; // Shutter
float fGain; // Gain
float fKneePoint[4]; // Extended Shutter Knee Point
#if FRAME_STRUCTURE
} DESCRIPTOR, *PDESCRIPTOR;
#else // !FRAME_STRUCTURE
// This section contains all settings that don’t change without
// the host’s knowledge
float fAutoExposure; // Auto Exposure
float fSharpness; // Sharpness
float fHue; // Hue
float fGamma; // Gamma
float fIris; // Iris
float fFocus; // Focus
float fTemperature; // Temperature
float fTriggerParamter; // Parameter for Trigger
float fTriggerDelay; // Trigger Delay
float fZoom; // Zoom
float fPan; // Pan
float fTilt; // Tilt
float fOpticalFilter; // Optical Filter
float fAutoROILeft; // Auto ROI Left
float fAutoROITop; // Auto ROI Top
float fAutoROIWidth; // Auto ROI Width
float fAutoROIHeight; // Auto ROI Height
float fFrameRate; // Frame Rate
float fLeft; // ROI Left
float fTop; // ROI Top
float fWidth; // ROI Width
float fHeight; // ROI Height
float fDecimation; // Decimation
float fPixelFormat; // Pixel Format
float fGpioParameter1[16]; // GPIO Parameter 1
float fGpioParameter2[16]; // GPIO Parameter 2
float fGpioParameter3[16]; // GPIO Parameter 3
U8 byGpioMode[16]; // GPIO Mode
U8 byGpioPolarity[16]; // GPIO Polarity
U8 byTriggerMode; // Trigger Mode
U8 byTriggerPolarity; // Trigger Polarity
U8 byTriggerType; // Trigger Type
U8 byReserved; // Padding to quadlet align
} DESCRIPTOR, *PDESCRIPTOR;
#endif // FRAME_STRUCTURE
typedef struct _DESCRIPTOR
{
const U16 wSize; // Size of this structure (in bytes)
const U16 wVersion = 0x0003; // Version of this structure
float fWhiteBalance; // White Balance
float fSaturation; // Saturation
float fBrightness; // Brightness
float fShutter; // Shutter
float fGain; // Gain
float fRedGain; // Red Gain
float fGreenGain; // Green Gain
float fBlueGain; // Blue Gain
#if FRAME_STRUCTURE
} DESCRIPTOR, *PDESCRIPTOR;
#else // !FRAME_STRUCTURE
// This section contains all settings that don’t change without
// the host’s knowledge
float fAutoExposure; // Auto Exposure
float fSharpness; // Sharpness
float fHue; // Hue
float fGamma; // Gamma
float fIris; // Iris
float fFocus; // Focus
float fTemperature; // Temperature
float fTriggerParamter; // Parameter for Trigger
float fTriggerDelay; // Trigger Delay
float fZoom; // Zoom
float fPan; // Pan
float fTilt; // Tilt
float fOpticalFilter; // Optical Filter
float fAutoROILeft; // Auto ROI Left
float fAutoROITop; // Auto ROI Top
float fAutoROIWidth; // Auto ROI Width
float fAutoROIHeight; // Auto ROI Height
float fRotate; // Angle of Rotation
float fFrameRate; // Frame Rate
float fLeft; // ROI Left
float fTop; // ROI Top
float fWidth; // ROI Width
float fHeight; // ROI Height
float fPixelAddressingValue; // Pixel Addressing Value
float fPixelAddressinMode; // Pixel Addressing Mode
float fPixelFormat; // Pixel Format
float fKneePoint[4]; // Extended Shutter Knee Point
float fGPOParameter1[16]; // GPO Parameter 1
float fGPOParameter2[16]; // GPO Parameter 2
float fGPOParameter3[16]; // GPO Parameter 3
U8 byGPOMode[16]; // GPO Mode
U8 byGPOPolarity[16]; // GPO Polarity
U8 byTriggerMode; // Trigger Mode
U8 byTriggerPolarity; // Trigger Polarity
U8 byTriggerType; // Trigger Type
U8 byReserved; // Padding to quadlet align
} DESCRIPTOR, *PDESCRIPTOR;
#endif // FRAME_STRUCTURE
Information in this section is based on the IIDC 1.31 specification. Please refer to the IIDC 1.31 specification for details on the meanings and use of CSRs.
The following table describes the Advanced Feature CSRs that are allowed under the IIDC V1.31 specification as vendor specific. These CSRs are based at an offset found in the Advanced Feature Offset value (register 0x480).
This table is common for all IIDC compliant PixeLINK cameras and is included to promote compatibility. See the full table in the IIDC Overview - Advanced CSRs topic.
|
Offset |
Name |
Field |
Bit |
Description |
|
ADVANCED FEATURE INQUIRY REGISTERS (READ ONLY) |
||||
|
10Ch |
Descriptor Inquiry |
Presence_Inq |
[0] |
Presence of this feature |
|
|
[1..7] |
Reserved | ||
|
Max_Num |
[8..15] |
Maximum number of Descriptors | ||
|
Struct_Ver |
[16..31] |
Version of the Descriptor Structure. | ||
|
110h |
Descriptor Offset |
Value |
[0..31] |
Quadlet offset of the Descriptor Structure from the base address of the initial register space (See NOTE 2) |
|
ADVANCED FEATURE CONTROL REGISTERS |
||||
|
200h |
Descriptor Configuration |
Current |
[0..7] |
Zero-based index of the descriptor currently in focus (Format 7 only) |
|
Number |
[8..15] |
Number of descriptors currently in use (Format 7 only) (See NOTE 6) | ||
|
Append_Desc |
[16] |
Append Descriptors to each frame 1 = Append, 0 = Don’t Append | ||
|
|
[17..31] |
Reserved | ||
|
|
|
Note 2 |
You do not have to access the Access Control Register to Read/Write to the value at the offset pointed to by the value in this register. |
|
|
|
Note 6 |
Descriptors are added or removed by increasing/decreasing this value. When a descriptor is created it will have the same values as the current descriptor (Current field) or the camera settings if it is the first descriptor to be created. When the descriptor number is decreased then the descriptors with a higher index are removed first. |