church_archive_script/Programs/doc/_sources/functions/video/mergediff.rst.txt

16 lines
598 B
Text
Raw Normal View History

2023-11-29 16:12:35 +00:00
MergeDiff
=========
.. function:: MergeDiff(vnode clipa, vnode clipb[, int[] planes])
:module: std
Merges back the difference in *clipb* to *clipa* and clamps the result.
By default all *planes* are processed. This function is usually used together with *MakeDiff*, which is normally used to calculate the difference.
Unsharp masking of luma::
blur_clip = core.std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1], planes=[0])
diff_clip = core.std.MakeDiff(clip, blur_clip, planes=[0])
sharpened_clip = core.std.MergeDiff(clip, diff_clip, planes=[0])