Example #1
0
        // main method that I am using just to test my methods in the class Focus
        static void Main(string[] args)
        {
            Focus testimage = new Focus();

            Image myimage = Image.FromFile(@"C:\Users\payam\Desktop\focusTest.png",true);

            var result = testimage.GetImageMatrix(myimage);
              // Bitmap grayimage = testimage.ConvertToGrayScale(result);
            Console.Write(result);
            Console.ReadLine();
        }
Example #2
0
        // main method that I am using just to test my methods in the class Focus
        static void Main(string[] args)
        {
            Focus testimage = new Focus();

               Image myimage = Image.FromFile(@"C:\Users\payam\Desktop\frame-42.png", true);
               var watch = Stopwatch.StartNew();
               Bitmap bitmapimage = testimage.ConvertToBitmap(myimage);
               var FM = testimage.GetFValue(bitmapimage);
               Console.WriteLine(FM);
               Console.WriteLine(watch.ElapsedMilliseconds);
               Console.ReadLine();
        }
Example #3
0
        // main method that I am using just to test my methods in the class Focus
        static void Main(string[] args)
        {
            Image myimage = Image.FromFile(@"C:\Users\payam\Desktop\frame-1.png", true);

            var watch2 = Stopwatch.StartNew();
            Focus testImage = new Focus();
            double fvalue = Calculate(myimage);

            Console.WriteLine("The second method took {0} miliseconds to be completed", watch2.ElapsedMilliseconds);
            Console.WriteLine("the focus value is {0}", fvalue);
            var watch1 = Stopwatch.StartNew();
            double fvalue2 = CalculatebyPointer(myimage);

            Console.WriteLine("the brightness of your image is {0} at {1} miliseconds", fvalue2,watch1.ElapsedMilliseconds);

            Console.ReadLine();
        }