Programming/openCV2014. 7. 3. 14:35

v4l2의 문제인지 설정은 잘안되고
못 불러 오는 설정사항도 많다 -_-a

VideoCapture::get
C++: double VideoCapture::get(int propId)
C: double cvGetCaptureProperty(CvCapture* capture, int property_id)

propId – Property identifier. It can be one of the following:
– CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds or video capture timestamp.
– CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
– CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
– CV_CAP_PROP_FPS Frame rate.
– CV_CAP_PROP_FOURCC 4-character code of codec.
– CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
– CV_CAP_PROP_FORMAT Format of the Mat objects returned by retrieve() .
– CV_CAP_PROP_MODE Backend-specific value indicating the current capture mode.
– CV_CAP_PROP_BRIGHTNESS Brightness of the image (only for cameras).
– CV_CAP_PROP_CONTRAST Contrast of the image (only for cameras).
– CV_CAP_PROP_SATURATION Saturation of the image (only for cameras).
– CV_CAP_PROP_HUE Hue of the image (only for cameras).
– CV_CAP_PROP_GAIN Gain of the image (only for cameras).
– CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
– CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether images should be converted to RGB.
– CV_CAP_PROP_WHITE_BALANCE Currently not supported
– CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently) 

웹캠 설정 덤프
주석처리한 두개는 2.3.1에서는 지원하지 않고 2.4.9 에서 지원하는 항목이다.
                VideoCapture cap(0);
 
               cout << "POS_MSEC : "           << cap.get(CV_CAP_PROP_POS_MSEC) << endl;
                cout << "POS_FRAMES : "         << cap.get(CV_CAP_PROP_POS_FRAMES) << endl;
                cout << "POS_AVI_RATIO : "      << cap.get(CV_CAP_PROP_POS_AVI_RATIO) << endl;
                cout << "POS_FRAME_WIDTH : "    << cap.get(CV_CAP_PROP_FRAME_WIDTH) << endl;
                cout << "POS_FRAME_HEIGHT : "   << cap.get(CV_CAP_PROP_FRAME_HEIGHT) << endl;
                cout << "FPS : "                << cap.get(CV_CAP_PROP_FPS) << endl;
                cout << "FOURCC : "             << cap.get(CV_CAP_PROP_FOURCC) << endl;
//              cout << "FRAME_OUT : "          << cap.get(CV_CAP_PROP_FRAME_OUT) << endl;
                cout << "FORMAT : "             << cap.get(CV_CAP_PROP_FORMAT) << endl;
                cout << "MODE : "               << cap.get(CV_CAP_PROP_MODE) << endl;
                cout << "BRIHTNESS : "          << cap.get(CV_CAP_PROP_BRIGHTNESS) << endl;
                cout << "CONTRAST : "           << cap.get(CV_CAP_PROP_CONTRAST) << endl;
                cout << "SATURATION : "         << cap.get(CV_CAP_PROP_SATURATION) << endl;
                cout << "HUE : "                << cap.get(CV_CAP_PROP_HUE) << endl;
                cout << "GAIN : "               << cap.get(CV_CAP_PROP_GAIN) << endl;
                cout << "EXPOSURE : "           << cap.get(CV_CAP_PROP_EXPOSURE) << endl;
                cout << "CONVERT_RGB : "        << cap.get(CV_CAP_PROP_CONVERT_RGB) << endl;
//              cout << "WHITE_BALANCE : "      << cap.get(CV_CAP_PROP_WHITE_BALANCE) << endl;
                cout << "RECTIFICATION : "      << cap.get(CV_CAP_PROP_RECTIFICATION) << endl; 



'Programming > openCV' 카테고리의 다른 글

openCV2 관련 꿍시렁 꿍시렁  (0) 2014.07.04
opencv2 highgui  (0) 2014.07.03
opencv2 채널분리하기(split)  (0) 2014.07.03
opencv2 rgb2hsv color space 변환하기  (0) 2014.07.02
openCV2 2.3.1 ubuntu 컴파일하기  (0) 2014.07.01
Posted by 구차니