GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Using GPUImageLookupFilter on live video

Open andrewabdalla opened this issue 7 years ago • 2 comments

Hi,

I am able to use the GPUImageLookupFilter on still images with no problem but I am not able to apply the lookup filter to live video. Is it possible? If so how?

This is what I have for still images

var filteredImage:UIImage!
func lookupFilter() {
    let stillImageSource = GPUImagePicture(image: UIImage(named: "lookup"))
    let filterApplied = GPUImagePicture(image: UIImage(named: "lookupF"))
    let lookup = GPUImageLookupFilter()
    stillImageSource.addTarget(lookup)
    filterApplied.addTarget(lookup)
    lookup.useNextFrameForImageCapture()
    stillImageSource.processImage()
    filterApplied.processImage()
    lookup.imageFromCurrentFramebuffer()
    filteredImage = lookup.imageFromCurrentFramebuffer()
}

AKA is it possible to have the "stillImageSource" be a live video stream from the camera? Thank you for any help!

andrewabdalla avatar Sep 18 '16 21:09 andrewabdalla

Would also love to know. I already recorded a video and I need a live filter in my player

lfarah avatar Oct 29 '16 20:10 lfarah

Any Idea how to use lookup filter to AVPlayer?

sagarthecoder avatar Jul 27 '22 13:07 sagarthecoder