23 #include "pipeline_thread.h" 25 #include <fvcams/camera.h> 47 :
Thread(
"FvSrSavePipelineThread",
Thread::OPMODE_WAITFORWAKEUP),
69 e.
append(
"FvSrSavePipelineThread::init() failed since no camera is specified");
92 float *fbuf = (
float *)__cam->
buffer();
94 float *y = x + width * height;
95 float *z = y + width * height;
98 if (asprintf(&filename,
"swissranger-%05u.pts", __frame_i++) != -1) {
99 FILE *f = fopen(filename,
"w");
101 for (
unsigned int h = 0; h < height; ++h) {
102 for (
unsigned int w = 0; w < width; ++w) {
103 fprintf(f,
"%f %f %f 128 128 128\n",
104 *x++ * 2000., *y++ * 2000., *z++ * 2000.);
FvSrSavePipelineThread()
Constructor.
virtual void finalize()
Thread finalization.
Fawkes library namespace.
firevision::VisionMaster * vision_master
Vision master.
virtual unsigned int pixel_width()=0
Width of image in pixels.
virtual void loop()
A new image is retrieved from the camera and the classifier looks for a ball in the image...
Thread class encapsulation of pthreads.
Logger * logger
This is the Logger member used to access the logger.
virtual void unregister_thread(fawkes::Thread *thread)=0
Unregister a thread.
Base class for exceptions in Fawkes.
virtual void capture()=0
Capture an image.
Thread aspect to use in FireVision apps.
const char * name() const
Get name of thread.
virtual void log_warn(const char *component, const char *format,...)=0
Log warning message.
virtual void init()
Initialize the pipeline thread.
virtual unsigned char * buffer()=0
Get access to current image buffer.
virtual unsigned int pixel_height()=0
Height of image in pixels.
virtual Camera * register_for_raw_camera(const char *camera_string, fawkes::Thread *thread)=0
Register thread for camera.
virtual ~FvSrSavePipelineThread()
Destructor.
void append(const char *format,...)
Append messages to the message list.
virtual void dispose_buffer()=0
Dispose current buffer.