dast.blog();

"Find a job you love, and you will never have to work a day in your life."

  Home  |   Contact  |   Syndication    |   Login
  19 Posts | 0 Stories | 0 Comments | 0 Trackbacks

News



Google dast.blog();





These postings are provided "AS IS" with no warranties, and confer no rights.

Locations of visitors to this page



Archives

Post Categories

Image Galleries

Artikel

CodeProject Artikel

Homepage

Links

PocketPCDN Artikel

Some weeks ago I had the idea to combine Matlab and DirectShow, and here's the result ...

... a DirectShow filter that will use Matlab to transform a video stream.

The filter will accept the path to a M-File and the Variable Names of the Input and Output Frame.

When the DirectShow Filter Graph starts the "Matlab Video Filter" starts the Matlab Command Shell automatically in the background. For each frame the "Matlab Video Filter" load the Input Frame to a Matlab matrix, put the matrix to the Matlab Command Shell, execute the M-File, get the transformed matrix back from the Matlab Command Shell and copy it to the Output Frame.

The M-File used in the screenshot uses the "Canny Edge Filter" to extract the edges of the video stream and plot the histogram of the Input Frame:

FrameOut = im2uint8(edge(FrameIn, 'canny'));
imhist(FrameIn);

There are two versions of the "Matlab Video Filter", one for 8 Bit Grayscale video streams and one for RGB 24 video streams.

Both Microsoft Visual Studio 2005 projects of the filters can be found here:

posted on Friday, May 25, 2007 4:13 AM