Basic structures

Overview

// typedefs

typedef Vec<uchar, 2> cv::Vec2b;
typedef Vec<uchar, 3> cv::Vec3b;
typedef Vec<uchar, 4> cv::Vec4b;
typedef Vec<short, 2> cv::Vec2s;
typedef Vec<short, 3> cv::Vec3s;
typedef Vec<short, 4> cv::Vec4s;
typedef Vec<ushort, 2> cv::Vec2w;
typedef Vec<ushort, 3> cv::Vec3w;
typedef Vec<ushort, 4> cv::Vec4w;
typedef Vec<int, 2> cv::Vec2i;
typedef Vec<int, 3> cv::Vec3i;
typedef Vec<int, 4> cv::Vec4i;
typedef Vec<int, 6> cv::Vec6i;
typedef Vec<int, 8> cv::Vec8i;
typedef Vec<float, 2> cv::Vec2f;
typedef Vec<float, 3> cv::Vec3f;
typedef Vec<float, 4> cv::Vec4f;
typedef Vec<float, 6> cv::Vec6f;
typedef Vec<double, 2> cv::Vec2d;
typedef Vec<double, 3> cv::Vec3d;
typedef Vec<double, 4> cv::Vec4d;
typedef Vec<double, 6> cv::Vec6d;
typedef Complex<double> cv::Complexd;
typedef Complex<float> cv::Complexf;
typedef const _InputArray& cv::InputArray;
typedef InputArray cv::InputArrayOfArrays;
typedef const _InputOutputArray& cv::InputOutputArray;
typedef InputOutputArray cv::InputOutputArrayOfArrays;
typedef Mat_<uchar> cv::Mat1b;
typedef Mat_<double> cv::Mat1d;
typedef Mat_<float> cv::Mat1f;
typedef Mat_<int> cv::Mat1i;
typedef Mat_<short> cv::Mat1s;
typedef Mat_<ushort> cv::Mat1w;
typedef Mat_<Vec2b> cv::Mat2b;
typedef Mat_<Vec2d> cv::Mat2d;
typedef Mat_<Vec2f> cv::Mat2f;
typedef Mat_<Vec2i> cv::Mat2i;
typedef Mat_<Vec2s> cv::Mat2s;
typedef Mat_<Vec2w> cv::Mat2w;
typedef Mat_<Vec3b> cv::Mat3b;
typedef Mat_<Vec3d> cv::Mat3d;
typedef Mat_<Vec3f> cv::Mat3f;
typedef Mat_<Vec3i> cv::Mat3i;
typedef Mat_<Vec3s> cv::Mat3s;
typedef Mat_<Vec3w> cv::Mat3w;
typedef Mat_<Vec4b> cv::Mat4b;
typedef Mat_<Vec4d> cv::Mat4d;
typedef Mat_<Vec4f> cv::Mat4f;
typedef Mat_<Vec4i> cv::Mat4i;
typedef Mat_<Vec4s> cv::Mat4s;
typedef Mat_<Vec4w> cv::Mat4w;
typedef Matx<double, 1, 2> cv::Matx12d;
typedef Matx<float, 1, 2> cv::Matx12f;
typedef Matx<double, 1, 3> cv::Matx13d;
typedef Matx<float, 1, 3> cv::Matx13f;
typedef Matx<double, 1, 4> cv::Matx14d;
typedef Matx<float, 1, 4> cv::Matx14f;
typedef Matx<double, 1, 6> cv::Matx16d;
typedef Matx<float, 1, 6> cv::Matx16f;
typedef Matx<double, 2, 1> cv::Matx21d;
typedef Matx<float, 2, 1> cv::Matx21f;
typedef Matx<double, 2, 2> cv::Matx22d;
typedef Matx<float, 2, 2> cv::Matx22f;
typedef Matx<double, 2, 3> cv::Matx23d;
typedef Matx<float, 2, 3> cv::Matx23f;
typedef Matx<double, 3, 1> cv::Matx31d;
typedef Matx<float, 3, 1> cv::Matx31f;
typedef Matx<double, 3, 2> cv::Matx32d;
typedef Matx<float, 3, 2> cv::Matx32f;
typedef Matx<double, 3, 3> cv::Matx33d;
typedef Matx<float, 3, 3> cv::Matx33f;
typedef Matx<double, 3, 4> cv::Matx34d;
typedef Matx<float, 3, 4> cv::Matx34f;
typedef Matx<double, 4, 1> cv::Matx41d;
typedef Matx<float, 4, 1> cv::Matx41f;
typedef Matx<double, 4, 3> cv::Matx43d;
typedef Matx<float, 4, 3> cv::Matx43f;
typedef Matx<double, 4, 4> cv::Matx44d;
typedef Matx<float, 4, 4> cv::Matx44f;
typedef Matx<double, 6, 1> cv::Matx61d;
typedef Matx<float, 6, 1> cv::Matx61f;
typedef Matx<double, 6, 6> cv::Matx66d;
typedef Matx<float, 6, 6> cv::Matx66f;
typedef const _OutputArray& cv::OutputArray;
typedef OutputArray cv::OutputArrayOfArrays;
typedef Point2i cv::Point;
typedef Point_<double> cv::Point2d;
typedef Point_<float> cv::Point2f;
typedef Point_<int> cv::Point2i;
typedef Point_<int64> cv::Point2l;
typedef Point3_<double> cv::Point3d;
typedef Point3_<float> cv::Point3f;
typedef Point3_<int> cv::Point3i;
typedef Rect2i cv::Rect;
typedef Rect_<double> cv::Rect2d;
typedef Rect_<float> cv::Rect2f;
typedef Rect_<int> cv::Rect2i;
typedef Scalar_<double> cv::Scalar;
typedef Size2i cv::Size;
typedef Size_<double> cv::Size2d;
typedef Size_<float> cv::Size2f;
typedef Size_<int> cv::Size2i;
typedef Size_<int64> cv::Size2l;

// enums

enum
{
    cv::@2::ACCESS_READ  =1<<24,
    cv::@2::ACCESS_WRITE =1<<25,
    cv::@2::ACCESS_RW    =3<<24,
    cv::@2::ACCESS_MASK  =ACCESS_RW,
    cv::@2::ACCESS_FAST  =1<<26,
};

enum cv::UMatUsageFlags;

// structs

struct cv::MatSize;
struct cv::MatStep;
struct cv::Param;

template <>
struct cv::ParamType<uchar>;

template <>
struct cv::ParamType<uint64>;

template <>
struct cv::ParamType<unsigned>;

template <>
struct cv::ParamType<String>;

template <>
struct cv::ParamType<std::vector<Mat>>;

template <>
struct cv::ParamType<Mat>;

template <>
struct cv::ParamType<float>;

template <typename _Tp>
struct cv::ParamType;

template <>
struct cv::ParamType<bool>;

template <>
struct cv::ParamType<Algorithm>;

template <>
struct cv::ParamType<double>;

template <typename T>
struct cv::Ptr;

struct cv::UMatData;
struct cv::UMatDataAutoLock;

// classes

class cv::Algorithm;

template <typename _Tp>
class cv::Complex;

class cv::DMatch;

template <typename _Tp>
class cv::DataDepth;

template <typename _Tp>
class cv::DataType;

class cv::Formatted;
class cv::Formatter;
class cv::KeyPoint;
class cv::Mat;
class cv::MatAllocator;

template <typename _Tp>
class cv::MatCommaInitializer_;

class cv::MatConstIterator;

template <typename _Tp>
class cv::MatConstIterator_;

class cv::MatExpr;

template <typename _Tp>
class cv::MatIterator_;

class cv::MatOp;

template <typename _Tp>
class cv::Mat_;

template <
    typename _Tp,
    int m,
    int n
    >
class cv::Matx;

template <
    typename _Tp,
    int m,
    int n
    >
class cv::MatxCommaInitializer;

class cv::NAryMatIterator;

template <typename _Tp>
class cv::Point3_;

template <typename _Tp>
class cv::Point_;

class cv::Range;

template <typename _Tp>
class cv::Rect_;

class cv::RotatedRect;

template <typename _Tp>
class cv::Scalar_;

template <typename _Tp>
class cv::Size_;

class cv::SparseMat;
class cv::SparseMatConstIterator;

template <typename _Tp>
class cv::SparseMatConstIterator_;

class cv::SparseMatIterator;

template <typename _Tp>
class cv::SparseMatIterator_;

template <typename _Tp>
class cv::SparseMat_;

class cv::String;
class cv::TermCriteria;

template <>
class cv::TypeDepth<CV_16U>;

template <>
class cv::TypeDepth<CV_32F>;

template <>
class cv::TypeDepth<CV_32S>;

template <>
class cv::TypeDepth<CV_16S>;

template <>
class cv::TypeDepth<CV_64F>;

template <>
class cv::TypeDepth<CV_8U>;

template <int _depth>
class cv::TypeDepth;

template <>
class cv::TypeDepth<CV_8S>;

class cv::UMat;

template <
    typename _Tp,
    int cn
    >
class cv::Vec;

template <
    typename _Tp,
    int m
    >
class cv::VecCommaInitializer;

class cv::_InputArray;
class cv::_InputOutputArray;
class cv::_OutputArray;

// global functions

template <
    typename _Tp,
    int m
    >
static
double
cv::determinant(const Matx<_Tp, m, m>& a);

template <typename T>
Ptr<T>
cv::makePtr();

template <
    typename T,
    typename A1
    >
Ptr<T>
cv::makePtr(const A1& a1);

template <
    typename T,
    typename A1,
    typename A2
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8,
    typename A9
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8,
    const A9& a9
    );

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8,
    typename A9,
    typename A10
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8,
    const A9& a9,
    const A10& a10
    );

InputOutputArray
cv::noArray();

template <
    typename _Tp,
    int m,
    int n
    >
static
double
cv::norm(const Matx<_Tp, m, n>& M);

template <
    typename _Tp,
    int m,
    int n
    >
static
double
cv::norm(
    const Matx<_Tp, m, n>& M,
    int normType
    );

template <
    typename _Tp,
    int cn
    >
static
Vec<_Tp, cn>
cv::normalize(const Vec<_Tp, cn>& v);

template <typename T>
bool
cv::operator!=(
    const Ptr<T>& ptr1,
    const Ptr<T>& ptr2
    );

static
String&
cv::operator<<(
    String& out,
    Ptr<Formatted> fmtd
    );

static
String&
cv::operator<<(
    String& out,
    const Mat& mtx
    );

template <typename T>
bool
cv::operator==(
    const Ptr<T>& ptr1,
    const Ptr<T>& ptr2
    );

template <typename T>
void
cv::swap(
    Ptr<T>& ptr1,
    Ptr<T>& ptr2
    );

template <
    typename _Tp,
    int m,
    int n
    >
static
double
cv::trace(const Matx<_Tp, m, n>& a);

Detailed Documentation

Global Functions

template <typename T>
Ptr<T>
cv::makePtr()

makePtr<T>(...) is equivalent to Ptr<T>(new T(...)). It is shorter than the latter, and it’s marginally safer than using a constructor or Ptr::reset, since it ensures that the owned pointer is new and thus not owned by any other Ptr instance. Unfortunately, perfect forwarding is impossible to implement in C++03, and so makePtr is limited to constructors of T that have up to 10 arguments, none of which are non-const references.

template <
    typename T,
    typename A1
    >
Ptr<T>
cv::makePtr(const A1& a1)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8,
    typename A9
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8,
    const A9& a9
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <
    typename T,
    typename A1,
    typename A2,
    typename A3,
    typename A4,
    typename A5,
    typename A6,
    typename A7,
    typename A8,
    typename A9,
    typename A10
    >
Ptr<T>
cv::makePtr(
    const A1& a1,
    const A2& a2,
    const A3& a3,
    const A4& a4,
    const A5& a5,
    const A6& a6,
    const A7& a7,
    const A8& a8,
    const A9& a9,
    const A10& a10
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template <typename T>
bool
cv::operator==(
    const Ptr<T>& ptr1,
    const Ptr<T>& ptr2
    )

Return whether ptr1.get() and ptr2.get() are equal and not equal, respectively.

template <typename T>
void
cv::swap(
    Ptr<T>& ptr1,
    Ptr<T>& ptr2
    )

Equivalent to ptr1.swap(ptr2). Provided to help write generic algorithms.