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. |
![]() |
#1 | Link |
Movie buff & shine
Join Date: Jan 2004
Location: Logan, the only hole above ground.
Posts: 257
|
A new attempt at good deblending
Hi,
Of course no one would remember that a long time ago, I attempted to create a deblend function for correcting films that underwent telecine and then had the fields blurred together. I wasn't very successful then, but just tonight I'm trying a slightly different approach but I am stuck on how to use FrameEvaluate... the help guide might as well be inverted chinese algebra, because it makes me go crosseyed (rest of the guide is good, though). Here is the test script to set up the detection process. Code:
Function DeBlend (clip Last) { a = Subtract (Last, Trim (1, 0).Levels (0, 1, 255, 128, 255, False)).Levels (0, 1, 127, 0, 255, False).Trim (1, 0) b = Subtract (Levels (0, 1, 255, 0, 127, False), Trim (1, 0)).Levels (0, 1, 127, 255, 0, False).DuplicateFrame (0) StackVertical (Last, a, b) } That's worked fine for me so far. Where FrameEvaluate () comes in and messes me up is how to have the function work out whether to deblend or not. Here is the script I more or less came up with (I know the syntax is WAAAY out)... Code:
Function DeBlend (clip Last) { # Perform Deblends for the comparison test a = Subtract (Last, Trim (1, 0).Levels (0, 1, 255, 128, 255, False)).Levels (0, 1, 127, 0, 255, False).Trim (1, 0) b = Subtract (Levels (0, 1, 255, 0, 127, False), Trim (1, 0)).Levels (0, 1, 127, 255, 0, False).DuplicateFrame (0) # Get difference between two tests Global Test = Subtract (a, b) # Get difference for each pair of frames in a 5 frame set ab = FrameEvaluate ("YPlaneMinMaxDifference (Test.SelectEvery (5, 0))") bc = FrameEvaluate ("YPlaneMinMaxDifference (Test.SelectEvery (5, 1))") cd = FrameEvaluate ("YPlaneMinMaxDifference (Test.SelectEvery (5, 2))") de = FrameEvaluate ("YPlaneMinMaxDifference (Test.SelectEvery (5, 3))") ea = FrameEvaluate ("YPlaneMinMaxDifference (Test.SelectEvery (5, 4))") # Find the frame which had the lowest difference in the two tests Dupe = (ab > bc) ? "bc" : "ab" Dupe = (Eval (Dupe) > cd) ? "cd" : Dupe Dupe = (Eval (Dupe) > de) ? "de" : Dupe Dupe = (Eval (Dupe) > ea) ? "ea" : Dupe # Use SelectEvery to delete Dupe... not yet implemented } Now, for those who made it this far.... ![]() Thanks. ![]()
__________________
I'm a boxer who can Bob () & Weave (). I like to Overlay () punches and Blur () his vision to ShowFiveVersions (). My KO punch will always Pulldown ().TimeStretch () and all he will hear is Tone (). |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|