OpenCV使用RANSAC的仿射变换估计 estimateAffine2D(3)

for( i = i0; i <= i1; i++ )
 {
  // check that the i-th selected point does not belong
  // to a line connecting some previously selected points
  for( j = 0; j < i; j++ )
  {
   double dx1 = ptr[j].x - ptr[i].x;
   double dy1 = ptr[j].y - ptr[i].y;
   for( k = 0; k < j; k++ )
   {
    double dx2 = ptr[k].x - ptr[i].x;
    double dy2 = ptr[k].y - ptr[i].y;
    if( fabs(dx2*dy1 - dy2*dx1) <= FLT_EPSILON*(fabs(dx1) + fabs(dy1) + fabs(dx2) + fabs(dy2)))
     break;
   }
   if( k < j )
    break;
  }
  if( j < i )
   break;
 }

return i >= i1;
}

Affine2DEstimator::Affine2DEstimator() : modelPoints(3),modelSize(cvSize(3, 2)),maxBasicSolutions(1)
{
 checkPartialSubsets = true;
 rng = cvRNG(-1);
}

--------------------------------------分割线 --------------------------------------

Ubuntu Linux下安装OpenCV2.4.1所需包

Ubuntu 12.04 安装 OpenCV2.4.2

CentOS下OpenCV无法读取视频文件

Ubuntu 12.04下安装OpenCV 2.4.5总结

Ubuntu 10.04中安装OpenCv2.1九步曲

基于QT和OpenCV的人脸识别系统

[翻译]Ubuntu 14.04, 13.10 下安装 OpenCV 2.4.9 

--------------------------------------分割线 --------------------------------------

OpenCV的详细介绍请点这里
OpenCV的下载地址请点这里

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/8e513cc479c1f385896ff8afc4a650db.html