How to draw an unfilled square on top of a stream video using a mouse

Hi,

I am making an object tracking application. I have used Emgucv 2.1.0.0 to load a video file to a picturebox. I have also taken the video stream from a web camera.

Now, I want to draw an unfilled square on the video stream using a mouse and then track the object enclosed by the unfilled square as the video continues to stream.

This is what people have suggested so far:-

(1) .NET Video overlay drawing(DirectX) - but this is for C++ users, the suggester said that there are .NET wrappers, but I had a hard time finding any.

(2) DxLogo sample
DxLogo ? A sample application showing how to superimpose a logo on a data stream. It uses a capture device for the video source, and outputs the result to a file. Sadly, this does not use a mouse.

(3) GDI+ and mouse handling - this area I do not have a clue.

(4) Dshownet - this is a .NET wrapper for DirectShow in the windows SDK

And for tracking the object in the square, I would appreciate if someone give me some research paper links to read.

Any help as to using the mouse to draw on a video is greatly appreciated. Thank you for taking the time to read this.

Many Thanks

Is there a device driver or kernel question in the somewhere? If not, wrong
forum. I’d suggest you visit the appropriate MSDN forums via Visual Studio.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, June 17, 2010 3:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to draw an unfilled square on top of a stream video
using a mouse

Hi,

I am making an object tracking application. I have used Emgucv 2.1.0.0 to
load a video file to a picturebox. I have also taken the video stream from a
web camera.

Now, I want to draw an unfilled square on the video stream using a mouse and
then track the object enclosed by the unfilled square as the video continues
to stream.

This is what people have suggested so far:-

(1) .NET Video overlay drawing(DirectX) - but this is for C++ users, the
suggester said that there are .NET wrappers, but I had a hard time finding
any.

(2) DxLogo sample
DxLogo ? A sample application showing how to superimpose a logo on a data
stream. It uses a capture device for the video source, and outputs the
result to a file. Sadly, this does not use a mouse.

(3) GDI+ and mouse handling - this area I do not have a clue.

(4) Dshownet - this is a .NET wrapper for DirectShow in the windows SDK

And for tracking the object in the square, I would appreciate if someone
give me some research paper links to read.

Any help as to using the mouse to draw on a video is greatly appreciated.
Thank you for taking the time to read this.

Many Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

On 6/17/2010 1:50 AM, xxxxx@gmail.com wrote:

I am making an object tracking application. I have used Emgucv 2.1.0.0 to load a video file to a picturebox. I have also taken the video stream from a web camera.

Now, I want to draw an unfilled square on the video stream using a mouse and then track the object enclosed by the unfilled square as the video continues to stream.

And for tracking the object in the square, I would appreciate if someone give me some research paper links to read.

Yes, that’s clearly the hard part. As you say, this is a research
topic. It is by NO means a “solved problem”. You aren’t going to find
any canned solutions.

Any help as to using the mouse to draw on a video is greatly appreciated. Thank you for taking the time to read this.

I don’t know how “Emgu CV” gets involved, but the fundamental concept is
easy. You would have a DirectShow graph connecting your camera to a
renderer for your screen. You could use the Video Mixing Renderer. VMR
supports a concept called “colorkey”, where you draw a single color in
the window. The video shows through anywhere the window contains that
color. So, all you would need to do is draw your rectangle in some
OTHER color, using normal GDI calls. The hardware colorkey will let the
square show through while the video plays on elsewhere. You could even
use the ISampleGrabber interface to grab a copy of each frame for your
processing.

Now, all of that assumes DirectShow and C++. DirectShowNet is a very
good .NET wrapper around DirectShow, but you’re still going to have a
lot of work ahead of you.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.