【问题标题】:Camera connected, but nothing happened, openCV-IP Webcam Android摄像头已连接,但什么也没发生,openCV-IP Webcam Android
【发布时间】:2014-11-24 21:51:37
【问题描述】:

这是交易,我正在尝试将我的 S3 连接为网络摄像头,使用适用于 android 的 IP WebCam 应用程序,然后在软件中制作一个 IP 网络摄像头,通常地址是 http://192.168.1.XX:8080/greet.html 可能最后两位数会更改,网页给我这样的选项和信息:

"Here is the list of IP Webcam service URLs:  
http://192.168.1.XX:8080/video is the MJPEG URL."

我使用的代码是这样的:

include "opencv2/highgui/highgui.hpp
include "opencv2/imgproc/imgproc.hpp
using namespace cv;
int main(){
    VideoCapture cap("http://192.168.1.XX:8080/video.mjpg"); // connect to an ip-cam ( might need some additional dummy param like: '?type=mjpeg' at the end
    while(cap.isOpened()){
        Mat frame;
        if (!cap.read(frame))
            break;
        imshow("lalala",frame);
        int k = waitKey(10);
        if ( k==27 )
            break;
    }
    return 0;
}

所以 IP 网络摄像头应用程序识别出一个连接,但没有任何图像......然后它说:

warning: Error opening file <../../modules/highgui/src/cap_ffmpeg_imp
Cannot open the web cam

Process returned -1 <0xFFFFFFF> execution time: 37.259 s
Press any key to continue.

我正在使用:
Windows 7 专业版
打开简历 2.4.4
代码块 13.12
USB 2.0 网络摄像头 640x480,30fps、50 Hz 和所有标准。

【问题讨论】:

    标签: c++ opencv ip ip-camera webcam-capture


    【解决方案1】:

    尝试连接另一个视频流 Android 应用程序。 我使用智能网络摄像头。 打开它

    cap.open("http://192.168.1.13:8080/?x.mjpg);
    

    【讨论】:

      猜你喜欢
      • 2011-12-31
      • 2017-01-21
      • 2013-07-15
      • 2020-06-03
      • 2012-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-17
      相关资源
      最近更新 更多