01-03-2011 06:13 AM
Hey!
I have a simple application. I just acquire image from USB camera and display it. The whole thing is in one while loop. When I run it the frame rate is quite low, around Fps. Also there is a delay in the presented image. When I run the task manager I can see that one core is at 100% and the second one is almost not used at all (2%). What should I do to use the whole processor?
Matej
01-05-2011 02:42 AM
Hi Mate47!
From programming perspective, you cannot run a single thread on two cores at a time. (I am sure that experienced IT guys could give you an IT solution, though - disabling multi-core operation)
My recommendation is to use pipelining.
Generally, inside a single while loop, you break your sequential programflow (single thread) into a paralell manner communicating via shift registers. The only requirement is to have at least two significant steps in your programming flow. Ie.: Acquire - Analyze; In your case, it might be Acquire - Present.
Please, read the following articles/tutorials and you can experiment with example programs entitled! If it doesn't increase throughput, or pipelining is not applicable for your task, please, get back to us and we'll find another solution!
Pipelining for Multicore Computers Example
Best,
Matyas
01-05-2011 01:15 PM
Maybe you could show your code so we might be able to suggest a solution to make it faster? If you are only acquiring and displaying you should be able to this with minimal CPU load.
Eric