template class cv::Affine3

Overview

Affine transform. Moreā€¦

#include <affine.hpp>

template <typename T>
class Affine3
{
public:
    // typedefs

    typedef T float_type;
    typedef Matx<float_type, 3, 3> Mat3;
    typedef Matx<float_type, 4, 4> Mat4;
    typedef Vec<float_type, 3> Vec3;

    // fields

    Mat4 matrix;

    // construction

    Affine3();
    Affine3(const Mat4& affine);

    Affine3(
        const Mat3& R,
        const Vec3& t = Vec3::all(0)
        );

    Affine3(
        const Vec3& rvec,
        const Vec3& t = Vec3::all(0)
        );

    Affine3(
        const Mat& data,
        const Vec3& t = Vec3::all(0)
        );

    Affine3(const float_type* vals);

    // methods

    template <typename Y>
    Affine3<Y>
    cast() const;

    Affine3
    concatenate(const Affine3& affine) const;

    Affine3
    inv(int method = cv::DECOMP_SVD) const;

    void
    linear(const Mat3& L);

    Mat3
    linear() const;

    template <typename Y>
    operator Affine3< Y >() const;

    Affine3
    rotate(const Mat3& R) const;

    Affine3
    rotate(const Vec3& rvec) const;

    void
    rotation(const Mat3& R);

    void
    rotation(const Vec3& rvec);

    void
    rotation(const Mat& data);

    Mat3
    rotation() const;

    Vec3
    rvec() const;

    Affine3
    translate(const Vec3& t) const;

    void
    translation(const Vec3& t);

    Vec3
    translation() const;

    static
    Affine3
    Identity();
};

Detailed Documentation

Affine transform.

Todo document

Construction

Affine3(const Mat4& affine)

Augmented affine matrix.

Affine3(
    const Mat3& R,
    const Vec3& t = Vec3::all(0)
    )

Rotation matrix.

Affine3(
    const Vec3& rvec,
    const Vec3& t = Vec3::all(0)
    )

Rodrigues vector.

Affine3(
    const Mat& data,
    const Vec3& t = Vec3::all(0)
    )

Combines all contructors above. Supports 4x4, 4x3, 3x3, 1x3, 3x1 sizes of data matrix.

Affine3(const float_type* vals)

From 16th element array.

Methods

Affine3
concatenate(const Affine3& affine) const

a.concatenate(affine) is equivalent to affine * a;

Affine3
rotate(const Mat3& R) const

a.rotate(R) is equivalent to Affine(R, 0) * a;

Affine3
rotate(const Vec3& rvec) const

a.rotate(rvec) is equivalent to Affine(rvec, 0) * a;

void
rotation(const Mat3& R)

Rotation matrix.

void
rotation(const Vec3& rvec)

Rodrigues vector.

void
rotation(const Mat& data)

Combines rotation methods above. Suports 3x3, 1x3, 3x1 sizes of data matrix;.

Vec3
rvec() const

Rodrigues vector.

Affine3
translate(const Vec3& t) const

a.translate(t) is equivalent to Affine(E, t) * a;

static
Affine3
Identity()

Create identity transform.