Пример #1
0
        private void button_run_Click(object sender, EventArgs e)
        {
            tab.SelectedIndex = 2;
            double a = (double)value_a.Value;
            double b = (double)value_b.Value;
            double p = (double)value_p.Value;
            double t = (double)value_t.Value;

            if (t == 0)
            {
                imageBox3.Image = left.origin;
                return;
            }
            else if (t == 1)
            {
                imageBox3.Image = right.origin;
                return;
            }
            list_left  = left.LineList;
            list_right = right.LineList;
            List <SupLine> list_dest = new List <SupLine>();

            for (int i = 0; i < list_left.Count; i++)
            {
                list_dest.Add(SupLine.Interpolation(list_left[i], list_right[i], t));
            }
            Image <Bgr, byte> warp_left  = left.Warp(list_dest, a, b, p);
            Image <Bgr, byte> warp_right = right.Warp(list_dest, a, b, p);

            imageBox3.Image = new Image <Bgr, byte>(warp_left.Size);
            CvInvoke.AddWeighted(warp_left, 1 - t, warp_right, t, 0, imageBox3.Image);
        }
Пример #2
0
 public void LineMoveDown(int index)
 {
     if (index < LineList.Count - 1)
     {
         SupLine temp = LineList[index];
         LineList.RemoveAt(index);
         LineList.Insert(index + 1, temp);
     }
 }
Пример #3
0
 public void LineMoveUp(int index)
 {
     if (index > 0)
     {
         SupLine temp = LineList[index];
         LineList.RemoveAt(index);
         LineList.Insert(index - 1, temp);
     }
 }