]> git.sesse.net Git - kdenlive/blobdiff - effects/frei0r_lightgraffiti.xml
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / effects / frei0r_lightgraffiti.xml
index a11ad97b58258224d61328790aa6033d23dcb87e..acf331e21a15dc90bc2fc6184c3a299371b18ee0 100644 (file)
 <!DOCTYPE kpartgui>
-<effect tag="frei0r.lightgraffiti" id="frei0r.lightgraffiti">
+<group>
+    <effect tag="frei0r.lightgraffiti" id="frei0r.lightgraffiti">
         <name>Light Graffiti</name>
         <description>Light Graffiti effect.
         <full><![CDATA[This effect allows to do Light Painting (i.e. painting with light sources on a photo by keeping the shutter
         opened for a while), but for video.]]></full></description>
         <author>Simon A. Eugster (Granjow)</author>
-        <parameter type="constant" name="longAlpha" default="0" min="0" max="256" factor="256">
-                <name>α</name>
-                <comment><![CDATA[Determines how the effect tries to adapt to background changes. <br/>
-                If the background does not change, then try to use 0 (requires the first frame to represent background only, without your light sources).]]></comment>
-        </parameter>
-        <parameter type="constant" name="lightOpacity" default="60" min="0" max="100" factor="100">
-            <name>Opacity</name>
-            <comment><![CDATA[Basic opacity for a light source.<br/>
-            For slowly moving light source try to use a lower opacity value to obtain smoother results.]]></comment>
-       </parameter>
-        <parameter type="constant" name="opacitySmoothing" default="30" min="1" max="100" factor="10">
-            <name>Smoothing</name>
-            <comment><![CDATA[Smoothing of the light map according to the light source. <br/>
-            A value of 1 results in absolutely smooth transitions from background to light source, but might result in too weak lights. The maximum value gives sharper edges and stronger lights.]]></comment>
-        </parameter>
-        <parameter type="constant" name="backgroundWeight" default="0" min="0" max="100" factor="100">
+        <parameter type="simplekeyframe" name="thresholdBrightness" default="450" min="0" max="765" factor="1">
+            <name>Brightness Threshold</name>
+            <comment><![CDATA[How bright (<code>R+G+B</code>) does a pixel need to be in order to be recognized as a light source?<br/>
+            Increasing this threshold requires brighter light sources (i.e. more white or less color, respectively) but prevents some «false alarms» where semi-bright parts, e.g. hands where colors can change quite a lot compared to the background, are incorrectly recognized as light source.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="thresholdDifference" default="80" min="0" max="255" factor="1">
+            <name>Difference Threshold</name>
+            <comment><![CDATA[How much does the strongest color channel of a pixel have to change, compared to the background image (<code>max(dR, dG, dB)</code>), in order to be recognized as light source? <br/>
+            Increasing this threshold makes it harder for light sources to be accepted on bright backgrounds, but decreases the danger of noise or generally bright spots counting as light source.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="thresholdDiffSum" default="0" min="0" max="765" factor="1">
+            <name>Difference Sum Threshold</name>
+            <comment><![CDATA[How much does the sum of all color channels <em>relative to the background image</em> (<code>dR + dG + dB</code>) have to change until a pixel is recognized as a light source?<br/>
+            Raising this value might, in some cases, avoid that some light objects lit by the light source are added to the light mask.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="sensitivity" default="100" min="0" max="500" factor="100">
+            <name>Sensitivity</name>
+            <comment><![CDATA[Light sensitivity.<br/>
+            For slowly moving light source try to use a lower sensitivity to obtain a better exposure.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="lowerOverexposure" default="0" min="0" max="10" factor="1">
+            <name>Lower Overexposure</name>
+            <comment><![CDATA[Lowers overexposure.<br/>
+            The light mask does not get white immediately when the light source is moving slowly or staying steady.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="dim" default="0" min="0" max="255" factor="255">
+            <name>Dimming</name>
+            <comment>Dims the light mask. Lights will leave a fainting trail if it is set to a value > 0.</comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="backgroundWeight" default="0" min="0" max="100" factor="100">
             <name>Background Weight</name>
-            <comment>Strength of the (calculated) background image. Setting it to 100 paints the light mask directly over the background, without any person in the image if the video starts with a «clean» background image.</comment>
+            <comment>Strength of the (calculated) background image. Setting it to 100 paints the light mask directly over the background, without the painting person in the image if the video starts with a «clean» background image. (See the α parameter.)</comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="longAlpha" default="0" min="0" max="256" factor="256">
+            <name>α</name>
+            <comment><![CDATA[Determines how the effect tries to adapt to background changes. <br/>
+            The Light Graffiti effect remembers the first frame of the clip it is applied to, so the clip should <em>always</em> start with the painter outside of the video. If the background constantly changes, e.g. on a street, try to set α > 0 to calculate an average background image.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="saturation" default="150" min="0" max="400" factor="100">
+            <name>Saturation</name>
+            <comment>Increases the saturation of lights.</comment>
+        </parameter>
+        <parameter type="bool" name="statsBrightness" default="0">
+            <name>Show brightness statistics</name>
+            <comment><![CDATA[The stats switches allow easy and accurate adjustment of the threshold parameters.<br/>
+            Example: To adjust the brightness threshold, check this box and adjust the threshold until the whole light source is highlighted. Repeat the same with the other parameters. Only parts that are highlighted in <em>all</em> thresholds will count as light source.]]></comment>
+        </parameter>
+        <parameter type="bool" name="statsDifference" default="0">
+            <name>Show background difference statistics</name>
+        </parameter>
+        <parameter type="bool" name="statsDiffSum" default="0">
+            <name>Show background difference sum statistics</name>
+        </parameter>
+        <parameter type="bool" name="transparentBackground" default="0">
+            <name>Transparent Background</name>
+            <comment>Makes the background transparent, allowing to apply a composite effect and paint the light mask over a completely different video.</comment>
         </parameter>
-        <parameter type="constant" name="thresholdBrightness" default="450" min="0" max="765" factor="1">
+        <parameter type="bool" name="nonlinearDim" default="0">
+            <name>Nonlinear dimming</name>
+            <comment>If normal dimming does not look natural enough, try this one.</comment>
+        </parameter>
+        <parameter type="bool" name="reset" default="0">
+            <name>Reset</name>
+            <comment>Resets the light mask and the background image. This is necessary e.g. if you apply this effect to a clip in the timeline and then move the timeline cursor from outside of the clip to the middle of it. The effect receives this frame in the middle as first frame and uses it as background image. For proper threshold adjusting move the timeline cursor to the beginning of the clip, check the Reset box and uncheck it again.</comment>
+        </parameter>
+    </effect>
+
+    <effect LC_NUMERIC="C" tag="frei0r.lightgraffiti" id="frei0r.lightgraffiti" version="0.2">
+        <name>Light Graffiti</name>
+        <description>Light Graffiti effect.
+        <full><![CDATA[This effect allows to do Light Painting (i.e. painting with light sources on a photo by keeping the shutter
+        opened for a while), but for video.]]></full></description>
+        <author>Simon A. Eugster (Granjow)</author>
+        <parameter type="simplekeyframe" name="thresholdBrightness" default="450" min="0" max="765" factor="765">
             <name>Brightness Threshold</name>
-            <comment><![CDATA[Determines how bright (<code>R+G+B</code>) a light source needs to be in order to be recognized as light source.<br/>
+            <comment><![CDATA[How bright (<code>R+G+B</code>) does a pixel need to be in order to be recognized as a light source?<br/>
             Increasing this threshold requires brighter light sources (i.e. more white or less color, respectively) but prevents some «false alarms» where semi-bright parts, e.g. hands where colors can change quite a lot compared to the background, are incorrectly recognized as light source.]]></comment>
         </parameter>
-        <parameter type="constant" name="thresholdDifference" default="80" min="0" max="255" factor="1">
+        <parameter type="simplekeyframe" name="thresholdDifference" default="80" min="0" max="255" factor="255">
             <name>Difference Threshold</name>
-            <comment><![CDATA[Similar to the brightness threshold, but for the brightness difference (<code>max(dR, dG, dB)</code>) <em>relative to the calculated background.</em><br/>
-            Increasing this threshold makes it harder for light sources to be accepted on bright backgrounds, but decreases the danger of noise counting as light source.]]></comment>
+            <comment><![CDATA[How much does the strongest color channel of a pixel have to change, compared to the background image (<code>max(dR, dG, dB)</code>), in order to be recognized as light source? <br/>
+            Increasing this threshold makes it harder for light sources to be accepted on bright backgrounds, but decreases the danger of noise or generally bright spots counting as light source.]]></comment>
         </parameter>
-        <parameter type="constant" name="thresholdDiffSum" default="0" min="0" max="765" factor="1">
+        <parameter type="simplekeyframe" name="thresholdDiffSum" default="0" min="0" max="765" factor="765">
             <name>Difference Sum Threshold</name>
-            <comment><![CDATA[Threshold for the differences summed up (<code>dR + dG + dB</code>).<br/>
+            <comment><![CDATA[How much does the sum of all color channels <em>relative to the background image</em> (<code>dR + dG + dB</code>) have to change until a pixel is recognized as a light source?<br/>
             Raising this value might, in some cases, avoid that some light objects lit by the light source are added to the light mask.]]></comment>
         </parameter>
-        <parameter type="constant" name="dim" default="0" min="0" max="255" factor="255">
+        <parameter type="simplekeyframe" name="sensitivity" default="100" min="0" max="500" factor="500">
+            <name>Sensitivity</name>
+            <comment><![CDATA[Light sensitivity.<br/>
+            For slowly moving light source try to use a lower sensitivity to obtain a better exposure.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="lowerOverexposure" default="0" min="0" max="10" factor="10">
+            <name>Lower Overexposure</name>
+            <comment><![CDATA[Lowers overexposure.<br/>
+            The light mask does not get white immediately when the light source is moving slowly or staying steady.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="dim" default="0" min="0" max="255" factor="255">
             <name>Dimming</name>
             <comment>Dims the light mask. Lights will leave a fainting trail if it is set to a value > 0.</comment>
         </parameter>
-</effect>
+        <parameter type="simplekeyframe" name="backgroundWeight" default="0" min="0" max="100" factor="100">
+            <name>Background Weight</name>
+            <comment>Strength of the (calculated) background image. Setting it to 100 paints the light mask directly over the background, without the painting person in the image if the video starts with a «clean» background image. (See the α parameter.)</comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="longAlpha" default="0" min="0" max="256" factor="256">
+            <name>α</name>
+            <comment><![CDATA[Determines how the effect tries to adapt to background changes. <br/>
+            The Light Graffiti effect remembers the first frame of the clip it is applied to, so the clip should <em>always</em> start with the painter outside of the video. If the background constantly changes, e.g. on a street, try to set α > 0 to calculate an average background image.]]></comment>
+        </parameter>
+        <parameter type="simplekeyframe" name="saturation" default="150" min="0" max="400" factor="400">
+            <name>Saturation</name>
+            <comment>Increases the saturation of lights.</comment>
+        </parameter>
+        <parameter type="bool" name="statsBrightness" default="0">
+            <name>Show brightness statistics</name>
+            <comment><![CDATA[The stats switches allow easy and accurate adjustment of the threshold parameters.<br/>
+            Example: To adjust the brightness threshold, check this box and adjust the threshold until the whole light source is highlighted. Repeat the same with the other parameters. Only parts that are highlighted in <em>all</em> thresholds will count as light source.]]></comment>
+        </parameter>
+        <parameter type="bool" name="statsDifference" default="0">
+            <name>Show background difference statistics</name>
+        </parameter>
+        <parameter type="bool" name="statsDiffSum" default="0">
+            <name>Show background difference sum statistics</name>
+        </parameter>
+        <parameter type="bool" name="transparentBackground" default="0">
+            <name>Transparent Background</name>
+            <comment>Makes the background transparent, allowing to apply a composite effect and paint the light mask over a completely different video.</comment>
+        </parameter>
+        <parameter type="bool" name="nonlinearDim" default="0">
+            <name>Nonlinear dimming</name>
+            <comment>If normal dimming does not look natural enough, try this one.</comment>
+        </parameter>
+        <parameter type="bool" name="reset" default="0">
+            <name>Reset</name>
+            <comment>Resets the light mask and the background image. This is necessary e.g. if you apply this effect to a clip in the timeline and then move the timeline cursor from outside of the clip to the middle of it. The effect receives this frame in the middle as first frame and uses it as background image. For proper threshold adjusting move the timeline cursor to the beginning of the clip, check the Reset box and uncheck it again.</comment>
+        </parameter>
+    </effect>
+</group>