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?
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?
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.
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.
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
It is image enhancement, so yeah photo enhancement is correct naming.
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 ;)
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 ;)
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:
After:
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:
After:
I can't say I dislike it :)
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.
@Gloom: I suspect all that is needed are a couple of histograms for color/brightness/saturation to adapt to the content.
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...
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.