Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
rtc
ColorExtractor
ColorExtractor.h
Go to the documentation of this file.
1
// -*- C++ -*-
10
#ifndef COLOR_EXTRACTOR_H
11
#define COLOR_EXTRACTOR_H
12
13
#include <rtm/idl/BasicDataType.hh>
14
#include <rtm/idl/ExtendedDataTypes.hh>
15
#include "hrpsys/idl/Img.hh"
16
#include <
rtm/Manager.h
>
17
#include <rtm/DataFlowComponentBase.h>
18
#include <
rtm/CorbaPort.h
>
19
#include <
rtm/DataInPort.h
>
20
#include <
rtm/DataOutPort.h
>
21
#include <rtm/idl/BasicDataTypeSkel.h>
22
#include <cv.h>
23
24
// Service implementation headers
25
// <rtc-template block="service_impl_h">
26
27
// </rtc-template>
28
29
// Service Consumer stub headers
30
// <rtc-template block="consumer_stub_h">
31
32
// </rtc-template>
33
34
using namespace
RTC
;
35
39
class
ColorExtractor
40
:
public
RTC::DataFlowComponentBase
41
{
42
public
:
47
ColorExtractor
(
RTC::Manager
*
manager
);
51
virtual
~
ColorExtractor
();
52
53
// The initialize action (on CREATED->ALIVE transition)
54
// formaer rtc_init_entry()
55
virtual
RTC::ReturnCode_t onInitialize();
56
57
// The finalize action (on ALIVE->END transition)
58
// formaer rtc_exiting_entry()
59
// virtual RTC::ReturnCode_t onFinalize();
60
61
// The startup action when ExecutionContext startup
62
// former rtc_starting_entry()
63
// virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
64
65
// The shutdown action when ExecutionContext stop
66
// former rtc_stopping_entry()
67
// virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
68
69
// The activated action (Active state entry action)
70
// former rtc_active_entry()
71
virtual
RTC::ReturnCode_t onActivated(
RTC::UniqueId
ec_id
);
72
73
// The deactivated action (Active state exit action)
74
// former rtc_active_exit()
75
virtual
RTC::ReturnCode_t onDeactivated(
RTC::UniqueId
ec_id);
76
77
// The execution action that is invoked periodically
78
// former rtc_active_do()
79
virtual
RTC::ReturnCode_t onExecute(
RTC::UniqueId
ec_id);
80
81
// The aborting action when main logic error occurred.
82
// former rtc_aborting_entry()
83
// virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
84
85
// The error action in ERROR state
86
// former rtc_error_do()
87
// virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
88
89
// The reset action that is invoked resetting
90
// This is same but different the former rtc_init_entry()
91
// virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
92
93
// The state update action that is invoked after onExecute() action
94
// no corresponding operation exists in OpenRTm-aist-0.2.0
95
// virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
96
97
// The action that is invoked when execution context's rate is changed
98
// no corresponding operation exists in OpenRTm-aist-0.2.0
99
// virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
100
101
102
protected
:
103
// Configuration variable declaration
104
// <rtc-template block="config_declare">
105
106
// </rtc-template>
107
108
Img::TimedCameraImage
m_original
;
109
110
// DataInPort declaration
111
// <rtc-template block="inport_declare">
112
InPort<Img::TimedCameraImage>
m_originalIn
;
113
114
// </rtc-template>
115
116
Img::TimedCameraImage
m_result
;
117
RTC::TimedPoint2D
m_pos
;
118
119
// DataOutPort declaration
120
// <rtc-template block="outport_declare">
121
OutPort<Img::TimedCameraImage>
m_resultOut
;
122
OutPort<RTC::TimedPoint2D>
m_posOut
;
123
124
// </rtc-template>
125
126
// CORBA Port declaration
127
// <rtc-template block="corbaport_declare">
128
129
// </rtc-template>
130
131
// Service declaration
132
// <rtc-template block="service_declare">
133
134
// </rtc-template>
135
136
// Consumer declaration
137
// <rtc-template block="consumer_declare">
138
139
// </rtc-template>
140
141
private
:
142
IplImage *
m_img
;
143
int
m_minPixels
;
144
std::vector<int>
m_rgbRegion
;
145
int
dummy
;
146
};
147
148
149
extern
"C"
150
{
151
void
ColorExtractorInit
(
RTC::Manager
*
manager
);
152
};
153
154
#endif // COLOR_EXTRACTOR_H
ec_id
ec_id
ColorExtractor::m_original
Img::TimedCameraImage m_original
Definition:
ColorExtractor.h:108
ColorExtractor::m_minPixels
int m_minPixels
Definition:
ColorExtractor.h:143
RTC
RTC::Manager
ColorExtractor::m_originalIn
InPort< Img::TimedCameraImage > m_originalIn
Definition:
ColorExtractor.h:112
ColorExtractor::m_resultOut
OutPort< Img::TimedCameraImage > m_resultOut
Definition:
ColorExtractor.h:121
RTC::DataFlowComponentBase
ColorExtractor::dummy
int dummy
Definition:
ColorExtractor.h:145
ColorExtractor::m_posOut
OutPort< RTC::TimedPoint2D > m_posOut
Definition:
ColorExtractor.h:122
ColorExtractor::m_result
Img::TimedCameraImage m_result
Definition:
ColorExtractor.h:116
manager
manager
DataOutPort.h
ColorExtractorInit
void ColorExtractorInit(RTC::Manager *manager)
Definition:
ColorExtractor.cpp:242
CorbaPort.h
Manager.h
ColorExtractor::m_pos
RTC::TimedPoint2D m_pos
Definition:
ColorExtractor.h:117
RTC::UniqueId
ExecutionContextHandle_t UniqueId
ColorExtractor::m_rgbRegion
std::vector< int > m_rgbRegion
Definition:
ColorExtractor.h:144
DataInPort.h
RTC::InPort< Img::TimedCameraImage >
RTC::OutPort< Img::TimedCameraImage >
ColorExtractor
RT component which resize an input image.
Definition:
ColorExtractor.h:39
ColorExtractor::m_img
IplImage * m_img
Definition:
ColorExtractor.h:142
hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:49