VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello everyone,

    I am trying to enhance some Anime one of them is the 1980s DB.

    My script looks like this at the moment.
    (Video only no audio processing)

    Code:
    LWLibavVideoSource("DB.mkv")
    
    ConvertToRGB(matrix="rec709")
    RGBAdjust(rb=-15, gb=0, bb=0)
    RGBAdjust(r=250.0/220.0, g=250.0/220.0, b=250.0/220.0)
    ConvertToYV12(matrix="rec709")
    
    TemporalDegrain(GPU=True,sigma=6)
    MergeChroma(aWarpSharp2(depth=10), aWarpSharp2(depth=20))
    Spline36Resize(1440, 1080)
    Sharpen(0.3)
    edgelevel(strength=15, threshold=8, bc=0, wc=0)
    f3kdb(range=31,dither_algo=3)
    The colours I get at the moment are like the below ones
    The left side is the original version, only upscale via Lanczos to compare, with the above filter

    Image
    [Attachment 68886 - Click to enlarge]


    Image
    [Attachment 68887 - Click to enlarge]


    Image
    [Attachment 68888 - Click to enlarge]


    The below picture is the filtered version

    Image
    [Attachment 68889 - Click to enlarge]


    I think I was able to get rid of the "grey haze" and some of the "red tint", but I think there is space for improvement.
    I am a bit lost with the RGBAdjust as I did this by trial and error. Is there any way the Windows Color Picker can come in handy or do I need another tool for that?
    Also, I am not sure if I used RGBAdjust the correct way.

    At the moment I am doing a one-step scale to 1440x1080, is it better to do another step first to 960x720 as the source is 640x480?
    I've seen some strange movements, like the picture is unstable or jittering, not sure how to name it.

    I've attached a 5-minute sample of my original (no audio).

    I am grateful for your help.
    Image Attached Files
    Last edited by dietboby; 27th Jan 2023 at 01:00. Reason: UPDATE VIDEO
    Quote Quote  
  2. Looks like PC vs TV scale,...

    So before playing around with RGBAdjust, you might want to make sure you get your luminance range (tv: 16-235 vs pc: 0-255) correct.

    Cu Selur
    Last edited by Selur; 27th Jan 2023 at 08:24.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Here's how I approach levels and white balance with RGBAdjust(). First I blur the image (to reduce noise) and find something large (to avoid color contamination from nearby areas) that should be black. The character's hair is the darkest thing in the shot and in anime is likely to be full black. I used an RGB picker to read the R,G,B values 9, 6, 9. So adjust the black level you need to subtract those values:
    Code:
    RGBAdjust(rb=-9, gb=-6, bb=-9)
    After that I look at the white levels. The character's eyes probably should be full white. They're not very big but the best we can get here. The RGB values (after the above subtraction) are 217, 203, 194. Since those probably should have all been 255 your can adjust them with:
    Code:
    RGBAdjust(r=255.0/217.0, g=255.0/203.0, b=255.0/194.0)
    If you think 255 is too bright, you can use lower numbers in the numerators.

    When your done with adjustments you remove the blur.

    Code:
    ImageSource("DB.png")
    crop(0,0,width/2, height) # just the left half of the frame
    #Blur(1.4).Blur(1.4).Blur(1.4) # used when analyzing RGB values
    RGBAdjust(rb=-9, gb=-6, bb=-9) # adjust black level
    RGBAdjust(r=255.0/217.0, g=255.0/203.0, b=255.0/194.0) # adjust white level and balance
    Image
    [Attachment 68909 - Click to enlarge]
    Quote Quote  
  4. Originally Posted by Selur View Post
    Looks like PC vs TV scale,...

    So before playing around with RGBAdjust, you might want to make sure you get your luminance range (tv: 16-235 vs pc: 0-255) correct.

    Cu Selur
    Hello Selur,

    Thank you for the information.
    I will need to check on this as I'm fairly new to AviSynth. So far I only used click-and-go, lazy software. But I wanted something better so I thought I have a look at AviSynth.



    Originally Posted by jagabo View Post
    Here's how I approach levels and white balance with RGBAdjust(). First I blur the image (to reduce noise) and find something large (to avoid color contamination from nearby areas) that should be black. The character's hair is the darkest thing in the shot and in anime is likely to be full black. I used an RGB picker to read the R,G,B values 9, 6, 9. So adjust the black level you need to subtract those values:
    Code:
    RGBAdjust(rb=-9, gb=-6, bb=-9)
    After that I look at the white levels. The character's eyes probably should be full white. They're not very big but the best we can get here. The RGB values (after the above subtraction) are 217, 203, 194. Since those probably should have all been 255 your can adjust them with:
    Code:
    RGBAdjust(r=255.0/217.0, g=255.0/203.0, b=255.0/194.0)
    If you think 255 is too bright, you can use lower numbers in the numerators.

    When your done with adjustments you remove the blur.

    Code:
    ImageSource("DB.png")
    crop(0,0,width/2, height) # just the left half of the frame
    #Blur(1.4).Blur(1.4).Blur(1.4) # used when analyzing RGB values
    RGBAdjust(rb=-9, gb=-6, bb=-9) # adjust black level
    RGBAdjust(r=255.0/217.0, g=255.0/203.0, b=255.0/194.0) # adjust white level and balance
    Image
    [Attachment 68909 - Click to enlarge]
    Hello jagabo,

    Thank you for the very detailed process, that helps a lot and makes it a lot clearer.
    I will use this to learn how to better utilize AviSynth RGBAdjust.


    Reading both of your feedbacks, I guess I still have a lot to learn and I very much appreciate your help and feedback.
    Thank you jagabo and selur.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!