From: <hug...@li...> - 2010-06-18 19:37:37
|
details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/ec3e84ebd1f1 changeset: 4082:ec3e84ebd1f1 user: tmodes date: Fri Jun 18 21:37:01 2010 +0200 description: Fixes wrong mask when image has circular crop diffstat: src/hugin_base/algorithms/nona/ComputeImageROI.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (16 lines): diff -r 9175c6d673a1 -r ec3e84ebd1f1 src/hugin_base/algorithms/nona/ComputeImageROI.cpp --- a/src/hugin_base/algorithms/nona/ComputeImageROI.cpp Thu Jun 17 13:52:59 2010 +0300 +++ b/src/hugin_base/algorithms/nona/ComputeImageROI.cpp Fri Jun 18 21:37:01 2010 +0200 @@ -117,9 +117,9 @@ transf.transformImgCoord(sx,sy, x/scale, y/scale); bool valid=true; if (src.getCropMode() == SrcPanoImage::CROP_CIRCLE) { - sx = sx - cropCenter.x; - sy = sy - cropCenter.y; - if (sx*sx + sy*sy > radius2) { + double dx = sx - cropCenter.x; + double dy = sy - cropCenter.y; + if (dx*dx + dy*dy > radius2) { valid = false; } } else if (!src.getCropRect().contains(vigra::Point2D(hugin_utils::roundi(sx), hugin_utils::roundi(sy))) ) { |