DirectShow – An Alternative Technology for Image Processing Applications
A developing trend on the internet is to provide video clips and short movies in addition to the classic formats of plain text and images. News portals such as CCN and social sites such as YouTube make use of video to present information in a way that is easier to understand. The underlying technology for handling video data streams in most of these applications is DirectShow® from Microsoft. In this article, we answer the question: “How can DirectShow benefit the machine vision industry and meet its needs?” This is an especially relevant question if we remember the past boosts provided to the industry by Gigabit Ethernet and IEEE 1394 technology.

DirectShow (sometimes abbreviated as DS or DShow) was launched in 1996 and was originally intended to provide MPEG-1 file playback support for Microsoft’s Windows® operating system. Because Windows 98 DirectShow became the standard component for data streaming on the Windows operating system, it was also intended as a replacement for earlier media processing frameworks such as Video for Windows.

The architecture of DirectShow divides the processing of multimedia tasks into a series of steps known as filters. Each filter represents a stage in the processing of the data:
Source filters (e.g., MPEG files or Basler digital cameras)
Transformation filters (e.g., splitters, YUV to RGB converters, multiplexers, or decompression)
Renderer filters (e.g., MS video renderer)


Each filter has a number of input and output pins that can be used to connect filters together. The generic design of the connection mechanism means that filters can be connected in many different ways for different tasks to build a filter graph. It also means that developers can add custom effects or other filters at any stage in the graph. For registered filters, the connection of individual filters can be done automatically by a graph manager based on Windows registry entries or it can be done manually by the developer. Once the filter graph is complete, the streaming process can be started and controlled by commands via the filter graph manager. When a DirectShow application is run in real time, the graph will handle data streaming invisibly in the background. The application must provide the user with GUI elements in a common way.

Microsoft’s GraphEdit tool provides a graphical, interactive method for filter graph development. GraphEdit is distributed together with C++ APIs for filter development as part of the DirectX SDK. With third party tools such as the MontiVision SDK (www.monitvision.com/products), users can get even faster and easier entry into this technology. In addition to a huge collection of filters and samples, MontiVision uses a wrapper to reduce the MS DirectShow interfaces to their essential parts.

Based on the native Windows support for data stream handling, Microsoft’s DirectShow is a powerful technology for multimedia application development. The advantage of DirectShow is that the data streams can be handled in an abstract way instead of touching bits and bytes directly. Any application that manipulates the data streams in order to change properties such formats or color or that displays and stores image streams can benefit greatly from DirectShow. In addition to some traditional machine vision applications, an area where the use of DirectShow technology might be especially useful is “Intelligent Surveillance.” Applications such as pattern matching, which have demanding requirements for timing and for discrete pixel access, will still focus on C++ programming technology.


© 2008 Basler AG | Imprint | Legal Policy