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