Skip to main content
Version: Next

Retrieve Frame Count

In this tutorial, we learn how to get frame count from camera with ion-kit.

Prerequisite​

U3V device must have framecount feature.

Tutorial​

The process of setting up the pipeline is the exactly same as the one in the previous tutorials. We just need to set up an additional output port and buffer to obtain frame count from the BB.

Get frame count​

While displaying image, we also want to retrieve the frame count information. The only difference from previous tutorials is that we need to bind the frame count value to a new port.

fcdatas = []
frame_counts = []
for i in range(num_device):
fcdatas.append(np.zeros(1, dtype=np.uint32))
frame_counts.append(Buffer(array=fcdatas[i]))

Execute the pipeline​

Execute builder.run() to finish the pipeline.

Since frame counts are directory stored to numpy array fcdata, you can print each framecount for ith sensor as follows:

print(fcdatas[i][0], end=" ")

Complete code​

Complete code used in the tutorial is here.