Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have a camera and making some process on frames.But I must make this process faster.
Because of that I'm trying to create a buffer.When I'm taking the new frame a thread will do the process on the old frame.How can I do that using threads? I tried CriticalSection functions but I've got run time errors.And I tried waitForSingleObject functions but I couldn't get more speed.What must I use ?
Posted

1 solution

With threads you may have a performance gain just on multicore systems.
In any case mutithreaded programming is a quite complex topic and you should know what are you doing in order to get benefits (your issues with synchronization functions, make me think you need a deeper understanding of the matter).
 
Share this answer
 
Comments
Mehdi Gholam 23-Sep-11 4:24am    
My 5!
blackMoree 23-Sep-11 5:14am    
my camera takes a frame at 15 ms.my processes on the images takes 30 ms.I want to create a buffer and taking the images to te buffer.
the scenario:
The main loop takes the images and writes them to the buffer.
the thread function takes them from the buffer and process the images.
mbue 24-Sep-11 10:59am    
You can create a thread for each buffer. If you need the processing result - wait for the appropriate thread.
Reagards.

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