locked
IP camera: video stream and camera capture. RRS feed

  • General discussion

  • Ok here is my question: I have an IP camera and webcam. I try to visualize the IP camera but I just get the webcam info.

    How can I change it?

    The second question is: "which is the diference between a camera capture and video stream". Is it possible to one to another?

     

     

    void Run()

    {

     

    try
     

    {

    _cameraCapture =

    new Capture();

    }

     

    catch (Exception e)

    {

     

    MessageBox.Show(e.Message);

     

    return;

    }

     

    _detector =

    new FGDetector<Bgr>(FORGROUND_DETECTOR_TYPE.FGD);

    _tracker =

    new BlobTrackerAuto<Bgr>();

     

    Application.Idle += ProcessFrame;

    }

    

    Image

    <Bgr, Byte> frame = _cameraCapture.QueryFrame(); //the information goes to a frame in order to save the information.

    

    With this code, the application just gets the camera from the on-board "webcam " of the PC, but how to get "captures" from a IP camera with IP 192.168.1.44 (dynamic IP)

     

     

     

     

    Wednesday, April 6, 2011 11:51 AM

All replies

  • This isn't really a language specific question, but while I'm here..

    I'm assuming you're using Emgu from the syntax and some google.  The reason you're geting the laptop webcam, and not the IPWebCam is because of your intilization of _cameraCapture.  The default constructor uses the default computer camera:

    http://www.emgu.com/wiki/files/2.2.1/document/html/ec52dc53-bcc1-d589-5187-b818c68d83fc.htm

    There is another constructor:

    http://www.emgu.com/wiki/files/2.2.1/document/html/ef1ecb1e-dbbb-affd-3acd-d05d194d9023.htm

    The other camera is probably 1.


    Christopher Cericola
    Friday, April 8, 2011 1:53 AM
  •  

    private static Capture _cameraCapture0;

    private static Capture _cameraCapture1;

    _cameraCapture0 =

    new Capture(0);

    _cameraCapture1 = new Capture(1); //put your number here... 

     

    Image<Bgr, Byte> frame0 = _cameraCapture0.QueryFrame();

    Image<Bgr, Byte> frame1 = _cameraCapture1.QueryFrame();

    But what about if it is an IP camera in your LAN (Local Area Network)? would you put it that way 

    _cameraCaptureIP = new Capture("http://192.168.1.44/"); 

    Friday, April 8, 2011 8:19 AM
  • I tried a webrequest in order to get that info.

    req = (

    HttpWebRequest)WebRequest.Create("http://192.168.1.44/");

    req.Credentials =

    new NetworkCredential("administrator", "passwordadministrator");

    resp = req.GetResponse();

    stream = resp.GetResponseStream();

    The connection seems succesful but I can not get or cast the stream into the cameracapture...how could I put the info into the frame...?

    Friday, April 8, 2011 8:32 AM
  • From the documentation I'm reading, Capture requires the camera to be a device "connected" (I'm sure there's a way to treat an IP camera as connected without a physical connection) to the machine.  Does the camera come with an API?  If so, I'd start there.  If not, read more through the documentation for EMGU.
    Christopher Cericola
    Friday, April 8, 2011 1:43 PM
  • Hi,

    Does any body find the solution to use IP camera with emguCV?

    Thanks

    Monday, March 19, 2012 1:34 PM