Skip to content

Instantly share code, notes, and snippets.

@adujardin
Created June 29, 2016 16:22
Show Gist options
  • Save adujardin/242276a4796ef425a33af70a41a02e00 to your computer and use it in GitHub Desktop.
Save adujardin/242276a4796ef425a33af70a41a02e00 to your computer and use it in GitHub Desktop.
ZED opencv
#include <stdio.h>
#include <string.h>
#include <opencv2/opencv.hpp>
int main(int argc, char **argv) {
cv::VideoCapture zed_cap(0);
cv::Mat sbs;
std::cout << zed_cap.get(cv::CAP_PROP_FRAME_WIDTH) << "x" << zed_cap.get(cv::CAP_PROP_FRAME_HEIGHT) << std::endl;
while (zed_cap.grab()) {
zed_cap.retrieve(sbs);
cv::imshow("SBS ZED", sbs);
cv::waitKey(20);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment