Go to the documentation of this file.
7 static std::atomic<bool>
alive{
true};
22 monoLeft->setCamera(
"left");
26 monoRight->setCamera(
"right");
31 stereo->setLeftRightCheck(
false);
32 stereo->setExtendedDisparity(
false);
34 stereo->setSubpixel(
false);
35 monoLeft->out.link(stereo->left);
36 monoRight->out.link(stereo->right);
40 stereo->disparity.link(videoEnc->input);
44 videoEnc->bitstream.link(xout->input);
52 auto videoFile = std::ofstream(
"disparity.mjpeg", std::ios::binary);
53 cout <<
"Press Ctrl+C to stop encoding..." << endl;
57 videoFile.write((
char*)(h265Packet->getData().data()), h265Packet->getData().size());
60 cout <<
"To view the encoded data, convert the stream file (.mjpeg) into a video file (.mp4) using a command below:" << endl;
61 cout <<
"ffmpeg -framerate 30 -i disparity.mjpeg -c copy video.mp4" << endl;
XLinkOut node. Sends messages over XLink.
Represents the pipeline, set of nodes and connections between them.
StereoDepth node. Compute stereo disparity and depth from left-right image pair.
void setDefaultProfilePreset(PresetMode mode)
MonoCamera node. For use with grayscale sensors.
std::shared_ptr< DataOutputQueue > getOutputQueue(const std::string &name)
void setDefaultProfilePreset(float fps, Properties::Profile profile)
std::shared_ptr< N > create()
void setResolution(Properties::SensorResolution resolution)
Set sensor resolution.
static std::atomic< bool > alive
VideoEncoder node. Encodes frames into MJPEG, H264 or H265.
void setStreamName(const std::string &name)
static void sigintHandler(int signum)
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19