//必做任务 输入图像选择 private void button_inputImg_Click(object sender, EventArgs e) { openFileDialog_inputImg.Filter = "图片文件(*.jpg,*.bmp,*.png)|*.jpg;*.bmp;*.png"; if (openFileDialog_inputImg.ShowDialog() == DialogResult.OK) { string img_path = openFileDialog_inputImg.FileName; //图片路径 //Mat img = CvInvoke.Imread(img_path); Bitmap bm_source = show_img(img_path, pictureBox_inputImg); distort_class = new Pic_distort(); distort_class.setInputImg(bm_source); } }
public double[,] W; //坐标变换所用参数 //保存原图像 public void set_source_img(Bitmap bm) { sourceFace_distort = new Pic_distort(); sourceFace_distort.setInputImg(bm); }