Author Topic: Script for deflickering and ramping ACR (.xmp) settings in Bridge  (Read 258941 times)

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #100 on: October 31, 2013, 06:17:41 PM »
Here is what I'm talking about.
Check 8340 (keyframe) and 8341 transition:

This is not deflickered sequence. ETTR decided to go from 5 sec in 8340 to 4 sec in 8341.

This is what happens with defliker after after 1, 5, 10 iterations. All the same result:

Script just continue to underexpose 8341, instead of adding exposure.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7406
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #101 on: October 31, 2013, 06:23:52 PM »
Strange. Should level the exposures more

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #102 on: October 31, 2013, 06:35:12 PM »
Yes. keyframe is 0 EV and next one is -1.2 EV.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7406
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #103 on: October 31, 2013, 06:44:59 PM »
I see you that you have a "star" on 8340, what,s the reason for that? Could this affect the outcome since it will become a keyframe handle

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #104 on: October 31, 2013, 06:51:44 PM »
It is keyframe, yes. I have 4 of them. First and Last images of the sequence and 2 in the middle to handle some WB and other adjustments transition. So 8341 should have been matched to 8340 keyframe. Instead it's going to opposite direction.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7406
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #105 on: October 31, 2013, 06:58:24 PM »
WHat happens if you deflicker everything without any starred keyframes and after that you start apply ramping and such? You could keep the first and last frame alone as your keypoints after deflicker and create a ramping additive exposure after deflickering right?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #106 on: October 31, 2013, 07:22:40 PM »
@itsskin
Can you help me debug this? here's what I need you to do:
Edit the script (any text editor will do) and uncomment all the lines that you see $.writeln commented out, i.e. if you see something like:
Code: [Select]
  //$.writeln(...);
take out the double slashes and change it to
Code: [Select]
  $.writeln(...);
(a simple find and replace should do the trick: find: //$.writeln  replace: $.writeln)

When the script runs, the ExtendScript Toolkit (you might have to install it if you don't already) should pop up. In the upper right corner of that window is a console, the script will print a bunch of debug information there, send me that information (just one iteration should be fine).

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #107 on: October 31, 2013, 08:21:26 PM »
In case PM didn't work (can't see any sent folder) I'll post it here too:


*** Iteration 1 ***
keyframe 108B8326.CR2: 201
keyframe 108B8340.CR2: 193
108B8327.CR2: 0.1546200767843ev (200.764705882353 - 197)
108B8328.CR2: 0.18067945827999ev (200.529411764706 - 195)
108B8329.CR2: 0.21202748185588ev (200.294117647059 - 192)
108B8330.CR2: 0.05213793341141ev (200.058823529412 - 202)
108B8331.CR2: 0.06745294370828ev (199.823529411765 - 200)
108B8332.CR2: -0.03123530744516ev (199.588235294118 - 206)
108B8333.CR2: 0.05064978091786ev (199.352941176471 - 200)
108B8334.CR2: 0.00853158892045ev (199.117647058824 - 202)
108B8335.CR2: 0.14161791784376ev (198.882352941176 - 192)
108B8336.CR2: 0.14326958944278ev (198.647058823529 - 191)
108B8337.CR2: 0.14499630687368ev (198.411764705882 - 190)
108B8338.CR2: 0.06662311624361ev (198.176470588235 - 195)
108B8339.CR2: 0.20509297546206ev (197.941176470588 - 185)
keyframe 108B8359.CR2: 108
108B8341.CR2: -0.21309330529631ev (155.5 - 168)
108B8342.CR2: -0.14492432038395ev (153 - 162)
108B8343.CR2: -0.1103221428348ev (150.5 - 158)
108B8344.CR2: -0.07466635013191ev (148 - 154)
108B8345.CR2: -0.13249812473191ev (145.5 - 155)
108B8346.CR2: -0.09706680509338ev (143 - 151)
108B8347.CR2: -0.06049204923087ev (140.5 - 147)
108B8348.CR2: -0.06276926647353ev (138 - 145)
108B8349.CR2: -0.00426795118219ev (135.5 - 140)
108B8350.CR2: 0.4452787722787ev (133 - 118)
108B8351.CR2: 0.50003196481029ev (130.5 - 114)
108B8352.CR2: 0.55728057295068ev (128 - 110)
108B8353.CR2: 0.61724619877515ev (125.5 - 106)
108B8354.CR2: 0.62414957439629ev (123 - 104)
108B8355.CR2: 0.63092798851693ev (120.5 - 102)
108B8356.CR2: 0.66657285856446ev (118 - 99)
108B8357.CR2: 0.6935730813898ev (115.5 - 96)
108B8358.CR2: 0.22152619213017ev (113 - 111)

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #108 on: October 31, 2013, 08:53:02 PM »
Thanks for your help, figured it out, try the script now.

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #109 on: November 01, 2013, 04:19:57 AM »
It worked! Really smooth transitions now. Except small glitch with 1st keyframe and second after it.
keyframe is +0.9 EV, second frame is +0.22 EV. But after this it's flawless. Thank you!


dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #110 on: November 01, 2013, 04:50:47 AM »
@JB,
I finally figured out the gradient corrections (GND, Radial filters) thingy in XMP API, so I added it to the script.
Caveat: All frames must already have the same number of gradient corrections applied before running (just 'synchronize' from the first frame in ACR dialog once you've created the gradient correction, then modify it in each keyframe).

Basically the problem is I can read/write the settings for gradients but I can't figure out how to create them if they don't exist, so they have to already be there in the XMP or the script will fail.

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #111 on: November 01, 2013, 04:03:52 PM »
@JB,
I finally figured out the gradient corrections (GND, Radial filters) thingy in XMP API, so I added it to the script.
Caveat: All frames must already have the same number of gradient corrections applied before running (just 'synchronize' from the first frame in ACR dialog once you've created the gradient correction, then modify it in each keyframe).
AWESOME! I will try it and report back here, I will laos have a look at the debugging stuff you posted before.



Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7406
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #112 on: November 01, 2013, 10:28:54 PM »
Flickerfree:)
Pretty demanding timelapse. Camera stopped in the middle causing a longer pause and ettr creates small steps of flicker. Weather conditions changes etc. The script took care of it all. Splendid.
Posted another version of this timelapse a while ago when using xmp sidecarfiles. Also worked but not as good as with the script.


Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #113 on: November 01, 2013, 11:02:23 PM »
Try it now as is, run the script from the ExtendScript Toolkit (not as a startup script), I've included some debug info, it should display the filename of the temp file in the upper right console log. Send me the output from that.
Sorry, I don't know what the "ExtendScript Toolkit" is and how to use it, could you give me a link with more detailed description, all I found is this (which is from 2006).

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7406
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #114 on: November 01, 2013, 11:24:22 PM »
Says here you get it bundled with adobe premiere pro cs6
http://forums.adobe.com/message/4823346
I have it in my application folder, maybe it could work as a standalone application?
What version of adobe are you uisng? Mac?

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #115 on: November 01, 2013, 11:34:56 PM »
In terms of the way this algorithm works, I can't make sense of what you mean by this. The algorithm simply matches where a particular percentile falls on the histogram from one frame to the next. I'm not sure what you mean by 'exposure graph'.
Okay, let me call it average brightness of each frame.
I f I am not mistaken if there is flicker between keyframes, the algorithm evens that out - no matter what, especially with multiple passses.
With my proposed method, it would just reduce the flicker leading to a more natural result. This is important when there are clouds blocking the sunlight and the exposure decreases significantly, for a natural result one would like to have a darker image in the shadow, but not 3EV darker as it was in reality.

Red graph = average image brightness (per frame)
Green graph = brutally averaged brightness target
Blue graph = gentle brightness target for pleasing and natural results©
Black bars = keyframes
The blue graph could be adjusted to anything in between from beeing like the red one (no changed brightness target) or the green one (smoothed out totally).
The deflickering strength then determines how hard the algorithm tries to match that target graph.

Do you understand now what I mean?


I could easily implement something like this (see the 'evCoefficient' at the top of the script, simply make it smaller), but...
...
If you're already making two different layers, you could just only partially blend the ground of fully deflickered footage (i.e. your layer mask makes the sky of the original 100% opaque, and the ground 50% or whatever). That should be basically the same I should think.
That would be possible, but in my case that means adding 50% more render time to that particular render and having to manage another iteration of the same sequence (3 instead of 2). I am also not sure if the blending would lead to the same natural looking results that you get with proper deflickering because that exposure slider of ACR acts really filmlike (in the sense of how chemical film behaves).

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #116 on: November 01, 2013, 11:36:13 PM »
Two feature requests:

Could you implement a check for settings that can't be ramped?
If there are conflicting settings, a dialogue pops up where the user can decide which one to keep. If that is not possible with the script then a reminder what to change would be good.
Examples:
Curves
Camera calibration
Lens profile
If you forget to sync those earlier this screws up your shot.


Would it be possible to create snapshots of the recent .xmp data? If I decide to alter the settings but want to keep the old ones aswell it would be nice to back them up with a right click.
If that is possible, what do you think of the idea to create a folder with the .xmp files and implement a dialogue where one can to load stored sets of .xmp files?
That would be handy to try and compare different developing styles quickly.

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #117 on: November 01, 2013, 11:47:46 PM »
Says here you get it bundled with adobe premiere pro cs6
http://forums.adobe.com/message/4823346
I have it in my application folder, maybe it could work as a standalone application?
What version of adobe are you uisng? Mac?
Thanks, I'll look into it, stuff like that is always giving me a headache...
I am on Win8.1 64bit , first CC version.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #118 on: November 02, 2013, 04:42:45 PM »
Flickerfree:)
Pretty demanding timelapse. Camera stopped in the middle causing a longer pause and ettr creates small steps of flicker. Weather conditions changes etc. The script took care of it all. Splendid.

:) Awesome!!

Keep 'em coming, I love to see what you guys are doing with this script!

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #119 on: November 02, 2013, 05:05:05 PM »
Yeah, robust statistics are really powerful. Now I guess I can just focus on a Python version to provide a fully open source workflow, and then post deflicker can be removed from ML and replaced by PC tools.

Great job!

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #120 on: November 02, 2013, 07:10:48 PM »
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #121 on: November 03, 2013, 09:37:31 PM »
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:
Nice!

Can you send me the debug info again? I'll see if I can fix it.

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #122 on: November 03, 2013, 11:36:02 PM »
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:
YOUTUBE
Lookin' good!

I am still trying to get the animated radial gradient to work, the linear one works as expected based on my obersavtions so far.
I am starting to suspect there is a bug in Bridge itself:
If I create a radial gradient (for this particular example I chose one with -3EV to make it REALLY visible) and press "sync everything" (including local adjustments) NOTHING happens.

Can you replicate that issue in some way David?

itsskin

  • Freshman
  • **
  • Posts: 67
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #123 on: November 04, 2013, 06:16:12 AM »
Nice!

Can you send me the debug info again? I'll see if I can fix it.

I replicated the issue and now it looks different. Second frame is OVERexposed. But still seems because of first keyframe is ignored. Keyframe is +1 EV, second is +6.

Initial sequence with 4 keyframes:


Ramp All:


Settings:


Result:


Iterations log: https://dl.dropboxusercontent.com/u/17452116/10%20Iterations.rtf

Joachim Buambeki

  • Freshman
  • **
  • Posts: 78
Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
« Reply #124 on: November 04, 2013, 12:12:58 PM »
I can't help with any debugging info, because I still don't get how to create it but I am having the same issue as itsskin.
My keyframes are in the range of +-0.3EV and the deflickered frames are SEVERELY underexposed in one pass and overexposed in the next one.
See here.

I also noticed that Bridge is seems very unstable/unresponsive since the iteration of your script with gradient ramping.