Registered Member
|
For some background research on GoPro's Protune I want to better understand the tonal curves I use when working in Kdenlive with HD Hero footage shot in Protune. What currently leaves me dazzled is the correct interpretation of the parameters of the Bézier curve effect in Kdenlive/MLT. Yes, this is a special question, but I hope that some Kdenlive expert here can help me out with an explanation.
The Bézier curve I'm working with is bent like an S-shape. The interesting part of the effect's parameters is as follows:
The UI displays these values for the handles:
I have to admit that I'm dazzled by the coordinate space these points are placed in and thus how to correctly interpret it. In particular, the points p0 to p3 aren't symmetrical to the origin or at least the in the X axis. Instead, the curve runs from X=-1.414 to X=2. When I'm plotting a cubic Bézier curve (Wikipedia) using the points displayed in the effect settings then I'm getting an S-like shape ... but it isn't symmetrial in itself. Can someone here please enlighten me how to correctly interpret the coordinate system used by the Bézier curve effect and how to properly (re) calculate the correct Bézier curve as Kdenlive/MLT does. My intent is to cross-check the Protune effect curve I once found in an old posting with the curve data that GoPro's David Newman was very kind to publish on his blog. |
Moderator
|
Does the Frei0r doco help? http://www.mltframework.org/bin/view/ML ... i0r-curves
|
Registered Member
|
Thanks for the link ... but even after reading it multiple times I still have no clue how to correctly interpret these values.
|
Registered Member
|
I finally took a look at the source code of the frei0r.curves effect. In it I could see that when the value string value="-1,414;-1,73159e-16#0;0#0,387;0|0,619;1#1;1#2,41421;1" is decomposed into its elements p00 (handle1), p01 (point), p02 (handle2) and p10 (handle1), p11 (point), p12 (handle2). The mapping of this points to the Bézier curve points P0..P3 is as follows: P0=p01 P1=p02 P2=p10 P3=p11 (source code lines 629+). The curve calculation doesn't use p00 and p12. Who could have deduced this from the documentation?
Finally, I was stricken by the blindingly un-obvious: when the tonal curve consists of multiple segments then each intermediate point has a left and right handle, that is, handle1 and handle2. For the overall start and end of the tonal curve the first left handle and the final right handle are not further considered. When manipulating handles, Kdenlive ensures that both handles connect to the intermediate point with the same slope so there's no break in the curve. So I finally could reproduce my Kdenlive Protune effect curve and compare it with the formula I got from GoPro's David Newman. Case solved. |
Moderator
|
Hey Divo,
This sounds great. Sounds like you understand how to use this stuff with respect to a real life example with a GoPro . But it is all techno babble to me. Do you reckon you could write up an explaination of all this for our manual and put it on http://userbase.kde.org/Kdenlive/Manual ... ier_Curves. Because I would love to know what you know. |
Registered Member
|
At the moment I try to get a few more pieces into place. If that is done, yes, I can work on some Kdenlive doc.
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar