0

我可以毫无问题地在静止图像上使用 GPUImageLookupFilter,但我无法将查找过滤器应用于实时视频。可能吗?如果有怎么办?

这就是我对静止图像的看法:

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 是否可以让“stillImageSource”成为来自相机的实时视频流?

4

0 回答 0