Zivid C++ API 2.12.0+6afd4961-1
|
Classes | |
class | ProjectedImage |
A handle to a 2D image being displayed on Zivid camera's projector. More... | |
Functions | |
ZIVID_CORE_EXPORT std::ostream & | operator<< (std::ostream &stream, const ProjectedImage &projectedImage) |
Serialize the value to a stream. | |
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< PointXY > | pixelsFrom3DPoints (const Camera &camera, const std::vector< PointXYZ > &points) |
Get 2D projector pixel coordinates corresponding to 3D points relative to the camera. | |
ZIVID_CORE_EXPORT std::ostream & Zivid::Projection::operator<< | ( | std::ostream & | stream, |
const ProjectedImage & | projectedImage ) |
Serialize the value to a stream.
ZIVID_CORE_EXPORT std::vector< PointXY > Zivid::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.
camera | Reference to camera instance. |
points | List of 3D points in the camera frame |
ZIVID_CORE_EXPORT Resolution Zivid::Projection::projectorResolution | ( | const Camera & | camera | ) |
Returns the resolution of the internal projector in the Zivid camera.
ZIVID_CORE_EXPORT ProjectedImage Zivid::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.
camera | Reference to camera instance |
image | Image to display, provided in BGRA format |