18 "implementation_id",
"USBCameraMonitor",
19 "type_name",
"USBCameraMonitor",
20 "description",
"USB Camera Acquire component",
22 "vendor",
"Noriaki Ando, AIST",
23 "category",
"example",
24 "activity_type",
"DataFlowComponent",
27 "lang_type",
"compile",
29 "conf.default.image_height",
"240",
30 "conf.default.image_width",
"320",
106 cvNamedWindow(
"CaptureImage", CV_WINDOW_AUTOSIZE);
108 std::cout <<
"m_img->nChannels :" <<
m_img->nChannels << std::endl;
109 std::cout <<
"m_img->width :" <<
m_img->width << std::endl;
110 std::cout <<
"m_img->height :" <<
m_img->height << std::endl;
119 cvReleaseImage(&
m_img);
121 cvDestroyWindow(
"CaptureImage");
130 static int count = 0;
138 if (!(
m_in.data.length() > 0))
143 memcpy(
m_img->imageData,(
void *)&(
m_in.data[0]),
m_in.data.length());
146 cvShowImage(
"CaptureImage",
m_img);
154 double sec(tm - tm_pre);
155 if (sec > 1.0 && sec < 1000.0)
157 std::cout << 100.0/sec <<
" [FPS]" << std::endl;
216 RTC::Create<USBCameraMonitor>,
217 RTC::Delete<USBCameraMonitor>);
DataFlowComponentBase class.
static const char * usbcameramonitor_spec[]
int gettimeofday(struct timeval *tv, struct timezone *tz)
Get the time and timezone.
InPort< TimedOctetSeq > m_inIn
ExecutionContextHandle_t UniqueId
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
Setup for configuration parameters.
virtual RTC::ReturnCode_t onInitialize()
Callback function to initialize.
Class represents a set of properties.
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
Callback function to deactivate.
void registerInPort(const char *name, InPortBase &inport)
[local interface] Register DataInPort
virtual bool isNew()
Check whether the data is newest.
USBCameraMonitor(RTC::Manager *manager)
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Callback function to execute periodically.
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
Register RT-Component Factory.
bool read()
Readout the value from DataPort.
void USBCameraMonitorInit(RTC::Manager *manager)
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
Callback function to activate.