OXIESEC PANEL
- Current Dir:
/
/
usr
/
include
/
opencv2
/
core
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 06:50:42 AM
rwxr-xr-x
📄
affine.hpp
15.03 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
base.hpp
26.02 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
bufferpool.hpp
723 bytes
05/12/2017 03:45:27 AM
rw-r--r--
📄
core.hpp
2.31 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
core_c.h
128.15 KB
05/12/2017 03:45:27 AM
rw-r--r--
📁
cuda
-
10/28/2024 06:50:34 AM
rwxr-xr-x
📄
cuda.hpp
28.59 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cuda.inl.hpp
13.59 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cuda_stream_accessor.hpp
3.17 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cuda_types.hpp
5.09 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cvdef.h
13.91 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cvstd.hpp
31.57 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
cvstd.inl.hpp
6.96 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
directx.hpp
7.08 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
eigen.hpp
9.11 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
fast_math.hpp
9.35 KB
09/20/2018 09:28:13 AM
rw-r--r--
📁
hal
-
10/28/2024 06:50:34 AM
rwxr-xr-x
📄
ippasync.hpp
7.3 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
mat.hpp
146.2 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
mat.inl.hpp
90.65 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
matx.hpp
43.42 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
neon_utils.hpp
4.29 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
ocl.hpp
26.86 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
ocl_genbase.hpp
2.28 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
opengl.hpp
23.4 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
operations.hpp
18.12 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
optim.hpp
15.48 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
ovx.hpp
731 bytes
05/12/2017 03:45:27 AM
rw-r--r--
📄
persistence.hpp
45.86 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
private.cuda.hpp
6.18 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
private.hpp
20.99 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
ptr.inl.hpp
9.38 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
saturate.hpp
9.12 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
sse_utils.hpp
41.2 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
traits.hpp
9.74 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
types.hpp
63.21 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
types_c.h
59.05 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
utility.hpp
35.96 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
va_intel.hpp
2.74 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
version.hpp
2.96 KB
05/12/2017 03:45:27 AM
rw-r--r--
📄
wimage.hpp
19.71 KB
05/12/2017 03:45:27 AM
rw-r--r--
Editing: eigen.hpp
Close
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // License Agreement // For Open Source Computer Vision Library // // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. // Copyright (C) 2009, Willow Garage Inc., all rights reserved. // Copyright (C) 2013, OpenCV Foundation, all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. // // This software is provided by the copyright holders and contributors "as is" and // any express or implied warranties, including, but not limited to, the implied // warranties of merchantability and fitness for a particular purpose are disclaimed. // In no event shall the Intel Corporation or contributors be liable for any direct, // indirect, incidental, special, exemplary, or consequential damages // (including, but not limited to, procurement of substitute goods or services; // loss of use, data, or profits; or business interruption) however caused // and on any theory of liability, whether in contract, strict liability, // or tort (including negligence or otherwise) arising in any way out of // the use of this software, even if advised of the possibility of such damage. // //M*/ #ifndef OPENCV_CORE_EIGEN_HPP #define OPENCV_CORE_EIGEN_HPP #include "opencv2/core.hpp" #if defined _MSC_VER && _MSC_VER >= 1200 #pragma warning( disable: 4714 ) //__forceinline is not inlined #pragma warning( disable: 4127 ) //conditional expression is constant #pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data #endif namespace cv { //! @addtogroup core_eigen //! @{ template<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& src, Mat& dst ) { if( !(src.Flags & Eigen::RowMajorBit) ) { Mat _src(src.cols(), src.rows(), DataType<_Tp>::type, (void*)src.data(), src.stride()*sizeof(_Tp)); transpose(_src, dst); } else { Mat _src(src.rows(), src.cols(), DataType<_Tp>::type, (void*)src.data(), src.stride()*sizeof(_Tp)); _src.copyTo(dst); } } // Matx case template<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& src, Matx<_Tp, _rows, _cols>& dst ) { if( !(src.Flags & Eigen::RowMajorBit) ) { dst = Matx<_Tp, _cols, _rows>(static_cast<const _Tp*>(src.data())).t(); } else { dst = Matx<_Tp, _rows, _cols>(static_cast<const _Tp*>(src.data())); } } template<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline void cv2eigen( const Mat& src, Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& dst ) { CV_DbgAssert(src.rows == _rows && src.cols == _cols); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(src.cols, src.rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); if( src.type() == _dst.type() ) transpose(src, _dst); else if( src.cols == src.rows ) { src.convertTo(_dst, _dst.type()); transpose(_dst, _dst); } else Mat(src.t()).convertTo(_dst, _dst.type()); } else { const Mat _dst(src.rows, src.cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); src.convertTo(_dst, _dst.type()); } } // Matx case template<typename _Tp, int _rows, int _cols, int _options, int _maxRows, int _maxCols> static inline void cv2eigen( const Matx<_Tp, _rows, _cols>& src, Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& dst ) { if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(_cols, _rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); transpose(src, _dst); } else { const Mat _dst(_rows, _cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); Mat(src).copyTo(_dst); } } template<typename _Tp> static inline void cv2eigen( const Mat& src, Eigen::Matrix<_Tp, Eigen::Dynamic, Eigen::Dynamic>& dst ) { dst.resize(src.rows, src.cols); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(src.cols, src.rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); if( src.type() == _dst.type() ) transpose(src, _dst); else if( src.cols == src.rows ) { src.convertTo(_dst, _dst.type()); transpose(_dst, _dst); } else Mat(src.t()).convertTo(_dst, _dst.type()); } else { const Mat _dst(src.rows, src.cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); src.convertTo(_dst, _dst.type()); } } // Matx case template<typename _Tp, int _rows, int _cols> static inline void cv2eigen( const Matx<_Tp, _rows, _cols>& src, Eigen::Matrix<_Tp, Eigen::Dynamic, Eigen::Dynamic>& dst ) { dst.resize(_rows, _cols); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(_cols, _rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); transpose(src, _dst); } else { const Mat _dst(_rows, _cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); Mat(src).copyTo(_dst); } } template<typename _Tp> static inline void cv2eigen( const Mat& src, Eigen::Matrix<_Tp, Eigen::Dynamic, 1>& dst ) { CV_Assert(src.cols == 1); dst.resize(src.rows); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(src.cols, src.rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); if( src.type() == _dst.type() ) transpose(src, _dst); else Mat(src.t()).convertTo(_dst, _dst.type()); } else { const Mat _dst(src.rows, src.cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); src.convertTo(_dst, _dst.type()); } } // Matx case template<typename _Tp, int _rows> static inline void cv2eigen( const Matx<_Tp, _rows, 1>& src, Eigen::Matrix<_Tp, Eigen::Dynamic, 1>& dst ) { dst.resize(_rows); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(1, _rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); transpose(src, _dst); } else { const Mat _dst(_rows, 1, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); src.copyTo(_dst); } } template<typename _Tp> static inline void cv2eigen( const Mat& src, Eigen::Matrix<_Tp, 1, Eigen::Dynamic>& dst ) { CV_Assert(src.rows == 1); dst.resize(src.cols); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(src.cols, src.rows, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); if( src.type() == _dst.type() ) transpose(src, _dst); else Mat(src.t()).convertTo(_dst, _dst.type()); } else { const Mat _dst(src.rows, src.cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); src.convertTo(_dst, _dst.type()); } } //Matx template<typename _Tp, int _cols> static inline void cv2eigen( const Matx<_Tp, 1, _cols>& src, Eigen::Matrix<_Tp, 1, Eigen::Dynamic>& dst ) { dst.resize(_cols); if( !(dst.Flags & Eigen::RowMajorBit) ) { const Mat _dst(_cols, 1, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); transpose(src, _dst); } else { const Mat _dst(1, _cols, DataType<_Tp>::type, dst.data(), (size_t)(dst.stride()*sizeof(_Tp))); Mat(src).copyTo(_dst); } } //! @} } // cv #endif