Using Zebra Rapixo CoF with Aurora Imaging Library
To use Zebra Rapixo CoF, you must allocate it as an Aurora Imaging Library Rapixo CoF system (using MsysAlloc with M_SYSTEM_RAPIXOCOF). This allocation opens communication with the Zebra Rapixo CoF board and allows Aurora Imaging Library to use its resources. You can allocate an Aurora Imaging Library Rapixo CoF system for your board in multiple processes (executables). However, different processes cannot allocate a digitizer for the same acquisition paths.
All Zebra Rapixo CoF boards feature 4 quadrature decoders that can decode input from linear or rotary encoders with quadrature output. For information on this feature, refer to Using quadrature input from a rotary encoder. This chapter also provides information on how to configure and use the auxiliary I/O signals.
For information on how to use the Processing FPGA of your Zebra Rapixo CoF100, seeUsing Aurora Imaging Library for FPGA processing.
Grabbing and the formats to use for each camera pixel format
The following table outlines which Aurora Imaging Library buffer format to use with each supported camera pixel format. Note that these are the officially supported camera pixel formats.
| Camera pixel format1 | Aurora Imaging Library buffer format (type and attribute) | Operation |
|---|---|---|
| Mono8, Mono10, Mono12, Mono14, Mono16, Mono32 | 1-band 8-bit, 1-band 16-bit, 1-band 32-bit, 3-band 8-bit2, 3-band 16-bit3 | Data will automatically be bit-shifted to have most-significant bits (MSB) in destination buffer |
| BayerXX8, BayerXX10, BayerXX12, BayerXX14, BayerXX16 where XX = GR, GB, BG or RG | 1-band 8-bit, 1-band 16-bit | Demosaicing followed by RGB to Y (bit shift for MSB) |
| 3-band 8-bit, 3-band 16-bit | Demosaicing (bit shift for MSB) | |
3-band YUV16 + M_PACKED | Demosaicing followed by RGB to YUV | |
| RGB8, RGBA8, | 1-band 8-bit | RGB to Y |
| 3-band 8-bit | Direct copy | |
3-band YUV16 + M_PACKED | RGB to YUV | |
| RGB10, RGBA10, RGB12, RGBA12, RGB14, RGBA14, RGB16, RGBA16 | 1-band 8-bit | RGB to Y (bit shift for MSB) |
| 1-band 16-bit | RGB to Y | |
3-band 16-bit M_PLANAR | Packed destination buffers are not supported | |
| YUV422_8, YCbCr601_422_8, YCbCr709_422_8 | 1-band 8-bit | Only Y band |
3-band YUV16 + M_PACKED | Direct copy |
Using the CoaXPress trigger signal on Zebra Rapixo CoF
The CoaXPress trigger signal is an embedded signal transmitted along the physical transport layer connection of your camera. Typically, the CoaXPress trigger signal is reserved for trigger information and is sent with other control and data signals along the same cable. On Zebra Rapixo CoF, the CoaXPress trigger signal is only supported from the frame grabber to the camera (that is, as an output signal).
To use this signal to trigger the camera, use MdigControl with M_IO_SOURCE + M_TL_TRIGGER set to the appropriate auxiliary input signals (for example, M_AUX_IO4).
Code example: boardspecific.Rapixo-CoF.Send_trigger
Note that when you set the camera to capture an image only upon a trigger, you should disable grab triggered mode on the frame grabber (M_GRAB_TRIGGER_STATE set to M_DISABLE). For more information on performing a triggered grab, see Grabbing with triggers.
Performing Bayer color conversion in hardware
When Zebra Rapixo CoF grabs color images from a video source with a Bayer color filter (as specified by the DCF), it performs Bayer color conversion in hardware, as it transfers the images to the Host. If the images require white balancing, Zebra Rapixo CoF can perform this automatically if white balancing is enabled using MdigControl with M_WHITE_BALANCE set to M_ENABLE. If performing white balancing, you can use the default white balance coefficients, automatically have them calculated (using MdigControl with M_WHITE_BALANCE set to M_CALCULATE), or set explicit coefficients (M_BAYER_COEFFICIENTS_ID). For information on Bayer color conversion, refer to Using images acquired with a Bayer color filter.
If you don't want to perform Bayer color conversion in hardware, disable it using MdigControl with M_BAYER_CONVERSION set to M_DISABLE.
The M_BAYER... control types of MdigControl can only be used when grabbing from a camera that has a Bayer color filter (as specified by the DCF); otherwise, an error will be generated.
Using frame burst with a multi-frame buffer
Zebra Rapixo CoF supports frame burst technology. This technology allows you to grab a group of sequential frames into a multi-frame buffer with one grab command (MdigGrab, or one grab of MdigProcess); the defined number of frames are stored contiguously in the same buffer. The end-of-grab event only occurs once the entire group of frames has been grabbed, reducing the number of events that need to be handled. This is useful in cases where you have a high frame rate and need to ensure that no frames are missed. Note that a user-defined function hooked to the end-of-grab event (MdigProcess, or MdigHookFunction with M_GRAB_END) is executed only once the entire group of frames has been grabbed. For information on creating a multi-frame image buffer to store sequential frames, see Specifying the dimensions of a multi-frame image buffer.
Using on-board flat-field correction
Zebra Rapixo CoF100 supports flat-field correction on-board without Host intervention. Images taken in environments with uneven lighting can affect the quality of your processing. To correct this, an on-board flat-field correction can be applied to images so that the intensity across the image is even before processing begins. To use flat-field correction, you need to specify an on-board buffer that contains the gain values, and optionally another that contains the offset values, using MdigControl with M_SHADING_CORRECTION_GAIN_ID and M_SHADING_CORRECTION_OFFSET_ID, respectively. The buffers should be the same size as the grabbed image, and the gain values should be in the specified fixed point format (M_SHADING_CORRECTION_GAIN_FIXED_POINT). The aggregate bandwidth to read the gain buffer and offset buffer from on-board memory cannot be bigger than the internal maximum bandwidth of the DMA port (8 Gbytes/sec). There is a line limitation of 64 K pixels per line and 1 M lines per frame. Once you have set the buffers, enable the correction using MdigControl with M_SHADING_CORRECTION.
Extracting peaks from an on-board multi-frame image buffer
Zebra Rapixo CoF100 can perform MimLocatePeak1d on-board without Host intervention if the specified buffer is an on-board 8-bit buffer. Supporting this function on-board allows the board to perform sheet of light (laser line) extraction. The sheet of light must appear horizontally in the image. The board can extract more than one peak per lane (up to 3). In addition, the board can operate on a single frame or multi-frame on-board image buffer. For more information on how to use MimLocatePeak1d for peak extraction from a multi-frame image buffer, see Extraction of peaks from a multi-frame buffer.