Ejemplo n.º 1
0
        /// <summary>
        /// Brightness and contrast adjustment
        /// </summary>
        private void trackBarBrightContrast_Scroll(object sender, EventArgs e)
        {
            TrackBar ctrl = (TrackBar)sender;

            toolTipValue.SetToolTip(ctrl, ctrl.Value.ToString());
            if (picOutput.Image != null)
            {
                picOutput.Image.Dispose();
            }
            picOutput.Image = ImageAdjustment.AdjustBrightnessContrast((Bitmap)picInput.Image, _rect, trackBarBrightness.Value, trackBarContrast.Value);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Hue, saturation and lightness adjustment
        /// </summary>
        private void trackBarHSL_Scroll(object sender, EventArgs e)
        {
            TrackBar ctrl = (TrackBar)sender;

            toolTipValue.SetToolTip(ctrl, ctrl.Value.ToString());

            int _saturation = trackBarSaturation.Value;

            if (_saturation > 100)
            {
                _saturation = ((_saturation - 100) * 3) + 100;
            }
            _saturation = (_saturation * 1024) / 100;

            if (picOutput.Image != null)
            {
                picOutput.Image.Dispose();
            }
            picOutput.Image = ImageAdjustment.AdjustHSL((Bitmap)picInput.Image, _rect, trackBarHue.Value, _saturation, trackBarLightness.Value);
        }
Ejemplo n.º 3
0
 public Form1()
 {
     InitializeComponent();
     ia = new ImageAdjustment();
     al = new AlgorithmLbph();
 }