Adding cameras (or, saying in general, video sources) is the first important step to do in the Computer Vision Sandbox application. Nothing interesting can be done really, before this step is done first.
The camera adding wizard can be started either from the project's context menu or application's main menu. The first page of the wizard is simple enough - it just asks for some name and description of the video source being added. While the next page of the wizard asks to chose video source plug-in, which will be used to provide video.
The list of plug-ins may certainly look different from the one shown above, since more video source plug-ins may become available and so added to the system. However the very basic set-up should have these 4 plug-ins:
- Local Capture Device - used to access video devices exposed through DirectShow interface. Usually those are laptops' integrated cameras, web cameras connected to computer's USB port or other capture devices.
- JPEG HTTP Video Source - used to continuously download an image from a given URL. This can be any image on the web, which gets updated periodically. However most often it will come from IP video surveillance cameras - individual image snapshots is still widely supported by IP cameras and represent the simplest way to access those cameras.
- MJPEG HTTP Video Source - used to access MJPEG streams (multiple JPEGs in a single stream) from a given URL. This, most likely, will come from an IP camera.
- Network Stream Video Source - used to access video streams over the network using protocols like RTSP. Such streams may come from different sources, however IP video surveillance cameras are of the most interest in the context of this application.
Once a video source plug-in is chosen, the final wizard's page prompts to configure its properties. Different video source plug-ins have a different set of properties to configure, so further settings a guided by description of those properties, which are shown on the properties' configuration page. Once video source configuration is done and the camera wizard completes, the camera will become available in the project tree. On successful configuration, clicking the camera should show some video coming from the video source.
Though every video source plug-in has different properties, let's have a quick look at some sample configurations. The picture below shows configuration for the Local Capture Device plug-in (for the currently available version of it). The main property is Device - it allows to select a device out of the list of all detected video devices in the system, which support DirectShow interface. Every time it is changed the other two properties change the list of their possible values, since those depend on the video device being chosen. The Resolution property, as its name suggests, allows to select video resolution to use - either default one (whatever preferred by camera drivers) or the one from the list of supported resolutions. Finally the Video Input property allows to select a video input to use. This is available only for capture cards supporting it and it will say "Unsupported" for other devices, like integrated or USB web cameras.
For JPEG HTTP Video Source plug-in (and similar about MJPEG and RTSP) the list of properties is very different and require more understanding of how to configure it. The main property here is JPEG URL, which must be set to a URL of a continuously updating JPEG image. Having access to some IP video surveillance camera it may be a question of what should be the URL to access its JPEG snapshots or MJPEG/RTSP streams. Many IP cameras' manufacturers provide documentation saying URL formats to access JPEG/MJPEG/RTSP data. For example, lets take an AXIS camera with IP 188.8.131.52 (at the time of writing, it was a really valid IP address of some public IP camera). As AXIS documentation says, URLs for JPEG snapshots have format as http://<ip_or_dns>[:port]/axis-cgi/jpg/image.cgi. So a URL like this must be set for the JPEG URL property. If the camera requires authentication then User name and Password properties must be set as well (some rare camera models may still complain and so "Force Basic Authentication" should be set too). Finally, since we work with single JPEG snapshots, we need to set how often we want to have them, which is the purpose of the Frame Interval property.
Next tutorial: Adding cameras' view