title: Capture high speed webcam and process frames using threads?
body: <p>I have a PS3 Eye webcam capable of delivering frames up to 120 times a second based on the resolution.</p>
  
  <p>I need to do some processing on each frame, and currently that takes up quite a lot of time.
  The webcam is set to 60 fps, that leaves around 16 ms of processing time per frame, but due to the processing bottleneck, i am only able to retrieve around 30 frames a second.</p>
  
  <p>Behind the scenes a while loop retrieves the bitmap data from the camera, and sets a bitmap property, and notifies that a new frame has been retrieved, so the images wont stack up if processing takes too long.</p>
  
  <p>I am thinking i should be able to somehow use threading to make the processing "faster".</p>
  
  <p>Perhaps like this</p>
  
  <ol>
  <li>Frame received</li>
  <li>Thread 1 starts processing</li>
  <li>Frame received</li>
  <li>Thread 1 is busy</li>
  <li>Thread 2 starts processing</li>
  <li>Thread 1 finished processing</li>
  <li>Frame received</li>
  <li>Thread 1 starts processing</li>
  <li>Thread 2 finished processing</li>
  <li>Etc</li>
  </ol>
  
  <p>Do you guys think threading, perhaps by using the Task Parallel library will improve performance?</p>
  
  <p>Thanks in advance!</p>