View Full Version : Remove static pixels (ccd artefacts)
NoX1911
28th June 2009, 18:51
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?
Leak
28th June 2009, 19:24
Any ideas?
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)
J_Darnley
29th June 2009, 16:24
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.
*.mp4 guy
1st July 2009, 03:21
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.
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 + + / " )
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.