23#include <core/exception.h>
24#include <fvutils/adapters/pcl.h>
25#include <fvutils/base/types.h>
26#include <fvutils/color/colorspaces.h>
27#include <fvutils/ipc/shm_image.h>
36 if (buffer->colorspace() != CARTESIAN_3D_FLOAT) {
37 throw Exception(
"Invalid colorspace, expected CARTESIAN_3D_FLOAT");
40 const pcl_point_t *pclbuf = (
const pcl_point_t *)buffer->buffer();
42 const unsigned int width = buffer->width();
43 const unsigned int height = buffer->height();
48 pcl.points.resize((
size_t)width * (size_t)height);
50 for (
unsigned int i = 0; i < width * height; ++i) {
51 pcl::PointXYZ & p = pcl.points[i];
52 const pcl_point_t &pt = pclbuf[i];
62 if (buffer->colorspace() != CARTESIAN_3D_FLOAT) {
63 throw Exception(
"Invalid colorspace, expected CARTESIAN_3D_FLOAT");
66 const pcl_point_t *pclbuf = (
const pcl_point_t *)buffer->buffer();
68 const unsigned int width = buffer->width();
69 const unsigned int height = buffer->height();
74 pcl.points.resize((
size_t)width * (size_t)height);
76 for (
unsigned int i = 0; i < width * height; ++i) {
77 pcl::PointXYZRGB & p = pcl.points[i];
78 const pcl_point_t &pt = pclbuf[i];
82 p.r = p.g = p.b = 255;
Base class for exceptions in Fawkes.
Fawkes library namespace.