Performing image acquisition with an Automation Technology C6 camera in CVB.
While using the Chunk Image Mode on the C6 to acquire composite images from the C6 without using MultiPart works fine for existing imaging systems, by creating a new application using C6 cameras the prefered way to acquire images should be the use of MultiPart.
There are multiple advantages the C6 platform has compared to its predecessor the C5 series.
The C6 allows to acquire images from 4 AOIs (Regions) in parallel while at each region iti s possible to extract up to 4 laser line peaks, allowing the full collection of data for (semi-)transparent surfaces. The maximum number of parts in a composite is nine.
The following example in CVB.NET shows how to acquire images with a C6 using GenICam 3.0 MultiPart image Acquisition.
using System;
using Stemmer.Cvb;
using Stemmer.Cvb.GenApi;
using Stemmer.Cvb.Utilities;
using Stemmer.Cvb.Driver;
namespace CVB_Multipart_ATC6
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start Program.");
DiscoveryInformationList DicoveryList = DeviceFactory.Discover(DiscoverFlags.IgnoreVins);
Device device = DeviceFactory.Open(DicoveryList[0],AcquisitionStack.GenTL);
Console.WriteLine((device.NodeMaps[NodeMapNames.TLDevice]["Std::DeviceModelName"] as StringNode).Value + " opened.");
//Multipart Acquisition
CompositeStream stream = (((GenICamDevice)device).GetStream<CompositeStream>(0));
stream.Start();
for (int i = 0; i < 10; i++)
{
using (Composite composite = stream.Wait(out WaitStatus status))
{
using(MultiPartImage image = MultiPartImage.FromComposite(composite))
{
using (NodeMapDictionary nodeMaps = NodeMapDictionary.FromComposite(composite))
{
int index = 0;
foreach (var part in image.Parts)
{
index++;
switch (part)
{
case Image partImage:
partImage.Save("Multipartimage_"+ i + "_" + index + ".tif");
Console.WriteLine("Composite " + i + " Part " + index + " is an Image");
break;
case PfncBuffer buffer:
Console.WriteLine("Composite " + i + " Part " + index + " is an PFNCBuffer");
break;
default:
break;
}
}
}
}
}
}
stream.Stop();
Console.WriteLine("Program finished");
Console.ReadLine();
}
}
}
In case of the C6 all composite parts are images. There are other devices that for example contain a pointcloud inside the composite. In this case the part extraction could look like this:
using (PointCloud pointcloud = PointCloud.FromComposite(composite))
{
//Do something
}