OpenCVでIPカメラからビデオストリームを取得したいのですが、OpenCVはURLからVideoCapture
を作成できませんが、EmguCVプロジェクトがあります。 url。コード:OpenCV 3.2 - IPからVideoCapureを作成できません
const std::string url = "rtsp://admin:[email protected]:554/RVi/1/1";
VideoCapture cap(url);
if (!cap.isOpened())
return -1;
namedWindow("frame", 1);
while (true)
{
Mat frame;
cap >> frame;
imshow("frame", frame);
if (waitKey(30) >= 0) break;
}
return 0;
私はOpenCV 2.9.11をインストールするだけで、すべてが動作します。 私は間違っていますか?
です:あなたは、あなたのようにURLに同じを追加することができますか? –
vlc経由でこのストリームにアクセスできますか? – alex
それはH264で、私はvlcでアクセスできます。私はEmguCVでアクセスすることもできます –