yes, you’re right. DC2 contains the range values of the current image. The output channels of AT cameras can be configured by the user in the camera nodemap. There can be either one output enabled or multiple.
In case only DC2 is enabled, the image buffer contains only the rangemap information. In case of multiple data channels enabled, the information is transmitted interleaved to the PC. Thus it is necessary to separate the different line information.
In the following I show you a basic example where I acquire an image from an AT camera and display the image as it is:
- CVB Color Format: Raw (0)
- Data Channels: only DC2 enabled
import matplotlib.pyplot as plt
# choose driver
device = cvb.DeviceFactory.open(os.environ["CVB"] + "/drivers/GenICam.vin");
# start streaming
stream = device.stream;
# acquire number of images
for i in range(1):
image, status = stream.wait()
if status == cvb.WaitStatus.Ok:
# create numpy array from cvb image (without copying data)
matrix = cvb.as_array(image)
# do something with image
print("Acquired image: " + str(i))
# stop streaming
As a result I get my rangemap displayed (Mono 16Bit).