【发布时间】:2015-11-09 18:09:47
【问题描述】:
我是图像处理的新手。我想做单应我从捕捉相机获得的图像。谁能帮我对我的捕获图像做单应性?非常感谢
这就是我所做的,但它不起作用。我卡住了
Image<Bgr, Byte> RGB_Image = CaptureKamera1.QueryFrame();
Image<Bgr, Byte> destImage = new Image<Bgr, Byte>(352, 288);
imageBox1.Image = RGB_Image;
double[,] srcp = { { 74, 82 }, { 281, 81 }, { 281, 211 }, { 68, 205 } };
double[,] dstp = { { 81, 7 }, { 160, 7 }, { 36, 158 }, { 207, 158 } };
double[,] homog = new double[3, 3];
Matrix<double> srcpm = new Matrix<double>(RGB_Image);
Matrix<double> dstpm = new Matrix<double>(destImage);
Matrix<double> homogm = new Matrix<double>(homog);
CvInvoke.cvGetAffineTransform(srcpm.Ptr, dstpm.Ptr, homogm.Ptr);
CvInvoke.cvPerspectiveTransform(RGB_Image.Ptr, destImage.Ptr, homogm.Ptr);
imageBox2.Image = destImage;
【问题讨论】:
标签: emgucv projection homography