Second parameter is float "varC" = variance chroma, which should be sigma_vU, sigma_vV in vsTCanny. Not sigmaU.
more something like:
(using 50 instead of 7)Code:v2= vsTCanny(v2, sigmaY=50.0, sigma_vU=50.0 + gblur, sigma_vV=50.0 + gblur, mode=-1)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 121 to 142 of 142
Thread
-
users currently on my ignore list: deadrats, Stears555
-
Well, "=50" - rises the highlights (unlike "=7"), but either way not resolve "border" issue.
Not sure what "variance chroma" mean exactly, but I guess it somewhat different from "Standard deviation of vertical gaussian blur" - which in vsTCanny is sigma_vY, sigma_vU, sigma_vV (and sigmaY, sigmaU, sigmaV - Standard deviation of horizontal gaussian blur.) -
It should be the deviation for U and V as I understood it. )
I assume you did simplify your script to stop after the ContrastMask calls to be sure this is not caused by something else, right?users currently on my ignore list: deadrats, Stears555 -
Well, if I will not tweak after ContrastMask - the picture will be wash out and I won't see any difference.
Right now it look like this:
old ContrastMask
Code:SeparateFields() MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) Weave() ConvertToYV12(matrix="rec601", interlaced=true) SeparateFields() even = SelectEven(last).ContrastMask(enhance=3.0) odd = SelectOdd(last).ContrastMask(enhance=3.0) Interleave(even, odd) Weave() ConvertBits(16) ColorYUV(gamma_y=-35, cont_y=46, gain_y=-10, off_y=0) Tweak(bright=3, coring=false) Tweak(cont=0.9) Tweak(Hue=-16) FFT3DFilter(bt=-1, sharpen=0.3, interlaced=true) ConvertBits(bits=8, dither=1)
Code:ConvertBits(16) SeparateFields() MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) Weave() SeparateFields() even = SelectEven(last).ContrastMask(enhance=3.0) odd = SelectOdd(last).ContrastMask(enhance=3.0) Interleave(even, odd) Weave() ColorYUV(gamma_y=-35, cont_y=46, gain_y=-10, off_y=0) Tweak(bright=3, coring=false) Tweak(cont=0.9) Tweak(Hue=-16) FFT3DFilter(bt=-1, sharpen=0.3, interlaced=true) ConvertBits(bits=8, dither=1) ConvertToYV12(matrix="rec601", interlaced=true)
-
With 'old ContrastMask' you used MergeChroma on 8bit, not you use it on 16bit.
As a general side node:
Your field handling seems odd / wrong to me, can you explain why you do it that way?- Convert to 16bit (okay)
Unsure why since afaik. none of the filters you use here does benefit from it, so it's just a slow-down) - You separate the fields. (okay)
- You do some chroma adjustments on the separated fields. (okay)
- You weave the fields and then separate them again => this seems wrong. Can you explain why you do that?
- You apply ContrastMask on the fields. (okay)
- You re-interlace the fields using Interleave(even, odd) and Weave(). (okay)
- You change the colors of the interlaced content. (okay)
- You apply FFT3DFilter it the interlaced content. (okay)
- You convert to 8bit, while dithering (okay)
- You convert to YV12 (okay)
The first step for me would be deinterlacing and the last step would be the re-interlacing.
Cu Selurusers currently on my ignore list: deadrats, Stears555 - Convert to 16bit (okay)
-
MergeChroma part handling some chroma ringing issue, I can't lose that step.
As a general side node:
Your field handling seems odd / wrong to me, can you explain why you do it that way?
[*]Convert to 16bit (okay)
Unsure why since afaik. none of the filters you use here does benefit from it, so it's just a slow-down)
[*]You weave the fields and then separate them again => this seems wrong. Can you explain why you do that?
Personally I would, deinterlace the content, apply the filters and at the end re-interlace the file, instead of working on the separated fields.
The first step for me would be deinterlacing and the last step would be the re-interlacing. -
MergeChroma part handling some chroma ringing issue, I can't lose that step.
It's for dithering while converting to 8bit, - to remove the banding.
There is mixed content of film and video (true 29.97 fps) [but not in this 03.avi clip]. So to avoid complication/problems (and not to lose video frames) I stay interlaced.users currently on my ignore list: deadrats, Stears555 -
So it will be something like this?
Code:AssumeTFF() Bob(0.0, 1.0) MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) ContrastMask(enhance=3.0) ColorYUV(gamma_y=-35, cont_y=46, gain_y=-10, off_y=0) #cont_y=46 Tweak(bright=3, coring=false) Tweak(cont=0.9) Tweak(Hue=-16) FFT3DFilter(bt=-1, sharpen=0.3) neo_f3kdb(range=31, keep_tv_range=true, grainY=0, grainC=0, output_depth=8) ConvertToYV12(matrix="rec601") AssumeTFF.SeparateFields().SelectEvery(4,0,3).Weave()
-
I would probably use QTGMC in fast mode, but yeah, something like that.
users currently on my ignore list: deadrats, Stears555 -
That definitely fix the "border" issue!
There is mixed content of film and video (true 29.97 fps) [but not in this 03.avi clip]. So to avoid complication/problems (and not to lose video frames) I stay interlaced.
I bumped sharpen from 0.3 to 0.5 - to get similar to the old script look.
* Although sharpen- 0.5 is a bit too much (bring more noise), - 0.4 is fine, I guess...
Code:AssumeTFF() Bob(0.0, 1.0) MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) ConvertBits(16) ContrastMask(enhance=3.0) ColorYUV(gamma_y=-35, cont_y=46, gain_y=-10, off_y=0) #cont_y=46 Tweak(bright=3, coring=false) Tweak(cont=0.9) Tweak(Hue=-16) FFT3DFilter(bt=-1, sharpen=0.5) AssumeTFF.SeparateFields().SelectEvery(4,0,3).Weave() ConvertBits(bits=8, dither=1) ConvertToYV12(matrix="rec601")
Last edited by cinephil; 11th Oct 2024 at 09:56.
-
That definitely fix the "border" issue!
With BOB the picture looks softer.
Like I said, I would not use the simple default Bob filter here. Also for light sharpening, try CAS.users currently on my ignore list: deadrats, Stears555 -
Turns out that BOB is not that bad. But sharpen with FFT3DFilter work better after reinterlacing.
------------------
Now getting back to the clip from my first post - after taken care of the chroma bleeding, I'm still trying to fix halo/ghost issue.
With FineDehalo it's look better, but I still have one bright halo/ghost.
[Attachment 82903 - Click to enlarge]
Is it possible to get rid of that line without degrade picture too much furter?
Code:AssumeTFF() Bob(0.0, 1.0) FineDehalo2(hconv = "-1 -1 1 1 40 1 1 -1 -1", vconv = "-1 -1 1 1 40 1 1 -1 -1", showmask=0) FineDehalo(rx=3.0, ry=2.0, thmi=30, thma=158, thlimi=50, thlima=100, darkstr=1.2, brightstr=1.5, showmask=0, contra=0.0, excl=true) ConvertBits(32) ConvertToPlanarRGB(matrix="Rec601") mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") ConvertToYUV444(matrix="Rec601") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) Tweak(bright=12) AssumeTFF.SeparateFields().SelectEvery(4,0,3).Weave() FFT3DFilter(bt=-1, sharpen=1.0, interlaced=true) ConvertBits(8) ConverttoYv12(matrix="Rec601", interlaced=true)
Last edited by cinephil; 18th Oct 2024 at 09:20.
-
FineDehalo doesn't work well with wide halos. Try something like dehalo_alpha(rx=7, ry=1, BrightStr=0.8, DarkStr=0.8). Use an edge mask to limit it to the strongest edges (thus protecting the rest of the image).
Even dehalo_alpha works better with smaller halos. So try downscaling horizontally, dehalo_alpha, upscale horizontally and an edges mask.Last edited by jagabo; 18th Oct 2024 at 17:44.
-
Thanks, jagabo!
Maybe I do something wrong with dehalo_alpha (or with edge mask), since don't got much improvement using it?
Code:Spline36Resize(width/2, height) emask=mt_edge(mode="prewitt", thy1=0, thy2=255, U=2, V=2) Overlay(last, dehalo_alpha(rx=2.0, ry=1, BrightStr=0.8, DarkStr=1.2), mask=emask) Spline36Resize(width*2,height)
Code:Spline36Resize(width/2, height) FineDehalo2(hconv = "-1 -1 1 1 40 1 1 -1 -1", vconv = "-1 -1 1 1 40 1 1 -1 -1", showmask=0) FineDehalo(rx=2.0, ry=1.0, thmi=60, thma=128, thlimi=50, thlima=100, darkstr=1.2, brightstr=0.8, showmask=0, contra=0.0, excl=true) Spline36Resize(width*2,height)
[Attachment 82954 - Click to enlarge] -
You used a different rx value than jagabo suggested.
users currently on my ignore list: deadrats, Stears555 -
Well, rx=7 was suggested for no downscale-upscale involving. And it not look good.
Code:emask=mt_edge(mode="prewitt", thy1=0, thy2=255, U=2, V=2) Overlay(last, dehalo_alpha(rx=7, ry=1, BrightStr=0.8, DarkStr=0.8), mask=emask)
[Attachment 82956 - Click to enlarge]
With downscale-upscale
Code:Spline36Resize(width/2, height) emask=mt_edge(mode="prewitt", thy1=0, thy2=255, U=2, V=2) Overlay(last, dehalo_alpha(rx=7, ry=1, BrightStr=0.8, DarkStr=0.8), mask=emask) Spline36Resize(width*2,height)
[Attachment 82959 - Click to enlarge]
I tried rx=3.5 too
Code:Spline36Resize(width/2, height) emask=mt_edge(mode="prewitt", thy1=0, thy2=255, U=2, V=2) Overlay(last, dehalo_alpha(rx=3.5, ry=1, BrightStr=0.8, DarkStr=0.8), mask=emask) Spline36Resize(width*2,height)
[Attachment 82960 - Click to enlarge] -
Have you tried applying YAHR two times?
Code:YAHR() YAHR()
users currently on my ignore list: deadrats, Stears555 -
Here's what I used:
Code:LWLibavVideoSource("FineDeHalo-before-after.png", cache=false, prefer_hw=2) ConvertToYV12(interlaced=true) Crop(0,0,width/2,height) src = last emask = mt_edge(thy1=8, thy2=8).mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().Blur(1.5).Blur(1.5) dh = dehalo_alpha(rx=7, ry=1, BrightStr=0.8, DarkStr=0.8) Overlay(src, dh, mask=emask)
[Attachment 82962 - Click to enlarge]
I didn't supply the script earlier because I didn't have the original video to work with. -
@jagabo: afaik. the video should be 05-5D[JP]-01.avi from the first post
DeHalo_alpha()
YAHR()
YAHR()
seesm fine too. since YAHR with larger depth and stronger blur is also possibleLast edited by Selur; 19th Oct 2024 at 14:55.
users currently on my ignore list: deadrats, Stears555 -
-
With that source, something like this:
Code:LWLibavVideoSource("05-5D[JP]-01.avi", cache=false, prefer_hw=2) TFM() TDecimate() vInverse() MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) SMDegrain(tr=2, thsad=200, PreFilter=6) Tweak(sat=2.0, bright=-15, cont=1.15) # dehalo with edge mask emask = Spline36Resize(400, height).mt_edge(thy1=10, thy2=10).mt_expand().mt_expand(mode="horizontal").Blur(1.0).GreyScale().nnedi3_rpow2(2, cshift="spline36Resize", fwidth=720, fheight=height) dh = Spline36Resize(400, height).dehalo_alpha(rx=3.5, ry=1, BrightStr=0.0, DarkStr=0.8).Spline36Resize(width, height).Sharpen(0.5, 0.0) Overlay(last, dh, mask=emask)
-
An even more selective edge mask would be:
Code:emask = Spline36Resize(400, height).mt_edge(mode="-1 2 -1 -1 2 -1 -1 2 -1 6").mt_expand().mt_expand(mode="horizontal").Blur(1.0).GreyScale().nnedi3_rpow2(2, cshift="spline36Resize", fwidth=720, fheight=height)
Similar Threads
-
AVISynth AddBorders chroma issue?
By killerteengohan in forum RestorationReplies: 8Last Post: 6th Apr 2024, 05:25 -
Strategies for movement shift
By Bencuri in forum EditingReplies: 4Last Post: 9th Aug 2023, 10:40 -
Chroma Shift creates artefacts
By phelissimo_ in forum RestorationReplies: 0Last Post: 19th Sep 2021, 06:49 -
How to properly fix this chroma abberation issue?
By elektro in forum Newbie / General discussionsReplies: 4Last Post: 10th Aug 2021, 14:39 -
Shift Filter for VirtualDub?
By anachronon in forum EditingReplies: 2Last Post: 17th Mar 2021, 17:14