BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.85k stars 605 forks source link

Toon Filters not like a video? #309

Open emresancaktar opened 4 years ago

emresancaktar commented 4 years ago

Hello,

I am trying to add Toon filter to my images but it does not look like the live video view from the examples.

I tried this one; let toonFilter = SmoothToonFilter() let testImage = UIImage(named:"1.JPG")! let pictureInput = PictureInput(image:testImage) let pictureOutput = PictureOutput() pictureOutput.encodedImageFormat = .jpeg pictureOutput.imageAvailableCallback = {image in self.imageView.image = UIImage.init(cgImage: image.cgImage!) } pictureInput --> toonFilter --> pictureOutput pictureInput.processImage(synchronously:true)

and this one;

let testImage = UIImage(named:"WID-small.jpg")! let toonFilter = SmoothToonFilter() let filteredImage = testImage.filterWithOperation(toonFilter)

they all same. It put filter but effects are very low. I tried to change threshold and quantizationLevels but it same.

What is the problem ? How can I use this filter like FilterShowcase app video preview. ?

Thanks!