private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OpenFileDialog openFileDialog = new OpenFileDialog();
     DialogResult res = openFileDialog.ShowDialog();
     if (res == DialogResult.OK)
     {
         m_image = new Handwritten_Text_Detection_Library.Image(openFileDialog.FileName);
         pictureBox1.Image = m_image.ExportBitmap();
     }
 }
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            DialogResult   res            = openFileDialog.ShowDialog();

            if (res == DialogResult.OK)
            {
                m_image           = new Handwritten_Text_Detection_Library.Image(openFileDialog.FileName);
                pictureBox1.Image = m_image.ExportBitmap();
            }
        }
        private void segmentTextToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IOperation operation = new Grayscale();
            m_image = operation.Apply(m_image);

            operation = new IncreaseContrast();
            m_image = operation.Apply(m_image);

            operation = new LocalThreshold(10,10);
            m_image = operation.Apply(m_image);

            pictureBox1.Image = m_image.ExportBitmap();
        }
        private void segmentTextToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IOperation operation = new Grayscale();

            m_image = operation.Apply(m_image);

            operation = new IncreaseContrast();
            m_image   = operation.Apply(m_image);

            operation = new LocalThreshold(10, 10);
            m_image   = operation.Apply(m_image);

            pictureBox1.Image = m_image.ExportBitmap();
        }