ExpLabo

From Avisynth wiki
Revision as of 17:23, 3 July 2020 by Reel.Deal (Talk | contribs)

Jump to: navigation, search
Abstract
Author brabudu
Version v2.0
Download ExpLaboV2_0.zip
Category Adjustment Filters
License GPLv2
Discussion Doom9 Thread

Contents

Description

ExpLabo is a multi-filters plugin, focused on the non-linear transformation of image color space.
Another feature is that it works principally with parameters that are hls oriented: Psychophysics suggest that this is the color space nearest to the man's qualitative colors perception, ans so the most intuitive manner to work with colors.


ExpLabo contains:

  • ExpSat: apply a non-linear transformation of saturation
  • Colorize: change the image color dominance in a flexible manner.
  • HLSnoise: adds a noise to the image separately to the HLS dimensions.


See official homepage for more information and examples: http://expsat.sourceforge.net/


Requirements


Syntax and Parameters

ExpSat


ExpSat (startFrame,stopFrame,
		pre_l,post_l,exp_l,peak_l,contr_l,preoffs_l,postoffs_l,
		pre_s,post_s,exp_s,peak_s,contr_s,preoffs_s,postoffs_s,
		hlow,hhi,hs,
		hls,test,graph)
		
startFrame: First frame of the application range (integer) 
stopFrame: Last frame of the application range(integer)
		
For both luminance (or brightness) and saturation:

pre: Pre-amplification factor (float [0;100] default=1)
post: Post-amplification factor (float [0;100] default=1)
exp: Applied exponential (float [0;10] default=1)
peak: Exponential shaping (float [0;1] default=0.5)
contr: Contrast amount (float [0;10] default=1)
preoffs: Additive constant (Pre) (float [-1;1] default =0)
postoffs: Additive constant (Post) (float [-1;1] default =0)

hlow : Low limit's value of the hue range (float[0;360] default=0)
hhi : High limit's value of the hue range(float [0;360] default=0)
hs : Sharpness of hue range edges

hls: If true, l is lightness, if false l is brightness (bool default=true)
graph: Shows filter function and statistical info (bool default=false)
test: Test mode active (bool default=false)


All parameters are optional

**************************
For a best comprehension,
!!! Try the graph mode !!!
(see SF Project homepage)
**************************


Colorize

Colorize (startFrame,stopFrame,
		exp_l,exp_s,
		rf,gf,bf,ga,
		hlow,hhi,hs,
		hls,graph)

startFrame: First frame of the application range (integer) 
stopFrame: Last frame of the application range(integer)

exp_l: Luminance (or brightness) exponential (float [-10,10] default=0)
exp_s: Saturation exponential (float [-10,10] default=0)
rf,gf,bf: Linear gains (float [0;1000] default=0)
ga: Strenght factor (float [0;10] default =1)

hlow : Low limit's value of the hue range (float[0;360] default=0)
hhi : High limit's value of the hue range(float [0;360] default=0)
hs : Sharpness of hue range edges

hls: If true, l is lightness, if false l is brightness (bool default=true)
graph: Shows filter function and statistical info (bool default=false)

All parameters are optional


Theory:

This filter is aimed to change the color dominance of the video. But it works in a flexible manner, 
permitting to adjust his strong  in relation to others pixel parameters, as saturation and luminance.
Moreover, this dependence can vary in an exponential and invertible manner.
This is the formula:

R=R*ga + rf * sat_factor * lum_factor
G=G*ga + gf * sat_factor * lum_factor
B=B*ga + bf * sat_factor *  lum_factor

where R,G and B are the rgb components of pixel, rf, gf, bf the linear gains passed to the filter and 
sat_factor and lum_factor are dependents from saturation, luminance and the exponential parameters passed to the filter:

if exp_s > 0  sat_factor = saturation ^ exp_s
if exp_s < 0 sat_factor = 1- saturation ^ |exp_s|

if exp_l > 0  lum_factor = luminance ^ exp_l
if exp_l < 0 lum_factor = 1- luminance ^ |exp_l|

where exp_s and exp_l are user's parameters,  saturation and  luminance are the image saturation and luminance.

Application
--------------
This is a bit too mathematical .. as we said former, all the parameters are oriented to the human perception.

Do you want to make the image appearance more blue, but only in the darkest areas?

This means that the blue must decrease with luminance, so exp_l<0;
you can try exp_s=0 (saturation do not affect the result), bf =100 and exp_l=-1 (linear dependence) or exp_l=-2 (quadratic dependence)

Do you want to make the image more red, but only where the colors are almost gray?

Set the saturation exponential to -1 and the red factor (rf) to 100

The best way is to try yourself!


HLSNoise

HLSnoise(startFrame,stopFrame,
		noise_h,noise_l,noise_s,
		hlow,hhi,
		mean,hold)

startFrame: First frame of the application range (integer) 
stopFrame: Last frame of the application range(integer)

noise_h: Hue noise amount (float [0;100] default=0)
noise_l: Luminance noise amount (float [0;100] default=0)
noise_s: Saturation noise amount (float [0;100] default=0)

hlow : Low limit's value of the hue range (float[0;360] default=0)
hhi : High limit's value of the hue range(float [0;360] default=0)

mean: (Future) (bool default=true)
hold: Use the same noise mask in all frames (bool default=true)

I suggest you to try it, it's very intuitive. Don't forget to try the hold mode on and off!


Examples

TODO

Archived Downloads

Version Download Mirror
v2.0 ExpLaboV2_0.zip ExpLaboV2_0.zip


External Links




Back to External Filters

Personal tools