9 auto pipeline = std::make_shared<dai::Pipeline>();
16 camRgb->setInterleaved(
false);
21 camRgb->preview.link(xoutRgb->input);
26 int main(
int argc,
char** argv) {
29 auto openVinoVersion = dai::OpenVINO::Version::VERSION_2021_4;
31 std::map<std::string, std::shared_ptr<dai::DataOutputQueue>> qRgbMap;
32 std::vector<std::shared_ptr<dai::Device>> devices;
34 for(
auto& deviceInfo : deviceInfoVec) {
35 auto device = std::make_shared<dai::Device>(openVinoVersion, deviceInfo, usbSpeed);
36 devices.push_back(device);
37 std::cout <<
"===Connected to " << deviceInfo.getMxId() << std::endl;
38 auto mxId = device->getMxId();
39 auto cameras = device->getConnectedCameras();
40 auto usbSpeed = device->getUsbSpeed();
41 auto eepromData = device->readCalibration2().getEepromData();
42 std::cout <<
" >>> MXID:" << mxId << std::endl;
43 std::cout <<
" >>> Num of cameras:" << cameras.size() << std::endl;
44 std::cout <<
" >>> USB speed:" << usbSpeed << std::endl;
45 if(eepromData.boardName !=
"") {
46 std::cout <<
" >>> Board name:" << eepromData.boardName << std::endl;
48 if(eepromData.productName !=
"") {
49 std::cout <<
" >>> Product name:" << eepromData.productName << std::endl;
52 device->startPipeline(*pipeline);
54 auto qRgb = device->getOutputQueue(
"rgb", 4,
false);
55 std::string streamName =
"rgb-" + eepromData.productName + mxId;
56 qRgbMap.insert({streamName, qRgb});
59 for(
auto& element : qRgbMap) {
60 auto qRgb = element.second;
61 auto streamName = element.first;
63 if(inRgb !=
nullptr) {
64 cv::imshow(streamName, inRgb->getCvFrame());
68 int key = cv::waitKey(1);
69 if(key ==
'q' || key ==
'Q') {