23 #include "pcl_frombuf_thread.h"
25 #include <fvutils/base/types.h>
26 #include <fvutils/color/colorspaces.h>
27 #include <fvutils/ipc/shm_image.h>
28 #include <pcl_utils/utils.h>
33 using namespace firevision;
46 :
Thread(
"OpenNiPclOnlyThread",
Thread::OPMODE_WAITFORWAKEUP),
61 width_ = pcl_buf_->
width();
62 height_ = pcl_buf_->
height();
65 pcl_->is_dense =
false;
67 pcl_->height = height_;
68 pcl_->points.resize((
size_t)width_ * (
size_t)height_);
89 if (last_capture_time_ != capture_time) {
90 last_capture_time_ = capture_time;
96 pcl_utils::set_time(pcl_, capture_time);
99 for (
unsigned int h = 0; h < height_; ++h) {
100 for (
unsigned int w = 0; w < width_; ++w, ++idx, ++pclbuf) {
102 pcl.points[idx].x = pclbuf->
x;
103 pcl.points[idx].y = pclbuf->
y;
104 pcl.points[idx].z = pclbuf->
z;