動作し、適切なプロパティを返す C コードがあります。
int main(int argc, char** argv) {
CvCapture *capture = NULL;
const char* filename = "foo.mov";
capture = cvCreateFileCapture(filename);
int w = (int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH);
int h = (int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT);
std::cout << "Width: " << w << std::endl;
std::cout << "Height: " << h << std::endl;
しかし、同等の Python はすべてに対して 0 を返します:
import cv2
capture = cv2.VideoCapture('foo.mov')
print capture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)
これは戻ります0.0
何か案は?