TimeCodes

Started by
4 comments, last by andreas132 17 years, 10 months ago
First off, i have tried to find information about this everywhere i can think off without finding anything of value What im hoping to get some help with is how to create time codes.. What im making is a game that plays up a movie clip in the background using directshow, no top of the clip is a sprite that can move from edge to edge and i need to use timecodes to create collision with object in the movie. Im open for other suggestions then using timecodes but thats the solution i can come up with. Im writing it in C++ and DirectX. Thanks for any help // Andy
Advertisement
Quote:Original post by andreas132
i need to use timecodes to create collision with object in the movie.


This doesn't make sense to me. Time codes (like SMPTE?) just help sync the movie, or tell where you are in the movie, I believe.

I guess if you had information about the "objects" in the movie for every point in time, you could do some collision detection...

Otherwise, it seems what you need are some image processing algorithms to recognize objects in the movie.
--== discman1028 ==--
Quote:Original post by discman1028
Time codes (like SMPTE?) just help sync the movie, or tell where you are in the movie, I believe.


This is what i need but dont know how.
What i want to do for example is:

I know at what times there is an object in the movie for example to the right, and then check at this timecode so the sprite isnt to the right too, if it is then it collides.

Or there is a little coin to the left at a certain time, and if the sprite is there too at the same time, it will take the coin and get a point.

Thanks for reply
// Andy
*bump*
I would start by looking into SMPTE, and see how you can map each frame to timecode. "VirtualDub" might be able to do that.

Then, you may need to study some image-processing algorithms. You could either:

1) On the fly, use some complex algorithm to determine where your "object" is. (anything you want to detect in the images).

2) Do that same computation ahead of time, and store some coordinates of some rough shapes, representing where some objects are at each frame (frame, or, SMPTE time margin).

3) Go through this film manually and find where you want to detect a collision, per frame, based on your preference. This would obviously take a long time...

Just some ideas...
--== discman1028 ==--
Thank you, appreciate it.
will look into SMTPE

i dont need to know the exact position of the object since it will only collide if the sprite is out to the left or right where the object is.

This topic is closed to new replies.

Advertisement