Swift 4 + iOS 11 or macOS 10.13
Mainly working on iOS
This repository is going to update to become runnable on Swift 5 & iOS 13, due to the author intent to hunt a job for iOS development :D
- Exposure
- Shadow & highlight
- Saturation
- Contrast
- HSL for Orange
- The implementation of Low Light Enhancement Algorithm - LIME
- Real-Time Rendering via MTKView
- Adapted aspect radio
- Lowest CPU cost with fewest data type conversion
- This way is much more faster than DispatchQueue method.
- Argument Buffer of Metal, which decrease around 10 times of CPU overheads. (macOS only)
- Gamma Correction
- Gaussian Blur
- Transforms between NSImage, CIImage and CGImage.
- 2D FFT in Apple Metal by a Iterative Way
- 1st: Rearrangement of element (shader is here)
- 2nd: Calculate FFT from beginning to final stage. (shader of early stage, shader of full stage)
- 3rd: Complex to modulus.
- Illumination Map in mean way
- Shrinkage
- Gradient
- Low Light Enhancement Algorithm - LIME
Core Image kernels locate in CustomKernel functions from CustomFilter.swift, you can also find them in Kernels.cikernel for Core Image Kernel with comments under the iOS directory.
The filter written in Metel is located in here.
Computational Kernel can be found both in macOS project and iOS project. These two kernels are not identical, please focus on iOS one.
Thanks to Core Image, you can test these filters by images supported by it. Output is available.
Case 1:
Guo, X., Li, Y., & Ling, H. (2017). LIME: Low-Light Image Enhancement via Illumination Map Estimation. IEEE TRANSACTIONS ON IMAGE PROCESSING, 26(2), 982–993.