troubleshooting Question

Motion Detection in C#

Avatar of gorexy
gorexy asked on
C#MultiMedia Applications
18 Comments1 Solution3349 ViewsLast Modified:
HI,
I would like to do a simple motion detection that can detect a car from my web cam in which my program can tell you the car is from left to right or from right to left.
  I have searched a sample code from
http://www.codeproject.com/KB/audio-video/Motion_Detection.aspx
I tried to modified the program
for ( int y = 0; y < height; y++ )
                        {
                              for ( int x = 0; x < width; x++, ptr++ )
                              {
                                    count += ( (*ptr) >> 7 );
                       
                        Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
                        Debug.WriteLine(count.ToString());
                              }
                              ptr += offset;
                 
                        }

However, when I use Debug, the video cannot capture image.  Anyway I should not use Debug.

So how can I detect the car from left to right or from right to left?

thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 18 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros