29 #include <opencv2/opencv.hpp>
37 int main(
int argc,
char *argv[])
57 std::cerr <<
"Cannot open camera video capture" << std::endl;
58 std::cerr <<
"See verbosity level for more details." << std::endl;
63 std::cout <<
"Connected to camera sn: " << sn << std::endl;
67 std::string calibration_file;
69 unsigned int serial_number = sn;
73 std::cerr <<
"Could not load calibration file from Stereolabs servers" << std::endl;
76 std::cout <<
"Calibration file found. Loading..." << std::endl;
84 cv::Mat map_left_x, map_left_y;
85 cv::Mat map_right_x, map_right_y;
86 cv::Mat cameraMatrix_left, cameraMatrix_right;
88 cameraMatrix_left, cameraMatrix_right);
90 std::cout <<
" Camera Matrix L: \n" << cameraMatrix_left << std::endl << std::endl;
91 std::cout <<
" Camera Matrix R: \n" << cameraMatrix_right << std::endl << std::endl;
132 int key = cv::waitKey( 5 );
133 if(key==
'q' || key==
'Q')
The VideoCapture class provides image grabbing functions and settings control for all the Stereolabs ...
const Frame & getLastFrame(uint64_t timeout_msec=100)
Get the last received camera image.
void getFrameSize(int &width, int &height)
Get the size of the camera frame.
bool initializeVideo(int devId=-1)
Open a ZED camera using the specified ID or searching for the first available.
int getSerialNumber()
Retrieve the serial number of the connected camera.
@ FPS_15
15 Frames per second. Available for all the resolutions.
The Frame struct containing the acquired video frames.
uint64_t timestamp
Timestamp in nanoseconds.
uint16_t height
Frame height.
uint16_t width
Frame width.
uint8_t * data
Frame data in YUV 4:2:2 format.
The camera configuration parameters.
RESOLUTION res
Camera resolution.
FPS fps
Frames per second.
int main(int argc, char *argv[])
sl_oc::video::VideoParams params