Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "opencv2/opencv.hpp"
- #include <cstdlib>
- #include "params_parser.h"
- #include <libv4l2.h>
- #include <linux/videodev2.h>
- #include <sys/ioctl.h>
- #include <fcntl.h>
- #include <iostream>
- #include <sstream>
- #include "Cube.h"
- using namespace cv;
- int main(int argc, char **argv) {
- int descriptor = v4l2_open(/dev/video0, O_RDWR);
- v4l2_control c;
- c.id = V4L2_CID_EXPOSURE_AUTO;
- c.value = 1;
- if(v4l2_ioctl(descriptor, VIDIOC_S_CTRL, &c) == 0)
- std::cout << "success";
- /*c.id = V4L2_CID_EXPOSURE_AUTO_PRIORITY;
- c.value = 0;
- if (v4l2_ioctl(descriptor, VIDIOC_S_CTRL, &c) == 0)
- std::cout << "success";*/
- c.id = V4L2_CID_EXPOSURE_ABSOLUTE;
- c.value = 158;
- if (v4l2_ioctl(descriptor, VIDIOC_S_CTRL, &c) == 0)
- std::cout << "success";
- cv::VideoCapture capture(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement