Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)
Posted: Fri May 13, 2022 6:25 pm
Hello!
The main problem I have with the Dust and Scratches filter is that most of the time, fast movements erase some parts of the human body, like the hands where fingers are missing or blurry with sometimes strange artifacts in the video rending. Also, sometimes the nose, if a person moves the head too fast, is also missing strangely enough. I tried to adjust: the mode, the threshold, and the amount and eventually changed the amount of Repeated Frames filter just in case, but there is nothing I can do to avoid this problem.
Sometimes I need two passes with this filter, which takes a lot of time and space on my hard drive or SSD. It even happens that some scratches are not taken into account, especially scratches with a VHS video capture (white and black horizontal lines, thin or thick) which is really surprising and will never be detected by Dust and Scratches, despite all effort and my attempts to adjust Dust and Scratches and other options.
I even watched the video on your blog about Dust and Scratches and read the entire post, here:
https://blog.neatvideo.com/post/batling ... flicker-in
So one day, I decided to use a script for Avisynth, based on another script for VHS restoration, DeVCR (made by Ricardo Garcia) for Avisynth called DetectVCRLines instead of using Neat Video. And this time, those awful horizontal white and dark lines were almost gone for good, and NO missing fingers, nose, or whatever! This script was surprisingly good! Not perfect, but 70% better than Neat Video and never touch the rest of the video, to be honest, as Neat Video does, unfortunately. But this is just my opinion. For this specific task, of course.
So, my question is: Can you, please, improve your Dust and Scratches filter, (based on these two scripts, maybe?) to avoid those problems (or bugs?) with hands, and fingers, to remove more efficiently VHS horizontal white and dark lines in for the next update of Neat Video? Because today, these scripts combined are more effective than Neat Video, and it would be great!
Thank you for having read my comment AND my request!
—
Here is the DeVCR script (x86 version): http://avisynth.nl/index.php/DeVCR
Here is the DetectVCRLines modified script with DeVCR (x86 version) below:
Instructions: Put the DeVCR script into your plugins+ directory.
by default: "C:\Program Files (x86)\AviSynth+\plugins+" - Then, copy & paste this script below in new document with AvsPmod (see below).
—
Here is the AvsPmod official website: https://avspmod.github.io
Don't forget to change the first line to test with a .avi file.
Use the command DirectShowSource instead of AVISource, if you are using a MPEG or MPG video, for example.
—
# Video source
AVISource("c:\video.avi")
# Function Declaration
function DetectVCRLines(clip c,int threshold)
{
spacial_data = GeneralConvolution(ConvertToRGB(c),0,"0 -1 0 0 2 0 0 -1 0")
bar_data = ConvertToRGB(BilinearResize(spacial_data,16,c.height))
st_data = Overlay(bar_data,Trim(bar_data,1,0),mode = "subtract")
st_data2 = Greyscale(Levels(st_data,threshold,10.0,threshold+1,0,255,coring = false))
st_data3 = Greyscale(Levels(st_data2,127,10.0,128,0,255,coring = false))
st_data4 = Overlay(st_data3,st_data3,y = -1, mode = "add")
return PointResize(st_data4,c.width,c.height)
}
#Function Declaration
function deVCR(clip c,int threshold)
{
mybars = DetectVCRLines(c,threshold)
return Overlay(c,Trim(c,1,0), mask = mybars,greymask = true)
}
#Removing horizontal stripes
deVCR(last, 0)
SpotLess()
SpotLess()
SpotLess()
SpotLess()
#Black spots removal
SpotLess()
The main problem I have with the Dust and Scratches filter is that most of the time, fast movements erase some parts of the human body, like the hands where fingers are missing or blurry with sometimes strange artifacts in the video rending. Also, sometimes the nose, if a person moves the head too fast, is also missing strangely enough. I tried to adjust: the mode, the threshold, and the amount and eventually changed the amount of Repeated Frames filter just in case, but there is nothing I can do to avoid this problem.
Sometimes I need two passes with this filter, which takes a lot of time and space on my hard drive or SSD. It even happens that some scratches are not taken into account, especially scratches with a VHS video capture (white and black horizontal lines, thin or thick) which is really surprising and will never be detected by Dust and Scratches, despite all effort and my attempts to adjust Dust and Scratches and other options.
I even watched the video on your blog about Dust and Scratches and read the entire post, here:
https://blog.neatvideo.com/post/batling ... flicker-in
So one day, I decided to use a script for Avisynth, based on another script for VHS restoration, DeVCR (made by Ricardo Garcia) for Avisynth called DetectVCRLines instead of using Neat Video. And this time, those awful horizontal white and dark lines were almost gone for good, and NO missing fingers, nose, or whatever! This script was surprisingly good! Not perfect, but 70% better than Neat Video and never touch the rest of the video, to be honest, as Neat Video does, unfortunately. But this is just my opinion. For this specific task, of course.
So, my question is: Can you, please, improve your Dust and Scratches filter, (based on these two scripts, maybe?) to avoid those problems (or bugs?) with hands, and fingers, to remove more efficiently VHS horizontal white and dark lines in for the next update of Neat Video? Because today, these scripts combined are more effective than Neat Video, and it would be great!
Thank you for having read my comment AND my request!
—
Here is the DeVCR script (x86 version): http://avisynth.nl/index.php/DeVCR
Here is the DetectVCRLines modified script with DeVCR (x86 version) below:
Instructions: Put the DeVCR script into your plugins+ directory.
by default: "C:\Program Files (x86)\AviSynth+\plugins+" - Then, copy & paste this script below in new document with AvsPmod (see below).
—
Here is the AvsPmod official website: https://avspmod.github.io
Don't forget to change the first line to test with a .avi file.
Use the command DirectShowSource instead of AVISource, if you are using a MPEG or MPG video, for example.
—
# Video source
AVISource("c:\video.avi")
# Function Declaration
function DetectVCRLines(clip c,int threshold)
{
spacial_data = GeneralConvolution(ConvertToRGB(c),0,"0 -1 0 0 2 0 0 -1 0")
bar_data = ConvertToRGB(BilinearResize(spacial_data,16,c.height))
st_data = Overlay(bar_data,Trim(bar_data,1,0),mode = "subtract")
st_data2 = Greyscale(Levels(st_data,threshold,10.0,threshold+1,0,255,coring = false))
st_data3 = Greyscale(Levels(st_data2,127,10.0,128,0,255,coring = false))
st_data4 = Overlay(st_data3,st_data3,y = -1, mode = "add")
return PointResize(st_data4,c.width,c.height)
}
#Function Declaration
function deVCR(clip c,int threshold)
{
mybars = DetectVCRLines(c,threshold)
return Overlay(c,Trim(c,1,0), mask = mybars,greymask = true)
}
#Removing horizontal stripes
deVCR(last, 0)
SpotLess()
SpotLess()
SpotLess()
SpotLess()
#Black spots removal
SpotLess()