Log in

View Full Version : Final Restoration


iMaiden
16th December 2009, 10:56
I have come a long way with my filter knowledge but am still quite a beginner.

I have started out with:

IMAGE #1: http://www.theindianmaiden.com-a.googlepages.com/og.jpg/og-full;init:.jpg

I was able to get it to:

IMAGE #2: http://www.theindianmaiden.com-a.googlepages.com/000000.jpg



I then found an online app that was able to take image #2 and get it to:

IMAGE #3: http://www.theindianmaiden.com-a.googlepages.com/000000a.jpg/000000a-full;init:.jpg


This app is for photos and does not have a batch mode nor a command line ability. It promises:

"the program brings out details on one single shot by intensifying color transition. It means that Enhancer strengthens the difference between adjacent pixels having different color gradations and therefore allows revealing not only details in the shadow but even details in the overexposed and mid tone areas."

Does anybody know of a filter chain that can achieve this type of result?

Dreadkillz
16th December 2009, 11:00
Seems like regular o color saturation. It's definitely not bringing out any details. Look at the wood grain being blurred to hell!

Inspector.Gadget
16th December 2009, 12:51
Yeah, the original image is the best looking of the three.

iMaiden
16th December 2009, 13:38
Sorry I the first two images are exactly the same. Here is IMAGE #2

http://www.theindianmaiden.com-a.googlepages.com/000000.jpg

The blurring is not done by this application but by the neat video denoise plugin. I know this screams simple saturation adjustment but I cannot get from Image #2 to image #3 with adjusting the saturation alone. Also, I know that image #3 does not look that good but there are aspects of it that I like and need to understand how get my images there hopefully via avisynth. There is something more going on other than saturation (I think) Anybody have an idea?

Didée
16th December 2009, 13:56
Have a look - do you see something useful in this:

http://img29.imageshack.us/img29/892/freqenh.th.png (http://img29.imageshack.us/i/freqenh.png/)

The script is quick & dirty, with some shortcuts regarding sharpness-backblending (one for all, instead of each separately) ... for what it's worth, here's the code:
ImageReader("sourcepic.jpg")
converttoyv12(matrix="PC.601")

b0 = fft3dfilter(sigma=2.49,sigma2=1.24,sigma3=1.00,sigma4=0.76,bw=32,bh=32,ow=16,oh=16,bt=1,plane=4)
b1 = b0.sbr()
b2 = b1.removegrain(11,-1)

s1 = b0.mt_adddiff(mt_makediff(b1,b1.removegrain(4,-1)),U=2,V=2)
s1a = s1.mt_adddiff(mt_makediff(b2,b2.medianblur(2,-300,-300)),U=2,V=2)
s2 = s1a.mt_adddiff(mt_makediff(s1,s1.sbr()).sbr(),U=2,V=2)
s3 = s1a.mt_adddiff(mt_makediff(s1,s1.removegrain(11,-1)).sbr(),U=2,V=2)
sD = mt_makediff(o,s3)

s3.mt_adddiff(sD.removegrain(11,-1).removegrain(11,-1),U=2,V=2)
tweak(sat=1.19).levels(0,1.08,255,0,255,false)
converttorgb(matrix="PC.601")
return(last)

################

function sbr(clip o) {
rg11=o.removegrain(11)
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}