2D Image Capture Process

The 2D capture API returns after the 2D image is available in CPU memory. All the acquisition, processing, and copying happen inside this function call.

Tip

Use recommended hardware to minimize 2D capture time.

Go to source

source

const auto frame2D = camera.capture(settings2D);

The method to get the image from the Frame2D object returns the image right away. The image object holds a handle to the image data in CPU memory.

Go to source

source

const auto image = frame2D.imageRGBA();

Note

In C++, class Zivid::Image inherits from Zivid::Array2D and provides, in addition, a method to save the image in PNG file format.

When the image is available on the CPU memory, we can utilize it in our machine vision application or save it to disk.

Go to source

source

const auto imageFile = "Image.png";
std::cout << "Saving 2D color image to file: " << imageFile << std::endl;
image.save(imageFile);

Caution

Zivid One+ camera has a time penalty when changing the capture mode (2D and 3D) if the 2D capture settings use brightness > 0. You can read more about it in 2D and 3D switching limitation.