Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
28th June 2009, 17:51 | #1 | Link |
Registered User
Join Date: Aug 2003
Location: Germany
Posts: 174
|
Remove static pixels (ccd artefacts)
Hallo,
i'm searching for a solution to remove static white pixels that are broken on my ccd camera (movie mode). All videos get branded with this white pixels. What is the best solution to extrapolate them out with avisynth without using standard fullscreen spatial filters? Something like an automatic generated mask or something. I don't know... Any ideas? |
28th June 2009, 18:24 | #2 | Link |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
I guess shooting a pitch black scene should give you a good mask of where the defective pixels are. Maybe doing a single mt_expand on it and using it and the Overlay filter with some other filter that removes the dots should keep any damage on the working pixels to a minimum.
I guess the filter you're looking for does inpainting, but I can't name one for AviSynth off the top of my head - but it's pretty much what you'd also use to get rid of an opaque logo. np: Jackie Leven - Looking For Love (The Haunted Year: Winter - Munich Blues)
__________________
now playing: [artist] - [track] ([album]) |
29th June 2009, 15:24 | #3 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
If they are single pixels then Undot() or RemoveGrain(mode=1) should take care of them. If you want to protect the rest of the image then you could try Leak's suggestion.
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
1st July 2009, 02:21 | #4 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
Assuming they are single pixels, and they are close together in color this should work. Set thesh to as close to the defective pixel color as you can. I don't have any way to test if this actually works, but it should be good at preserving the rest of your video.
Code:
thresh=255 mt_luts( last, last, mode = "med", pixels = " 0 1 1 0 -1 0 0 -1 " , expr = " "+string(thresh)+" X - abs 1 + X * Y x y - abs 1 + * + "+string(thresh)+" X - abs 2 + x y - abs 1 + + / " ) |
|
|