Ask Your Question

AnjaliChanglani's profile - activity

2015-03-23 04:11:31 -0600 received badge  Student (source)
2015-02-19 03:55:32 -0600 commented question I can't call the video that is stored in my laptop using VideoCapture() method of opencv.

Please anyone help me in this...

2015-02-18 07:47:38 -0600 commented question cv2.VideoCapture: Cannot read from file

DId anyone get the solution of this problem? I am facing the same problem for so many days and still couldn't fix it

2015-02-18 06:22:06 -0600 commented question I can't call the video that is stored in my laptop using VideoCapture() method of opencv.

hey berak, I saw FOURCC.. and downloaded and installed 3IV1 for my windows and mp4 video. now what? how to use this? please help me.

2015-02-18 02:15:25 -0600 commented question I can't call the video that is stored in my laptop using VideoCapture() method of opencv.

Yeah, it is not capturing my video. So, what to do with this? My path is correct I have checked it.

2015-02-18 01:46:35 -0600 asked a question I can't call the video that is stored in my laptop using VideoCapture() method of opencv.

If I write: cap = cv2.VideoCapture(0), my code works properly. but whenever I write cap = cv2.VideoCapture('C:\Users\Anjali\Documents\Python_Files\Video_tracking\slow.mp4'), it does't work.

Below is my code:

import cv2
import numpy as np


cap = cv2.VideoCapture('C:\Users\Anjali\Documents\Python_Files\Video_tracking\slow.mp4')

while (True):

ret, frame = cap.read()

#gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

cv2.imshow('Frame', frame)

if cv2.waitKey(1) & 0xFF == ord('q'):
    break

cap.release()
cv2.destroyAllWindows()

It gives the following error, please help me in this:

cv2.imshow('Frame', frame)
error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow