Пример #1
0
        private void powerTransformMenuItem_Click(object sender, EventArgs e)
        {
            double pow  = double.Parse(paramsTextBox.Text);
            byte   fMax = SourceImage.Cast <byte>().Max();

            ApplyTransform((x) => FixRange((int)(255 * Math.Pow((double)x / fMax, pow))));
        }
Пример #2
0
        private void linearContrastMenuItem_Click(object sender, EventArgs e)
        {
            byte fMax = SourceImage.Cast <byte>().Max();
            byte fMin = SourceImage.Cast <byte>().Min();

            ApplyTransform((x) => FixRange((255 * (x - fMin) / (fMax - fMin))));
        }
Пример #3
0
        private void logarithmicTransformMenuItem_Click(object sender, EventArgs e)
        {
            double logMax = Math.Log(1 + SourceImage.Cast <byte>().Max());

            ApplyTransform((x) => FixRange((int)(255 * Math.Log(1 + x) / logMax)));
        }