http://www.imagemagick.org/Usage/color_mods/#sigmoidal
The equation of the sigmoidal should be
(1/(1+exp(β*(α-u))) - 1/(1+exp(β))) / (1/(1+exp(β*(α-1)))/(1+exp(β)))
In general, the Beta is 10 and the alpha is 0.5, IM give us a simple
command "-fx" with default Beta and alpha (Beta = 10, alpha = 0.5)
The value of the equation listed on the page looks like this
(1/(1+exp(10*(.5-u)))-0.0066928509)*1.0092503
From the equation, I find out that
A : 1 / (1+exp(β)) == 0.0066928509 when β == 10
B : 1 / (1+exp(β*(α-1))) / (1+exp(β)) == 1.0092503 when β == 10, α = 0.5
I try to implement this by C++ and find out the value is weird
Code: Select all
std::cout << 1 / (1 + std::exp(10)); //output 4.53979e-05
Code: Select all
std::cout << 1 / (1 + std::exp(5)); //output 0.0066928509
Code: Select all
float temp = 1 / (1 + std::exp(10));
std::cout<<(1 / (1 + std::exp(10 * (0.5 - 1)))) * temp; //output 4.5094e-05