Hi,
You have all seen it, the little white or black specs that pop up on the screen from time to time. Sometimes with old VHS or Betamax tapes this can happen a lot. Looking for a filter that will find these specs, remove them, and replace the surrounding fields. However don't want it to also remove good data.
In General, would love to just remove the white or black specs.
They normally only last like a frame, it can be a few pixels or many, it just depends.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
Last edited by Deter; 1st Aug 2010 at 14:13.
-
AviSynth RemoveDirt() but modified a bit to RemoveSpots():
function RemoveSpots(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return corrected
} -
...However don't want it to also remove good data....
It's tough to find an automatic algorithm that detects everything and misses nothing. Because how can it determine whether a spot is "wanted" or to be eliminated? You usually end up losing good stuff or missing unwanted spots.
Even if you do 1 pass on weak settings (so it misses lots of "spots" , attempting to reduce removing "good" stuff) , you still have to do some manual correction after
You usually have to do some form of manually correction to get it "perfect". (At least manual identification and some semi-manual correction) -
Afternoon everyone.
Removing speckles may not be as easy when dealing with generalized filters that work on the whole frame because the end result will be loss of detail on the whole image instead of just the speckled area, like poison said, and is not a good thing unless you compremise, which may be your only choice if it bothers that bad. But, to get rid of them would require a spailized algo that targets speckls specifically and dynamically.
Basic theory to resolve might go something like this. . .
1. Determine line or area it is a speckle (usually, speckles are white-est tip followed by a trailing gradient, from white-to-gray/black)
2. Then, remove or reduce them through some matrix of pixels, probably a 3xN to 5xN where N is depending on the length of the trailing white-gray/black of pixels, and since not all speckles are alike in length then that would have to be a dynamic calculation of some sort.
There can be more than 1 line of speckles, like 2 or even three lines, and in some cases the multi lines ones had varying gradients, too. So there are different degrees for determinging and processing them.
A 3xN would be easiest since there is only one line to replace, but where you have two or more, the worse, it gets more smudgier looking when finished. Think of a cut on your arm. After the stitches are removed and a few months have passed, there is usually a faint though noticable scar left. That's the smudge I was trying to describe when more than several lines have to be healed.
The other complex part has to do with the noise level in the video, such as analog or vhs then that gets harder to deal with because a lot of the noise can look like speckles. So, the cleaner the source (digital cable and satalite) the better the healing results. Hmm.. very briefly, laserdisc produces similar speckles (called laser rot) in the form of rainbow colored pixels and is usually 3 lines. Anyway.
3. Given 1 and 2, a couple of possibilities might be: a temporal averaging or median out, or complete replacement with L1/L3 pixels on the 3xN matrix. In theory, a median type method could work but i've seen in some of my experiements that it did not, instead, only some of it was removed or reduced. The algo here has to be smart.
4. Repeat 1-3, do this for every frame. Not every frame will have speckles nor same amount and length, etc.
I too would be interested in a sample even a few images would be worth a look at. I like to see the different kinds of speckles people see in their videos.
-vhelp 5406 -
VHS sample before and after RemoveDust() (requires RemoveGrain package):
function RemoveDust(clip input, int _mode)
{
repmode = 16
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
return RemoveGrain(rep, mode=_mode)
}
WhateverSource()
RemoveDust(last, 3) -
I usually do a Sharpen afterwards because of this:
Code:RemoveDirt() Sharpen(.6)
Even if you do 1 pass on weak settings (so it misses lots of "spots", attempting to reduce removing "good" stuff) , you still have to do some manual correction after
I often use
Code:BadFrames(959,960,965)
Often a film is more damaged near the beginning, and as that often also has the credits I can find the best frame in what should be a static credits screen and freezeframe it to cover the crappy ones:
Code:FreezeFrame(428,488,460)
-
Thanks for these replies.
Jagabo, yea the videos kind of look like the one u have above, that is what is needs to be removed.
Where do u get ? RemoveDust & RemoveGrain
Not really sure on how to use AviSynth with Virtual Dub. Never used the program and was wondering how do u set it up.
Once it is set up: Than you just paste in those scripts?
AlanHK,
Everyonce in a while get really bad frames. (THIS IS A REALLY BAD ONE) Normally have to remove these by hand, basically pull out the frames than re-mix the film to blend out with little to no notice in errors. However in a long film that has lots of these types of errors it does take ages to restore or fix.Last edited by Deter; 2nd Aug 2010 at 22:06.
-
Click on the links the forum puts on the names.
More info : http://avisynth.org/mediawiki/Main_Page
That's what "BadFrames" is for.
I use the AvsP editor, move through the file and when I see a bad frame, insert the cursor into the script window and press F11 to insert the current frame number.
Similar Threads
-
What Avisynth filter should I use for these white flashes?
By StickMonster in forum EditingReplies: 5Last Post: 21st Nov 2011, 23:23 -
Best way to Mask out Betamax video dropouts using hardware?
By Deter in forum RestorationReplies: 3Last Post: 10th Mar 2010, 12:02 -
PSP v3.30 Video Specs for ffmpegX
By persona1138 in forum ffmpegX general discussionReplies: 25Last Post: 27th Apr 2009, 12:45 -
How are these specs for video editing?
By vid83 in forum ComputerReplies: 16Last Post: 8th Feb 2009, 03:54 -
PC specs for video editing
By dainova in forum EditingReplies: 16Last Post: 5th Dec 2008, 12:30