Coder Social home page Coder Social logo

imahen2's Introduction

Imahen - iOS Image Filter App

Overview

Imahen -- Tagalog for "image" or "visual representation" of something

I created this app to explore the uses of common image effects used in CoreImage. I also leverage Metal kernels to perform popular image processing techniques on the device's GPU. Along the way, I also intend to make the user experience intuitive, similar to Instagram's photo editing interface.

Product Spec

User Stories (Required and Optional)

Required Must-have Stories

  • User can use photos taken from camera or photo library for filtering
  • User can apply a filter or image processing technique to a given image
  • User can compare original and filtered images when pressing on the preview
  • User can apply multiple filters one after the other
  • User can adjust filter intensity when applying to image
  • User can save to gallery or share to third-party apps

Optional Nice-to-have Stories

  • User can see a history of which filters they've applied (sort of like a copy/paste clipboard or previously visited browser pages in a tab)

Supported and Planned Filters

Filters

  • Grayscale Noir
  • Sepia

Enhance

  • Brightness
  • Contrast (using histogram equalization)
  • Smoothing (using Gaussian blurring)
  • Sharpening

Advanced (using Metal shaders)

  • Gradient w.r.t. x-axis
  • Gradient w.r.t. y-axis
  • Sobel edge detection filter
  • Canny edge detection filter
  • Otsu binarization

GIF Demo Walkthrough

imahen-demo-1

Data Model

Imahen Filter

Property Data Type Desc
name String? name of filter / img proc. scheme
filter CIFilter?
key String? Specifies which property to change in CIFilter
threshold CGFloat? 0.0 to 1.0, typically used for filter intensity
filterType FilterType .coreImage or .metal

Some things I learned along the way

I anticipated for this app to be super simple in complexity, however I found it very useful to tap into my OOP knowledge. Even though by nature UIKit is object-oriented based and relies on keeping track of parent/children classes like Views and ViewControllers, it was interesting to practice it on the very classes I made for my specific use case. Not only was it super helpful to utilize structs/classes to create data models, but also keeping in mind inheritance/subclassing and method overriding when creating the user experience for applying filters.

imahen2's People

Contributors

illumimarty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.