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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th April 2016, 19:25   #61  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,399
I did actually try a merge of the turned and un-turned versions, but didn't care for what I got in the center of the screen.

All of these attempts (by all of us) are interesting, but without understanding how the script makes its color assignments, we're just throwing random numbers at the problem: some script variations make the result in a particular scene look better; some make it look worse.

BTW, there were several posts a few days ago about the lack of blue, but when I look at the individual RGB channels, color actually looks pretty evenly distributed between each channel. Put another way, blue is not absent.
johnmeyer is offline   Reply With Quote
Old 6th April 2016, 19:42   #62  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
I dont think looking at RGB helps at all, the mod is to UV, viewing RGB you are looking at plenty of blue from Y,
having said that, there also seems plenty of U+V above and below 128.

EDIT: UV merged with original luma.

EDIT: Histogram(Mode="Levels") # view YUV
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th April 2016 at 19:44.
StainlessS is offline   Reply With Quote
Old 6th April 2016, 19:46   #63  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,399
Quote:
Originally Posted by MWilson View Post
johnmeyer, I completely disagree. It takes some heavy use of colormill to look good, but I have plenty of encodes to back me up.
I certainly don't want to start an argument, especially since what you've done is so amazing. However, the one article you linked to provided absolutely no support for the notion that color clues are buried in a grayscale representation of a color image.

From everything I know (which is more than a little, but less than a lot), there is no way it can be.

Here is an image I just created using pure blue for one line, then pure green, and pure red. I then desaturated the result. There is no way anyone can know which line was originally which color because the grayscale representation of each color is now identical. Nothing is latent or buried to allow recovery of the original colors.



Now it is quite clear that the script does assign colors based on some change in luma (that's what defreq does), and it does it in a very consistent basis. It is possible that it might be able sense something that happens when, as an example, red is adjacent to blue, and a few pixels at the boundary overlap (although I just tried this with some test clips, and it failed). However, until or unless someone can reverse engineer the script, or until you can provide a little more help in understanding the theory of operation, it will be impossible to make it work better.
johnmeyer is offline   Reply With Quote
Old 6th April 2016, 20:36   #64  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
Code:
function cf(clip v)
{
v=v.greyscale().converttoyv12()
v2=v.sincresize(256,256)

g=v2.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0,info=false)

b=v2.defreq(fy=0,fx=57,sharp=100,dx=50,dy=50,cutx=0,cuty=0,info=false)

r=v2.defreq(fy=0,fx=39,sharp=100,dx=50,dy=50,cutx=0,cuty=0)

g1=v2.defreq(fy=0,fx=49,sharp=100,dx=50,dy=50,cutx=0,cuty=0)

b1=v2.defreq(fy=0,fx=65,sharp=100,dx=50,dy=50,cutx=0,cuty=0,fx2=100,fy2=0)

r1=v2.defreq(fy=0,fx=47,sharp=100,dx=50,dy=50,cutx=0,cuty=0)

x1=merge(r1,r)
y1=merge(g,g1)
z1=merge(b1,b1)
x=mt_makediff(v2,x1).converttorgb()
y=mt_makediff(v2,y1).converttorgb()
z=mt_makediff(v2,z1).converttorgb()
mergergb(x,y,z)
converttoyv12()
ColorYUV(autogain=false,autowhite=true)
sincresize(width(v),height(v))
mergechroma(v,last,1)
return last
}
This may not help at all. It's the first script I wrote,and has some severe problems. Only changes made are the resize and the addition of mergechroma.

Edit: Would produce clips 256*256, so edited again.

Last edited by MWilson; 6th April 2016 at 20:43.
MWilson is offline   Reply With Quote
Old 6th April 2016, 21:06   #65  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
Note without mt_makediff(...,Chroma="-128") or similar, will have garbage in UV, only because earlier clips are grayscale might you escape
having crud in UV, and sometimes you will not escape. (convertToRGB will use garbage if there)

John, had a bit of a problem downloading your wiggly line drawing, I usually double click url I think in PhotoBucket and it copies as
[IMG] ... [/IMG]
Cannot download yours because it is inserted as http: etc, downloads web page instead.
I think I had to set some setting or other when I first joined to make [IMG] tag the default.

EDIT: I got it now, inserted link into one of my posts, and enclosed in [IMG] tags, saveas and then remove link.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th April 2016 at 21:11.
StainlessS is offline   Reply With Quote
Old 6th April 2016, 22:55   #66  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
Would you like to try this out, combined into single function, and attempted a little speed up (not too successful, about 0.5 FPS faster on Doctor Who clip,
DFreq take most time).

Rename as you will, perhaps could change Bool Full arg to some Float arg for Tweak and/or Merge Weight arg, and do shift or not based on that. (LINES IN BLUE, ie make more user configurable)

Code:
Function CmMod(clip c, Bool "Full") {    # (c) MWilson, http://forum.doom9.org/showthread.php?t=173364
    # Progressive Only : MUST be MOD 4 Width and Height, Otherwise will crop Mod 4
    c     = c.Crop(0,0,c.Width/4*4,c.Height/4*4).ConvertToYV12.GrayScale
    Full = Default(Full,True)
    BordW = c.width  /2                                 # Must be even, Avoid using Width and Height as variables (misleading)
    BordH = c.height /2
    smallc= c.sincresize(256,256)
    Padc  = smallc.addborders(BordW,BordH,BordW,BordH)
    # Crop Padding off again, less work below (crop is qwik)
    r  = Padc.defreq(fy=0,fx=39,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH) 
    r1 = Padc.defreq(fy=0,fx=47,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)
    g  = Padc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)
    g1 = Padc.defreq(fy=0,fx=51,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)    
    b  = Padc.defreq(fy=0,fx=65,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)           
    b1 = Padc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0,fx2=100,fy2=0).crop(BordW,BordH,-BordW,-BordH)        
    x1 = merge(r,r1)
    y1 = merge(g,g1)
    z1 = merge(b,b1)    
    y2 = overlay(smallc,y1,mode="multiply")
    z2 = overlay(smallc,z1,mode="multiply") 
    x=mt_makediff(smallc,x1,Chroma="-128").converttorgb()          # Full range RGB
    y=mt_makediff(smallc,y2,Chroma="-128").converttorgb()
    z=mt_makediff(smallc,z2,Chroma="-128").converttorgb()
    mergergb(x,y,z).ConvertToYV12                                  # RGB to YV12 TV Levels
    lanczos4resize(c.Width,c.Height)
    ColorYUV(autowhite=true)
    mergechroma(c,last,1.0)
    Last = (Full) ? Eval ("""
            u = utoy()
            v = vtoy()
            u3=repair(c.lanczosresize(c.width/2,c.height/2),u)
            v3=repair(c.lanczosresize(c.width/2,c.height/2),v)
            ytouv(u3,v3,c)
            tweak(sat=7.5,interp=32)
            mergechroma(c,last,0.33)
            coloryuv(autowhite=true)
            Return Last
    """) : Last
    return last
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th April 2016 at 23:45.
StainlessS is offline   Reply With Quote
Old 6th April 2016, 23:02   #67  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,399
I tried CmMod. Much faster. Seems like the same color/quality results as the original script. Was that the intent?
johnmeyer is offline   Reply With Quote
Old 6th April 2016, 23:07   #68  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
Oh, only about 0.5 FPS faster on my Core Duo.
No attempt to change functionality, only wanted to clarify and perhaps speed up a bit, also do away with one of the ConvertToYV12 and GrayScale calls.
I've still no idea why the padding is necessary.

EDIT: Although I only timed it for a few seconds.

EDIT: And yes, I tried comparison with previous script, bit for bit identical on downsized GoldFinger frame (org 2048xnnnn).

And MW's little test modded a bit
Code:
r=Blankclip(Color=$FF0000)
g=Blankclip(Color=$00FF00)
b=Blankclip(Color=$0000FF)
original=stackhorizontal(r,g,b).sincresize(256,256)
filter=original.greyscale().CmMod()
tw=Filter.Tweak(Sat=4.0)
stackvertical(original.converttoyv12(),filter,tw)
return last
We do get some blue, but rotten green
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th April 2016 at 00:04.
StainlessS is offline   Reply With Quote
Old 7th April 2016, 00:46   #69  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
Code:
Function Cm3Mod(clip c, Bool "Full") {    # (c) MWilson, http://forum.doom9.org/showthread.php?t=173364
    # Progressive Only : MUST be MOD 4 Width and Height, Otherwise will crop Mod 4
    c     = c.Crop(0,0,c.Width/4*4,c.Height/4*4).ConvertToYV12.GrayScale
    Full = Default(Full,True)
    BordW = c.width  /2                                 # Must be even, Avoid using Width and Height as variables (misleading)
    BordH = c.height /2
    smallc= c.sincresize(256,256)
    Padc  = smallc.addborders(BordW,BordH,BordW,BordH)
    # Crop Padding off again, less work below (crop is qwik)
    r  = Padc.defreq(fy=0,fx=39,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH) 
    r1 = Padc.defreq(fy=0,fx=47,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)
    g1 = Padc.defreq(fy=0,fx=51,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)          
    b1 = Padc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0,fx2=100,fy2=0).crop(BordW,BordH,-BordW,-BordH)        
    x1 = merge(r,r1)
    y1 = merge(smallc.invert(),g1)
    z1 = merge(smallc.invert(),b1)    
    y2 = overlay(smallc,y1,mode="multiply")
    z2 = overlay(smallc,z1,mode="multiply") 
    x=mt_makediff(smallc,x1,Chroma="-128").converttorgb()          # Full range RGB
    y=mt_makediff(smallc,y2,Chroma="-128").converttorgb()
    z=mt_makediff(smallc,z2,Chroma="-128").converttorgb()
    mergergb(x,y,z).ConvertToYV12                                  # RGB to YV12 TV Levels
    lanczos4resize(c.Width,c.Height)
    ColorYUV(autowhite=true)
    mergechroma(c,last,1.0)
    Last = (Full) ? Eval ("""
            u = utoy()
            v = vtoy()
            u3=repair(c.lanczosresize(c.width/2,c.height/2),u)
            v3=repair(c.lanczosresize(c.width/2,c.height/2),v)
            ytouv(u3,v3,c)
            tweak(sat=7.5,interp=32)
            mergechroma(c,last,0.33)
            coloryuv(autowhite=true)
            Return Last
    """) : Last
    return last
}
StainlessS, try the same test with the above mod.

Edit: B and G became pointless using above. Doh! Updated.

Last edited by MWilson; 7th April 2016 at 02:20. Reason: Clarification
MWilson is offline   Reply With Quote
Old 7th April 2016, 03:27   #70  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
MW, Sorry can you clarify. Are you saying previous post is misake or that the original CmMod is in error (I took it to be the former).

I've looked at comparison with original CmMod and in first scene after credits, white is better but guys forehead is somewhat overbright.

In doctor scenes, get rid of mid pinkish stuff but doctor is flaring a little more orange.

If previous post is the mistake, then delete and I'll delete this post.

Going to bed soon.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 7th April 2016, 04:01   #71  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
StainlessS, I actually meant the latter.

Top: Original Middle: cmmod Bottom: cm3mod
Bottom two used the tweak values of 4 for sat.
MWilson is offline   Reply With Quote
Old 7th April 2016, 04:23   #72  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
Yeh but it really screws up some other colors, see the Kodak type (DQ-Tools.bmp)
and basically most of the others (Jurassic park the stuff of nightmares) and eg football field beetroot midfield.

Beddy byes ZZZzzzzz.

EDIT: I mean with a tweak of sat=4.0.
And the eg bright blue in kodak thing is still black (other saturated similar probs).
That fix just fixes that little demo.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th April 2016 at 04:26.
StainlessS is offline   Reply With Quote
Old 7th April 2016, 04:39   #73  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,099
Quote:
Originally Posted by StainlessS View Post
Yeh but it really screws up some other colors, see the Kodak type (DQ-Tools.bmp)
and basically most of the others (Jurassic park the stuff of nightmares) and eg football field beetroot midfield.
That's because this script is just cargo cult programming. Restoring color information that doesn't exist is obviously impossible. What this script does is just make colors up. In some rare cases it gets some colors not entirely wrong, if you muck around with the parameters enough, which was apparently enough to make OP think this approach could be made to work in general. It can't.

Automatically restoring color information to a grayscale image or image sequence requires some kind of clues from its original color form (such as in that BBC case which used crosstalk for this purpose) or it's pure guesswork. The neural network approach is guesswork, but it's educated guesswork based on a very large dataset of grayscale/color image pairs. This, on the other hand, is astonishingly bad guesswork and a waste of time.

Last edited by TheFluff; 7th April 2016 at 04:45.
TheFluff is offline   Reply With Quote
Old 7th April 2016, 04:55   #74  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
Code:
Function CmxMod(clip c, Bool "Full") {    # (c) MWilson, http://forum.doom9.org/showthread.php?t=173364
    # Progressive Only : MUST be MOD 4 Width and Height, Otherwise will crop Mod 4
    c     = c.Crop(0,0,c.Width/4*4,c.Height/4*4).ConvertToYV12.GrayScale
    Full = Default(Full,True)
    BordW = c.width  /2                                 # Must be even, Avoid using Width and Height as variables (misleading)
    BordH = c.height /2
    smallc= c.sincresize(256,256)
    Padc  = smallc.addborders(BordW,BordH,BordW,BordH)
    # Crop Padding off again, less work below (crop is qwik)
    r  = Padc.defreq(fy=0,fx=39,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH) 
    r1 = Padc.defreq(fy=0,fx=47,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)
    g  = Padc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)
    g1 = Padc.defreq(fy=0,fx=51,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)    
    b  = Padc.defreq(fy=0,fx=65,sharp=100,dx=50,dy=50,cutx=0,cuty=0).crop(BordW,BordH,-BordW,-BordH)           
    b1 = Padc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0,fx2=100,fy2=0).crop(BordW,BordH,-BordW,-BordH)        
    x1 = merge(r,r1)
    y1 = merge(smallc.invert(),merge(g,g1))
    z1 = merge(smallc.invert(),merge(b,b1))    
    y2 = overlay(smallc,y1,mode="multiply")
    z2 = overlay(smallc,z1,mode="multiply") 
    x=mt_makediff(smallc,x1,Chroma="-128").converttorgb()          # Full range RGB
    y=mt_makediff(smallc,y2,Chroma="-128").converttorgb()
    z=mt_makediff(smallc,z2,Chroma="-128").converttorgb()
    mergergb(x,y,z).ConvertToYV12                                  # RGB to YV12 TV Levels
    lanczos4resize(c.Width,c.Height)
    ColorYUV(autowhite=true)
    mergechroma(c,last,1.0)
    Last = (Full) ? Eval ("""
            u = utoy()
            v = vtoy()
            u3=repair(c.lanczosresize(c.width/2,c.height/2),u)
            v3=repair(c.lanczosresize(c.width/2,c.height/2),v)
            ytouv(u3,v3,c)
            tweak(sat=7.5,interp=32)
            mergechroma(c,last,0.33)
            coloryuv(autowhite=true)
            Return Last
    """) : Last
    return last
}
Try this out.

Quote:
That's because this script is just cargo cult programming. Restoring color information that doesn't exist is obviously impossible. What this script does is just make colors up. In some rare cases it gets some colors not entirely wrong, if you muck around with the parameters enough, which was apparently enough to make OP think this approach could be made to work in general. It can't.

Automatically restoring color information to a grayscale image or image sequence requires some kind of clues from its original color form (such as in that BBC case which used crosstalk for this purpose) or it's pure guesswork. The neural network approach is guesswork, but it's educated guesswork based on a very large dataset of grayscale/color image pairs. This, on the other hand, is astonishingly bad guesswork and a waste of time.
Does this say anywhere (BTW, I mean anywhere) that it is color restoration. No! It is colorization, plain and simple.
Trying to make it better should not be met with this much hatred.
MWilson is offline   Reply With Quote
Old 7th April 2016, 05:35   #75  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,099
I don't hate you, I'm just telling it like it is, dude. Earlier in the thread you said this, though:
Quote:
Originally Posted by MWilson View Post
The idea is that we are viewing a record of the light captured at the time. Technicolor used prisms as well as color filters to separate the light into base components of color inside of the camera. My idea was that if this was possible, it might be possible to make a sort of "inverse" process from the recorded light in the greyscale.
Which kinda called for some harsh truths. If you're now aware that you're just adding random colors, then my work here is done and you can keep on keeping on. It's your video, if doing things to it makes it look better to you I'm certainly not going to stop you.
TheFluff is offline   Reply With Quote
Old 7th April 2016, 05:52   #76  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
Quote:
If you're now aware that you're just adding random colors, then my work here is done and you can keep on keeping on.
Not random.

Quote:
The idea is that we are viewing a record of the light captured at the time. Technicolor used prisms as well as color filters to separate the light into base components of color inside of the camera. My idea was that if this was possible, it might be possible to make a sort of "inverse" process from the recorded light in the greyscale.
Yep. It's using the light.
Just because I'm not astonishing at this doesn't mean it couldn't work.

And you are correct that I was trying to achieve color restoration.
MWilson is offline   Reply With Quote
Old 7th April 2016, 12:32   #77  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 792
I am rather surprised at the frequency domain filtered results are used for this. The borders of colored parts actually are reflected in the frequency domain. It does not discriminate between colors as the colors have no special rendering in the input. Ascribing colors to the segments of frequency ranges does not give any consistent colored image. Yes it will give some color. More easily the input image can be segmented based on the Y values and colors attached as per the intensity range. I do not see any logic in resorting to the frequency domain operations for this type of image manipulation.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 7th April 2016, 14:09   #78  |  Link
MWilson
Registered User
 
Join Date: Mar 2016
Location: Arkansas
Posts: 95
Code:
Function Cmx5Mod(clip c, Bool "Full") {    # (c) MWilson, http://forum.doom9.org/showthread.php?t=173364
    # Progressive Only : MUST be MOD 4 Width and Height, Otherwise will crop Mod 4
    c     = c.ConvertToYV12.GrayScale
    Full = Default(Full,True)
    smallc= c.sincresize(256,256)
    # Crop Padding off again, less work below (crop is qwik)
    r  = smallc.defreq(fy=0,fx=39,sharp=100,dx=50,dy=50,cutx=0,cuty=0)
    r1 = smallc.defreq(fy=0,fx=47,sharp=100,dx=50,dy=50,cutx=0,cuty=0)
    g  = smallc.defreq(fy=0,fx=37,sharp=100,dx=50,dy=50,cutx=0,cuty=0)
    g1 = smallc.defreq(fy=0,fx=85,sharp=100,dx=50,dy=50,cutx=0,cuty=0)   
    b  = smallc.defreq(fy=0,fx=65,sharp=100,dx=50,dy=50,cutx=0,cuty=0)   
    b1 = smallc.defreq(fy=0,fx=59,sharp=100,dx=50,dy=50,cutx=0,cuty=0,fx2=100,fy2=0)       
    x1 = merge(r,r1)
    y1 = merge(smallc.invert(),merge(g,g1))
    z1 = merge(smallc.invert(),merge(b,b1))    
    y2 = overlay(smallc,y1,mode="multiply")
    z2 = overlay(smallc,z1,mode="multiply") 
    x=mt_makediff(smallc,x1,Chroma="-128").converttorgb()          # Full range RGB
    y=mt_makediff(smallc,y2,Chroma="-128").converttorgb()
    z=mt_makediff(smallc,z2,Chroma="-128").converttorgb()
    mergergb(x,y,z).ConvertToYV12                                  # RGB to YV12 TV Levels
    lanczos4resize(c.Width,c.Height)
    ColorYUV(autowhite=true)
    mergechroma(c,last,1.0)
    Last = (Full) ? Eval ("""
            u = utoy()
            v = vtoy()
            u3=repair(c.lanczosresize(c.width/2,c.height/2),u)
            v3=repair(c.lanczosresize(c.width/2,c.height/2),v)
            ytouv(u3,v3,c)
            tweak(sat=7.5,interp=32)
            mergechroma(c,last,0.33)
            coloryuv(autowhite=true)
            Return Last
    """) : Last
    return last
}
The borders were just slowing down the filter.
This needs a bit of color correction after the fact, FWIW.

Last edited by MWilson; 8th April 2016 at 01:47.
MWilson is offline   Reply With Quote
Old 8th April 2016, 02:14   #79  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,870
What the previous members have said is completely correct, but that does not make this a complete waste of time and space,
it still does create some really magnificent results, maybe just by accident, but pretty damn good just the same.
Dont let TheFluff bother you, he treats everyone with equal disdain (not just you, a 'Fluff' is a fart [Brit], silent but very unpleasant,
such is his nature, just a shame that the silent part is not given equal weight).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th April 2016 at 02:34.
StainlessS is offline   Reply With Quote
Old 8th April 2016, 02:48   #80  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,399
Quote:
Originally Posted by StainlessS View Post
What the previous members have said is completely correct, but that does not make this a complete waste of time and space ... it still does create some really magnificent results, maybe just by accident, but pretty damn good just the same.
I still think adding a replacement table after this script has completed might make the results much more useful.

My idea is based on these observations:

1. The gamut of colors created is quite narrow. It really only seems to create three or four colors.

2. The colors seem to track objects remarkably well; green leaves don't suddenly turn purple.

So, if we could list the small range of colors used (some of StainlessS functions seem to be designed for this sort of thing) and then create a table that says, "replace these five colors with five different colors," then we might have something.

The one issue I see that keeps this script from being useful, even in its current state, is the odd tendency to put green at the edges and purple in the middle. If that could be smoothed out, then even with the faux colors, it could be useful, and if a replacement table could be created, it would almost be marketable.
johnmeyer is offline   Reply With Quote
Reply

Tags
automated, color, colorization

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.