• Advertisement
Sign in to follow this  

Displaying images grabbed from a camera in realtime

This topic is 4307 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

Hello. I'm programming an application in .NET 2003 (C++) and the images grabbed by a camera are displayed in realtime in a form (one image every 33 ms). To improve performance, I'm thinking about using a graphics library to display the images. The first option I thought is to use DirectX. I've seen that directdraw is deprecated, and I don't know if using Direct3D is too much just to display images. Are there easier options? Which is the best way to accomplish this? I'm a completely newbie in this field, so any information will be welcome :) Thank you very much.

Share this post


Link to post
Share on other sites
Advertisement
I am confused. Are you saying you're using Visual Studio .NET 2003 to write a general C++ program, or are you using C++ with Managed Extensions and the .NET framework?

If you're using regular C++ you'd probably be easier off with SDL if all you want to do is display a 2D image in realtime. DirectX might be a bit much work to get up and working.

Share this post


Link to post
Share on other sites
Sorry if I wasn't clear enough.

I'm using the .NET framework and managed C++.

I've read that Direct3D is rather complicated to set up, and as you said I just want to display de 2D image in realtime, so is it better to use SDL? Is SDL managed?

Thank you.

Share this post


Link to post
Share on other sites
Originally SDL is not managed, but there might be a managed port of it that I'm not aware of. Managed DirectX is relatively straightforward to use for 2D presentation. Once you've created an MDX device and loaded the texture you can use the Sprite class to draw it, avoiding all the 3D stuff. However there might be a much simpler solution. After all DirectX is made to use in very graphics intesive programs such as games.

Share this post


Link to post
Share on other sites
Quote:

To improve performance, I'm thinking about using a graphics library to display the images.


What's your bottleneck? In what way do you want to improve performance?

If you want to do it with Managed DirectX find a MDX tutorial on texturing. All you need to do is apply a texture (your picture) on a poly.

DirectX FAQ has a lot of DirectX tutorials including MDX ones.

Share this post


Link to post
Share on other sites
Hi!

The bottleneck is the CPU. The grabbed images are processed and displayed on the screen. We expect to reduce the needed CPU by using DirectX, SDL, etc.

We have have tried DirectDraw, and the results have been promising, but we can't make it work with direct3D.

We have also tried with SDL, which is very easy to set up, but the performance is quite worse.

Thank you for everything!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement