View Full Version : Concept beyond field difference
Ceppo
18th March 2016, 12:33
What is the concept beyond a "field difference" filter used to get the best field match by filters like TIVTC's tfm and Decomb's telecide? How do i do it?
(Words not code please)
StainlessS
18th March 2016, 15:50
Perhaps of interest, not exactly what you want.
http://avisynth.nl/index.php/Interlace_detection
Edit: or Google "ivtc field matching".
Ceppo
18th March 2016, 19:13
Maybe a more correct way to put it... how do i calculate the field difference the way CFieldDiff does. The source code it's too hard for me to read it, i don't get it.
colours
18th March 2016, 22:38
The information you're looking for is in the documentation.
FieldDiff calculates a field difference metric using the 5 point metric that TFM uses and then outputs it via the debug or display options. It operates on full frames (it differences the two fields in each frame). FieldDiff has a version that can be used in conditional filtering called "CFieldDiff" that returns the value to the script.
Assume 5 neighboring pixels (a,b,c,d,e) positioned vertically.
d1 = c - b;
d2 = c - d;
if ((d1 > cthresh && d2 > cthresh) || (d1 < -cthresh && d2 < -cthresh))
{
if (abs(a+4*c+e-3*(b+d)) > cthresh*6) it's combed;
}
Ceppo
19th March 2016, 13:57
Thank you.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.