5#ifndef OPENCV_CORE_MATX_INL_HPP 
    6#define OPENCV_CORE_MATX_INL_HPP 
    9#  error matx.inl.hpp header must be compiled as C++ 
   12#include "opencv2/core/matx.hpp" 
   28        double p = 
LU(
temp.val, m*
sizeof(_Tp), m, 0, 0, 0);
 
   31        for( 
int i = 0; i < m; i++ )
 
 
 
   49        return a(0,0)*a(1,1) - a(0,1)*a(1,0);
 
 
 
   57        return a(0,0)*(a(1,1)*a(2,2) - a(2,1)*a(1,2)) -
 
   58            a(0,1)*(a(1,0)*a(2,2) - a(2,0)*a(1,2)) +
 
   59            a(0,2)*(a(1,0)*a(2,1) - a(2,0)*a(1,1));
 
 
 
 
   79template<
typename _Tp, 
int m, 
int n> 
class DataType< 
Matx<_Tp, m, n> >
 
   87    enum { generic_type = 0,
 
   90#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED 
 
   99template<
typename _Tp, 
int m, 
int n>
 
  101template<
typename _Tp, 
int m, 
int n>
 
 
  118template<
typename _Tp, 
typename _T2, 
int m, 
int n> 
static inline 
  122    return (commaInitializer, val);
 
  125template<
typename _Tp, 
int m, 
int n> 
inline 
  130template<
typename _Tp, 
int m, 
int n> 
template<
typename _T2> 
inline 
  138template<
typename _Tp, 
int m, 
int n> 
inline 
  147template<
typename _Tp, 
int m, 
int n> 
inline 
  150    for(
int i = 0; i < 
channels; i++) val[i] = _Tp(0);
 
  153template<
typename _Tp, 
int m, 
int n> 
inline 
  157    for(
int i = 1; i < 
channels; i++) val[i] = _Tp(0);
 
 
  160template<
typename _Tp, 
int m, 
int n> 
inline 
  163    CV_StaticAssert(
channels >= 2, 
"Matx should have at least 2 elements.");
 
  164    val[0] = v0; val[1] = v1;
 
  165    for(
int i = 2; i < 
channels; i++) val[i] = _Tp(0);
 
  168template<
typename _Tp, 
int m, 
int n> 
inline 
  171    CV_StaticAssert(
channels >= 3, 
"Matx should have at least 3 elements.");
 
  172    val[0] = v0; val[1] = v1; val[2] = v2;
 
  173    for(
int i = 3; i < 
channels; i++) val[i] = _Tp(0);
 
  176template<
typename _Tp, 
int m, 
int n> 
inline 
  179    CV_StaticAssert(
channels >= 4, 
"Matx should have at least 4 elements.");
 
  180    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  184template<
typename _Tp, 
int m, 
int n> 
inline 
  187    CV_StaticAssert(
channels >= 5, 
"Matx should have at least 5 elements.");
 
  188    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3; val[4] = v4;
 
  189    for(
int i = 5; i < 
channels; i++) val[i] = _Tp(0);
 
  192template<
typename _Tp, 
int m, 
int n> 
inline 
  195    CV_StaticAssert(
channels >= 6, 
"Matx should have at least 6 elements.");
 
  196    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  197    val[4] = v4; val[5] = v5;
 
  198    for(
int i = 6; i < 
channels; i++) val[i] = _Tp(0);
 
  201template<
typename _Tp, 
int m, 
int n> 
inline 
  204    CV_StaticAssert(
channels >= 7, 
"Matx should have at least 7 elements.");
 
  205    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  206    val[4] = v4; val[5] = v5; val[6] = v6;
 
  210template<
typename _Tp, 
int m, 
int n> 
inline 
  213    CV_StaticAssert(
channels >= 8, 
"Matx should have at least 8 elements.");
 
  214    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  215    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  219template<
typename _Tp, 
int m, 
int n> 
inline 
  220Matx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8)
 
  222    CV_StaticAssert(
channels >= 9, 
"Matx should have at least 9 elements.");
 
  223    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  224    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  226    for(
int i = 9; i < 
channels; i++) val[i] = _Tp(0);
 
 
  229template<
typename _Tp, 
int m, 
int n> 
inline 
  230Matx<_Tp, m, n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9)
 
  232    CV_StaticAssert(
channels >= 10, 
"Matx should have at least 10 elements.");
 
  233    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  234    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  235    val[8] = v8; val[9] = v9;
 
  236    for(
int i = 10; i < 
channels; i++) val[i] = _Tp(0);
 
 
  240template<
typename _Tp, 
int m, 
int n> 
inline 
  241Matx<_Tp,m,n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11)
 
  243    CV_StaticAssert(
channels >= 12, 
"Matx should have at least 12 elements.");
 
  244    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  245    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  246    val[8] = v8; val[9] = v9; val[10] = v10; val[11] = v11;
 
  247    for(
int i = 12; i < 
channels; i++) val[i] = _Tp(0);
 
 
  250template<
typename _Tp, 
int m, 
int n> 
inline 
  251Matx<_Tp,m,n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13)
 
  253    CV_StaticAssert(
channels >= 14, 
"Matx should have at least 14 elements.");
 
  254    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  255    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  256    val[8] = v8; val[9] = v9; val[10] = v10; val[11] = v11;
 
  257    val[12] = v12; val[13] = v13;
 
  258    for (
int i = 14; i < 
channels; i++) val[i] = _Tp(0);
 
 
  262template<
typename _Tp, 
int m, 
int n> 
inline 
  263Matx<_Tp,m,n>::Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13, _Tp v14, _Tp v15)
 
  265    CV_StaticAssert(
channels >= 16, 
"Matx should have at least 16 elements.");
 
  266    val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
 
  267    val[4] = v4; val[5] = v5; val[6] = v6; val[7] = v7;
 
  268    val[8] = v8; val[9] = v9; val[10] = v10; val[11] = v11;
 
  269    val[12] = v12; val[13] = v13; val[14] = v14; val[15] = v15;
 
  270    for(
int i = 16; i < 
channels; i++) val[i] = _Tp(0);
 
 
  274#if defined _MSC_VER && _MSC_VER >= 1920 
  276#pragma warning(disable: 4702) 
  278template<
typename _Tp, 
int m, 
int n> 
inline 
  281    for( 
int i = 0; i < 
channels; i++ ) val[i] = values[i];
 
 
  283#if defined _MSC_VER && _MSC_VER >= 1920 
  287template<
typename _Tp, 
int m, 
int n> 
inline 
  292    for(
const auto& 
elem : list)
 
 
  298template<
typename _Tp, 
int m, 
int n> 
inline 
  302    for( 
int i = 0; i < m*n; i++ ) 
M.val[i] = 
alpha;
 
 
  306template<
typename _Tp, 
int m, 
int n> 
inline 
  312template<
typename _Tp, 
int m, 
int n> 
inline 
  318template<
typename _Tp, 
int m, 
int n> 
inline 
  322    for(
int i = 0; i < shortdim; i++)
 
 
  327template<
typename _Tp, 
int m, 
int n> 
inline 
  331    for( 
int i = 0; i < 
channels; i++ ) s += val[i]*
M.val[i];
 
 
  335template<
typename _Tp, 
int m, 
int n> 
inline 
  339    for( 
int i = 0; i < 
channels; i++ ) s += (
double)val[i]*
M.val[i];
 
 
  343template<
typename _Tp, 
int m, 
int n> 
inline 
  347    for(
int i = 0; i < shortdim; i++)
 
  352template<
typename _Tp, 
int m, 
int n> 
template<
typename T2>
 
  356    for( 
int i = 0; i < m*n; i++ ) 
M.val[i] = saturate_cast<T2>(val[i]);
 
 
  360template<
typename _Tp, 
int m, 
int n> 
template<
int m1, 
int n1> 
inline 
  363    CV_StaticAssert(m1*n1 == m*n, 
"Input and destination matrices must have the same number of elements");
 
 
  367template<
typename _Tp, 
int m, 
int n>
 
  368template<
int m1, 
int n1> 
inline 
  371    CV_DbgAssert(0 <= base_row && base_row+m1 <= m && 0 <= base_col && base_col+n1 <= n);
 
  373    for( 
int di = 0; di < m1; di++ )
 
  374        for( 
int dj = 0; dj < n1; dj++ )
 
  375            s(di, dj) = (*this)(base_row+di, base_col+dj);
 
 
  379template<
typename _Tp, 
int m, 
int n> 
inline 
  386template<
typename _Tp, 
int m, 
int n> 
inline 
  391    for( 
int i = 0; i < m; i++ )
 
  396template<
typename _Tp, 
int m, 
int n> 
inline 
  400    for( 
int i = 0; i < shortdim; i++ )
 
  405template<
typename _Tp, 
int m, 
int n> 
inline 
  408    CV_DbgAssert( (
unsigned)row_idx < (
unsigned)m && (
unsigned)col_idx < (
unsigned)n );
 
  409    return this->val[row_idx*n + col_idx];
 
 
  412template<
typename _Tp, 
int m, 
int n> 
inline 
  415    CV_DbgAssert( (
unsigned)row_idx < (
unsigned)m && (
unsigned)col_idx < (
unsigned)n );
 
  416    return val[row_idx*n + col_idx];
 
 
  419template<
typename _Tp, 
int m, 
int n> 
inline 
  422    CV_StaticAssert(m == 1 || n == 1, 
"Single index indexation requires matrix to be a column or a row");
 
  427template<
typename _Tp, 
int m, 
int n> 
inline 
  430    CV_StaticAssert(m == 1 || n == 1, 
"Single index indexation requires matrix to be a column or a row");
 
  435template<
typename _Tp, 
int m, 
int n> 
inline 
  439        val[i] = saturate_cast<_Tp>(a.
val[i] + b.
val[i]);
 
 
  442template<
typename _Tp, 
int m, 
int n> 
inline 
  446        val[i] = saturate_cast<_Tp>(a.
val[i] - b.
val[i]);
 
 
  449template<
typename _Tp, 
int m, 
int n> 
template<
typename _T2> 
inline 
  453        val[i] = saturate_cast<_Tp>(a.
val[i] * 
alpha);
 
 
  456template<
typename _Tp, 
int m, 
int n> 
inline 
  460        val[i] = saturate_cast<_Tp>(a.
val[i] * b.
val[i]);
 
 
  463template<
typename _Tp, 
int m, 
int n> 
inline 
  467        val[i] = saturate_cast<_Tp>(a.
val[i] / b.
val[i]);
 
 
  470template<
typename _Tp, 
int m, 
int n> 
template<
int l> 
inline 
  473    for( 
int i = 0; i < m; i++ )
 
  474        for( 
int j = 0; j < n; j++ )
 
  477            for( 
int k = 0; 
k < l; 
k++ )
 
  478                s += a(i, 
k) * b(
k, j);
 
 
  483template<
typename _Tp, 
int m, 
int n> 
inline 
  486    for( 
int i = 0; i < m; i++ )
 
  487        for( 
int j = 0; j < n; j++ )
 
  488            val[i*n + j] = a(j, i);
 
 
  491template<
typename _Tp, 
int m, 
int n> 
inline 
  497template<
typename _Tp, 
int m, 
int n> 
inline 
  503template<
typename _Tp, 
int m, 
int n> 
inline 
  509template<
typename _Tp, 
int m, 
int n> 
inline 
  516template<
typename _Tp, 
int m> 
static inline 
  522template<
typename _Tp, 
int m, 
int n> 
static inline 
  526    for( 
int i = 0; i < 
std::min(m, n); i++ )
 
 
  531template<
typename _Tp, 
int m, 
int n> 
static inline 
  534    return std::sqrt(normL2Sqr<_Tp, double>(
M.val, m*n));
 
 
  537template<
typename _Tp, 
int m, 
int n> 
static inline 
  542        return (
double)normInf<_Tp, typename DataType<_Tp>::work_type>(
M.val, m*n);
 
  544        return (
double)normL1<_Tp, typename DataType<_Tp>::work_type>(
M.val, m*n);
 
  546        return (
double)normL2Sqr<_Tp, typename DataType<_Tp>::work_type>(
M.val, m*n);
 
 
  553template<
typename _Tp1, 
typename _Tp2, 
int m, 
int n> 
static inline 
  556    for( 
int i = 0; i < m*n; i++ )
 
  557        a.
val[i] = saturate_cast<_Tp1>(a.
val[i] + b.
val[i]);
 
 
  561template<
typename _Tp1, 
typename _Tp2, 
int m, 
int n> 
static inline 
  564    for( 
int i = 0; i < m*n; i++ )
 
  565        a.
val[i] = saturate_cast<_Tp1>(a.
val[i] - b.
val[i]);
 
 
  569template<
typename _Tp, 
int m, 
int n> 
static inline 
  575template<
typename _Tp, 
int m, 
int n> 
static inline 
  581template<
typename _Tp, 
int m, 
int n> 
static inline 
  584    for( 
int i = 0; i < m*n; i++ )
 
 
  589template<
typename _Tp, 
int m, 
int n> 
static inline 
  592    for( 
int i = 0; i < m*n; i++ )
 
 
  597template<
typename _Tp, 
int m, 
int n> 
static inline 
  600    for( 
int i = 0; i < m*n; i++ )
 
 
  605template<
typename _Tp, 
int m, 
int n> 
static inline 
  611template<
typename _Tp, 
int m, 
int n> 
static inline 
  617template<
typename _Tp, 
int m, 
int n> 
static inline 
  623template<
typename _Tp, 
int m, 
int n> 
static inline 
  629template<
typename _Tp, 
int m, 
int n> 
static inline 
  635template<
typename _Tp, 
int m, 
int n> 
static inline 
  641template<
typename _Tp, 
int m, 
int n> 
static inline 
  644    for( 
int i = 0; i < m*n; i++ )
 
 
  649template<
typename _Tp, 
int m, 
int n> 
static inline 
  652    for( 
int i = 0; i < m*n; i++ )
 
 
  657template<
typename _Tp, 
int m, 
int n> 
static inline 
  663template<
typename _Tp, 
int m, 
int n> 
static inline 
  669template<
typename _Tp, 
int m, 
int n> 
static inline 
  675template<
typename _Tp, 
int m, 
int n, 
int l> 
static inline 
  681template<
typename _Tp, 
int m, 
int n> 
static inline 
  688template<
typename _Tp, 
int m, 
int n> 
static inline 
  691    for( 
int i = 0; i < m*n; i++ )
 
  692        if( a.
val[i] != b.
val[i] ) 
return false;
 
 
  696template<
typename _Tp, 
int m, 
int n> 
static inline 
  713    enum { generic_type = 0,
 
  716#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED 
  720           _dummy_enum_finalizer = 0
 
 
  725template<
typename _Tp, 
int cn>
 
  727template<
typename _Tp, 
int cn>
 
  741template<
typename _Tp, 
typename _T2, 
int cn> 
static inline 
  745    return (commaInitializer, val);
 
  748template<
typename _Tp, 
int cn> 
inline 
  753template<
typename _Tp, 
int cn> 
template<
typename _T2> 
inline 
  757    this->
dst->val[this->
idx++] = saturate_cast<_Tp>(
value);
 
 
  761template<
typename _Tp, 
int cn> 
inline 
  769template<
typename _Tp, 
int cn> 
inline 
  772template<
typename _Tp, 
int cn> 
inline 
  774    : 
Matx<_Tp, cn, 1>(v0) {}
 
 
  776template<
typename _Tp, 
int cn> 
inline 
  778    : 
Matx<_Tp, cn, 1>(v0, v1) {}
 
 
  780template<
typename _Tp, 
int cn> 
inline 
  782    : 
Matx<_Tp, cn, 1>(v0, v1, v2) {}
 
 
  784template<
typename _Tp, 
int cn> 
inline 
  786    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3) {}
 
 
  788template<
typename _Tp, 
int cn> 
inline 
  790    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4) {}
 
 
  792template<
typename _Tp, 
int cn> 
inline 
  794    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5) {}
 
 
  796template<
typename _Tp, 
int cn> 
inline 
  798    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6) {}
 
 
  800template<
typename _Tp, 
int cn> 
inline 
  802    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7) {}
 
 
  804template<
typename _Tp, 
int cn> 
inline 
  806    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7, v8) {}
 
 
  808template<
typename _Tp, 
int cn> 
inline 
  809Vec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9)
 
  810    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {}
 
 
  812template<
typename _Tp, 
int cn> 
inline 
  813Vec<_Tp, cn>::Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13)
 
  814    : 
Matx<_Tp, cn, 1>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) {}
 
 
  816template<
typename _Tp, 
int cn> 
inline 
  818    : 
Matx<_Tp, cn, 1>(values) {}
 
 
  820template<
typename _Tp, 
int cn> 
inline 
  822    : 
Matx<_Tp, cn, 1>(list) {}
 
 
  824template<
typename _Tp, 
int cn> 
inline 
  826    : 
Matx<_Tp, cn, 1>(m.val) {}
 
 
  828template<
typename _Tp, 
int cn> 
inline 
  830    : 
Matx<_Tp, cn, 1>(a, b, op) {}
 
 
  832template<
typename _Tp, 
int cn> 
inline 
  834    : 
Matx<_Tp, cn, 1>(a, b, op) {}
 
 
  836template<
typename _Tp, 
int cn> 
template<
typename _T2> 
inline 
 
  840template<
typename _Tp, 
int cn> 
inline 
  844    for( 
int i = 0; i < cn; i++ ) v.
val[i] = 
alpha;
 
 
  848template<
typename _Tp, 
int cn> 
inline 
  854template<
typename _Tp, 
int cn> 
inline 
  860template<
typename _Tp, 
int cn> 
inline 
  864    for( 
int i = 0; i < cn; i++ ) w.
val[i] = saturate_cast<_Tp>(this->val[i]*v.
val[i]);
 
 
  892template<
typename _Tp, 
int cn> 
inline 
  895    CV_StaticAssert(cn == 3, 
"for arbitrary-size vector there is no cross-product defined");
 
 
  903                     this->val[2]*v.
val[0] - this->val[0]*v.
val[2],
 
  904                     this->val[0]*v.
val[1] - this->val[1]*v.
val[0]);
 
 
  911                     this->val[2]*v.
val[0] - this->val[0]*v.
val[2],
 
  912                     this->val[0]*v.
val[1] - this->val[1]*v.
val[0]);
 
 
  915template<
typename _Tp, 
int cn> 
template<
typename T2> 
inline 
  919    for( 
int i = 0; i < cn; i++ ) v.
val[i] = saturate_cast<T2>(this->val[i]);
 
 
  923template<
typename _Tp, 
int cn> 
inline 
  930template<
typename _Tp, 
int cn> 
inline 
  937template<
typename _Tp, 
int cn> 
inline 
  944template<
typename _Tp, 
int cn> 
inline 
  951template<
typename _Tp, 
int cn> 
inline 
  955    return v * (nv ? 1./nv : 0.);
 
 
  958template<
typename _Tp1, 
typename _Tp2, 
int cn> 
static inline 
  961    for( 
int i = 0; i < cn; i++ )
 
  962        a.
val[i] = saturate_cast<_Tp1>(a.
val[i] + b.
val[i]);
 
 
  966template<
typename _Tp1, 
typename _Tp2, 
int cn> 
static inline 
  969    for( 
int i = 0; i < cn; i++ )
 
  970        a.
val[i] = saturate_cast<_Tp1>(a.
val[i] - b.
val[i]);
 
 
  974template<
typename _Tp, 
int cn> 
static inline 
  980template<
typename _Tp, 
int cn> 
static inline 
  986template<
typename _Tp, 
int cn> 
static inline 
  989    for( 
int i = 0; i < cn; i++ )
 
  990        a[i] = saturate_cast<_Tp>(a[i]*
alpha);
 
 
  994template<
typename _Tp, 
int cn> 
static inline 
  997    for( 
int i = 0; i < cn; i++ )
 
  998        a[i] = saturate_cast<_Tp>(a[i]*
alpha);
 
 
 1002template<
typename _Tp, 
int cn> 
static inline 
 1005    for( 
int i = 0; i < cn; i++ )
 
 1006        a[i] = saturate_cast<_Tp>(a[i]*
alpha);
 
 
 1010template<
typename _Tp, 
int cn> 
static inline 
 1013    double ialpha = 1./
alpha;
 
 1014    for( 
int i = 0; i < cn; i++ )
 
 1015        a[i] = saturate_cast<_Tp>(a[i]*ialpha);
 
 
 1019template<
typename _Tp, 
int cn> 
static inline 
 1022    float ialpha = 1.f/
alpha;
 
 1023    for( 
int i = 0; i < cn; i++ )
 
 1024        a[i] = saturate_cast<_Tp>(a[i]*ialpha);
 
 
 1028template<
typename _Tp, 
int cn> 
static inline 
 1031    double ialpha = 1./
alpha;
 
 1032    for( 
int i = 0; i < cn; i++ )
 
 1033        a[i] = saturate_cast<_Tp>(a[i]*ialpha);
 
 
 1037template<
typename _Tp, 
int cn> 
static inline 
 1043template<
typename _Tp, 
int cn> 
static inline 
 1049template<
typename _Tp, 
int cn> 
static inline 
 1055template<
typename _Tp, 
int cn> 
static inline 
 1061template<
typename _Tp, 
int cn> 
static inline 
 1067template<
typename _Tp, 
int cn> 
static inline 
 1073template<
typename _Tp, 
int cn> 
static inline 
 1079template<
typename _Tp, 
int cn> 
static inline 
 1085template<
typename _Tp, 
int cn> 
static inline 
 1091template<
typename _Tp, 
int cn> 
static inline 
 1095    for( 
int i = 0; i < cn; i++ ) t.
val[i] = saturate_cast<_Tp>(-a.
val[i]);
 
 
 1101    return Vec<_Tp, 4>(saturate_cast<_Tp>(v1[0]*v2[0] - v1[1]*v2[1] - v1[2]*v2[2] - v1[3]*v2[3]),
 
 1102                       saturate_cast<_Tp>(v1[0]*v2[1] + v1[1]*v2[0] + v1[2]*v2[3] - v1[3]*v2[2]),
 
 1103                       saturate_cast<_Tp>(v1[0]*v2[2] - v1[1]*v2[3] + v1[2]*v2[0] + v1[3]*v2[1]),
 
 1104                       saturate_cast<_Tp>(v1[0]*v2[3] + v1[1]*v2[2] - v1[2]*v2[1] + v1[3]*v2[0]));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
_Tp channel_type
Definition matx.inl.hpp:84
 
Matx< typename DataType< _Tp >::work_type, m, n > work_type
Definition matx.inl.hpp:83
 
value_type vec_type
Definition matx.inl.hpp:85
 
Matx< _Tp, m, n > value_type
Definition matx.inl.hpp:82
 
_Tp channel_type
Definition matx.inl.hpp:710
 
Vec< typename DataType< _Tp >::work_type, cn > work_type
Definition matx.inl.hpp:709
 
Vec< _Tp, cn > value_type
Definition matx.inl.hpp:708
 
value_type vec_type
Definition matx.inl.hpp:711
 
Template "trait" class for OpenCV primitive data types.
Definition traits.hpp:113
 
Comma-separated Matrix Initializer.
Definition matx.inl.hpp:108
 
int idx
Definition matx.inl.hpp:115
 
Matx< _Tp, m, n > * dst
Definition matx.inl.hpp:114
 
MatxCommaInitializer< _Tp, m, n > & operator,(T2 val)
 
Matx< _Tp, m, n > operator*() const
Definition matx.inl.hpp:139
 
MatxCommaInitializer(Matx< _Tp, m, n > *_mtx)
Definition matx.inl.hpp:126
 
Template class for small matrices whose type and size are known at compilation time.
Definition matx.hpp:100
 
Matx< _Tp, m, n > mul(const Matx< _Tp, m, n > &a) const
multiply two matrices element-wise
Definition matx.inl.hpp:492
 
Matx()
default constructor
Definition matx.inl.hpp:148
 
Matx< _Tp, n, m > t() const
transpose the matrix
Definition matx.inl.hpp:504
 
static CV_NODISCARD_STD Matx ones()
Definition matx.inl.hpp:313
 
Matx< _Tp, 1, n > row(int i) const
extract the matrix row
Definition matx.inl.hpp:380
 
Matx< _Tp, m, 1 > col(int i) const
extract the matrix column
Definition matx.inl.hpp:387
 
static CV_NODISCARD_STD Matx eye()
Definition matx.inl.hpp:319
 
Matx< _Tp, m, n > div(const Matx< _Tp, m, n > &a) const
divide two matrices element-wise
Definition matx.inl.hpp:498
 
Matx< _Tp, m1, n1 > reshape() const
change the matrix shape
Definition matx.inl.hpp:361
 
static CV_NODISCARD_STD Matx zeros()
Definition matx.inl.hpp:307
 
const _Tp & operator()(int row, int col) const
element access
Definition matx.inl.hpp:406
 
static CV_NODISCARD_STD Matx all(_Tp alpha)
Definition matx.inl.hpp:299
 
Matx< _Tp, n, l > solve(const Matx< _Tp, m, l > &rhs, int flags=DECOMP_LU) const
solve linear system
 
double ddot(const Matx< _Tp, m, n > &v) const
dot product computed in double-precision arithmetics
Definition matx.inl.hpp:336
 
diag_type diag() const
extract the matrix diagonal
Definition matx.inl.hpp:397
 
_Tp val[m *n]
matrix elements
Definition matx.hpp:218
 
Matx< _Tp, m1, n1 > get_minor(int base_row, int base_col) const
extract part of the matrix
Definition matx.inl.hpp:369
 
_Tp dot(const Matx< _Tp, m, n > &v) const
dot product computed with the default precision
Definition matx.inl.hpp:328
 
Comma-separated Vec Initializer.
Definition matx.inl.hpp:734
 
VecCommaInitializer< _Tp, m > & operator,(T2 val)
 
Vec< _Tp, m > operator*() const
Definition matx.inl.hpp:762
 
VecCommaInitializer(Vec< _Tp, m > *_vec)
Definition matx.inl.hpp:749
 
Template class for short numerical vectors, a partial case of Matx.
Definition matx.hpp:369
 
static Vec zeros()
Definition matx.inl.hpp:855
 
static Vec all(_Tp alpha)
Definition matx.inl.hpp:841
 
Vec mul(const Vec< _Tp, cn > &v) const
per-element multiplication
Definition matx.inl.hpp:861
 
Vec()
default constructor
Definition matx.inl.hpp:770
 
const _Tp & operator[](int i) const
Definition matx.inl.hpp:924
 
Vec cross(const Vec &v) const
Definition matx.inl.hpp:893
 
static Vec ones()
Definition matx.inl.hpp:849
 
const _Tp & operator()(int i) const
Definition matx.inl.hpp:938
 
Vec conj() const
conjugation (makes sense for complex numbers and quaternions)
 
CV_EXPORTS_W double norm(InputArray src1, int normType=NORM_L2, InputArray mask=noArray())
Calculates the absolute norm of an array.
 
CV_EXPORTS_W bool solve(InputArray src1, InputArray src2, OutputArray dst, int flags=DECOMP_LU)
Solves one or more linear systems or least-squares problems.
 
CV_EXPORTS_W Scalar trace(InputArray mtx)
Returns the trace of a matrix.
 
CV_EXPORTS_W double determinant(InputArray mtx)
Returns the determinant of a square floating-point matrix.
 
CV_EXPORTS_W void normalize(InputArray src, InputOutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray())
Normalizes the norm or value range of an array.
 
@ NORM_L2
Definition base.hpp:185
 
@ NORM_L1
Definition base.hpp:176
 
@ NORM_L2SQR
Definition base.hpp:194
 
@ NORM_INF
Definition base.hpp:168
 
static String & operator<<(String &out, Ptr< Formatted > fmtd)
Definition core.hpp:3164
 
static bool operator!=(const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b)
 
static bool operator==(const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b)
 
int CvScalar value
Definition core_c.h:720
 
int int channels
Definition core_c.h:100
 
const void * elem
Definition core_c.h:1715
 
const int * idx
Definition core_c.h:668
 
int int type
Definition core_c.h:221
 
int depth
Definition core_c.h:100
 
const CvArr CvArr * x
Definition core_c.h:1195
 
double alpha
Definition core_c.h:1093
 
#define CV_MAKETYPE(depth, cn)
Definition interface.h:85
 
CV_INLINE v_reg< _Tp, n > & operator/=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
 
CV_INLINE v_reg< _Tp, n > operator/(const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
Divide values.
 
CV_INLINE v_reg< _Tp, n > & operator-=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
 
CV_INLINE v_reg< _Tp, n > & operator+=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
 
CV_INLINE v_reg< _Tp, n > & operator*=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)
 
CV_EXPORTS int LU(float *A, size_t astep, int m, float *b, size_t bstep, int n)
 
static _AccTp normL2Sqr(const _Tp *a, int n)
Definition base.hpp:404
 
#define CV_DbgAssert(expr)
Definition base.hpp:375
 
CvArr CvPoint2D32f double M
Definition imgproc_c.h:270
 
const CvArr CvArr int method
Definition imgproc_c.h:384
 
CvArr CvArr * temp
Definition imgproc_c.h:329
 
CV_EXPORTS OutputArray int double double InputArray OutputArray int int bool double k
Definition imgproc.hpp:2133
 
OutputArray dst
Definition imgproc.hpp:3564
 
Vec< _Tp, 2 > conjugate(const Vec< _Tp, 2 > &v)
Definition matx.inl.hpp:63
 
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441
 
DualQuat< T > operator-(const DualQuat< T > &q, const T a)
Definition dualquaternion.inl.hpp:255
 
DualQuat< T > operator+(const T a, const DualQuat< T > &q)
Definition dualquaternion.inl.hpp:243
 
DualQuat< T > operator*(const T a, const DualQuat< T > &q)
Definition dualquaternion.inl.hpp:274
 
Definition matx.inl.hpp:24
 
double operator()(const Matx< _Tp, m, m > &a) const
Definition matx.inl.hpp:25
 
Definition traits.hpp:382
 
@ value
Definition traits.hpp:382
 
Definition traits.hpp:402
 
Definition traits.hpp:386
 
@ value
Definition traits.hpp:386