Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to run slow video processing algorithms in background while showing camera output?

In more detail, on my iPad I'm trying to

  • start the videoCamera;
  • take a frame and process it in background (say object detection, which is quite slow)
  • in the meanwhile, continuing to show the video output (e.g. at 15 fps)
  • when the algorithm terminates on the frame previously taken, take the current frame and run again;
  • always show the video output
  • when the algorithm terminates, take the current frame...

... and so on.

I tried with dispatch_queues but it gives me errors, I think because I'm not able to say to the processing algorithm "Take the current frame only when you have finished with the frame previously taken".

How can I do that?

Thanks