Live Camera Filter

So, I used the UIImagepickercontroller to access the camera for photo and video capture, then I wanted to apply filters for these two sources, I managed to filter tokens, but I have problems finding a solution for the rest, all I need to do is get access to raw image data: a live image that is displayed by the camera, apply a filter, and then display the filtered ones. Any help or advice would be appreciated.

+2
source share
1 answer

UIImagePickerController does not provide low level access to the camera buffer.

You must configure AVCaptureSession and use a delegate to handle CMSampleBufferRef

Take a look at Apple's AVCam and SquareCam demos to give you a good idea of ​​video capture.

http://developer.apple.com/library/ios/#samplecode/AVCam/Introduction/Intro.html http://developer.apple.com/library/ios/#samplecode/SquareCam/Introduction/Intro.html

A simpler solution is to use https://github.com/BradLarson/GPUImage

Thanks Adam

+3
source

Source: https://habr.com/ru/post/1528915/


All Articles