Example #1
0
        private void ShowStatisticalResult(StatisticalDTO previous, StatisticalDTO after)
        {
            var result = "Results\n"
                         + "CpuTemp = " + Math.Round(previous.CpuTemp, 2) + " + " + Math.Round((after.CpuTemp - previous.CpuTemp), 2).ToString() + "oC\n"
                         + "CpuUser = "******" + " + (after.CpuUser - previous.CpuUser).ToString() + "%\n"
                         + "CpuSystem = " + previous.CpuSystem + " + " + (after.CpuSystem - previous.CpuSystem).ToString() + "%\n"
                         + "CpuIOW = " + previous.CpuIOW + " + " + (after.CpuIOW - previous.CpuIOW).ToString() + "%\n"
                         + "CpuIRQ = " + previous.CpuIRQ + " + " + (after.CpuIRQ - previous.CpuIRQ).ToString() + "%\n"
                         + "BatteryTemp = " + previous.BatteryTemp + " + " + (after.BatteryTemp - previous.BatteryTemp).ToString() + "oC\n"
                         + "BatteryLevel = " + previous.BatteryLevel + " + " + (after.BatteryLevel - previous.BatteryLevel).ToString() + "%\n"
                         + "TimeSpend = " + after.TimeSpend + "ms\n";

            Toast.MakeText(Application.Context, result, ToastLength.Long).Show();
        }
Example #2
0
        private void ExecuteTesseract(object sender, EventArgs e)
        {
            var previous = new StatisticalDTO();
            var after    = new StatisticalDTO();

            previous = StatisticsDetails.GetDetailsResult();
            Stopwatch watch = Stopwatch.StartNew(); // time the detection process
            UMat      uImg  = new UMat(imagePath, ImreadModes.Color);

            ProcessImageMethod(uImg, (int)OCRMethodEnum.Tesseract);
            after = StatisticsDetails.GetDetailsResult();
            watch.Stop(); //stop the timer
            after.TimeSpend = watch.Elapsed.TotalMilliseconds.ToString();

            ShowStatisticalResult(previous, after);
        }