Balluff - BVS CA-GX0 / BVS CA-GX2 Technical Documentation
Using the SmartFrameRecall feature
Note
The feature described here requires at least version 2.18.1 of Impact Acquire and also devices offering certain features as part of their firmware.

Introduction

The SmartFrameRecall is a new, FPGA based smart feature which takes the data handling of industrial cameras to a new level.

So far, the entire data amount has to transferred to the host PC whereby the packetizer in the camera split the data packages and distributed them to the two Gigabit Ethernet lines. On the host PC, the data was merged again, shrank, and this AOI was possibly processed (Figure 1).

Figure 1: Data handling so far

This procedure has several disadvantages:

  • Both data lines (in case of Dual GigE cameras for example) for each camera are required which
    • leads to high cabling efforts.
  • A high end PC is needed to process the data which
    • leads to high power consumption.
  • In USB 3 multi-camera solutions (depending on the resolution) each camera requires a separate connection line to the host PC which
    • limits the cabling possibilities, the possible distances, and makes an installation more complex (without the possibilities to use hubs, for example).
  • Last but not least, the frame rates a limited to the bandwidth.

The SmartFrameRecall is a new data handling approach which buffers the hi-res images in the camera and only transfers thumbnails. You or your software decides on the host PC which AOI should be sent to the host PC (Figure 2).

Figure 2: SmartFrameRecall working method

This approach allows

  • higher bandwidths,
  • less CPU load and power consumption,
  • higher frame rates, and
  • less complex cabling.
Figure 3: Connection advantages in combination with SmartFrameRecall

Implementing a SmartFrameRecall application

First of all, clarify if the SmartFrameRecall makes sense to be used in your application:

  • Taking a short look on the thumbnails, could you specify which frames don't interest you at all or which portions of the frame suffice to you for further processing?

If you can, your application can do so too, and then SmartFrameRecall is the right framework for you. To use the SmartFrameRecall follow these steps:

  • Activate the Chunk Data Control:
#include <mvIMPACT_CPP/mvIMPACT_acquire.h>
#include <mvIMPACT_CPP/mvIMPACT_acquire_GenICam.h>

... 
GenICam::ChunkDataControl cdc( pDev );
cdc.chunkModeActive.write( bTrue );
cdc.chunkSelector.writeS( "Image" );
cdc.chunkEnable.write( bTrue );
cdc.chunkSelector.writeS( "mvCustomIdentifier" );
cdc.chunkEnable.write( bTrue );
...

It is necessary to activate the chunk data that your application can easily distinguish frames belonging to the normal stream from the ones requested by the host application.

  • Reduce the size of the streamed images. This can reduce the size using Decimation, both horizontally and vertically. E.g. setting decimation to 16, a normal image will only consume 16*16 thus 1/256th of the bandwidth:
...
GenICam::ImageFormatControl ifc( pDev );
ifc.decimationHorizontal.write( 16 );
ifc.decimationVertical.write( 16 );
...
  • Make sure that the resulting image width is a multiple of 8! If this is not the case the SmartFrameRecall feature cannot be activated.
  • Activate the SmartFrameRecall feature:
...

GenICam::AcquisitionControl ac( pDev );
ac.mvSmartFrameRecallEnable.write( bTrue );
...

This will configure the devices internal memory to store each frame (that gets transmitted to the host) in full resolution. These images can be requested by an application when needed. As soon as the memory is full, the oldest one will be removed from the memory whenever a new one becomes ready (FIFO).

  • Analyze the images of the reduced data stream.
  • If necessary, request the desired image in full resolution:
...
struct ThreadParameter
{
    Device* pDev;
    GenICam::CustomCommandGenerator ccg;
    ...
}
...
unsigned int DMR_CALL liveThread( void* pData )
{
    ThreadParameter* pThreadParameter = reinterpret_cast<ThreadParameter*>( pData );
    ...
    pThreadParameter->ccg.requestTransmission( pRequest, x, y, w, h, rtmFullResolution, cnt );
    ...
}
...

The last parameter of requestTransmission will be written into the chunkmvCustomIdentifier and your application can recognize the request.

  • Finally do you analysis/processing with the requested image in full resolution.

We provide