MatchHistogram

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Requirements)
m (author)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Levels_and_Chroma_filters}}
 
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Levels_and_Chroma_filters}}
 
{{Filter3
 
{{Filter3
|{{Author/LaTo}}, [https://github.com/dubhater Dubhater], [https://github.com/Asd-g asd-g]
+
|{{Author/LaTo}}, [https://github.com/dubhater Dubhater], {{Author/Asd-g}}
|v2.1.0
+
|v2.1.2
|3=[https://github.com/Asd-g/AviSynth-MatchHistogram/releases MatchHistogram-2.1.0.7z]
+
|3=[https://github.com/Asd-g/AviSynth-MatchHistogram/releases MatchHistogram-2.1.2.7z]
 
|4=Adjustment Filters
 
|4=Adjustment Filters
 
|5=Open source
 
|5=Open source
Line 28: Line 28:
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
  
:{{Template:FuncDef|MatchHistogram (clip clip1 , clip clip12, clip clip3, bool "raw", bool "show", bool "debug", int "smoothing_window", bool "y", bool "u", bool "v")}}
+
:{{Template:FuncDef|MatchHistogram (clip clip1 , clip clip2, clip "clip3", bool "raw", bool "show", bool "debug", int "smoothing_window", bool "y", bool "u", bool "v")}}
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
Line 38: Line 38:
  
 
<br>
 
<br>
::{{Par2| |clip|clip1}}
+
::{{Par2|clip3|clip|clip1}}
 
:::Clip3: clip to be modified to match ''clip2'''s histogram.
 
:::Clip3: clip to be modified to match ''clip2'''s histogram.
 
:::Must have the same format as ''clip1'' and constant dimensions.
 
:::Must have the same format as ''clip1'' and constant dimensions.
Line 66: Line 66:
  
 
== Examples ==
 
== Examples ==
[[TODO]]
+
 
 +
clip1 = AviSource("blah.avi")  # clip 1 is the source
 +
clip2 = AviSource("blah2.avi") # clip 2 is the target
 +
 +
MatchHistogram(clip1, clip2, raw=false, show=false, debug=false, smoothing_window=8, y=true, u=false, v=false)
 +
 
 +
The difference between clip1 and clip2 is calculated.
 +
That difference is applied on clip3, which defaults to using clip1 if no other clip is given. You can apply the difference between clip1 and clip2 on any clip with the same format and dimension as clip1.
 
<br>
 
<br>
 
<br>
 
<br>
 
== Changelog ==
 
== Changelog ==
  Version        Date            Changes
+
  Version        Date            Changes<br>
 +
v2.1.2          2020/08/08      - Now clip3 is optional.
 +
                                - AviSynth+: self-registers as [[MT_NICE_FILTER]].<br>
 +
v2.1.1          2020/06/03      - Fixed memory misalignment for AviSynth 2.6.<br>
 
  v2.1.0          2020/05/17      - Move project to GitHub
 
  v2.1.0          2020/05/17      - Move project to GitHub
                                 - Update to AviSynth+'s v8 interface
+
                                 - Update to AviSynth+'s v8 interface<br>
 
                 2020/04/22      - Author: asd
 
                 2020/04/22      - Author: asd
 
                                 - Backport VS port MatchHistogram v2 by dubhater
 
                                 - Backport VS port MatchHistogram v2 by dubhater
                                 - Compiled with MSVC 2019 (Clang 9).
+
                                 - Compiled with MSVC 2019 (Clang 9).<br>
 
                 2015/07/12      - Initial release by LaTo
 
                 2015/07/12      - Initial release by LaTo
 
<br>
 
<br>

Latest revision as of 21:55, 8 August 2020

Abstract
Author LaTo, Dubhater, Asd-g
Version v2.1.2
Download MatchHistogram-2.1.2.7z
Category Adjustment Filters
License Open source
Discussion Doom9 Thread

Contents

[edit] Description

MatchHistogram modifies one clip's histogram to match the histogram of another clip.

Will produce weird results if frame contents are dissimilar.

Should be used for analysis only, not for production.

[edit] Requirements


*** vcredist_x86.exe required for MatchHistogram-x86
*** vcredist_x64.exe required for MatchHistogram-x64


[edit] Syntax and Parameters

MatchHistogram (clip clip1 , clip clip2, clip "clip3", bool "raw", bool "show", bool "debug", int "smoothing_window", bool "y", bool "u", bool "v")


clip   =
Clip1: must have constant format and dimensions and 8 bits per sample, and it must not be RGB.


clip   =
Clip2: clip whose histogram is to be copied.
Must have the same format and dimensions as clip1.


clip  clip3 = clip1
Clip3: clip to be modified to match clip2's histogram.
Must have the same format as clip1 and constant dimensions.
If this parameter is not passed then clip1 is used instead.
Default: clip1


bool  raw = false
Use the raw histogram without postprocessing.


bool  cpu = false
Show calculated curve on video frame.
This parameter has no effect when debug=true.


bool  debug = false
Return 256x256 clip with calculated data.


int  smoothing_window = 8
Window used when smoothing the curve.
A value of 0 disables the smoothing.
This parameter has no effect when raw=true.


bool  y = true
bool  u = false
bool  v = false
Select which planes to process. Any unprocessed planes will be copied from the third clip.


[edit] Examples

clip1 = AviSource("blah.avi")  # clip 1 is the source
clip2 = AviSource("blah2.avi") # clip 2 is the target

MatchHistogram(clip1, clip2, raw=false, show=false, debug=false, smoothing_window=8, y=true, u=false, v=false)

The difference between clip1 and clip2 is calculated. That difference is applied on clip3, which defaults to using clip1 if no other clip is given. You can apply the difference between clip1 and clip2 on any clip with the same format and dimension as clip1.

[edit] Changelog

Version         Date            Changes
v2.1.2 2020/08/08 - Now clip3 is optional. - AviSynth+: self-registers as MT_NICE_FILTER.
v2.1.1 2020/06/03 - Fixed memory misalignment for AviSynth 2.6.
v2.1.0 2020/05/17 - Move project to GitHub - Update to AviSynth+'s v8 interface
2020/04/22 - Author: asd - Backport VS port MatchHistogram v2 by dubhater - Compiled with MSVC 2019 (Clang 9).
2015/07/12 - Initial release by LaTo


[edit] Archived Downloads

Version Download Mirror
2015/07/12 MatchHistogram.7z MatchHistogram.7z


[edit] External Links

  • GitHub - Source code repository.
  • GitHub - Source code repository (VapourSynth port).




Back to External Filters

Personal tools