Return to site

Capture Video Stream From Ip Camera

broken image


With todays computing power (including embedded and hobby board computers), the commoditisation of web cameras, and the maturity of computer vision software and object detection algorithms, anyone can play around computer vision for negligible cost.

  1. Capture Video Camera To Pc
  2. Capture Video From Laptop Camera
  1. Ausdom Full HD 1080p Webcam ($40) This entry from Ausdom boasts some impressive features.
  2. To add a new camera to AnyCam, you need only input the IP address or the domain name, the port number being optional. Aside from that, there are no other configuration options. You can then click ‘Save' and the tool will attempt to stream the images captured.
  3. Almost IP surveillance cameras support RTSP video stream, that means user can use media player to watch the live video from anywhere. RTSP is the abbreviation of real time streaming protocol, it's a network control protocol designed for use in entertainment and communications systems to control streaming media servers.

In this guide I'll give you a rough start to streaming content from an IP camera to OpenCV (tested on v2.4.10) for building your own computer vision projects. Although the code in this guide is written in Python there are many other languages supported by OpenCV.

Capture up to 4 video sources through multiple inputs. Supports a direct output to an HDMI display The LC200 captures various video sources, including HDMI inputs, Lumens IP cameras, and RTSP streams, and allows you to switch among them. Together with four line-in / MIC-in inputs, you can provide a complete audiovisual experience to your viewers!


TL;DR

Just give me the code: GitHub

IP camera streaming into OpenCV

As getting vision from an IP camera into OpenCV is an unnecessarily tricky stumbling block, we'll only concentrate on the code that streams vision from an IP camera to OpenCV which then simply displays that stream. Blizzcon starcraft 2.

webcam-opencv-example.py

Camera effects for facetime. Congratulations, you're now streaming content into OpenCV. NB: Change the url to suit your particular camera.

Please explain.

I've had trouble with OpenCV and mpeg streams (even though OpenCV has support for this) as was the case in this instance with an Ai-Ball Wi-Fi camera. The code here deals with the camera's mpeg stream directly and passes each image in that stream to OpenCV for consumption. As each (jpeg) image in the stream is binary encoded and each image frame contains a start marker 'xffxd8' and an end marker 'xffxd9' we can easily detect those markers and segment our stream into individual images. Many other people seem to have a similar problem so there are many other explanations and examples out there.

Examples

Here are a couple of examples of what you might want to do using OpenCV and some very lightweight built-in object detection algorithms (nothing fancy, just some crude knock-ups I've made for demo purposes): https://verlewebcui1984.wixsite.com/freefresh/post/acrobat-pro-dc-reset-preferences-mac.

First up, with relatively little extra code, and no other equipment, we can use fiducials to track position and orientation of objects:

Feature Matching + Homography to find Objects using OpenCV and the ORB (oriented BRIEF) keypoint detector and descriptor extractor.Determines the (x,y,z) of the centre point of a marker in order to determine where it is in 3D space relative to the camera.

Details:

Capture Video Camera To Pc

Video

Capture Video From Laptop Camera

  • OpenCV
  • ORB (oriented BRIEF) keypoint detector and descriptor extractor (one of many OpenCV object detection algorithms)
  • Ai-Ball web camera


Below is a more complex example that utilises an SMI Red 500 eye-tracker and PyViewX. NOTE: Eye-trackers are rapidly becoming a commodity item, and at the time of writing, the Tobii EyeX developer kit was available for $99USD. I have achieved very good results with this particular eye-tracker and the development SDK (C# only at this point in time) provides gaze and fixation event streams out of the box allowing you to build working models pretty quickly.

Feature Matching + Homography + Eye Tracking and Gaze Fixation to identify objects and locate them in space. Movavi video converter premium 20 1 17.

Determines fixation start and end points, and for the duration, draws a bounding box around the fixation area of interest (AOI) on the screen. If a recognised marker is within that box (i.e. we're looking at an object) determine the (x,y,z) of the centre point of that marker in order to determine where it is in 3D space relative to the camera. NOTE: The fixation bounding box is for demonstration purposes only. In a real deployment you would not want to display the fixation bounding box as it distracts the user, which in turn changes their gaze point.

Flash movie editor. Details:

  • OpenCV
  • ORB (oriented BRIEF) keypoint detector and descriptor extractor (one of many OpenCV object detection algorithms)
  • SMI Red 500 eye tracker
  • PyViewX (remote streaming client for SMI eye tracker)
  • Ai-Ball web camera


Opportunities

The purpose of this rough and ready example is to get you started with getting IP camera streams into OpenCV. As shown in the second example in this article, eye-tracking can be easily integrated into computer vision projects and with the present day commoditisation of eye-trackers for the consumer market (including embedded in phones), the application for products combining computer vision and eye-tracking, along with other now commonly available technology like GPS, accelerometers, IMU's, etc. is opening up many new development opportunities in computer vision.

Edit a movie clip. Here is a solution that supports displaying live video from multiple IP cameras on a TV monitor via HDMI. Live video display of multiple security cameras is a common requirement from customers at CCTV Camera Pros. I have previously documented solutions on how-to connect analog CCTV cameras to a TV and how-to connect HD over coax cameras to a TV here. This article specifically discusses how to do it using network IP cameras and an IP decoder box with HDMI video outputs. Users searching for 'IP camera to HDMI' or 'IP camera to VGA' solutions will be interested in this article.

This is how it works.

  1. The 4 IP cameras in the above system are all hard wired using Cat-5 network cable to the network router (switch can be used instead of a router). I am using Zavio IP cameras in my installation because they are 100% ONVIF compliant and CCTV Camera Pros has tested Zavio cameras for compatible with the Geovision GV-IP decoder. Please note that wireless IP cameras can also be used with a wireless router / access point.
  2. Although not pictured in the diagram, it is typical to have an NVR (network video recorder) on the same network that is recording video from the cameras.
  3. The Geovision GV-IP decoder is also hard wired to the network router. The Geovision IP decoder has an HDMI and VGA video output, but only one can be used. Dual monitor is currently not supported.
  4. The HDMI output of the decoder is connected to the HDMI input of the TV.
  5. Cameras can be added and display can be configured using a wireless remote control (included with the GV decoder) or by connected a USB mouse.
  6. Single, four camera, and nine camera grid displays are supported.

If you need to display a live view of your IP cameras on multiple TVs / monitors, multiple decoders can be added on the same network. You are only limited to the number of connections your IP cameras support.

You can view the complete manual for the GV-IP decoder here.





broken image