[問題] Open CV: VideoCapture 開檔失敗
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VS2012
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
opencv 2.4.3
問題(Question):
想讀入一個AVI影片,並且存取每一張frame的資訊
錯誤結果(Wrong Output):
直接return -1,表示根本沒有讀到影片
程式碼(Code):(請善用置底文網頁, 記得排版)
int main(int argc,char*argv[])
{
Mat frame;
string path = "D:\\DSCN1244.avi";
VideoCapture capture(path);
namedWindow("my_window");
if(!capture.isOpened())return -1;
for(;;)
{
capture >> frame;
imshow("my_window", frame);
if(cvWaitKey(30) >= 0) break;
}
return 0;
}
補充說明(Supplement):
已爬過文,並沒有解答
請各位先進提供可能原因
謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.68.157
→
03/29 01:36, , 1F
03/29 01:36, 1F
→
03/29 01:36, , 2F
03/29 01:36, 2F
推
03/29 01:58, , 3F
03/29 01:58, 3F
→
03/29 11:04, , 4F
03/29 11:04, 4F
→
03/29 20:40, , 5F
03/29 20:40, 5F
推
03/30 15:16, , 6F
03/30 15:16, 6F
→
03/30 22:08, , 7F
03/30 22:08, 7F
→
03/31 21:36, , 8F
03/31 21:36, 8F
→
03/31 21:37, , 9F
03/31 21:37, 9F
→
03/31 21:38, , 10F
03/31 21:38, 10F
→
03/31 21:39, , 11F
03/31 21:39, 11F
推
04/01 18:29, , 12F
04/01 18:29, 12F
→
04/01 18:29, , 13F
04/01 18:29, 13F
→
04/01 22:11, , 14F
04/01 22:11, 14F