public double getResult(out OpenCvSharp.RotatedRect location)
        {
            VP_MatchTemplate m = (VP_MatchTemplate)testcase;

            location = new RotatedRect(new Point2f(m.Loc.X + temp.Width / 2, m.Loc.Y + temp.Height / 2), new Size2f(temp.Width, temp.Height), -(float)m.Angle);
            return(m.Val);
        }
 public override void runTest()
 {
     testcase.setValue("templ", temp);
     testcase.setValue("mode", Enum.Parse(typeof(TemplateMatchModes), listMode.SelectedItem.ToString()));
     if (!chkRotate.Checked)
     {
         testcase.run();
     }
     else
     {
         VP_MatchTemplate p     = (VP_MatchTemplate)testcase;
         double           start = double.Parse(txtAngleStart.Text);
         double           end   = double.Parse(txtAngleEnd.Text);
         p.runRotate(start, end, 1.0);
     }
 }
 public dlgMatchTemplate()
 {
     InitializeComponent();
     testcase = new VP_MatchTemplate();
     temp     = null;
 }