Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created desktop application using WPF(C#) for accessing usb industrial Camera with high resolution camera(3840*2160, 4208*3120, 4096*2160).
For this I have implemented APIs from the below mentioned articles but still Video Lagging and Memory Consumption issue is not yet resolved
- WPFMedia Kit
- AForge
- OpenCvSharp
Can you please suggest me some articles or code snippets for showing video without lag in real time for the higher resolution camera with low memory consumption.

What I have tried:

- WPFMedia Kit
- AForge
- OpenCvSharp
Posted
Updated 19-Feb-19 4:49am
v3

Talk to the manufacturers: it's going to depend heavily on what format they stream the data in, and the type of USB connection the camera is connected to.
Just look at the resolution you list, pick one 4069 * 2160, assuming no compression and 4 byte pixels (8 bits per colour plus the alpha channel) is 35MB per frame, so if you run 30fps, that's 1GB per second, which is an impressive rate of data transfer. Faster in fact than my SSD can cope with ...

So it's compressed. Which means that the bandwidth required is variable, but probably still fairly high. And USB 1 is around 1.2MB per second, USB 2 is up to 50MB per second, and USB 3 will get you 640MB per second. And then you have to store it temporarily, and decompress it to display each frame ... and you're surprised there is lag?

Talk to the manufacturers, and see what they say. There is not "one ring" which will solve this problem, it's going to be a combination of factors.
 
Share this answer
 
Comments
Ganesh B Patil 19-Feb-19 5:09am    
Hi,
I have checked the current result of camera set to high resolution with Micro Soft Office Lens and found no lag(Tried also with Micro Soft Default Camera).
Hence, I was wondering what could be the technique use by them.
Please suggest if the same camera and resolution works smoothly, then which API should I use to minimize the lag.
Have you ever try it in high spec pc's
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900