Skip to content

UncleJerry/Filmroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filmroom, an image process playground

Swift 4 + iOS 11 or macOS 10.13

Mainly working on iOS

iOS Part include

  • Image adjustment
    • Exposure
    • Shadow & highlight
    • Saturation
    • Contrast
    • HSL for Orange
  • Real-Time Rendering via MTKView
  • ★★★ The implementation of Low Light Enhancement Algorithm - LIME ★★★

macOS parts included

  • Gamma Correction
  • Gaussian Blur
  • Transforms between NSImage, CIImage and CGImage.
  • Real-Time Rendering via MTKView

Rendering Features

  • Real-Time Rendering via MTKView
    • Adapted aspect radio
    • Lower CPU cost because fewer data type conversion
      • This way is much more faster than DispatchQueue method.
    • It decreases the CPU usage because of taking use of argument Buffer of Metal . (macOS only)

Computation Kernels

These algorithms are written in computation kernels (of Metal API):

  • 2D FFT in Apple Metal by a Iterative Way
  • Illumination Map in mean way
  • Shrinkage
  • Gradient
  • Low Light Enhancement Algorithm - LIME

Computational Kernel can be found both in macOS project and iOS project. These two kernels are not identical, please focus on iOS one.

Core Image kernels

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.

Test

You can test these filters by images supported by Core Image. Output is available.

Note: FFT algorithm only support image size like 1024x1024 or 4096x4096.

FFT Result

Case 1:

FFTcase1

Case 2: FFTcase2

Low-Light Image Enhancement (LIME)

Reference of LIME

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.

Result

LIMEcase1

LIMEcase2

About

A Image Processing test field of Apple Platform. Mainly using Swift and Metal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published