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
I tried to modified the program
for ( int y = 0; y < height; y++ )
for ( int x = 0; x < width; x++, ptr++ )
count += ( (*ptr) >> 7 );
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?