Update aff_trans.cpp

When the fullAffine parameter is set to false, the estimateRigidTransform function maybe return empty, then the _localAffineEstimate function will be called, but the bug in it will result in incorrect results.
pull/12286/head
logic1988 7 years ago committed by heqian
parent 6700fdb81f
commit b47c9ac643
  1. 4
      modules/shape/src/aff_trans.cpp

@ -165,8 +165,8 @@ static Mat _localAffineEstimate(const std::vector<Point2f>& shape1, const std::v
}
else
{
therow.at<float>(0,0)=-shape1[contPt].y;
therow.at<float>(0,1)=shape1[contPt].x;
therow.at<float>(0,0)=shape1[contPt].y;
therow.at<float>(0,1)=-shape1[contPt].x;
therow.at<float>(0,3)=1;
therow.row(0).copyTo(matM.row(ii));
matP.at<float>(ii,0) = shape2[contPt].y;

Loading…
Cancel
Save