Using C # with a C DLL for callback can't get better than 16FPS rate framegrab, why?

I have a C # application that interacts with a USB camera. It works great, except that I could not succeed better than about 16 frames per second. I use VFW and the ā€œCā€ callback (the callback is part of the DLL) on the WM_CAP_GRAB_FRAME_NOSTOP message, and I found that even if I really have NOTHING ANYTHING in the callback, I cannot get a decent frame rate (16FPS - max.).

I thought that using this interface would give me better performance than other alternatives (for example, DirectShow) simply because of its simplicity and low-level connection to the driver; but now I'm starting to wonder if this is true. Does anyone know about this?

+4
source share
2 answers

I never found out why VFW limits my frame rate; however, I found VideoInput for C #, and now I use this instead. Gives me much more control over the camera and much higher frames.

0
source

Let me risk a guess ...

Do you use System.Timers.Timer randomly? Or is it part of a C program using a Windows timer? If you do, the reason may be its limited permission.

0
source

All Articles