This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Fragments disappear in hand-drawn animation
#1
Question 
Hello, when using the Despot and SpotLess filters (mainly) and LUTDeCrawl, whole pieces in the frame often disappear with rapid movement, as if they dissolve in the background color. Fragments of black lines that are not noise also disappear. When these filters are turned off, there is much more noise in the frame (real interference appears) here and there.
The question arises, how to remove noise in hand-drawn animation and not spoil the frames?
Maybe there are some recommendations for setting up or using other filters? Thanks!
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("D:/Progs/Hybrid/64bit/vsfilters/Support/libfftw3-3.dll")
Dllref = ctypes.windll.LoadLibrary("D:/Progs/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'D:/Progs/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/libdescale.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/Bilateral.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DebandFilter/Flash3kDeband/flash3kyuu_deband.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/TCanny.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/vcm.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/libmvtools_sf_em64t.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DenoiseFilter/TTempSmooth/TTempSmooth.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DenoiseFilter/VagueDenoiser/VagueDenoiser.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/libtemporalmedian.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DeCrawlFilter/DeDot/libdedot.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/DeCrawlFilter/DotKill/DotKill.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="D:/Progs/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# Import scripts
import edi_rpow2
import fvsfunc
import mvsfunc
import muvsfunc
import G41Fun
import SpotLess
import havsfunc
# source: 'F:\Downloads\Осторожно, обезьянки\01. Обезьянки. Гирлянда из малышей - 1983.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 720x544, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="F:/Downloads/Осторожно, обезьянки/01. Обезьянки. Гирлянда из малышей - 1983.avi",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# anti decrawling using LUTDeCrawl
clip = havsfunc.LUTDeCrawl(input=clip, maxdiff=60, scnchg=22)
clip = core.dotkill.DotKillS(clip=clip, usematch=True)
clip = core.dedot.Dedot(clip=clip)
clip = SpotLess.SpotLess(clip=clip, radT=1, ablksz=8, rec=True)
# denoising using VagueDenoiser
clip = core.vd.VagueDenoiser(clip=clip)
# denoising using DFTTest
clip = core.dfttest.DFTTest(clip=clip, ftype=1)
# denoising using Neo-FFT3D
clip = core.neo_fft3d.FFT3D(clip=clip, sigma=1.00, sigma2=2.00, sigma4=3.00, planes=[1,2])
# denoising using KNLMeansCL
# adjusting color space from YUV420P8 to RGB24 for vsKNLMeans
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")
clip = core.knlm.KNLMeansCL(clip=clip, d=3, a=3, channels="RGB", wmode=1, device_type="gpu", device_id=0)
# adjusting color space from RGB24 to YUV444P8 for vsMCT
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, matrix_s="470bg", range_s="limited")
# denoising using MCTemporalDenoise
clip = havsfunc.MCTemporalDenoise(i=clip, settings="medium", deblock=True, useQED=True, quant1=10, quant2=20, bt=1)
# denoising using mClean
clip = G41Fun.mClean(clip=clip, sharp=6, rn=15, deband=0)
# Denoising using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", InputType=1, TR2=0, SourceMatch=0, Lossless=0, EZDenoise=0.10, NoisePreset="Fast", opencl=True, device=0)
# debanding using GradFun3
clip = fvsfunc.GradFun3(src=clip, dyn=True, staticnoise=True)
# adjusting output color from: YUV444P16 to YUV420P8 for VCEEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
IMG:
http://lostpix.com/img/2022-02/18/gefmps...t5thqv.png

Maybe there are some recommendations, presets for this type of video? I would like to optimize this somehow, not to pick up settings every time, the interference is quite typical. I would like to test 3-5 presets and choose the appropriate one.
Reply


Messages In This Thread
Fragments disappear in hand-drawn animation - by Dmitry - 18.02.2022, 12:53

Forum Jump:


Users browsing this thread: 3 Guest(s)