22 #include "pybind11/pybind11.h"
23 #include "pybind11/stl.h"
25 #include "numpy/arrayobject.h"
26 #include "ndarray/pybind11.h"
31 namespace py = pybind11;
32 using namespace py::literals;
40 py::module mod(
"transformFactory");
42 py::module::import(
"lsst.afw.geom.transform");
45 if (_import_array() < 0) {
46 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
50 mod.def(
"linearizeTransform",
52 "original"_a,
"point"_a);
55 mod.def(
"makeRadialTransform",
57 mod.def(
"makeRadialTransform",
60 "forwardCoeffs"_a,
"inverseCoeffs"_a);
TransformPoint2ToPoint2 makeTransform(AffineTransform const &affine)
Wrap an AffineTransform as a Transform.
Transform< Point2Endpoint, Point2Endpoint > TransformPoint2ToPoint2
AffineTransform linearizeTransform(TransformPoint2ToPoint2 const &original, Point2D const &inPoint)
Approximate a Transform by its local linearization.
PYBIND11_PLUGIN(_cameraPoint)
TransformPoint2ToPoint2 makeIdentityTransform()
Trivial Transform x → x.
Point< double, 2 > Point2D
TransformPoint2ToPoint2 makeRadialTransform(std::vector< double > const &coeffs)
A purely radial polynomial distortion.