2017-09-04 44 views
1

opencvでipcameraにアクセスできません。私はipcctrlアプリケーションを使用してカメラのプレビューを表示しています。私は表示されたコードにURLを貼り付けようとしています警告:ファイルを開く際にエラーが発生しました(/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578)何が問題なのですか? here is the proof that it is working fine in ipcctrl警告:ファイルを開く際にエラーが発生しました(/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578)

cv::Mat imgFrame1; 
cv::Mat imgFrame2; 

cv::VideoCapture capVideo; 
const std::string videoStreamAddress = "http://admin:[email protected]:8088/mjpeg.cgi?user=USERNAME&password=PWD&channel=0&.mjpg"; 

std::vector<Blob> blobs; 

cv::Point crossingLine[2]; 

int carCount = 0; 
std::ofstream writer; 
writer.open("cars.txt"); 
writer.close(); 

capVideo.open(videoStreamAddress); 
if (!capVideo.open(videoStreamAddress)) {             // if unable to open video file 
    std::cout << "error reading video file" << std::endl << std::endl;  // show error message 
    _getch();     // it may be necessary to change or remove this line if not using Windows 
    return(0);                // and exit program 
} 

答えて

0

私はすでにこの問題を解決し、私はビデオストリームアドレスの不正なURLを持っていることが判明し、ハードの部分は、私のカメラは、ことは知られていないですし、それを構成する方法について少しドキュメンテーションを持っていました。私はispyアプリを使って私のkedacomカメラのための適切なURLを生成し、VLC上でそれをテストし、アプリとビオラでテストしました!出来た。

関連する問題