Beispiel #1
0
        private void Redo()
        {
            Guid   cardId   = Guid.Parse("014F3226-9CB7-4A7F-9C98-6821BADB6033");
            string fileName = string.Format(@"C:\Temp\cards\{0}.bmp", cardId);

            using (Mat titleImage = new Mat(fileName, LoadImageType.Color))
            {
                var image = new CardImaging.Image(titleImage);

                CannyParam cannyParam = new CannyParam(trackBar1.Value, trackBar2.Value, false, 5);

                using (var contouredImage = image.GetContouredImage(angle: 0, cannyParameter: cannyParam))
                {
                    if (pictureBox9.Image != null)
                    {
                        pictureBox9.Image.Dispose();
                    }

                    pictureBox9.Image = (Bitmap)contouredImage.Bitmap.Clone();
                    pictureBox9.Update();
                }
            }
        }