Advertisement Jump to content


This topic is now archived and is closed to further replies.



This topic is 6345 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anybody here know anything about directshow? I am trying to capture frames from a usb webcam and do some processing of each frame i am looking at the playcap sample program that comes with it and im just not sure where to start with objects i should be looking at or whatever. I want to be able to actually get the rgb values kind of like you would from a bitmap when u load it into memory but i dont know how to do it with a media stream. I know this is probably a long shot that anybody here knows this stuff but any clues or ideas you guys have would be really appreciated thanks.

Share this post

Link to post
Share on other sites
Hmmm... DirectShow can be a strange beast until you get used to it. Take a look at the GraphBuilder application, which allows you to drag and drop to build interesting filter combinations. Also, look at some of the sample code that involves some simple image processing. In the most basic terms, you want to create a filter graph where the capture filter is connected to your frame processor, which is connected to some sort of output renderer. If you can get that filter graph built correctly, you''ll be in business. The best thing I can tell you is look at the samples.

Another option - look at the Texture3D sample. This creates a filter that receives frames from an AVI reader and reformats them as textures. Use that as a base. First, change it to get frames from the capture device, then add your processing before the texture creation, then eventually rip out all the 3D stuff and add some other output mechanism.

Share this post

Link to post
Share on other sites
You want to look at the capture applications, they may just work with the webcam.

If you want to do some special processing on a stream, I''m almost certain you have to write your own DirectShow Filter, and manually insert it into the graph as CrazedGenius mentioned.

Magmai Kai Holmlor
- Not For Rent

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!