PanoTools mailing list archive

Mailinglist:PanoTools NG
Sender:Steinar Midtskogen steinar@...
Date/Time:2015-May-03 11:55:57
Subject:Hugin Python interface

Thread:


PanoTools NG: Hugin Python interface Steinar Midtskogen steinar@... 2015-May-03 11:55:57
Hello,

I'd like to make some scripts using Python and the HSI module.  But I've
run into trouble when I need to access an overloaded C++ function with
references.  I'm not sure if the problem is overloading or references or
the combination.  A minimal example for producing the error:

#!/usr/bin/env python2

import hsi
x = 0.0
y = 0.0
hsi.Transform().transformImgCoord(x, y, 123.0, 456.0)

Which gives me:

Traceback (most recent call last):
  File "./test.py", line 6, in <module>
    hsi.Transform().transformImgCoord(x, y, 243.0, 24.0)
  File "/usr/lib/python2.7/dist-packages/hsi.py", line 6626, in transformImgCoord
    return _hsi.Transform_transformImgCoord(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'Transform_transformImgCoord'.
  Possible C/C++ prototypes are:
    HuginBase::PTools::Transform::transformImgCoord(double &,double &,double,double) const
    HuginBase::PTools::Transform::transformImgCoord(hugin_utils::FDiff2D &,hugin_utils::FDiff2D const &) const

I want to use the first function.  That is, the function should assign
the result in x and y.

I'm learning Python as I go and I'm unfamiliar with swig.  Does anyone
know how I can call transformImgCoord() from Python?

-- 
Steinar Midtskogen


------------------------------------
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/


Next thread:

Previous thread:

back to search page