I need for an objc implementation exactly the functionality of this swift documentation: https://developer.apple.com/documentation/accelerate/vimage/pixelbuffer/3951652-cropped?changes=_7_1&language=objc
It seems that there is no objc documentation present. Does anyone know how to call the crop function in objc?
Take a look at Applying vImage Operations to Regions of Interest.
In summary, you need to create a vImage buffer that shares data with your source buffer but with a data pointer that points to the top-left pixel of your region of interest and a height and width that matches your region of interest. Then call vImageCopyBuffer
to copy from the source to your crop destination.