View Full Version : Repairing bad (partial) scanlines
Cary Knoop
23rd July 2020, 18:02
Sometime scanlines are partially damaged from analog tapes showing white (or black) single-line horizontal stripes.
is there a filter that can repair this (by interpolating neighboring scanlines)?
poisondeathray
23rd July 2020, 18:41
Did you mean something like drop outs ?
What is the distribution ? Static defect or random spatially and temporally ?
Cary Knoop
23rd July 2020, 19:21
Did you mean something like drop outs ?
What is the distribution ? Static defect or random spatially and temporally ?
Both random spatially and temporally. With the duration of one or two frames (interlaced).
poisondeathray
23rd July 2020, 19:35
Is there another defining pattern, such as odd fields affected only , or Y channel affect only ), those sorts of things ?
There are dozens of avisynth scrips that deal with this issue, it would be a good starting place (translating to vapoursynth. ) . There is a user here "yup" that posted many
Most of them work on the differences between frames (or fields) , the more random , the more easy to remove.
It's easy to remove these types of defects... The problem IMO is being more selective. It's more difficult to remove them only, without softening other parts
Cary Knoop
23rd July 2020, 19:46
Is there another defining pattern, such as odd fields affected only , or Y channel affect only ), those sorts of things ?
Interestingly, the black stripes happen only in the top field while the chroma is not affected (well it is indirectly due to the now incorrect subsampling).
It seems DePulse is worth looking into.
Thanks for helping me out!
poisondeathray
23rd July 2020, 19:52
Interestingly, the black stripes happen only in the top field while the chroma is not affected (well it is indirectly due to the now incorrect subsampling).
What about the white stripes ?
What is the average width of a defect ? , min/max ? Is there a pattern such as black ones always longer ?
What is the Y' range for these? e.g. is a black stripe really Y=0 . What about the rest of the image ? ie. Can you use a Y range to help isolate black vs white stripes vs. rest of picture - essentially a luma mask
Those are some of the types of things that can be used to fine tune a script to be more selective
Cary Knoop
23rd July 2020, 20:17
What about the white stripes ?
I was mistaken all the stripes are black.
They vary in length, I do not see a conceivable pattern.
Y is not 0 (or 16) and varies within a stripe, it usually has two darker dots within the stripe. Like it is a pulse.
What about the rest of the image ?
Well, it is nothing to write home about, it was recorded about 55 years ago, in the early days of color.
Can you use a Y range to help isolate black...
Ah, yes that would help.
zorr
23rd July 2020, 20:43
This could be solved with some custom Python code. I have written a lot different methods to solve various problems as I slowly process my old VHS videos. For example a while ago I solved a "missing scanline" -problem where a single scanline was dropped in a random location.
Usually the frame needs to be split into horizontal slices so that you can calculate statistics for each one and then decide what to do based on those statistics. In your case you'd have to calculate separate statistics for every scanline and then detect the dark scanlines based on the luma of neighbour scanlines (too much darker and the scanline needs to be replaced).
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.