Hugin Python interface

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hugin Python interface

PanoTools NG mailing list
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
Reply | Threaded
Open this post in threaded view
|

Re: Hugin Python interface

PanoTools NG mailing list


On 3 May 2015 10:55:53 BST, Steinar Midtskogen wrote:
>
>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:

Hi, I'm not sure anyone here knows enough about the Hugin python bindings to help. The author of the python code is definitely on the hugin-ptx mailing list, so this would be a better place to ask: http://groups.google.com/group/hugin-ptx

--
Bruno