title: Implementation of Inter Thread Communication in Qt
body: <p>I am having problem to implement the following scenario. My problem statement goes like this:</p>
  
  <ol>
  <li>I have 3 threads. ThreadCamera for grabbing frames from a camera. ThreadProcess for processing (doing some image processing with OpenCV on the image/frame grabbed) the frame and main GUI Thread for displaying the image.</li>
  <li>I don't know how much time ThreadProcess will take to process an image. So I want to pass the image from ThreadCamera to ThreadProcess , do some image processing on the image and pass it to the main GUI Thread for display.</li>
  <li>When ThreadProcess processes the image the ThreadCamera should sleep. I.e. <strong>it should not grab further frames from the camera</strong>. When the ThreadProcess finishes the image processing task it should pass the image and some information to the main GUI Thread. After this only the ThreadCamera should wake up and grab the next frame/image from the camera runnig in that(ThreadCamera) thread.</li>
  </ol>
  
  <p>Thanx Guys...after some comments to put Camera and Image Processing job in a single thread i would like to know another point..which is..</p>
  
  <ol>
  <li>What if don't want to sleep the camera while the processing is going on?It does not matter to me if I loose some of the frames grabbed by CameraThread(which in any case I am loosing if i sleep or not sleep the camera)</li>
  </ol>
  
  <p>I am using QObject for each process(Camera Process and Image Processing job) and movetoThread command to make it run in a particular thread.</p>
  
  <p>Any insight about the implementation and signal/slot design will be helpful..</p>