您好,登錄后才能下訂單哦!
自己最近做一個項目,采用Opencv2.4.10+MFC處理,結果發現,在視頻處理過程中,采用bool VideoCapture::set(int propId, double value)函數設置圖像的分辨率,返回值為0,查看opencv2.4.10文檔,是這樣的
propId – Property identifier. It can be one of the following:
– CV_CAP_PROP_POS_MSEC Current position of the video file in milliseconds.
– 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 p_w_picpath (only for cameras).
– CV_CAP_PROP_CONTRAST Contrast of the p_w_picpath (only for cameras).
– CV_CAP_PROP_SATURATION Saturation of the p_w_picpath (only for cameras).
– CV_CAP_PROP_HUE Hue of the p_w_picpath (only for cameras).
– CV_CAP_PROP_GAIN Gain of the p_w_picpath (only for cameras).
– CV_CAP_PROP_EXPOSURE Exposure (only for cameras).
– CV_CAP_PROP_CONVERT_RGB Boolean flags indicating whether p_w_picpaths should
be converted to RGB.
– CV_CAP_PROP_WHITE_BALANCE Currently unsupported
– CV_CAP_PROP_RECTIFICATION Rectification flag for stereo cameras (note: only
supported by DC1394 v 2.x backend currently)
value – Value of the property.
文檔中并沒有明確視頻幀的寬度,高度僅僅適合攝像頭或是視頻,于是我用
CV_CAP_PROP_FRAME_WIDTH,CV_CAP_PROP_FRAME_HEIGHT設置視頻幀的分辨率,結果
結果發現,設置無效,于是總結出目前的opencv版本不支持視頻幀
分辨率設置。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。