A lightweight SkinSmoothing Filter using Metal and CoreImage.
Before | After |
---|---|
iOS 15+, macOS 11+
You can add SkinSmoothingFilter to your project via Swift Package Manager by adding the following to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/shima11/SkinSmoothingFilter.git", .upToNextMajor(from: "1.0.0"))
]
To use the SkinSmoothingFilter, you first need to import the package into your project:
import SkinSmoothingFilter
Then, create an instance of SkinSmoothingFilter, set your desired parameters, and process your images like so:
let filter = SkinSmoothingFilter()
filter.inputImage = ciImage // Your input CIImage
filter.inputAmount = inputAmount // Smoothing amount
filter.inputSharpness = inputSharpness // Image sharpness
filter.inputRadius = inputRadius // Blur radius
let result = filter.outputImage // Processed CIImage
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any ideas, bug reports, or suggestions.
SkinSmoothingFilter is available under the MIT license. See the LICENSE file for more info.