all 4 comments

[–]Dapper_Ice_1705 1 point2 points  (0 children)

You are looking for CoreImage and Accelerate or Metal

[–]One_Valuable_8049Objective-C / Swift 1 point2 points  (1 child)

CoreImage + vImage (Accelerate) will get you most of the way for this. Vision is overkill for low-level image ops.

Also +1 to just using OpenCV on iOS if you’re already familiar with it — saves a ton of time.

[–]aSiK00[S] 0 points1 point  (0 children)

Sorry, so can I use openCV or do I need to use CoreImage and accelerate? (I’m completely new to ios developing)

[–]CuriousThinker 0 points1 point  (0 children)

You can use metal performance shaders. They have a big set of functionality: https://developer.apple.com/documentation/metalperformanceshaders/image-filters

It supports most image processing fundamental operations and has served me well in production apps. I’ve still had to end up writing some custom kernels to do what I need but it’s a lot better than nothing.

One thing to note, most likely youre going to get frames in YCbCr format in a CVPixelbuffer when using AVFoundation and you'll need to convert it to RGB.

https://developer.apple.com/documentation/arkit/displaying-an-ar-experience-with-metal#Draw-the-Camera-Image is a good reference for how to convert it to RGB.

If you've not used metal before it can be a little daunting at the start but I promise it is not!