cats-oss / android-gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)
9.01k stars 2.27k forks source link

GPUImageSharpenFilter is different compare to CISharpenLuminance from iOS #542

Open 8kt8 opened 2 years ago

8kt8 commented 2 years ago

Hello I am trying to achieve a filter effect similar to iOS SharpenLuminescence:

extension SharpenLuminescence {
  func filter(_ image: CIImage) -> CIImage {
    image.applyingFilter(
      "CISharpenLuminance",
      parameters: [
        kCIInputSharpnessKey: sharpness,
        kCIInputRadiusKey: radius,
      ]
    )
  }
}

Using GPUImageSharpenFilter I am getting different results, any idea why and how to achieve a similar effect to iOS?

The left side photo is from ios, radius 20 sharpen 2, the right site is an image with GPUImageSharpenFilter applied.

Screenshot 2022-04-20 at 20 25 39