Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)

resolve technical issues related to use of Neat Video
Post Reply
NeatOliver
Posts: 35
Joined: Mon Feb 12, 2007 5:41 am

Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)

Post by NeatOliver »

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()
NVTeam
Posts: 2673
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Re: Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)

Post by NVTeam »

Thank you for your comments and observations regarding the Dust and Scratches filter and its behavior in certain cases. We have in our plans to work on it further to improve those aspects. Your input is certainly helpful in this context. I will add it to the corresponding set of records on our side to take it all into considerations when working on the filter.

Thank you once again!

Vlad
NeatOliver
Posts: 35
Joined: Mon Feb 12, 2007 5:41 am

Re: Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)

Post by NeatOliver »

Fantastic! Thank you for your reply, Vlad. I appreciate it.
:wink:
ddessert
Posts: 3
Joined: Fri Oct 28, 2022 12:01 am

Re: Dust and Scratches: Big Issues With Fast Movements! (Scripts joined)

Post by ddessert »

I am experiencing similar problems with my 8mm 16fps source material and quick movements of hands/arms/clothing. Essentially there is no overlap of the appendages between frames and the dust and scratches filter thinks they are blotches to be removed. I've experimented with the settings from the above blog post as well.

I understand the difficultly in distinguishing objects with no overlap between frames from a random splotch. No amount of adjacent frames will be able to fix that without considerable motion tracking.

The obliteration of fast moving objects makes later steps to change the 16 fps to 24 fps or higher really problematic because the errant removal ruins the adjacent frames as well. So it needs to be fixed before even attempting to interpolate to a higher frame rate.

I think what I may have to do is:
a) Do a first pass with noise removal and no dust and scratch removal.
b) Break out the frames with fast motion. Exclude them from the following dust and scratch removal step.
c) A 2nd Neat Video on non-excluded slow(er) motion frames with dust and scratch removal.
d) Export the excluded fast motion frames as PNG or TIFF pictures and edit them a frame at a time to remove dust and scratches.
e) Put it all back together again.
f) Work on interpolating to a higher frame rate.

I guess what might make this process easier is if there was a way to manually mask out certain areas from dust and scratch removal on a frame by frame basis. Other than these quick-moving objects, the dust and scratches filter does a great job.
Post Reply