Operator CXPDualCamera

Operator Library: Hardware Platform

This operator represents the image data interface between a CXP dual channel camera and VisualApplets.

Available for Hardware Platforms
mE5 marathon VCX-QP
mE5 ironman VQ8-CXP6D
mE5 ironman VQ8-CXP6B

The operator provides image data on its output O. This output is always present.

In addition to this standard output port, you can specify various optional ports if required by your design.

The following pop-up dialog appears during operator instantiation:

Here, you can specify the optional ports for general purpose inputs and outputs over CXP cable, as well as optional trigger ports to and from the camera.

You can define the availability of the particular GPIs (General Purpose Inputs), the particular GPOs (General Purpose Outputs), the trigger input port, and the trigger output port.

If you set the port availability to "0" (default), the port will not be present in the operator. If you set the port availability to 1, the particular port is available at the operator interface.

The operator uses 2 resources of type CameraPort.

[Important] Modifying Image Width and Image Height

You can modify width and height to the camera-specific settings. However, the maximal image width on operator port O must be divisible by the parallelism of port O.

Make sure the maximal image width is divisible by the parallelism of port O!

[Important] Value for Parallelism

The parallelism on port O needs to be set at least to the minimum value (stated in parameter MinimalParallelism). A lower value for the parallelism is not allowed. The minimal parallelism is calculated by VisualApplets on the basis of the values you define for other parameters of this operator. This way, incoming data can always be received.

[Important] Dummy Pixels

The output data might contain dummy pixels. This happens because the operator might convert the parallelism twice. First, the operator internally converts to the minimal parallelism it calculates and provides as a read-only value in the parameter MinimalParallelism. This results in an internal image width that is divisible by MinimalParallelism with potentially added dummy values due to the parallelism conversion. Second, the operator converts the parallelism to O.Parallelism, potentially adding more dummy values, if the padded image width that resulted from the first parallelism conversion is not a multiple of O.Parallelism. So, whether the output data contains dummy pixels depends on the MinimalParallelism parameter, the image width and the O.Parallelism. Each parallelism conversion might add dummy pixels. The additional dummy pixels contain undefined data values and lead to an image width that deviates from the real image width.

Example: If the MinimalParallelism is 12, the O.Parallelism is 32, and the transmitted image width is 128 pixels, the operator internally creates image lines of width 132, because of the internal parallelism of 12 defined in the MinimalParallelism parameter. For the output, the data vector is converted to parallelism 32 (O.Parallelism), which results in an image line width of 160 pixels.

Due to dummy pixels, the expected output image width is:

[Important] Bit Width and Format Type

The bit width on port O (image port) depends on the selected format type (parameter FormatType):

  • If FormatType = Gray: Bit Width can have any value (VAF_Gray and FL_NONE).
  • If FormatType = RGB: Bit Width is a multiple of 3 (VAF_Color and FL_RGB)
  • If FormatType = RGBA: Bit Width is a multiple of 4 (VAF_Gray and FL_NONE)
  • If FormatType = RAW: Bit Width is 32 (VAF_Gray and FL_NONE)

I/O Properties

Property Value
Operator Type M
Input Links - TriggerI (optional), Trigger sent from frame grabber to camera over CXP channel. This port is often used to trigger line scan cameras.
- GPIx (optional), General purpose input [x] sent from the frame grabber to camera over CXP channel. Available are GPI0, GPI1, GPI2, GPI3, GPI4, GPI5, GPI6, and GPI7.
Output Links - O, image data output
- TriggerO (optional), Trigger sent from the camera to the frame grabber over CXP channel.
- GPOx (optional), General purpose output [x] sent from the camera to the frame grabber over CXP channel. Available are GPO0, GPO1, GPO2, GPO3, GPO4, GPO5, GPO6, and GPO7.

Supported Link Format

Link Parameter Output Link - O Input Link - TriggerI (optional) Output Link - TriggerO (optional) Input Link - GPIx (optional) Output Link - GPOx (optional)
Bit Width any 1 1 1 1
Arithmetic unsigned unsigned unsigned unsigned unsigned
Parallelism any1 1 1 1 1
Kernel Columns 1 1 1 1 1
Kernel Rows 1 1 1 1 1
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} (default: VALT_IMAGE2D) VALT_SIGNAL VALT_SIGNAL VALT_SIGNAL VALT_SIGNAL
Color Format {VAF_GRAY, VAF_COLOR}

VAF_GRAY = FL_NONE

VAF_COLOR = FL_RGB

(If Color Format is VAF_GRAY, Color Flavor is FL_NONE; if Color Format is VAF_COLOR, Color Flavor is FL_RGB.)

VAF_GRAY VAF_GRAY VAF_GRAY VAF_GRAY
Color Flavor {FL_NONE, FL_RGB}

VAF_GRAY = FL_NONE

VAF_COLOR = FL_RGB

(If Color Format is VAF_GRAY, Color Flavor is FL_NONE; if Color Format is VAF_COLOR, Color Flavor is FL_RGB.)

FL_NONE FL_NONE FL_NONE FL_NONE
Max. Img Width any (default: 1024) 1 1 1 1
Max. Img Height any (default: 1024) 1 1 1 1

1

Needs to be set at least to the minimum value stated in parameter MinimalParallelism.

If MinimalParallelism and the O.Paralleism differ from each other, the parallelism is converted twice and each time dummy values might be added. Because of these dummy pixels, the expected output image width is:

Parameters

CameraID
Type static write parameter
Default
Range {-1, 0, 1, 2, 3}

The CameraID parameter defines the CXP master port ID to the firmware of the camera operator to allow automatic CXP topology discovery (camera-to-applet and applet-to-camera).

By using this parameter, you can specify the ID directly here in the operator. However, we recommend to specify the resources of the operator in the Resources dialog. (To open the Resources dialog, simply highlight the camera operator and select from the Design menu the menu item Resources.) The CameraID parameter will automatically update to the correct master port, using the resource dialog parameters. The following example is using one single camera and one dual camera:

The CameraID (CXP master port ID) of module3 (single camera) is 2. The CameraID (CXP master port ID) of module5 (dual camera) is 1.

The dual camera requires 2 CXP camera ports. (A quad camera requires 4 ports.) Only the master port is reflected in the CameraID parameter of the operator.

When you define more CameraPort resources than possible (the maximum is 4), e.g., when you instantiate 5 "CXPSingleCamera"" operators, the camera operator which requests the CameraPort resource last (while all four available ones are already occupied) sets its CameraID to -1. In this case, the design rule check reports an error.

The parameter CameraID is in range {-1,0,1,2,3}.

MinimalParallelism
Type static read parameter
Default 12
Range [1 : 512]

A read-only parameter that provides the minimal parallelism for the output link O that still allows to transport the maximal bandwidth of the camera without losing data. The minimal parallelism is calculated automatically.

The value depends on the pixel format you select in parameter FormatMode.

If you define parameter FormatMode to be a dynamic parameter (see description of parameter FormatMode below), the smallest minimal parallelism that might occur is calculated.

The minimal parallelism might lead to the creation of dummy pixels, because the operator might convert the parallelism twice and add dummy values in this process. Because of these dummy pixels, the expected output image width is:

Status
Type dynamic read parameter
Default
Range {0; 2^7-1}

The Status parameter is a runtime, read-only parameter to reflect the current status of the camera operator. Bit[0] signalizes CXP stream packet loss detection. Bit[1] signalizes single byte error correction in CXP stream packets. Bit[2] signalizes multiple byte error detection in CXP stream packets. Bit[3..6] are reserved. This parameter might change in future versions.

FormatType
Type static write parameter
Default GRAY
Range GRAY, RGB, RGBA, RAW

Here, you can select which kind of pixel format (as defined by the CXP specification) you want to receive. The value you select here defines which pixel formats can be selected in parameter FormatMode. Hence, the setting of this parameter directly influences parameter FormatMode. See also documentation of parameter FormatMode below.

FormatMode
Type static or dynamic (user-defined) write parameter
Default Mono8
Range {Mono8, Mono10, Mono12, Mono14, Mono16, BayerGR8, BayerGR10, BayerGR12, BayerGR14, BayerGR16, BayerRG8, BayerRG10, BayerRG12, BayerRG14, BayerRG16, BayerGB8, BayerGB10, BayerGB12, BayerGB14, BayerGB16, BayerBG8, BayerBG10, BayerBG12, BayerBG14, BayerBG16, RGB8, RGB10, RGB12, RGB14, RGB16, RGBA8, RGBA10, RGBA12, RGBA14, RGBA16, Raw}

The parameter offers all pixel formats (as defined by the CXP specification) that belong to the format type you selected in parameter FormatType.

The pixel formats you can select here depend on the setting of parameter FormatType. Hence, you always have only a pre-set of the full value range available.

To get another set of pixel formats, change the setting of parameter FormatType. See also documentation of parameter FormatType above.

In detail, the following settings of parameter FormatType provide the following pixel formats in parameter FormatMode:

FormatType == GRAY: {Mono8, Mono10, Mono12, Mono14, Mono16, BayerGR8, BayerGR10, BayerGR12, BayerGR14, BayerGR16, BayerRG8, BayerRG10, BayerRG12, BayerRG14, BayerRG16, BayerGB8, BayerGB10, BayerGB12, BayerGB14, BayerGB16, BayerBG8, BayerBG10, BayerBG12, BayerBG14, BayerBG16}

FormatType == RGB: {RGB8, RGB10, RGB12, RGB14, RGB16}

FormatType == RGBA: {RGBA8, RGBA10, RGBA12, RGBA14, RGBA16}

FormatType == RAW: {Raw} Pixel format Raw has a fix bit width of 32Bit. The data are interpreted as received.

You can decide if you want to use this parameter as a dynamic or as a static parameter. Select in column Parameter Type:

TxTriggerPacketMode
Type dynamic write parameter
Default CxpStandard
Range {CxpStandard, RisingEdgeOnly}

With parameter TxTriggerPacketMode you can increase the bandwidth of the CXP cables that connect the frame grabber with the camera. The increase of bandwidth is achieved by a slight modification of the camera trigger signal interpretation.

Please note that this feature can only be used with specific cameras that support this feature. For details, please contact your local distributor or the Basler Support.

Parameter TxTriggerPacketMode allows two values (CxpStandard, RisingEdgeOnly):

  • CxpStandard: The recommended setting is value CxpStandard. If set to value CxpStandard, the camera trigger works in accordance with the CXP specification. (The CXP specification defines that the frame grabber sends two packets via CXP cable to the camera in order to trigger the camera once.)

  • RisingEdgeOnly: If set to value RisingEdgeOnly, the frame grabber sends only one packet to the camera in order to trigger the camera once. The result is an increased bandwidth and a higher line rate.

TxTriggerEventCount
Type dynamic read parameter
Default 0
Range {0;2^20-1}

The TxTriggerEventCount parameter indicates how many trigger edge events have been sent to the camera.

TxTriggerAcknowledgementCount
Type dynamic read parameter
Default 0
Range {0;2^20-1}

The TxTriggerAcknowledgementCount parameter indicates how many trigger acknowledgement packets sent by the camera (in answer to the trigger edge packets sent before) have been received by the frame grabber.

TxTriggerWaveformViolation
Type dynamic read parameter
Default 0
Range {0,1}

The parameter is set to 1 by the camera operator if the operator detects a distance between two trigger edges on port TriggerI which violates the minimal edge frequency. The minimal edge frequency is 550 ns (nanoseconds) on all microEnable 5 platforms. The parameter holds its value until it has been read. After being read, the parameter updates the value. Frequency control is running permanently and is not influenced by the read status of the parameter.

Examples of Use

The use of operator CXPDualCamera is shown in the following examples: