public Point[] calc_peaks (Mat im,
Point[] points,
OpenCvSharp.CvSize ssize)
{
int n = points.Length;
Mat matpoints = OpenCvSharp.CPlusPlus.MatOfPoint2f (points);
using (Mat pt = (new MatOfPoint2f (matpoints)).Reshape (1, 2 * n))
我在Unity上尝试了这个代码,它说在以下位置有一个Cs0119错误:
Mat matpoints = OpenCvSharp.CPlusPlus.MatOfPoint2f (points)
它让我抓狂!我试图删除错误行;但是它说:
错误CS1503:参数#1'无法将
OpenCvSharp.CPlusPlus.Point[]
表达式转换为System.IntPtr
类型
答案 0 :(得分:2)
非常确定问题是MatOfPoint2f()想要一个Point,但是你给它一个Points数组