Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7519793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:57:40+00:00 2026-05-30T01:57:40+00:00

I initially approached this issue with CoreImage in mind (because I also need to

  • 0

I initially approached this issue with CoreImage in mind (because I also need to do facial recognition), but realized that, unfortunately, the CI Distortion filters are not yet included on the iPhone.

I attempted to dive into GLImageProcessing, CImg, and ImageMagick, though I’ve had a lot of trouble finding a starting point for learning any of these.

Given the number of apps out there that do image distortion, I know this can’t be incredibly difficult.

I don’t know C or C++, and don’t have the time to learn those languages unless absolutely necessary. It would become necessary if one of those libraries is the definitive library for handling this task.

Does anyone have experience with any of these libraries?

Any books out there that cover this for iOS5 specifically?

Resources I’ve found:

  • GLImageProcessing sample project
    https://developer.apple.com/library/ios/#samplecode/GLImageProcessing/Introduction/Intro.html

  • ImageMagick & MagickWand
    http://www.imagemagick.org/script/magick-wand.php

  • CImg
    http://cimg.sourceforge.net/

  • Simple iPhone image processing
    http://code.google.com/p/simple-iphone-image-processing/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:57:40+00:00Added an answer on May 30, 2026 at 1:57 am

    As you say, the current capabilities of Core Image are a little limited on iOS. In particular, the lack of custom kernels like you find on the desktop is disappointing. The other alternatives you list (with the exception of GLImageProcessing, which wouldn’t be able to do this kind of filtering) are all CPU-bound libraries and would be much too slow for doing live filtering on a mobile device.

    However, I can point you to an open source framework called GPUImage that I just rolled out because I couldn’t find something that let you pull off custom effects. As its name indicates, GPUImage does GPU-accelerated processing of still images and video using OpenGL ES 2.0 shaders. You can write your own custom effects using these, so you should be able to do just about anything you can think of. The framework itself is Objective-C, and has a fairly simple interface.

    As an example of a distortion filter, the following shader (based on the code in Danny Pflughoeft’s answer) does a sort of a fisheye effect:

    varying highp vec2 textureCoordinate;
    uniform sampler2D inputImageTexture;
    
    const mediump float bulgeFactor = 0.5;
    
    void main()
    {
        mediump vec2 processedTextureCoordinate = textureCoordinate - vec2(0.5);
        mediump float radius = processedTextureCoordinate.x * processedTextureCoordinate.x + processedTextureCoordinate.y * processedTextureCoordinate.y;
        mediump vec2 distortedCoordinate = vec2(pow(radius, bulgeFactor)) * processedTextureCoordinate + vec2(0.5);
    
        gl_FragColor = texture2D(inputImageTexture, distortedCoordinate);
    }
    

    This produces this kind of effect on a video stream:

    Fisheye effect filter

    In my benchmarks, GPUImage processes images 4X faster than Core Image on an iPhone 4 (6X faster than CPU-bound processing) and video 25X faster than Core Image (70X faster than on the CPU). In even the worst case I could throw at it, it matches Core Image for processing speed.

    The framework is still fairly new, so the number of stock filters I have in there right now is low, but I’ll be adding a bunch more soon. In the meantime, you can write your own custom distortion shaders to process your images, and the source code for everything is available for you to tweak as needed. My introductory post about it has a little more detail on how to use this in your applications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Initially I thought this was going to work, but now I understand it won't
Initially I deployed packages on SQL server but since my machine is not having
Initially I had a method in our DL that would take in the object
I initially designed my system following the s# architecture example outlined in this codeproject
I initially thought that 64 bit instructions would not work on OS-X 10.5. I
I have a rather annoying issue that I solved using a simple recursive method
I have a UI issue. Initially I wanted to have 2 pickers to populate
This is a pretty generic question, but I come from a few years with
I've got a bit of a usability issue that I'd value some input on.
I need to create a simple rich-text editor that saves its contents to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.