Exemple #1
0
        List <Result> TestISO12233Ex(WriteableBitmap chart)
        {
            var rl    = new List <Result>();
            var Chart = new ISO12233ExChart();

            rl.Add(new Result()
            {
                Value     = Chart.getLPResoveLines(),
                Name      = "Resolution",
                Memo      = "",
                TestTime  = DateTime.Now,
                TestCount = 1,
                Dimension = "LW/PH"
            });

            rl.Add(new Result()
            {
                Value     = Chart.getHEdgeResoveLines(),
                Name      = "Horizontal Resolution",
                Memo      = "",
                TestTime  = DateTime.Now,
                TestCount = 1,
                Dimension = "LW/PH"
            });

            rl.Add(new Result()
            {
                Value     = Chart.getVEdgeResoveLines(),
                Name      = "Vertical Resolution",
                Memo      = "",
                TestTime  = DateTime.Now,
                TestCount = 1,
                Dimension = "LW/PH"
            });

            rl.Add(new Result()
            {
                Value     = Chart.getHDispersiveness(),
                Name      = "Horizontal Dispersiveness",
                Memo      = "",
                TestTime  = DateTime.Now,
                TestCount = 1,
                Dimension = "Pix"
            });
            rl.Add(new Result()
            {
                Value     = Chart.getVDispersiveness(),
                Name      = "Vertical Dispersiveness",
                Memo      = "",
                TestTime  = DateTime.Now,
                TestCount = 1,
                Dimension = "Pix"
            });

            return(rl);
        }
Exemple #2
0
        public void ISO12233ExTest()
        {
            processbar.Value = 0;
            ResultPanel.Children.Clear();

            Button          li;
            ISO12233ExChart ISOChart = new ISO12233ExChart(SourcePhoto);

            ISOChart.CorrectChart();
            ISOChart.BeginAnalyse();
            processbar.Value = 30;

            sw.Stop();
            sw.Start();

            long r = ISOChart.getLPResoveLines();

            li         = new Button();
            li.Name    = "ResolvingPower";
            li.Content = "分辨率(中央):" + r.ToString() + " LW/PH";
            li.SetValue(ToolTipService.ToolTipProperty, "利用瑞利判据,直观判断相机分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量");
            li.Click += new RoutedEventHandler(ISO12233MTF_Click);
            ResultPanel.Children.Add(li);
            processbar.Value = 50;

            r          = ISOChart.getHEdgeResoveLines();
            li         = new Button();
            li.Name    = "HResolvingPower";
            li.Content = "分辨率(水平线):" + r.ToString() + " LW/PH";
            li.SetValue(ToolTipService.ToolTipProperty, "利用水平线条测试分辨率,接近相机的中心分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量");
            li.Click += new RoutedEventHandler(ISO12233MTF_Click);
            ResultPanel.Children.Add(li);
            processbar.Value = 60;

            r          = ISOChart.getVEdgeResoveLines();
            li         = new Button();
            li.Name    = "VResolvingPower";
            li.Content = "分辨率(垂直线):" + r.ToString() + " LW/PH";
            li.SetValue(ToolTipService.ToolTipProperty, "利用垂直线条测试分辨率,接近相机的边沿分辨率,数据表示在一张照片里面可以分辨的垂直线条的数量");
            li.Click += new RoutedEventHandler(ISO12233MTF_Click);
            ResultPanel.Children.Add(li);
            processbar.Value = 70;

            li = new Button();
            decimal d = ISOChart.getHDispersiveness();

            li.Name    = "HDispersiveness";
            li.Content = "色散(水平线):" + d.ToString() + " pxl";
            li.SetValue(ToolTipService.ToolTipProperty, "利用水平线条测试,接近中央色散程度,数据表示红绿蓝三原色在边界分离的程度,无色散时为0");
            li.Click += new RoutedEventHandler(ISO12233Dispersiveness_Click);
            ResultPanel.Children.Add(li);
            processbar.Value = 85;

            li         = new Button();
            d          = ISOChart.getVDispersiveness();
            li.Name    = "VDispersiveness";
            li.Content = "色散(垂直线):" + d.ToString() + " pxl";
            li.SetValue(ToolTipService.ToolTipProperty, "利用垂直线条测试,接近边沿色散程度,数据表示红绿蓝三原色在边界分离的程度,无色散时为0");
            li.Click += new RoutedEventHandler(ISO12233Dispersiveness_Click);
            ResultPanel.Children.Add(li);
            processbar.Value = 100;

            sw.Stop();
            li.SetValue(ToolTipService.ToolTipProperty, "测试共花费" + sw.Interval.Milliseconds.ToString() + "ms");

            Logo.Source = ISOChart.AnalysePhoto;
        }