10 #ifndef __SKIN_MESH_THREAD_PORT_H__
11 #define __SKIN_MESH_THREAD_PORT_H__
17 #include <yarp/os/PeriodicThread.h>
18 #include <yarp/os/Log.h>
19 #include <yarp/dev/ControlBoardInterfaces.h>
20 #include <yarp/dev/PolyDriver.h>
21 #include <yarp/dev/CanBusInterface.h>
22 #include <yarp/sig/Vector.h>
40 using namespace yarp::os;
46 static const int MAX_SENSOR_NUM = 128;
66 for (
int t=0; t<MAX_SENSOR_NUM; ++t)
68 if (sensor[t])
delete sensor[t];
72 virtual bool threadInit();
73 virtual void threadRelease();
78 std::lock_guard<std::mutex> lck(mtx);
79 for (
int t=0; t<MAX_SENSOR_NUM; ++t)
81 if (sensor[t]) sensor[t]->
resize(width,height,40);
85 void eval(
unsigned char *image)
87 std::lock_guard<std::mutex> lck(mtx);
88 for (
int t=0; t<MAX_SENSOR_NUM; ++t)
98 sensor[t]->
eval(image);
104 void draw(
unsigned char *image)
106 for (
int t=0; t<MAX_SENSOR_NUM; ++t)
108 if (sensor[t]) sensor[t]->
draw(image);
BufferedPort< Bottle > skin_port_virtual
std::vector< unsigned char > defaultColor
void eval(unsigned char *image)
void resize(int width, int height)
BufferedPort< Bottle > skin_port
void draw(unsigned char *image)
void eval(unsigned char *image)
void resize(int width, int height, int margin)
virtual void draw(unsigned char *image)
void eval_light(unsigned char *image)