计算Emgucv中轮廓的幽默

时间:2014-05-09 12:13:07

标签: c# emgucv

// computing hu moments
  Moments moments2=moments(croppedImage,false);
  double hu[7];
  HuMoments(moments2,hu);

此代码为轮廓提供了胡子时刻。任何机构都可以在Emgucv C#中提供等效代码吗?

部分C#代码

 MCvMoments moments = contours.GetMoments();
 MCvHuMoments Humoments;
 CvInvoke.cvGetHuMoments(moments,.........);

为cvGetHuMoments方法争取第二个参数。

1 个答案:

答案 0 :(得分:0)

Contour<Point> contours = image.FindContours();    
MCvMoments moments = contours.GetMoments();
MCvHuMoments huMoments.GetHuMoment();

MCvHuMoments结构具有将hu1转换为hu7的字段。