Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
25th September 2016, 20:55 | #185 | Link |
Registered User
Join Date: Oct 2007
Posts: 135
|
The best results shown in this thread were from when the script was being used on clips that had chroma, and the script was buggy and reusing that information instead of purely the random noise that you're getting.
|
25th September 2016, 21:29 | #186 | Link | |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Quote:
B) Random noise is going too far, if you don't like the results you have every right to say so. But it plain and simply isn't what you're describing.
__________________
ChromaJig |
|
25th September 2016, 21:53 | #187 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
do you use another GBlur?
__________________
See My Avisynth Stuff |
|
25th September 2016, 21:57 | #188 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
No, seriously though, this particular bit of dumb has gone on for far too long. Your script is based on not just one, but a entire series of fundamental misunderstandings of the underlying technology (the most egregious ones being how measuring chromatic information actually works and what the frequency domain actually is). This has been pointed out to you several times already but still you persist in using the same method. This entire thread is one big tribute to the remarkable ability of the human perception to see what it wants to see. You're literally adding random colors (there is no correlation whatsoever between the information you're basing the colors on and the actual color of the object, so you're picking the colors at random - it's not even an educated guess) and when the almost correct shade happens to fall out of the slot machine for some important foreground object you claim that this is a success, never mind that literally everything else in the background is utter garbage and you get a whole truckload of bizarre artifacts to go along with it (hint: stop these dumb frequency domain operations already). The entire thing is nonsense that usually results in coloring the entire scene either vaguely orange or vaguely green. Just drop it.
Last edited by TheFluff; 25th September 2016 at 21:59. |
25th September 2016, 22:01 | #189 | Link | |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Quote:
__________________
ChromaJig |
|
25th September 2016, 23:15 | #191 | Link |
Registered User
Join Date: Mar 2013
Posts: 12
|
Neural Networks for colorization
Really to do this correctly you would need to use a neural network. There just isn't enough information there. In reality most stars were wearing green makeup in the black and white TV shows so you are never going to want to show the real colors anyway.
Here are a couple articles that seems to be much better results, but still has work to go. http://tinyclouds.org/colorize/ https://techcrunch.com/2016/03/31/th...hite-pictures/ However I still wish you luck with this technique. Navarre66 |
25th September 2016, 23:26 | #192 | Link | |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Quote:
__________________
ChromaJig |
|
27th September 2016, 06:32 | #193 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
I am waiting
__________________
See My Avisynth Stuff |
27th September 2016, 18:46 | #195 | Link |
Registered User
Join Date: May 2016
Posts: 235
|
I think this works great on old movies. I do have to change the levels, contrast and brightness a bit on some scenes to make it work better. But the best result is when its outdoor, its the sky is blue and colors are great. Often the things that should be red becomes green, but I can live with that.
And about the off topic on colorization with learning, I would love to see this work somehow with avisynth, but I think its hard job and hard to do. But it looks awesome. Still I do like the ChromaJig and I do like it and its faster than other projects like: http://people.cs.uchicago.edu/~larsson/colorization/ http://colorize.ttic.edu/ http://demos.algorithmia.com/colorize-photos/ (free to do one picture online but otherwise it cost) https://github.com/satoshiiizuka/sig...6_colorization http://colorize.dev.kaisou.misosi.ru/ https://github.com/Eiji-Kb/macacon |
3rd October 2016, 18:31 | #196 | Link | ||
Registered User
Join Date: May 2016
Posts: 235
|
Floatingshed
I do try to change the levels to get the best "colors" when its not good colored., but mostly they are okey. I did change the levels but I think it could be mutch better if you do it. I just did this in a few secounds: Quote:
Quote:
Last edited by color; 3rd October 2016 at 20:12. |
||
26th October 2016, 04:02 | #197 | Link |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Code:
function cjb(clip v) { v=v.converttoyv12().greyscale() v1=v.spline36resize(240,240) y=v1.converttorgb() y.pointresize(8,8) invert() pointresize(16,16) chromajig() blur(1,1) invert() swapuv() temporalsoften(10,0,20) spline36resize(width(y),height(y)) a=last y.pointresize(32,32) chromajig() blur(1,1) invert() spline36resize(width(y),height(y)) b=last y.pointresize(128,128) chromajig() blur(1,1) invert() swapuv() spline36resize(width(y),height(y)) c=last subtract(a,b) subtract(last,c) invert() temporalsoften(10,0,25) mergechroma(y.converttoyv12().greyscale(),last,.75) coloryuv(autowhite=true) hqdn3d(0,6,0,4.5) spline36resize(width(v),height(v)) blur(1,1) mergechroma(v,last) return last } function cjc(clip y) { y=y.greyscale().converttoyv12() a=y.cjb().invert().tweak(hue=-90).invert().invert("U").swapuv() b=y.cjb() merge(a,b) return last } This is giving me some promising results, as always adjust as necessary.
__________________
ChromaJig Last edited by MWilson; 26th October 2016 at 04:33. |
6th November 2016, 11:22 | #198 | Link |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Code:
function ChromaJig3 (clip y, float weight) { y=y weight=Default (weight,1) y.gaussresize(240,240) blur(1,1) blur(1,1) blur(1,1) gaussresize(120,120) blur(1,1) blur(1,1) gaussresize(42,42) blur(1,1) blur(1,1) blur(1,1) blur(1,1) blur(1,1) chromajig() swapuv() invert() gaussresize(width(y),height(y)) subtract(last,y.chromajig()) a=last a.gaussresize(36,36).chromajig().gaussresize(width(y),height(y)) b=last c=subtract(a,b).swapuv() d=subtract(b,a) subtract(c,d) merge(a,last) merge(c,last) invert("V") mergechroma(y,last) mergechroma(last,d,.75) mergechroma(y,last,weight) } function fcjig(clip y) { y=y.converttoyv12() y gaussresize(80,60) converttoyv12() y1=last y1 chromajig3(1) converttorgb() invert("G") converttoyv12() invert("UV") swapuv() blur(1,1) blur(1,1) blur(1,1) merge(y1.chromajig(),last) bilinearresize(width(y),height(y)) subtract(last,y.greyscale()) tweak(hue=-90) merge(y.chromajig(),last) gaussresize(80,80) blur(1,1) blur(1,1) bilinearresize(width(y),height(y)) mergechroma(y,last) return last } function chroma(clip v,float "Weight") { Weight= Default (Weight,.75) v=v.greyscale().converttoyv12() y=v.linearresize(240,240).greyscale() y.fcjig() mt_makediff(vtoY(),last.reduceby2(),u=3,v=3) #chromajig3b() invert() coloryuv(autowhite=true) linearresize(width(v),height(v)) mergechroma(v,last,Weight) } I hope you folks will enjoy it as much as I am. You might want to use rgbadjust (Broken Record, I know). But it's fairly close from the get-go with everything I've tried. Here's two short clips that haven't been corrected or graded, one is from a color source converted to greyscale, and one that was originally colorized and then converted to greyscale. Usage: Code:
Chroma()
__________________
ChromaJig Last edited by MWilson; 6th November 2016 at 11:28. |
7th November 2016, 14:00 | #199 | Link |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
Code:
function fc1(clip v,float weight) {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 v=v.greyscale().converttoyv12() af=v.defreq(fy=-.29,fx=.29,sharp=0,dx=.50,dy=.50,fy2=-.88,fx2=.88,dx2=.50,dy2=.50) av=v.defreq(fy=-29,fx=29,sharp=0,dx=50,dy=50,fy2=-88,fx2=88,dx2=50,dy2=50) ax=v.defreq(fy2=-88,fx2=88,sharp=0,dx2=50,dy2=50,fy=-58,fx=58,dx=0,dy=50) a=mt_makediff(merge(af,av),v).converttorgb().converttoyv12() m1=ytouv(av,a).converttoyv12().sincresize(width(v),height(v)) y2=ytouv(m1.invert(),av).converttoyv12().sincresize(width(v),height(v)) merge(m1,y2,.35) converttoyv12(last) coloryuv(autowhite=true) tweak(sat=5,maxsat=59.5,interp=20) merge(v.invert().converttoyv12(),last.converttoyv12()) converttorgb() sb=showblue(last).invert() sr=showred(last).invert() sg=showgreen(last).invert() mergergb(sb,sr,sg) ConvertToYV12() sx=last.converttorgb().invert("G").converttoyv12() sy=last.converttoyv12() mergechroma(sy,sx,.50).converttoyv12() merge(last,v.invert().converttoyv12()).invert("UV").swapuv() tweak(sat=7.5,maxsat=59.5,interp=20) mergechroma(v.converttoyv12(),last,weight) coloryuv(autowhite=true) converttorgb24() return last } function fc2(clip v) {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 v=v.greyscale().converttoyv12() merge(v.invert().fc1(1).converttoyv12().coloryuv(cont_u=-128,cont_v=-128),v.fc1(1).converttoyv12()) converttoyv12() tweak(sat=5,interp=32) mergechroma(v,last.awarpsharp2(depth=48,chroma=4),.333) return last } function chromajig(clip y) {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 y=y.greyscale().converttoyv12() y1=y.gaussresize(72,48) y1 fc2() #hqdn3d(0,28,0,4.5) gaussresize(width(y),height(y)) subtract(y.fc2(),last) mergeluma(y) return last } function cjbx(clip v) {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 v=v.converttoyv12().greyscale() v1=v.spline36resize(240,240) y=v1.converttorgb() y.pointresize(8,8) invert() pointresize(16,16) chromajig() blur(1,1) invert() swapuv() #temporalsoften(10,0,20) spline36resize(width(y),height(y)) a=last y.pointresize(32,32) chromajig() blur(1,1) invert() spline36resize(width(y),height(y)) b=last y.pointresize(180,180) chromajig() blur(1,1) invert() swapuv() spline36resize(width(y),height(y)) c=last subtract(a,b) subtract(last,c) invert() spline36resize(width(y),height(y)) mergechroma(y.converttoyv12().greyscale(),last,.75) coloryuv(autowhite=true) spline36resize(width(v),height(v)) blur(1,1) mergechroma(v,last) return last } function colorfox(clip y) {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 y=y.greyscale().converttoyv12() y.cjbx() a=last c1=a.converttorgb() r=showred(c1) g=showgreen(c1) b=showblue(c1) c=merge(r,merge(g,b).invert()) m=merge(g,merge(r,b).invert()) ye=merge(b,merge(r,g).invert()) mergergb(ye,m,c) subtract(last,c1) converttoyv12() invert("UV") subtract(a,last) swapuv() } function colorjig(clip v, float "Weight") {# (c) MWilson, http://forum.doom9.org/showthread.php?t=173364 Weight= Default(Weight,1) v=v.greyscale().converttoyv12() b=v.greyscale().colorfox().tweak(hue=90).invert("UV").coloryuv(autowhite=true).invert("V").converttoyv12() merge(b,b.chromajig()) coloryuv(autowhite=true) mergechroma(v,last,Weight) } Usage: Code:
ColorJig() Edit: Commented out HQDN3D and temporalsoften calls, it was painfully slow. Using a denoiser after the fact is really just about as good.
__________________
ChromaJig Last edited by MWilson; 7th November 2016 at 15:35. Reason: Typo |
8th November 2016, 11:33 | #200 | Link |
Registered User
Join Date: Mar 2016
Location: Arkansas
Posts: 95
|
This one is very close as far as I can see. I apologize for the posts, I just had to get some stuff out there.
Code:
function cfcf2(clip y) { y=y.greyscale().converttoyv12().invert().turnleft() a=y.cjbx().utoy() b=y.invert().TurnLeft().cjbx().TurnRight().invert().utoy() ytouv(a,b,y) mergechroma(y,last,.45) converttoyv12() c=last subtract(c,y.cjbx()) invert("UV") medianblur(0,10,10) mergechroma(c,last,.33) turnright() invert("Y") return last }
__________________
ChromaJig Last edited by MWilson; 8th November 2016 at 11:51. |
Tags |
automated, color, colorization |
Thread Tools | Search this Thread |
Display Modes | |
|
|