View Full Version : Raising saturation without the colors messing up?


killerteengohan
30th August 2014, 13:06
I have a source that the colors look very dull or washed out. I was going to increase it slightly by using Tweak(sat=1.05)

I noticed when using this though that on all the blacks or dark colors you can see green spots and or rainbow like colors showing up and moving around on the source. It seems to add a green tint to blacks. When I turn the tweak back off, the colors go back to normal.

This does this even if I raise the saturation even the smallest bit like tweak(sat=1.01) and its very visible and annoying.

Using a derainbow filter doesn't help at all. Is there an alternative method for increasing saturation using avisynth (http://www.videohelp.com/tools/Avisynth)?



Heres screenshots of the issue I'm talking about. This scene isnt as washed out or dull as the other scenes I want to use tweak for but it shows what I'm talking about if you look at the black or darker colors like their shirt.


NO SATURATION INCREASE

http://i.imgur.com/fAfOVYD.png


WITH TWEAK SAT=1.04

http://i.imgur.com/PVy4nkG.png


NO SATURATION INCREASE

http://i.imgur.com/dMnmLQh.png


WITH TWEAK SAT=1.04

http://i.imgur.com/AOlLw5P.png

raffriff42
30th August 2014, 16:06
I have a script that allows you to Tweak (or anything else) the midrange tones only, leaving highlights and lowlights alone:## Last = YUV

## DEMO - FRAME STEP ONLY
return Interleave(
\ Subtitle("org"),
\ Tweak(sat=1.5) /* exaggerated for testing */
\ .Subtitle("Tweak"),
\ MergeLMH(C_mid=Tweak(sat=1.7)) /* same apparent sat (+/-) */
\ .Subtitle("MergeLMH"),
\ Subtitle("org")
\ ).Loop(3).Histogram("color2")

#######################################
### merge Lo, Mid, Hi clips based on clip "C" luma
### requires MaskTools v2
##
## @ xover_x - aproximate 50% luma blend between ranges
## default 102 (40%), 191 (75%)
## @ showmasks - if true, show original + 3 masks in quad split
##
function MergeLMH(clip C, clip "C_lo", clip "C_mid", clip "C_hi",
\ float "xover_lomid", float "xover_midhi",
\ bool "showmasks")
{
xlo = Min(Max( 0, Default(xover_lomid, 102)), 127) * 3.0 / 256
xhi = Min(Max(128, Default(xover_midhi, 191)), 255) * 3.0 / 256
showmasks = Default(showmasks, false)

## (mt_lutxyz too slow; use mt_lut x3)

mask_lo = C.mt_lut(
\ yexpr="x -0.01 * "+String(xlo)+" + 256 * ",
\ u=-128, v=-128)

mask_hi = C.mt_lut(
\ yexpr="1 x -0.01 * "+String(xhi)+" + - 256 * ",
\ u=-128, v=-128)

mask_mid = mt_lutxy(mask_lo, mask_hi,
\ "x y + -1 * 256 + ",
\ u=-128, v=-128)

R = C
R = (!IsClip(C_lo)) ? R : R.Overlay(C_lo, mask=mask_lo)
R = (!IsClip(C_mid)) ? R : R.Overlay(C_mid, mask=mask_mid)
R = (!IsClip(C_hi)) ? R : R.Overlay(C_hi, mask=mask_hi)

return (showmasks==false) ? R
\ : StackVertical(
\ StackHorizontal(C, mask_lo),
\ StackHorizontal(mask_mid, mask_hi)
\ ).BilinearResize(C.Width, C.height)
\ .Subtitle("Low", align=9)
\ .Subtitle("\nMid", align=4, lsp=0)
\ .Subtitle("\nHigh", align=6, lsp=0)
}

Mystery Keeper
31st August 2014, 04:14
If you look carefully - you'll see that color issue is present in the source. You just amplify it by rising saturation. Don't know how to fight it, but I would try tempo-spatial denoising (3D DFTTest with motion compensation) and then ordered dithering before applying saturation tweak.

cretindesalpes
31st August 2014, 08:43
Using Tweak(param…, dither=true) may help to fix this kind of artefact.

bxyhxyh
31st August 2014, 15:44
If neuron2 was here, he would've ask about how did you obtain your source.

feisty2
31st August 2014, 16:07
If neuron2 was here, he would've ask about how did you obtain your source.

he's gone, you don't gotta be mean

asarian
31st August 2014, 18:28
he's gone, you don't gotta be mean

LOL. Neuron2 is gone?! My, I really *have* been off this world for a spell! :)

asarian
31st August 2014, 18:31
If you look carefully - you'll see that color issue is present in the source. You just amplify it by rising saturation. Don't know how to fight it, but I would try tempo-spatial denoising (3D DFTTest with motion compensation) and then ordered dithering before applying saturation tweak.

Agree with this, actually. You can clearly see it's already present in the source. I dunno, maybe a wee hue-shift on the blacks would work?

feisty2
1st September 2014, 01:59
LOL. Neuron2 is gone?! My, I really *have* been off this world for a spell! :)

neuron2 just left the forum lately all the sudden, nobody knows why he left, the Guest user used to be neuron2

killerteengohan
1st September 2014, 12:41
I havent seen neuron2 in a while

killerteengohan
2nd September 2014, 04:50
okay well the solution to my problem was use a filter called smoothtweak(saturation=1.04) or to use ColorYUV(cont_u=10, cont_v=10)

it did exactly what I wanted and the greens I was seeing didn't change or become more visible. I went with the smoothtweak.