Beispiel #1
0
        /// <summary>
        /// Start processing the image
        /// </summary>
        public void ProcessImage()
        {
            //Load the image from file and resize it for display
            ImgOriginal =
                new Image <Bgr, byte>(FilePath);
            //.Resize(400, 400, Emgu.CV.CvEnum.Inter.Linear, true);

            HistogramPanel.ClearHistogram();
            HistogramPanel.GenerateHistograms(ImgOriginal, 256);
            HistogramPanel.Refresh();

            //Convert the image to grayscale and filter out the noise
            ImgGray = ImgOriginal.Convert <Gray, Byte>().SmoothGaussian(5, 5, 0, 0) /*.PyrDown().PyrUp()*/;

            PopulateImageProperties(ImgOriginal);

            foreach (CtrlImageBox.FilterAlgorithm name in Enum.GetValues(typeof(CtrlImageBox.FilterAlgorithm)))
            {
                AddImageBox(name);
            }

            IsLoaded = true;
        }