MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / example_auto_pilot

Function example_auto_pilot

example/E01-AutoPilot.cpp:135–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135void example_auto_pilot() {
136 GElementPtr lane, car, show = nullptr;
137 auto pipeline = GPipelineFactory::create();
138
139 pipeline->registerGElement<LaneDetectorGNode>(&lane, {}, "lane");
140 pipeline->registerGElement<CarDetectorGNode>(&car, {}, "car");
141 pipeline->registerGElement<ShowGNode>(&show, {lane, car}, "show");
142
143 pipeline->createGParam<DetectResultGParam>(EXAMPLE_PARAM_KEY);
144 pipeline->addGDaemon<CameraGDaemon>(1000); // 模拟相机,每间隔1000ms,生成一张图片
145
146 pipeline->process(10);
147 GPipelineFactory::clear();
148 CGRAPH_CLEAR_MESSAGES()
149}
150
151
152int main() {

Callers 1

mainFunction · 0.85

Calls 3

createFunction · 0.85
clearFunction · 0.50
processMethod · 0.45

Tested by

no test coverage detected