Re: [問題] OpenCV 3.0 是否支援網路串流(rtsp)?

看板C_and_CPP作者 (vu03)時間9年前 (2016/04/20 21:29), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
各位好~ 後來改成採用OpenCV 2.4.7的版本 + VS2015 + Win10 但是遇到了以下的error code [rtsp @ 000001722f257020] Received packet without a start chunk; dropping frame. 想請問是為什麼? 因為我可以用VLC來撥放但是這個確不行 我執行上網找到簡易的程式測試就會發生 #include "opencv2/opencv.hpp" using namespace cv; int main(int, char**) { VideoCapture cap("rtsp://192.168.1.105/test.sdq"); // open the default camera if (!cap.isOpened()) // check if we succeeded return -1; Mat edges; namedWindow("edges", 1); for (;;) { Mat frame; cap >> frame; // get a new frame from camera cvtColor(frame, edges, COLOR_BGR2GRAY); GaussianBlur(edges, edges, Size(7, 7), 1.5, 1.5); Canny(edges, edges, 0, 30, 3); imshow("edges", edges); if (waitKey(30) >= 0) break; } // the camera will be deinitialized automatically in VideoCapture destructor return 0; } ※ 引述《yuci (vu03)》之銘言: : 開發平台(Platform): (Ex: VC++, GCC, Linux, ...) : VS C++ 2015 : 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) : OpepCV 3.0 : 問題(Question): : 想要抓取自己開發版上的webcam (羅技C170)傳過來的視訊影像 : 餵入的資料(Input): : webcam C170 的網路串流(已經確定VLC可以讀) : 預期的正確結果(Expected Output): : 錯誤結果(Wrong Output): : 程式碼(Code):(請善用置底文網頁, 記得排版) : 補充說明(Supplement): : 目前看到好像只有OpenCV 2.X版本有支援cv::VideoCapture : 想請問是他naming rule有改還是3.0目前還沒有支援 : 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.231.100.118 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1461158988.A.6E7.html
文章代碼(AID): #1N5uHCRd (C_and_CPP)
文章代碼(AID): #1N5uHCRd (C_and_CPP)