Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter Live camera feed

So i've been using UIImagepickercontroller to access the camera for photo and video capture, then i wanted to apply filters on those 2 sources, i succeeded with filtering token photos but i'am having trouble finding the solution for the rest, all i need is to access the raw image data : the live image feed that the camera is showing , apply the filter and then show the filtered ones instead. Any help or advice will be appreciated.

like image 949
Jad Avatar asked Apr 08 '26 08:04

Jad


1 Answers

UIImagePickerController doesn't give you low level access to the camera buffer.

You should setup a AVCaptureSession and use the delegate to process the CMSampleBufferRef

Take a look at the AVCam & SquareCam demos from Apple, they give a good introduction to video capture.

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

An easier solution is to use https://github.com/BradLarson/GPUImage

Thanks Adam

like image 177
Adam Roberts Avatar answered Apr 11 '26 04:04

Adam Roberts