我可以在静止图像上使用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”成为来自相机的实时视频流?