11

I am trying to develop an iOS app that performs real time effects on video from the camera, much like Photobooth on the iPad. I am familiar with the API for OpenCV but am worried about the performance on iOS if most processing is completed on the CPU versus the GPU. Libraries like GPUImage would most likely do the trick but I would rather stay with something I am familiar with. So, does anyone know if OpenCV compiled for iOS uses the GPU?

Nathan Murray
  • 179
  • 2
  • 8
  • A good Metal GPU processing on iOS ref: https://www.objc.io/issues/21-camera-and-photos/gpu-accelerated-image-processing/ – MoDJ Oct 27 '16 at 20:09

1 Answers1

18

OpenCV uses Cuda for it's GPU which is only supported on NVidia graphics cards. There is an experimental port of openCV's GPU functions to OpenCL and it's likely that OpenCL will be supported in the future - at least on iPad (it's GPU can run OpenCL)

You can use shaders in OpenGL ES2.0 on the iPhone and iPad

Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
  • 21
    @NathanMurray - I should point out that one of the primary reasons I wrote GPUImage was to eventually replace many of the functions of OpenCV in a GPU-accelerated manner. It uses OpenGL ES 2.0 shaders under the hood and abstracts away the underlying code required for maximum performance on iOS. For processing live video on iOS, I can say with confidence that there's no library faster than it right now. I've also tried to make it as easy to incorporate into an application as I can. – Brad Larson May 22 '12 at 17:15
  • 4
    Brad's GPUImage is very useful. – Rob Jan 25 '14 at 20:19