pouët.net

Go to bottom

Instagram-like image processing

category: code [glöplog]
 
Hi All,

Has anyone experimented with Instagram-like photo enhancement? I'm curious what methods they use, especially the nonlinear algorithms. Does anyone have experience with this kind of processing?

added on the 2013-05-17 16:15:30 by trc_wm trc_wm
yeah, i do tons of it :) There's not a whole lot to it, you do a colour transform, perhaps a blur, and add an overlay for 'dirty lens' or 'scruffy photo paper' and the frame.

There's quite a few methods of doing it, the most common is just to chain a bunch of standard image filters (brightness, contrast, blur, masking and so on), pretty much replicating what you'd do in photoshop to tweak an image.
added on the 2013-05-17 16:23:05 by psonice psonice
I looked into it the other day. Here is an interesting read (just skip the login). It seems the guy spent some time reverse-engineering whatever they do, but even if you don't reverse engineer I'm sure you can come up with something similar.
I like how you call it "photo enhancement".
i may be wrong, but i think they adjust also shape detection algorithms
added on the 2013-05-19 02:38:22 by gorgh gorgh
It is image enhancement, so yeah photo enhancement is correct naming.
added on the 2013-05-19 06:40:18 by panic panic
panic, I'm just pointing out that I'd hardly call these shit instagram puts on these pictures an "enhancement" of the picture. ;)
Graga: that's likely pretty accurate.

gorgh: i'm pretty sure there's no shape detection - what shapes are they detecting, and what do they do with the shapes? They just apply some colour transforms and overlays, perhaps a bit of blur.

saga: when it hides a shitty picture, it's an enhancement ;)
added on the 2013-05-19 18:04:25 by psonice psonice
Touché. :)
trc_wm: what will get you 95% of the way to that Instagram look is a technique called cross processing. It's dead easy to replicate in any photo editing software, and therefore also insanely easy to replicate in code. Making it work on a wide variety of images is a little trickier, but you can get it pretty robust by just pre-processing the image to check for brightness levels and such.

In short: two positive S-curves on the red and green color channels, and one negative S-curve on the blue color channel. Adjust to style, enjoy. :)

Before:

BB Image

After:

BB Image
added on the 2013-05-19 21:53:06 by gloom gloom
I can't say I dislike it :)
added on the 2013-05-19 21:55:04 by superplek superplek
Cool stuff folks! This was what I was looking for. Tnx!

@Gloom: I suspect all that is needed are a couple of histograms for color/brightness/saturation to adapt to the content.
added on the 2013-05-20 14:14:50 by trc_wm trc_wm
You'll have better control using RGB (and value) curves, as in the second link gloom posted, because you can manually boost bues in the dark and greens in the bright or w/e.

Creating a couple of presets that work for you (and throwing them on a phone and naming it instaspam) shouldn't take too long...
trc_wm: yeah, it shouldn't be too hard to simply have a set of reference adjustments and multiply those by a factor derived from the histogram pass.
added on the 2013-05-21 09:31:26 by gloom gloom

login

Go to top