PanoTools NG:
Re: Panotools rounding bug?
Steinar Midtskogen steinar@... 2014-Dec-13 14:02:41
The patch below (2013 branch) does indeed seem to fix the problem.
There's also similar code in src/hugin_base/nona/SpaceTransform.cpp.
I guess the question is, why the translation of half a pixel in the
first place?
-Steinar
diff -r 4692917e7a55 src/hugin_base/panotools/PanoToolsInterface.cpp
--- a/src/hugin_base/panotools/PanoToolsInterface.cpp Sun Oct 27 12:22:49 2013 +0100
+++ b/src/hugin_base/panotools/PanoToolsInterface.cpp Sat Dec 13 13:56:07 2014 +0100
@@ -260,15 +260,15 @@
bool Transform::transformImgCoord(double & x_dest, double & y_dest,
double x_src, double y_src) const
{
- x_src -= m_srcTX - 0.5 ;
- y_src -= m_srcTY - 0.5;
+ x_src -= m_srcTX;
+ y_src -= m_srcTY;
void * params= (void *) (&m_stack);
bool ok = execute_stack_new(x_src, y_src, &x_dest, &y_dest, params) != 0;
if(ok)
{
- x_dest += m_destTX - 0.5;
- y_dest += m_destTY - 0.5;
+ x_dest += m_destTX;
+ y_dest += m_destTY;
}
else
{
------------------------------------
Posted by: Steinar Midtskogen <#removed#>
------------------------------------
--
<*> Wiki: http://wiki.panotools.org
<*> User Guidelines: http://wiki.panotools.org/User_Guidelines
<*> Nabble (Web) http://panotoolsng.586017.n4.nabble.com/
<*> NG Member Map http://www.panomaps.com/ng
<*> Moderators/List Admins: #removed#
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/PanoToolsNG/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/PanoToolsNG/join
(Yahoo! ID required)
<*> To change settings via email:
#removed#
#removed#
<*> To unsubscribe from this group, send an email to:
#removed#
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/