PDA

View Full Version : greyc inpainting


Terka
19th October 2009, 14:21
trying deinterlace (bob) using greyc inpaint function
this is a part of a code:

LoadPlugin("c:\Program Files\AviSynth\plugins\Greyc.dll")
clp=avisource("c:\hj\kamera\avisynth\psi\!Psi.avi").Crop(left,top,-right,-bottom)
sf=clp.SeparateFields()
lower=sf.SelectEvery(2, 0)
white=lower.ClpWhite()
lower_joined=Interleave(lower, white).weave()
lower_final=lower_joined.GreycInpaint(lower_joined,0, 0)

but avsp crashes

Didée
19th October 2009, 15:41
Can't tell you why it crashes ... what I can tell is that inpainting won't work satisfying'ly. From memory: Mug Funky tried it and found that inpainting won't improve anything .


I didn't try it, but it's easy to conclude why it won't improve: the present image data is insufficient. Remember that interlacing means "decimated" resolution. There are pixels missing, and the transition between present pixels is not continuous.

say an area in a full frame looks like this:

a a a
? ? ?
c c c

Pixels "a" and "c" is what we have, pixels "?" we want to construct. Spatial correlation is not sufficient for a reconstruction. (If it was, then "bob()" would be the perfect deinterlacer.)

There are two different scenarios for each pixel location:
a) another area has sufficient correlation to "a a a" and "b b b".
- In this case, that area is just a twin. It won't hold any new information for "? ? ?".

b) another area does hold information for "? ? ?".
- In this case, the "aaa" and "ccc" lines are not sufficiently correlated. If there is a match, the filter won't find it.


*****


Or, a bit shorter:

If the present data at the actual location

a a a
? ? ?
c c c

is not sufficient for a good interpolation, then why should

a' a' a'
?' ?' ?'
c' c' c'

be any better?

It doesn't matter if you approach a black hole from the left, or from the right, from above or from behind.

The hole is BLACK.

Terka
20th October 2009, 09:29
It doesn't matter if you approach a black hole from the left, or from the right, from above or from behind.

is clear.
also your longer explanation(s).
But my goal was a bit different.
You will agree that nnedi/bob/eedi feeded to TGMC has different speed/quality. i wanted to try the inpainting as bob for further TGMC processing (speed/quality testing).

Terka
20th October 2009, 09:35
IMHO MVTolls are great filter(s), but it has its limits. Until getting significantly better, the tgmc (as until now the best deinterlace concept) wont be better. Or maybee Tritical will add temporal part to nnedi2. :cool: