CIFilter output image nil

You cannot call UIImage(CIImage:) and use that UIImage as the image of a UIImageView. UIImageView requires a UIImage backed by a bitmap (CGImage). A UIImage instantiated with CIImage has no bitmap; it has no actual image, it’s just a set of instructions for applying a filter. That is why your UIImageView’s image is nil.

How to apply a Vignette CIFilter to a live camera feed in iOS?

Your step 2 is way too slow to support real-time rendering… and it looks like you’re missing a couple of steps. For your purpose, you would typically: Setup: create a pool of CVPixelBuffer – using CVPixelBufferPoolCreate create a pool of metal textures using CVMetalTextureCacheCreate For each frame: convert CMSampleBuffer > CVPixelBuffer > CIImage Pass that … Read more

Why can’t I invert my image back to original with CIFilter in my Swift iOS app

The problem is this line: imageView.image = UIImage(CIImage: (filter.outputImage)!) You can’t do that. A CIImage does not magically turn into a UIImage. An image view needs a bitmap-based image, not a CIImage-based image. You have to render the CIImage to turn it into a UIImage, either by getting a CIContext and telling it to create … Read more