Zivid C++ API 2.11.1+de9b5dae-1
Functions
Zivid::Experimental::Projection Namespace Reference

Functions

ZIVID_CORE_EXPORT Resolution projectorResolution (const Camera &camera)
 Returns the resolution of the internal projector in the Zivid camera.
 
ZIVID_CORE_EXPORT ProjectedImage showImage (Camera &camera, const Image< ColorBGRA > &image)
 Display a 2D color image using the projector.
 
ZIVID_CORE_EXPORT std::vector< PointXYpixelsFrom3DPoints (const Camera &camera, const std::vector< PointXYZ > &points)
 Get 2D projector pixel coordinates corresponding to 3D points relative to the camera.
 

Function Documentation

◆ pixelsFrom3DPoints()

ZIVID_CORE_EXPORT std::vector< PointXY > Zivid::Experimental::Projection::pixelsFrom3DPoints ( const Camera camera,
const std::vector< PointXYZ > &  points 
)

Get 2D projector pixel coordinates corresponding to 3D points relative to the camera.

This function takes 3D points in the camera's reference frame and converts them to the projector frame using the internal calibration of a Zivid camera. In a Zivid point cloud, each point corresponds to a pixel coordinate in the camera, but the projector has a slight offset. The translation of each point depends on the distance between the camera and the point, as well as the distance and angle between the camera and the projector.

Parameters
cameraReference to camera instance.
pointsList of 3D points in the camera frame
Returns
List of 2D projector pixel coordinates

◆ projectorResolution()

ZIVID_CORE_EXPORT Resolution Zivid::Experimental::Projection::projectorResolution ( const Camera camera)

Returns the resolution of the internal projector in the Zivid camera.

Returns
The projector resolution

◆ showImage()

ZIVID_CORE_EXPORT ProjectedImage Zivid::Experimental::Projection::showImage ( Camera camera,
const Image< ColorBGRA > &  image 
)

Display a 2D color image using the projector.

The image resolution needs to be the same as the resolution obtained from the projectorResolution(const Camera &camera) function for the camera. To project the image, the returned projected image handle must be kept alive. The projection will stop when the handle goes out of scope, if the stop() function is called on the handle, or if another capture is initiated on the camera.

Parameters
cameraReference to camera instance
imageImage to display, provided in BGRA format
Returns
A handle to the projected image