chathu Posted July 30, 2003 Posted July 30, 2003 can somebody please tell me how to break a video into frames for analysis with directX 9 with C++. I have no previous experiance in using directx . Quote
*Experts* Nerseus Posted July 31, 2003 *Experts* Posted July 31, 2003 First install the DirectX SDK. Then look at the sample folder at: C:\DXSDK\Samples\C++\DirectShow There used to a sample in the Direct3D folder for showing a spinning cube and putting an AVI (as a texture) on each face of the cube. I didn't look at the code, but I assume it had a way to load each frame of the video one frame at a time and get it into a texture object. You can lock a texture and look at the color bits that way. I'd first take a look at the DirectShow samples and see what you can see. By the way, if you're not already very good at programming, DirectX may be a bit much to take in. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
chathu Posted August 1, 2003 Author Posted August 1, 2003 Thanks for the reply. Is there any other method that you recommend for reading a video frame by frame for analysis other than directX. I have to use VC++ for this project. Chathu Quote
*Experts* Nerseus Posted August 1, 2003 *Experts* Posted August 1, 2003 Is there any other method that you recommend for reading a video frame by frame for analysis other than directX Well, you posted in the DirectX forum :) If you know the video type (AVI, MPG, etc.), you can search google to find information about the format, but you'd have to write the decoder yourself. There are some free decoders available at SourceForge. I've seen some GUI tools that are Open Source that use the Open Source libraries. By looking at the code for either of those, you should be able to find what you're looking for. This isn't going to be an afternoon or even a weekend's worth of looking around and then writing an app to take out each frame though. Manipulating images is a tough business, even with source code provided to you. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
AndreRyan Posted August 2, 2003 Posted August 2, 2003 Nerseus: DirectX 9 has a special event for the texture thing: 'Loading AudioVideoPlayback.Video AddHandler videoTexture.TextureReadyToRender, AddressOf Me.RenderIt Sub RenderIt(ByVal sender As Object, ByVal e As TextureRenderEventArgs) 'Set our texture so we can render it texture = e.Texture RenderTexture() End Sub Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
NicoVB Posted December 25, 2003 Posted December 25, 2003 Can you work it this a little bit... So for example: I want to capture frame number 100 or the frame on the time '8,43 seconds' ?? How? Quote Visit http://www.nico.gotdns.com Now ONLINE!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.