LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire video using tcp/ip

Solved!
Go to solution

Hi! I am looking for a way to acquire video from a tapo c310 IP camera using the tcp/ip protocol, the camera specs show that it is possible. I don't know where to start, can someone guide me?

0 Kudos
Message 1 of 4
(1,902 Views)
0 Kudos
Message 2 of 4
(1,863 Views)

Integrating Image Data Acquisition and Processing in LabVIEW is most easily accomplished with the Vision Development Module (VDM) and the Vision Acquisition Software (VAS) packages that can be purchased (and licensed) from NI.  Image Processing in LabVIEW is somewhat different than other forms of DAQ, which typically deal with a 1-D Array of data (though possibly several "channels" of simultaneously-acquired 1D Arrays can be acquired in parallel) at sampling rates often measured in kHz to MHz, whereas Images are often 3-D Arrays (two spatial and one color/intensity), acquired at rates on the order of 30-300 Hz.  Needless to say, IMAQ (Image Acquisition) routines and processing in LabVIEW are somewhat more difficult in nature than, say, DAQmx routines.

 

In my opinion, trying to add a third-party Image Acquisition I/O package and integrating its output with LabVIEW is adding another layer of complexity to your system.

 

Bob Schor

0 Kudos
Message 3 of 4
(1,848 Views)
Solution
Accepted by topic author Dcampu90

@Bob_Schor wrote:

 

In my opinion, trying to add a third-party Image Acquisition I/O package and integrating its output with LabVIEW is adding another layer of complexity to your system.


It absolutely is. You have about three options here: 

 

1) Find an IP camera DirectX driver that works with your camera. Then using IMAQdx you can access it like a built in webcam.

 

Trouble: finding the right driver that works with your camera. They usually are not free and come nowadays without any support since the original developer has long ago moved to other more prosperous projects (most users found it an affront that someone wanted even money for “just” a driver).

 

2) If the manufacturer provides an SDK, you can try to call that in LabVIEW. Depending on the technology of the SDK you should be prepared to tackle a number of problems. .Net based interfaces are usually less prone to crashes caused by wrong interfacing to the API but you still need to handle image buffers and somehow translate them into LabVIEW data objects. Anything but IMAQ images is generally at best a workaround but not a solution and IMAQ Vision in order to use the IMAQ display control requires a license.

 

3) Your IP camera almost certainly talks HTTP. This is based on TCP. You can use the LabVIEW HTTP VIs or the TCP primitives to directly talk to it. There are example VIs out there that directly talk SRTP, which is build on HTTP. They may not work out of the box with your camera but can usually be adapted fairly easily to it.

Trouble here is that depending on what compression scheme your camera uses you can seriously run into problems. If it supports JPG compression there are routines available to turn that into a bitmap but if it is one of the H.264 or similar compression schemes then things get hairy. It’s unfeasible to try to implement such a decompression in LabVIEW and the compression schemes are often patent encumbered so that nobody has so far cared to create an easy to use solution. Integrating with .Net Windows APIs isn’t trivial since they are based on stream interfaces for performance reasons and that doesn’t-match well with LabVIEW buffers, causing extra memory copies that add up very quickly when dealing with video streams.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,804 Views)