Page 1 of 1

automated clip comparison

PostPosted: Tue Dec 24, 2019 5:59 am
by George Deierling
Is this possible:
Compare two clips in difference mode.
When the peak brightness or average brightness exceeds a threshold, drop a marker or put out a text message, or drop a keyframe as a way to mark the trouble spot.
Basically I need to compare a processed file with the unprocessed version and check for glitches or bad frames. It would be great if the computer could do it for me.
Any suggestions?

Thank you.

Re: automated clip comparison

PostPosted: Tue Dec 24, 2019 2:58 pm
by Bryan Ray
Here's a very quick first look:

Code: Select all
{
   Tools = ordered() {
      Merge1 = Merge {
         Inputs = {
            ApplyMode = Input { Value = FuID { "Difference" }, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 660.5, 125.5 } },
      },
      Background3 = Background {
         Inputs = {
            GlobalOut = Input { Value = 100, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "Probe1",
               Source = "Result",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 659.5, 171.5 } },
      },
      Probe1 = Probe {
         CtrlWZoom = false,
         Inputs = {
            ImageToProbe = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Channel = Input { Value = 4, },
            ProbeRectangle = Input { Value = 1, },
            Width = Input { Value = 1, },
            Height = Input { Value = 1, },
         },
      }
   }
}


Plug the image sequences you want to compare into the Merge, then run the Bake Animation script on the Background node. Get the script from the Eyeon Legacy script collection in Reactor. Make sure you have the latest version—the previous one (which I think may come with Fusion, but I don't recall for sure) throws an error when used on a tool with a Modifier.

You'll get a keyframe on every frame, but there will be a spike in the curve where any difference between the images is detected. You could then use the Reduce Points feature in the Spline Editor to cull it down to a minimum of five frames around each spike.

With a couple hours I could create a macro and script that would be a little more automated and hopefully be able to target a bad frame more precisely.

Re: automated clip comparison

PostPosted: Tue Dec 24, 2019 8:11 pm
by George Deierling
Thanks very much Brian, I check it out.

Merry Christmas