Beispiel #1
0
 public void ShowHistogramForm()
 {
     try
     {
         BackUpImage();
         HistogramPanel histogramPanel = new HistogramPanel();
         histogramPanel.ImageForm = this;
         histogramPanel.Init(_imageBox.Image as Image <Bgr, Byte>);
         Form form = new Form();
         form.Text           = "直方图";
         histogramPanel.Dock = DockStyle.Fill;
         form.Controls.Add(histogramPanel);
         form.Size          = new System.Drawing.Size(500, 300);
         form.StartPosition = FormStartPosition.WindowsDefaultLocation;
         form.ShowDialog();
     }
     catch (System.Exception ex)
     {
         logger.Error(ex.Message);
     }
 }