zoukankan      html  css  js  c++  java
  • IP摄像机

    什么是IP摄像机

    IP摄像机的主要优点是直接以数字流的形式输出,可以直接通过以太网进行访问。因此,IP摄像机不仅仅拥有摄像头而且还有嵌入式的计算机板子,一般运行linux系统,原因有一下两条:1把模拟图像信号转换为数字图像信号。2能够通过IP地址访问图像,要配备网卡。视频服务器是非常复杂的设备,一般不配备摄像头,但是预留有一些摄像头接口,可以通过接口进行连接,能够把模拟图像信号转换为数字图像信号并提供网络访问功能。

    事实上网络摄像机和服务器有很多优点,如可以随时随地在任何有网络的地方访问摄像头,不再像传统的那样仅仅拘泥于本地访问,而且访问设备也是多样化的如服务器,小型机,pad 和智能手机等等。它的运用也更加广泛,交通,家庭监控,医院等等。

    视频格式

     

    string sourceURL = "http://webcam.mmhk.cz/axis-cgi/jpg/image.cgi";
    byte[] buffer = new byte[100000];
    int read, total = 0;
    // create HTTP request
    HttpWebRequest req = (HttpWebRequest) WebRequest.Create( sourceURL );
    // get response
    WebResponse resp = req.GetResponse( );
    // get response stream
    Stream stream = resp.GetResponseStream( );
    // read data from stream
    while ( ( read = stream.Read( buffer, total, 1000 ) ) != 0 )
    {
        total += read;
    }
    // get bitmap
    Bitmap bmp = (Bitmap) Bitmap.FromStream( 
                  new MemoryStream( buffer, 0, total ) );
    

      但是好多摄像头都是需要口令才能进入的因此需要添加

    // create HTTP request
    HttpWebRequest req = 
       (HttpWebRequest) WebRequest.Create( sourceURL );
    // set login and password
    req.Credentials = new NetworkCredential( login, password );
    ...

  • 相关阅读:
    使用Jmeter对SHA1加密接口进行性能测试
    Introduction of JSON Processing and binding in JavaEE
    RE validation in Java EE(java.util.regex.Pattern)
    Analysis of Hello2 source code
    Spring AOP Capability and Goal
    Mysql :Datatype
    MYSQL Backup & Recovery
    JavaEE Design Patter(2)
    Analysis JSON / XML、 Processing Model 、Extend to JAVA Design Model
    Session & Cookie
  • 原文地址:https://www.cnblogs.com/sheshouyanhun/p/2697410.html
Copyright © 2011-2022 走看看