提交 4ae4a705 编写于 作者: L lewgate

Fix a bug for seam_finders.cpp when computing the source and destination points of the seam

上级 f2e9588c
...@@ -638,7 +638,7 @@ bool DpSeamFinder::getSeamTips(int comp1, int comp2, Point &p1, Point &p2) ...@@ -638,7 +638,7 @@ bool DpSeamFinder::getSeamTips(int comp1, int comp2, Point &p1, Point &p2)
{ {
double size1 = static_cast<double>(points[i].size()), size2 = static_cast<double>(points[j].size()); double size1 = static_cast<double>(points[i].size()), size2 = static_cast<double>(points[j].size());
double cx1 = cvRound(sum[i].x / size1), cy1 = cvRound(sum[i].y / size1); double cx1 = cvRound(sum[i].x / size1), cy1 = cvRound(sum[i].y / size1);
double cx2 = cvRound(sum[j].x / size2), cy2 = cvRound(sum[j].y / size1); double cx2 = cvRound(sum[j].x / size2), cy2 = cvRound(sum[j].y / size2);
double dist = (cx1 - cx2) * (cx1 - cx2) + (cy1 - cy2) * (cy1 - cy2); double dist = (cx1 - cx2) * (cx1 - cx2) + (cy1 - cy2) * (cy1 - cy2);
if (dist > maxDist) if (dist > maxDist)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册