33 xoutLeft->setStreamName(
"left");
44 monoLeft->setCamera(
"left");
51 stereo->setRectifyEdgeFillColor(0);
54 stereo->setLeftRightCheck(
lrcheck);
55 stereo->setExtendedDisparity(
extended);
59 monoLeft->
out.
link(stereo->left);
60 monoRight->
out.
link(stereo->right);
62 stereo->syncedLeft.link(xoutLeft->input);
63 stereo->syncedRight.link(xoutRight->
input);
64 stereo->disparity.link(xoutDisp->
input);
67 stereo->rectifiedLeft.link(xoutRectifL->
input);
68 stereo->rectifiedRight.link(xoutRectifR->
input);
72 stereo->depth.link(xoutDepth->
input);
77 monoLeft->
out.
link(xoutLeft->input);
92 float disparityMultiplier =
withDepth ? 255 / stereo->initialConfig.getMaxDisparity() : 0;
96 cv::imshow(
"left", left->getFrame());
98 cv::imshow(
"right", right->getFrame());
102 cv::Mat disp(disparity->getCvFrame());
103 disp.convertTo(disp, CV_8UC1, disparityMultiplier);
104 cv::imshow(
"disparity", disp);
106 cv::applyColorMap(disp, disp_color, cv::COLORMAP_JET);
107 cv::imshow(
"disparity_color", disp_color);
111 cv::imshow(
"depth", depth->getCvFrame());
116 cv::imshow(
"rectified_left", rectifL->getFrame());
119 cv::imshow(
"rectified_right", rectifR->getFrame());
123 int key = cv::waitKey(1);
124 if(key ==
'q' || key ==
'Q') {