Is there any library implementing the color effect like lomography?
I am now looking for a lib that can change the color effect. Though the popu开发者_Go百科lar image processing lib such as opencv can do sufficient color transformation, the details of the transformation matrix of a certain style remain unavailable to me.
So is there any book or lib that introduces how to apply a certain effect such as ones in lomography?
From the comments it seems you would like to replicate "step by step" the Photoshop tutorial pointed by @0x69.
With Mathematica 8, I did the following:
Step1. I copied the picture from the tutorial
Step2. Define the point-based function that will change the red channel and apply it
redfun[x_, s_] := 1/(1 + E^(-((x - 0.5)/s)));
Plot[{t, redfun[t, .1]}, {t, 0, 1}, AspectRatio -> 1]
img2 = ImageApply[{redfun[#[[1]], .1], #[[2]], #[[3]]} &, img]
Step3. I don't know the algorithm used for color balancing by Photoshop, so let's skip those and create directly a vignette. The color balancing would change things quite a bit.
Step4. Vignette creation:
vignette = ColorNegate@ImageAdjust[
DistanceTransform[Image[1 - BoxMatrix[1, Reverse@ImageDimensions@img2]]],
{0, 0, 2}, {Automatic, Automatic}]
You can just multiply the two images, or use fancier overlaying modes (see the documentation of ImageCompose
):
ImageMultiply[img2, vignette]
It would be quick and easy to tweak things around and change the final result.
精彩评论