EstervQrCode 1.1.1
Library for qr code manipulation
Modules | Classes | Macros | Typedefs | Enumerations | Functions
Utility and system functions and macros

Modules

 Logging facilities
 
 SSE utilities
 
 NEON utilities
 
 VSX utilities
 
 Softfloat support
 
 Utility functions for OpenCV samples
 

Classes

struct  cv::Hamming
 
union  Cv16suf
 
union  Cv32suf
 
union  Cv64suf
 
class  cv::Allocator< _Tp >
 
class  cv::AutoBuffer< _Tp, fixed_size >
 Automatically Allocated Buffer Class. More...
 
class  cv::TickMeter
 a Class to measure passing time. More...
 
class  cv::ParallelLoopBody
 Base class for parallel data processors. More...
 
class  cv::ParallelLoopBodyLambdaWrapper
 
class  cv::CommandLineParser
 Designed for command line parsing. More...
 
class  cv::TLSDataContainer
 
class  cv::TLSData< T >
 Simple TLS data class. More...
 
class  cv::TLSDataAccumulator< T >
 TLS data accumulator with gathering methods. More...
 
class  cv::Exception
 Class passed to an error. More...
 

Macros

#define CV_Error(code, msg)   cv::error( code, msg, CV_Func, __FILE__, __LINE__ )
 Call the error handler. More...
 
#define CV_Error_(code, args)   cv::error( code, cv::format args, CV_Func, __FILE__, __LINE__ )
 Call the error handler. More...
 
#define CV_Assert(expr)   do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ); } while(0)
 Checks a condition at runtime and throws exception if it fails. More...
 
#define CV_DbgAssert(expr)
 
#define CV__DEBUG_NS_BEGIN
 
#define CV__DEBUG_NS_END
 
#define __CV_EXPAND(x)   x
 
#define __CV_CAT__(x, y)   x ## y
 
#define __CV_CAT_(x, y)   __CV_CAT__(x, y)
 
#define __CV_CAT(x, y)   __CV_CAT_(x, y)
 
#define __CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)   N
 
#define __CV_VA_NUM_ARGS(...)   __CV_EXPAND(__CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
 
#define CV_Func   "<unknown>"
 
#define CV_CDECL
 
#define CV_STDCALL
 
#define CV_INLINE   static
 
#define CV_ALWAYS_INLINE   inline
 
#define CV_ENABLE_UNROLLED   1
 
#define CV_DECL_ALIGNED(x)
 
#define CV_CPU_NONE   0
 
#define CV_CPU_MMX   1
 
#define CV_CPU_SSE   2
 
#define CV_CPU_SSE2   3
 
#define CV_CPU_SSE3   4
 
#define CV_CPU_SSSE3   5
 
#define CV_CPU_SSE4_1   6
 
#define CV_CPU_SSE4_2   7
 
#define CV_CPU_POPCNT   8
 
#define CV_CPU_FP16   9
 
#define CV_CPU_AVX   10
 
#define CV_CPU_AVX2   11
 
#define CV_CPU_FMA3   12
 
#define CV_CPU_AVX_512F   13
 
#define CV_CPU_AVX_512BW   14
 
#define CV_CPU_AVX_512CD   15
 
#define CV_CPU_AVX_512DQ   16
 
#define CV_CPU_AVX_512ER   17
 
#define CV_CPU_AVX_512IFMA512   18
 
#define CV_CPU_AVX_512IFMA   18
 
#define CV_CPU_AVX_512PF   19
 
#define CV_CPU_AVX_512VBMI   20
 
#define CV_CPU_AVX_512VL   21
 
#define CV_CPU_AVX_512VBMI2   22
 
#define CV_CPU_AVX_512VNNI   23
 
#define CV_CPU_AVX_512BITALG   24
 
#define CV_CPU_AVX_512VPOPCNTDQ   25
 
#define CV_CPU_AVX_5124VNNIW   26
 
#define CV_CPU_AVX_5124FMAPS   27
 
#define CV_CPU_NEON   100
 
#define CV_CPU_NEON_DOTPROD   101
 
#define CV_CPU_NEON_FP16   102
 
#define CV_CPU_NEON_BF16   103
 
#define CV_CPU_MSA   150
 
#define CV_CPU_RISCVV   170
 
#define CV_CPU_VSX   200
 
#define CV_CPU_VSX3   201
 
#define CV_CPU_RVV   210
 
#define CV_CPU_LSX   230
 
#define CV_CPU_LASX   231
 
#define CV_CPU_AVX512_SKX   256
 
#define CV_CPU_AVX512_COMMON   257
 
#define CV_CPU_AVX512_KNL   258
 
#define CV_CPU_AVX512_KNM   259
 
#define CV_CPU_AVX512_CNL   260
 
#define CV_CPU_AVX512_CLX   261
 
#define CV_CPU_AVX512_ICL   262
 
#define CV_HARDWARE_MAX_FEATURE   512
 
#define CV_STRONG_ALIGNMENT   0
 
#define CV_PI   3.1415926535897932384626433832795
 
#define CV_2PI   6.283185307179586476925286766559
 
#define CV_LOG2   0.69314718055994530941723212145818
 
#define CV_FP16_TYPE   0
 
#define OPENCV_ABI_COMPATIBILITY   400
 
#define CV_EXPORTS
 
#define CV_EXPORTS_TEMPLATE   CV_EXPORTS
 
#define CV_DEPRECATED
 
#define CV_DEPRECATED_EXTERNAL   CV_DEPRECATED
 
#define CV_EXTERN_C
 
#define CV_EXPORTS_W   CV_EXPORTS
 
#define CV_EXPORTS_W_SIMPLE   CV_EXPORTS
 
#define CV_EXPORTS_AS(synonym)   CV_EXPORTS
 
#define CV_EXPORTS_W_MAP   CV_EXPORTS
 
#define CV_EXPORTS_W_PARAMS   CV_EXPORTS
 
#define CV_IN_OUT
 
#define CV_OUT
 
#define CV_PROP
 
#define CV_PROP_RW
 
#define CV_WRAP
 
#define CV_WRAP_AS(synonym)
 
#define CV_WRAP_MAPPABLE(mappable)
 
#define CV_WRAP_PHANTOM(phantom_header)
 
#define CV_WRAP_DEFAULT(val)
 
#define CV_WRAP_FILE_PATH
 
#define CV_MAX_DIM   32
 
#define CV_MAT_CN_MASK   ((CV_CN_MAX - 1) << CV_CN_SHIFT)
 
#define CV_MAT_CN(flags)   ((((flags) & CV_MAT_CN_MASK) >> CV_CN_SHIFT) + 1)
 
#define CV_MAT_TYPE_MASK   (CV_DEPTH_MAX*CV_CN_MAX - 1)
 
#define CV_MAT_TYPE(flags)   ((flags) & CV_MAT_TYPE_MASK)
 
#define CV_MAT_CONT_FLAG_SHIFT   14
 
#define CV_MAT_CONT_FLAG   (1 << CV_MAT_CONT_FLAG_SHIFT)
 
#define CV_IS_MAT_CONT(flags)   ((flags) & CV_MAT_CONT_FLAG)
 
#define CV_IS_CONT_MAT   CV_IS_MAT_CONT
 
#define CV_SUBMAT_FLAG_SHIFT   15
 
#define CV_SUBMAT_FLAG   (1 << CV_SUBMAT_FLAG_SHIFT)
 
#define CV_IS_SUBMAT(flags)   ((flags) & CV_MAT_SUBMAT_FLAG)
 
#define CV_ELEM_SIZE1(type)   ((0x28442211 >> CV_MAT_DEPTH(type)*4) & 15)
 
#define CV_ELEM_SIZE(type)   (CV_MAT_CN(type)*CV_ELEM_SIZE1(type))
 
#define MIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define MAX(a, b)   ((a) < (b) ? (b) : (a))
 
#define CV_IMIN(a, b)   ((a) ^ (((a)^(b)) & (((a) < (b)) - 1)))
 
#define CV_IMAX(a, b)   ((a) ^ (((a)^(b)) & (((a) > (b)) - 1)))
 
#define CV_SWAP(a, b, t)   ((t) = (a), (a) = (b), (b) = (t))
 
#define CV_CMP(a, b)   (((a) > (b)) - ((a) < (b)))
 
#define CV_SIGN(a)   CV_CMP((a),0)
 
#define __CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST)   static const EnumType MEMBER_CONST = EnumType::MEMBER_CONST; \
 
#define __CV_ENUM_CLASS_EXPOSE_2(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_3(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_4(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_5(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_6(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_7(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_8(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_CLASS_EXPOSE_9(EnumType, MEMBER_CONST, ...)
 
#define __CV_ENUM_FLAGS_LOGICAL_NOT(EnumType)
 
#define __CV_ENUM_FLAGS_LOGICAL_NOT_EQ(Arg1Type, Arg2Type)
 
#define __CV_ENUM_FLAGS_LOGICAL_EQ(Arg1Type, Arg2Type)
 
#define __CV_ENUM_FLAGS_BITWISE_NOT(EnumType)
 
#define __CV_ENUM_FLAGS_BITWISE_OR(EnumType, Arg1Type, Arg2Type)
 
#define __CV_ENUM_FLAGS_BITWISE_AND(EnumType, Arg1Type, Arg2Type)
 
#define __CV_ENUM_FLAGS_BITWISE_XOR(EnumType, Arg1Type, Arg2Type)
 
#define __CV_ENUM_FLAGS_BITWISE_OR_EQ(EnumType, Arg1Type)
 
#define __CV_ENUM_FLAGS_BITWISE_AND_EQ(EnumType, Arg1Type)
 
#define __CV_ENUM_FLAGS_BITWISE_XOR_EQ(EnumType, Arg1Type)
 
#define CV_ENUM_CLASS_EXPOSE(EnumType, ...)   __CV_EXPAND(__CV_CAT(__CV_ENUM_CLASS_EXPOSE_, __CV_VA_NUM_ARGS(__VA_ARGS__))(EnumType, __VA_ARGS__)); \
 
#define CV_ENUM_FLAGS(EnumType)
 
#define CV_NORETURN   /* nothing by default */
 
#define __has_cpp_attribute(__x)   0
 
#define CV_NODISCARD_STD   /* nothing by default */
 
#define CV_CXX11   1
 
#define CV_OVERRIDE   override
 
#define CV_FINAL   final
 
#define CV_NOEXCEPT   noexcept
 
#define CV_CONSTEXPR   constexpr
 

Typedefs

typedef Hamming cv::HammingLUT
 
typedef union Cv16suf Cv16suf
 
typedef union Cv32suf Cv32suf
 
typedef union Cv64suf Cv64suf
 
typedef int(* cv::ErrorCallback) (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)
 
typedef std::recursive_mutex cv::Mutex
 
typedef std::lock_guard< cv::Mutexcv::AutoLock
 

Enumerations

enum  CpuFeatures {
  CPU_MMX = 1 , CPU_SSE = 2 , CPU_SSE2 = 3 , CPU_SSE3 = 4 ,
  CPU_SSSE3 = 5 , CPU_SSE4_1 = 6 , CPU_SSE4_2 = 7 , CPU_POPCNT = 8 ,
  CPU_FP16 = 9 , CPU_AVX = 10 , CPU_AVX2 = 11 , CPU_FMA3 = 12 ,
  CPU_AVX_512F = 13 , CPU_AVX_512BW = 14 , CPU_AVX_512CD = 15 , CPU_AVX_512DQ = 16 ,
  CPU_AVX_512ER = 17 , CPU_AVX_512IFMA512 = 18 , CPU_AVX_512IFMA = 18 , CPU_AVX_512PF = 19 ,
  CPU_AVX_512VBMI = 20 , CPU_AVX_512VL = 21 , CPU_AVX_512VBMI2 = 22 , CPU_AVX_512VNNI = 23 ,
  CPU_AVX_512BITALG = 24 , CPU_AVX_512VPOPCNTDQ = 25 , CPU_AVX_5124VNNIW = 26 , CPU_AVX_5124FMAPS = 27 ,
  CPU_NEON = 100 , CPU_NEON_DOTPROD = 101 , CPU_NEON_FP16 = 102 , CPU_NEON_BF16 = 103 ,
  CPU_MSA = 150 , CPU_RISCVV = 170 , CPU_VSX = 200 , CPU_VSX3 = 201 ,
  CPU_RVV = 210 , CPU_LSX = 230 , CPU_LASX = 231 , CPU_AVX512_SKX = 256 ,
  CPU_AVX512_COMMON = 257 , CPU_AVX512_KNL = 258 , CPU_AVX512_KNM = 259 , CPU_AVX512_CNL = 260 ,
  CPU_AVX512_CLX = 261 , CPU_AVX512_ICL = 262 , CPU_MAX_FEATURE = 512
}
 Available CPU features. More...
 
enum  cv::SortFlags { cv::SORT_EVERY_ROW = 0 , cv::SORT_EVERY_COLUMN = 1 , cv::SORT_ASCENDING = 0 , cv::SORT_DESCENDING = 16 }
 

Functions

CV_EXPORTS CV_NORETURN void cv::error (int _code, const String &_err, const char *_func, const char *_file, int _line)
 Signals an error and raises the exception. More...
 
template<typename _Tp >
_Tp cv::cv_abs (_Tp x)
 
int cv::cv_abs (uchar x)
 
int cv::cv_abs (schar x)
 
int cv::cv_abs (ushort x)
 
int cv::cv_abs (short x)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normL2Sqr (const _Tp *a, int n)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normL1 (const _Tp *a, int n)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normInf (const _Tp *a, int n)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normL2Sqr (const _Tp *a, const _Tp *b, int n)
 
static float cv::normL2Sqr (const float *a, const float *b, int n)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normL1 (const _Tp *a, const _Tp *b, int n)
 
float cv::normL1 (const float *a, const float *b, int n)
 
int cv::normL1 (const uchar *a, const uchar *b, int n)
 
template<typename _Tp , typename _AccTp >
static _AccTp cv::normInf (const _Tp *a, const _Tp *b, int n)
 
CV_EXPORTS_W float cv::cubeRoot (float val)
 Computes the cube root of an argument. More...
 
static double cv::cubeRoot (double val)
 
CV_EXPORTS_W float cv::fastAtan2 (float y, float x)
 Calculates the angle of a 2D vector in degrees. More...
 
CV_EXPORTS int cv::LU (float *A, size_t astep, int m, float *b, size_t bstep, int n)
 
CV_EXPORTS int cv::LU (double *A, size_t astep, int m, double *b, size_t bstep, int n)
 
CV_EXPORTS bool cv::Cholesky (float *A, size_t astep, int m, float *b, size_t bstep, int n)
 
CV_EXPORTS bool cv::Cholesky (double *A, size_t astep, int m, double *b, size_t bstep, int n)
 
CV_EXPORTS_W String cv::utils::dumpInputArray (InputArray argument)
 
CV_EXPORTS_W String cv::utils::dumpInputArrayOfArrays (InputArrayOfArrays argument)
 
CV_EXPORTS_W String cv::utils::dumpInputOutputArray (InputOutputArray argument)
 
CV_EXPORTS_W String cv::utils::dumpInputOutputArrayOfArrays (InputOutputArrayOfArrays argument)
 
static CV_WRAP String cv::utils::dumpBool (bool argument)
 
static CV_WRAP String cv::utils::dumpInt (int argument)
 
static CV_WRAP String cv::utils::dumpInt64 (int64 argument)
 
static CV_WRAP String cv::utils::dumpSizeT (size_t argument)
 
static CV_WRAP String cv::utils::dumpFloat (float argument)
 
static CV_WRAP String cv::utils::dumpDouble (double argument)
 
static CV_WRAP String cv::utils::dumpCString (const char *argument)
 
static CV_WRAP String cv::utils::dumpString (const String &argument)
 
static CV_WRAP String cv::utils::dumpRect (const Rect &argument)
 
static CV_WRAP String cv::utils::dumpTermCriteria (const TermCriteria &argument)
 
static CV_WRAP String cv::utils::dumpRotatedRect (const RotatedRect &argument)
 
static CV_WRAP String cv::utils::dumpRange (const Range &argument)
 
CV_EXPORTS_W String cv::utils::dumpVectorOfInt (const std::vector< int > &vec)
 
CV_EXPORTS_W String cv::utils::dumpVectorOfDouble (const std::vector< double > &vec)
 
CV_EXPORTS_W String cv::utils::dumpVectorOfRect (const std::vector< Rect > &vec)
 
CV_EXPORTS void * cv::fastMalloc (size_t bufSize)
 Allocates an aligned memory buffer. More...
 
CV_EXPORTS void cv::fastFree (void *ptr)
 Deallocates a memory buffer. More...
 
CV_INLINE int cvRound (double value)
 Rounds floating-point number to the nearest integer. More...
 
CV_INLINE int cvFloor (double value)
 Rounds floating-point number to the nearest integer not larger than the original. More...
 
CV_INLINE int cvCeil (double value)
 Rounds floating-point number to the nearest integer not smaller than the original. More...
 
CV_INLINE int cvIsNaN (double value)
 Determines if the argument is Not A Number. More...
 
CV_INLINE int cvIsInf (double value)
 Determines if the argument is Infinity. More...
 
CV_EXPORTS String cv::format (const char *fmt,...) CV_FORMAT_PRINTF(1
 Returns a text string formatted using the printf-like expression. More...
 
template<typename _Tp >
static _Tp cv::saturate_cast (uchar v)
 Template function for accurate conversion from one primitive type to another. More...
 
template<typename _Tp >
static _Tp cv::saturate_cast (schar v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (ushort v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (short v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (unsigned v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (int v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (float v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (double v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (int64 v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (uint64 v)
 
template<>
uchar cv::saturate_cast< uchar > (schar v)
 
template<>
uchar cv::saturate_cast< uchar > (ushort v)
 
template<>
uchar cv::saturate_cast< uchar > (int v)
 
template<>
uchar cv::saturate_cast< uchar > (short v)
 
template<>
uchar cv::saturate_cast< uchar > (unsigned v)
 
template<>
uchar cv::saturate_cast< uchar > (float v)
 
template<>
uchar cv::saturate_cast< uchar > (double v)
 
template<>
uchar cv::saturate_cast< uchar > (int64 v)
 
template<>
uchar cv::saturate_cast< uchar > (uint64 v)
 
template<>
schar cv::saturate_cast< schar > (uchar v)
 
template<>
schar cv::saturate_cast< schar > (ushort v)
 
template<>
schar cv::saturate_cast< schar > (int v)
 
template<>
schar cv::saturate_cast< schar > (short v)
 
template<>
schar cv::saturate_cast< schar > (unsigned v)
 
template<>
schar cv::saturate_cast< schar > (float v)
 
template<>
schar cv::saturate_cast< schar > (double v)
 
template<>
schar cv::saturate_cast< schar > (int64 v)
 
template<>
schar cv::saturate_cast< schar > (uint64 v)
 
template<>
ushort cv::saturate_cast< ushort > (schar v)
 
template<>
ushort cv::saturate_cast< ushort > (short v)
 
template<>
ushort cv::saturate_cast< ushort > (int v)
 
template<>
ushort cv::saturate_cast< ushort > (unsigned v)
 
template<>
ushort cv::saturate_cast< ushort > (float v)
 
template<>
ushort cv::saturate_cast< ushort > (double v)
 
template<>
ushort cv::saturate_cast< ushort > (int64 v)
 
template<>
ushort cv::saturate_cast< ushort > (uint64 v)
 
template<>
short cv::saturate_cast< short > (ushort v)
 
template<>
short cv::saturate_cast< short > (int v)
 
template<>
short cv::saturate_cast< short > (unsigned v)
 
template<>
short cv::saturate_cast< short > (float v)
 
template<>
short cv::saturate_cast< short > (double v)
 
template<>
short cv::saturate_cast< short > (int64 v)
 
template<>
short cv::saturate_cast< short > (uint64 v)
 
template<>
int cv::saturate_cast< int > (unsigned v)
 
template<>
int cv::saturate_cast< int > (int64 v)
 
template<>
int cv::saturate_cast< int > (uint64 v)
 
template<>
int cv::saturate_cast< int > (float v)
 
template<>
int cv::saturate_cast< int > (double v)
 
template<>
unsigned cv::saturate_cast< unsigned > (schar v)
 
template<>
unsigned cv::saturate_cast< unsigned > (short v)
 
template<>
unsigned cv::saturate_cast< unsigned > (int v)
 
template<>
unsigned cv::saturate_cast< unsigned > (int64 v)
 
template<>
unsigned cv::saturate_cast< unsigned > (uint64 v)
 
template<>
unsigned cv::saturate_cast< unsigned > (float v)
 
template<>
unsigned cv::saturate_cast< unsigned > (double v)
 
template<>
uint64 cv::saturate_cast< uint64 > (schar v)
 
template<>
uint64 cv::saturate_cast< uint64 > (short v)
 
template<>
uint64 cv::saturate_cast< uint64 > (int v)
 
template<>
uint64 cv::saturate_cast< uint64 > (int64 v)
 
template<>
int64 cv::saturate_cast< int64 > (uint64 v)
 
template<typename _Tp >
static _Tp cv::saturate_cast (hfloat v)
 
template<>
hfloat cv::saturate_cast< hfloat > (uchar v)
 
template<>
hfloat cv::saturate_cast< hfloat > (schar v)
 
template<>
hfloat cv::saturate_cast< hfloat > (ushort v)
 
template<>
hfloat cv::saturate_cast< hfloat > (short v)
 
template<>
hfloat cv::saturate_cast< hfloat > (unsigned v)
 
template<>
hfloat cv::saturate_cast< hfloat > (int v)
 
template<>
hfloat cv::saturate_cast< hfloat > (uint64 v)
 
template<>
hfloat cv::saturate_cast< hfloat > (int64 v)
 
template<>
hfloat cv::saturate_cast< hfloat > (float v)
 
template<>
hfloat cv::saturate_cast< hfloat > (double v)
 
CV_EXPORTS bool cv::setBreakOnError (bool flag)
 Sets/resets the break-on-error mode. More...
 
CV_EXPORTS ErrorCallback cv::redirectError (ErrorCallback errCallback, void *userdata=0, void **prevUserdata=0)
 Sets the new error handler and the optional user data. More...
 
CV_EXPORTS String cv::tempfile (const char *suffix=0)
 
CV_EXPORTS void cv::glob (String pattern, std::vector< String > &result, bool recursive=false)
 
CV_EXPORTS_W void cv::setNumThreads (int nthreads)
 OpenCV will try to set the number of threads for subsequent parallel regions. More...
 
CV_EXPORTS_W int cv::getNumThreads ()
 Returns the number of threads used by OpenCV for parallel regions. More...
 
CV_EXPORTS_W int cv::getThreadNum ()
 Returns the index of the currently executed thread within the current parallel region. Always returns 0 if called outside of parallel region. More...
 
CV_EXPORTS_W const Stringcv::getBuildInformation ()
 Returns full configuration time cmake output. More...
 
CV_EXPORTS_W String cv::getVersionString ()
 Returns library version string. More...
 
CV_EXPORTS_W int cv::getVersionMajor ()
 Returns major library version. More...
 
CV_EXPORTS_W int cv::getVersionMinor ()
 Returns minor library version. More...
 
CV_EXPORTS_W int cv::getVersionRevision ()
 Returns revision field of the library version. More...
 
CV_EXPORTS_W int64 cv::getTickCount ()
 Returns the number of ticks. More...
 
CV_EXPORTS_W double cv::getTickFrequency ()
 Returns the number of ticks per second. More...
 
static std::ostreamcv::operator<< (std::ostream &out, const TickMeter &tm)
 output operator More...
 
CV_EXPORTS_W int64 cv::getCPUTickCount ()
 Returns the number of CPU ticks. More...
 
CV_EXPORTS_W bool cv::checkHardwareSupport (int feature)
 Returns true if the specified feature is supported by the host hardware. More...
 
CV_EXPORTS_W String cv::getHardwareFeatureName (int feature)
 Returns feature name by ID. More...
 
CV_EXPORTS_W std::string cv::getCPUFeaturesLine ()
 Returns list of CPU features enabled during compilation. More...
 
CV_EXPORTS_W int cv::getNumberOfCPUs ()
 Returns the number of logical CPUs available for the process. More...
 
template<typename _Tp >
static _Tp * cv::alignPtr (_Tp *ptr, int n=(int) sizeof(_Tp))
 Aligns a pointer to the specified number of bytes. More...
 
static size_t cv::alignSize (size_t sz, int n)
 Aligns a buffer size to the specified number of bytes. More...
 
static int cv::divUp (int a, unsigned int b)
 Integer division with result round up. More...
 
static size_t cv::divUp (size_t a, unsigned int b)
 
static int cv::roundUp (int a, unsigned int b)
 Round first value up to the nearest multiple of second value. More...
 
static size_t cv::roundUp (size_t a, unsigned int b)
 
template<int N, typename T >
static bool cv::isAligned (const T &data)
 Alignment check of passed values. More...
 
template<int N>
static bool cv::isAligned (const void *p1)
 
template<int N>
static bool cv::isAligned (const void *p1, const void *p2)
 
template<int N>
static bool cv::isAligned (const void *p1, const void *p2, const void *p3)
 
template<int N>
static bool cv::isAligned (const void *p1, const void *p2, const void *p3, const void *p4)
 
CV_EXPORTS_W void cv::setUseOptimized (bool onoff)
 Enables or disables the optimized code. More...
 
CV_EXPORTS_W bool cv::useOptimized ()
 Returns the status of optimized code usage. More...
 
static size_t cv::getElemSize (int type)
 
CV_EXPORTS CV_NORETURN void cv::error (const Exception &exc)
 Signals an error and raises the exception. More...
 
template<typename _Tp , typename Functor >
void cv::Mat::forEach_impl (const Functor &operation)
 

Detailed Description

Macro Definition Documentation

◆ __CV_CAT

#define __CV_CAT (   x,
  y 
)    __CV_CAT_(x, y)

◆ __CV_CAT_

#define __CV_CAT_ (   x,
  y 
)    __CV_CAT__(x, y)

◆ __CV_CAT__

#define __CV_CAT__ (   x,
  y 
)    x ## y

◆ __CV_ENUM_CLASS_EXPOSE_1

#define __CV_ENUM_CLASS_EXPOSE_1 (   EnumType,
  MEMBER_CONST 
)    static const EnumType MEMBER_CONST = EnumType::MEMBER_CONST; \

Provides compatibility operators for both classical and C++11 enum classes, as well as exposing the C++11 enum class members for backwards compatibility

// Provides operators required for flag enums
// Exposes the listed members of the enum class AccessFlag to the current namespace
AccessFlag
Definition: mat.hpp:65
@ ACCESS_READ
Definition: mat.hpp:65
@ ACCESS_WRITE
Definition: mat.hpp:65
#define CV_ENUM_FLAGS(EnumType)
Definition: cvdef.h:649
#define CV_ENUM_CLASS_EXPOSE(EnumType,...)
Definition: cvdef.h:646

◆ __CV_ENUM_CLASS_EXPOSE_2

#define __CV_ENUM_CLASS_EXPOSE_2 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_1(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST)
Definition: cvdef.h:543

◆ __CV_ENUM_CLASS_EXPOSE_3

#define __CV_ENUM_CLASS_EXPOSE_3 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_2(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_2(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:546

◆ __CV_ENUM_CLASS_EXPOSE_4

#define __CV_ENUM_CLASS_EXPOSE_4 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_3(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_3(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:550

◆ __CV_ENUM_CLASS_EXPOSE_5

#define __CV_ENUM_CLASS_EXPOSE_5 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_4(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_4(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:554

◆ __CV_ENUM_CLASS_EXPOSE_6

#define __CV_ENUM_CLASS_EXPOSE_6 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_5(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_5(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:558

◆ __CV_ENUM_CLASS_EXPOSE_7

#define __CV_ENUM_CLASS_EXPOSE_7 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_6(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_6(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:562

◆ __CV_ENUM_CLASS_EXPOSE_8

#define __CV_ENUM_CLASS_EXPOSE_8 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_7(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_7(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:566

◆ __CV_ENUM_CLASS_EXPOSE_9

#define __CV_ENUM_CLASS_EXPOSE_9 (   EnumType,
  MEMBER_CONST,
  ... 
)
Value:
__CV_ENUM_CLASS_EXPOSE_1(EnumType, MEMBER_CONST); \
__CV_EXPAND(__CV_ENUM_CLASS_EXPOSE_8(EnumType, __VA_ARGS__)); \
#define __CV_ENUM_CLASS_EXPOSE_8(EnumType, MEMBER_CONST,...)
Definition: cvdef.h:570

◆ __CV_ENUM_FLAGS_BITWISE_AND

#define __CV_ENUM_FLAGS_BITWISE_AND (   EnumType,
  Arg1Type,
  Arg2Type 
)
Value:
static inline EnumType operator&(const Arg1Type& a, const Arg2Type& b) \
{ \
typedef std::underlying_type<EnumType>::type UnderlyingType; \
return static_cast<EnumType>(static_cast<UnderlyingType>(a) & static_cast<UnderlyingType>(b)); \
} \
CV_EXPORTS MatExpr operator&(const Mat &a, const Mat &b)

◆ __CV_ENUM_FLAGS_BITWISE_AND_EQ

#define __CV_ENUM_FLAGS_BITWISE_AND_EQ (   EnumType,
  Arg1Type 
)
Value:
static inline EnumType& operator&=(EnumType& _this, const Arg1Type& val) \
{ \
_this = static_cast<EnumType>(static_cast<int>(_this) & static_cast<int>(val)); \
return _this; \
} \
CV_INLINE v_reg< _Tp, n > & operator&=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)

◆ __CV_ENUM_FLAGS_BITWISE_NOT

#define __CV_ENUM_FLAGS_BITWISE_NOT (   EnumType)
Value:
static inline EnumType operator~(const EnumType& val) \
{ \
typedef std::underlying_type<EnumType>::type UnderlyingType; \
return static_cast<EnumType>(~static_cast<UnderlyingType>(val)); \
} \
CV_EXPORTS MatExpr operator~(const Mat &m)

◆ __CV_ENUM_FLAGS_BITWISE_OR

#define __CV_ENUM_FLAGS_BITWISE_OR (   EnumType,
  Arg1Type,
  Arg2Type 
)
Value:
static inline EnumType operator|(const Arg1Type& a, const Arg2Type& b) \
{ \
typedef std::underlying_type<EnumType>::type UnderlyingType; \
return static_cast<EnumType>(static_cast<UnderlyingType>(a) | static_cast<UnderlyingType>(b)); \
} \
CV_EXPORTS MatExpr operator|(const Mat &a, const Mat &b)

◆ __CV_ENUM_FLAGS_BITWISE_OR_EQ

#define __CV_ENUM_FLAGS_BITWISE_OR_EQ (   EnumType,
  Arg1Type 
)
Value:
static inline EnumType& operator|=(EnumType& _this, const Arg1Type& val) \
{ \
_this = static_cast<EnumType>(static_cast<int>(_this) | static_cast<int>(val)); \
return _this; \
} \
CV_INLINE v_reg< _Tp, n > & operator|=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)

◆ __CV_ENUM_FLAGS_BITWISE_XOR

#define __CV_ENUM_FLAGS_BITWISE_XOR (   EnumType,
  Arg1Type,
  Arg2Type 
)
Value:
static inline EnumType operator^(const Arg1Type& a, const Arg2Type& b) \
{ \
typedef std::underlying_type<EnumType>::type UnderlyingType; \
return static_cast<EnumType>(static_cast<UnderlyingType>(a) ^ static_cast<UnderlyingType>(b)); \
} \
CV_EXPORTS MatExpr operator^(const Mat &a, const Mat &b)

◆ __CV_ENUM_FLAGS_BITWISE_XOR_EQ

#define __CV_ENUM_FLAGS_BITWISE_XOR_EQ (   EnumType,
  Arg1Type 
)
Value:
static inline EnumType& operator^=(EnumType& _this, const Arg1Type& val) \
{ \
_this = static_cast<EnumType>(static_cast<int>(_this) ^ static_cast<int>(val)); \
return _this; \
} \
CV_INLINE v_reg< _Tp, n > & operator^=(v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b)

◆ __CV_ENUM_FLAGS_LOGICAL_EQ

#define __CV_ENUM_FLAGS_LOGICAL_EQ (   Arg1Type,
  Arg2Type 
)
Value:
static inline bool operator==(const Arg1Type& a, const Arg2Type& b) \
{ \
return static_cast<int>(a) == static_cast<int>(b); \
} \
CV_EXPORTS MatExpr operator==(const Mat &a, const Mat &b)

◆ __CV_ENUM_FLAGS_LOGICAL_NOT

#define __CV_ENUM_FLAGS_LOGICAL_NOT (   EnumType)
Value:
static inline bool operator!(const EnumType& val) \
{ \
typedef std::underlying_type<EnumType>::type UnderlyingType; \
return !static_cast<UnderlyingType>(val); \
} \

◆ __CV_ENUM_FLAGS_LOGICAL_NOT_EQ

#define __CV_ENUM_FLAGS_LOGICAL_NOT_EQ (   Arg1Type,
  Arg2Type 
)
Value:
static inline bool operator!=(const Arg1Type& a, const Arg2Type& b) \
{ \
return static_cast<int>(a) != static_cast<int>(b); \
} \
CV_EXPORTS MatExpr operator!=(const Mat &a, const Mat &b)

◆ __CV_EXPAND

#define __CV_EXPAND (   x)    x

◆ __CV_VA_NUM_ARGS

#define __CV_VA_NUM_ARGS (   ...)    __CV_EXPAND(__CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))

◆ __CV_VA_NUM_ARGS_HELPER

#define __CV_VA_NUM_ARGS_HELPER (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  _9,
  _10,
  N,
  ... 
)    N

◆ __has_cpp_attribute

#define __has_cpp_attribute (   __x)    0

◆ CV_2PI

#define CV_2PI   6.283185307179586476925286766559

◆ CV__DEBUG_NS_BEGIN

#define CV__DEBUG_NS_BEGIN

◆ CV__DEBUG_NS_END

#define CV__DEBUG_NS_END

◆ CV_ALWAYS_INLINE

#define CV_ALWAYS_INLINE   inline

◆ CV_Assert

#define CV_Assert (   expr)    do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ); } while(0)

Checks a condition at runtime and throws exception if it fails.

The macros CV_Assert (and CV_DbgAssert(expr)) evaluate the specified expression. If it is 0, the macros raise an error (see cv::error). The macro CV_Assert checks the condition in both Debug and Release configurations while CV_DbgAssert is only retained in the Debug configuration.

◆ CV_CDECL

#define CV_CDECL

◆ CV_CMP

#define CV_CMP (   a,
 
)    (((a) > (b)) - ((a) < (b)))

◆ CV_CONSTEXPR

#define CV_CONSTEXPR   constexpr

◆ CV_CPU_AVX

#define CV_CPU_AVX   10

◆ CV_CPU_AVX2

#define CV_CPU_AVX2   11

◆ CV_CPU_AVX512_CLX

#define CV_CPU_AVX512_CLX   261

◆ CV_CPU_AVX512_CNL

#define CV_CPU_AVX512_CNL   260

◆ CV_CPU_AVX512_COMMON

#define CV_CPU_AVX512_COMMON   257

◆ CV_CPU_AVX512_ICL

#define CV_CPU_AVX512_ICL   262

◆ CV_CPU_AVX512_KNL

#define CV_CPU_AVX512_KNL   258

◆ CV_CPU_AVX512_KNM

#define CV_CPU_AVX512_KNM   259

◆ CV_CPU_AVX512_SKX

#define CV_CPU_AVX512_SKX   256

◆ CV_CPU_AVX_5124FMAPS

#define CV_CPU_AVX_5124FMAPS   27

◆ CV_CPU_AVX_5124VNNIW

#define CV_CPU_AVX_5124VNNIW   26

◆ CV_CPU_AVX_512BITALG

#define CV_CPU_AVX_512BITALG   24

◆ CV_CPU_AVX_512BW

#define CV_CPU_AVX_512BW   14

◆ CV_CPU_AVX_512CD

#define CV_CPU_AVX_512CD   15

◆ CV_CPU_AVX_512DQ

#define CV_CPU_AVX_512DQ   16

◆ CV_CPU_AVX_512ER

#define CV_CPU_AVX_512ER   17

◆ CV_CPU_AVX_512F

#define CV_CPU_AVX_512F   13

◆ CV_CPU_AVX_512IFMA

#define CV_CPU_AVX_512IFMA   18

◆ CV_CPU_AVX_512IFMA512

#define CV_CPU_AVX_512IFMA512   18

◆ CV_CPU_AVX_512PF

#define CV_CPU_AVX_512PF   19

◆ CV_CPU_AVX_512VBMI

#define CV_CPU_AVX_512VBMI   20

◆ CV_CPU_AVX_512VBMI2

#define CV_CPU_AVX_512VBMI2   22

◆ CV_CPU_AVX_512VL

#define CV_CPU_AVX_512VL   21

◆ CV_CPU_AVX_512VNNI

#define CV_CPU_AVX_512VNNI   23

◆ CV_CPU_AVX_512VPOPCNTDQ

#define CV_CPU_AVX_512VPOPCNTDQ   25

◆ CV_CPU_FMA3

#define CV_CPU_FMA3   12

◆ CV_CPU_FP16

#define CV_CPU_FP16   9

◆ CV_CPU_LASX

#define CV_CPU_LASX   231

◆ CV_CPU_LSX

#define CV_CPU_LSX   230

◆ CV_CPU_MMX

#define CV_CPU_MMX   1

◆ CV_CPU_MSA

#define CV_CPU_MSA   150

◆ CV_CPU_NEON

#define CV_CPU_NEON   100

◆ CV_CPU_NEON_BF16

#define CV_CPU_NEON_BF16   103

◆ CV_CPU_NEON_DOTPROD

#define CV_CPU_NEON_DOTPROD   101

◆ CV_CPU_NEON_FP16

#define CV_CPU_NEON_FP16   102

◆ CV_CPU_NONE

#define CV_CPU_NONE   0

◆ CV_CPU_POPCNT

#define CV_CPU_POPCNT   8

◆ CV_CPU_RISCVV

#define CV_CPU_RISCVV   170

◆ CV_CPU_RVV

#define CV_CPU_RVV   210

◆ CV_CPU_SSE

#define CV_CPU_SSE   2

◆ CV_CPU_SSE2

#define CV_CPU_SSE2   3

◆ CV_CPU_SSE3

#define CV_CPU_SSE3   4

◆ CV_CPU_SSE4_1

#define CV_CPU_SSE4_1   6

◆ CV_CPU_SSE4_2

#define CV_CPU_SSE4_2   7

◆ CV_CPU_SSSE3

#define CV_CPU_SSSE3   5

◆ CV_CPU_VSX

#define CV_CPU_VSX   200

◆ CV_CPU_VSX3

#define CV_CPU_VSX3   201

◆ CV_CXX11

#define CV_CXX11   1

◆ CV_DbgAssert

#define CV_DbgAssert (   expr)

replaced with CV_Assert(expr) in Debug configuration

◆ CV_DECL_ALIGNED

#define CV_DECL_ALIGNED (   x)

◆ CV_DEPRECATED

#define CV_DEPRECATED

◆ CV_DEPRECATED_EXTERNAL

#define CV_DEPRECATED_EXTERNAL   CV_DEPRECATED

◆ CV_ELEM_SIZE

#define CV_ELEM_SIZE (   type)    (CV_MAT_CN(type)*CV_ELEM_SIZE1(type))

◆ CV_ELEM_SIZE1

#define CV_ELEM_SIZE1 (   type)    ((0x28442211 >> CV_MAT_DEPTH(type)*4) & 15)

Size of each channel item, 0x28442211 = 0010 1000 0100 0100 0010 0010 0001 0001 ~ array of sizeof(arr_type_elem)

◆ CV_ENABLE_UNROLLED

#define CV_ENABLE_UNROLLED   1

◆ CV_ENUM_CLASS_EXPOSE

#define CV_ENUM_CLASS_EXPOSE (   EnumType,
  ... 
)    __CV_EXPAND(__CV_CAT(__CV_ENUM_CLASS_EXPOSE_, __CV_VA_NUM_ARGS(__VA_ARGS__))(EnumType, __VA_ARGS__)); \

◆ CV_ENUM_FLAGS

#define CV_ENUM_FLAGS (   EnumType)
Value:
__CV_ENUM_FLAGS_LOGICAL_EQ (EnumType, int) \
__CV_ENUM_FLAGS_LOGICAL_NOT_EQ (EnumType, int) \
__CV_ENUM_FLAGS_BITWISE_OR (EnumType, EnumType, EnumType) \
__CV_ENUM_FLAGS_BITWISE_AND (EnumType, EnumType, EnumType) \
__CV_ENUM_FLAGS_BITWISE_XOR (EnumType, EnumType, EnumType) \
__CV_ENUM_FLAGS_BITWISE_OR_EQ (EnumType, EnumType) \
__CV_ENUM_FLAGS_BITWISE_AND_EQ (EnumType, EnumType) \
__CV_ENUM_FLAGS_BITWISE_XOR_EQ (EnumType, EnumType) \
#define __CV_ENUM_FLAGS_BITWISE_OR_EQ(EnumType, Arg1Type)
Definition: cvdef.h:625
#define __CV_ENUM_FLAGS_BITWISE_NOT(EnumType)
Definition: cvdef.h:597
#define __CV_ENUM_FLAGS_LOGICAL_NOT(EnumType)
Definition: cvdef.h:578

◆ CV_Error

#define CV_Error (   code,
  msg 
)    cv::error( code, msg, CV_Func, __FILE__, __LINE__ )

Call the error handler.

Currently, the error handler prints the error code and the error message to the standard error stream stderr. In the Debug configuration, it then provokes memory access violation, so that the execution stack and all the parameters can be analyzed by the debugger. In the Release configuration, the exception is thrown.

Parameters
codeone of Error::Code
msgerror message

◆ CV_Error_

#define CV_Error_ (   code,
  args 
)    cv::error( code, cv::format args, CV_Func, __FILE__, __LINE__ )

Call the error handler.

This macro can be used to construct an error message on-fly to include some dynamic information, for example:

// note the extra parentheses around the formatted text message
CV_Error_(Error::StsOutOfRange,
("the value at (%d, %d)=%g is out of range", badPt.x, badPt.y, badValue));
#define CV_Error_(code, args)
Call the error handler.
Definition: base.hpp:334
Parameters
codeone of Error::Code
argsprintf-like formatted error message in parentheses

◆ CV_EXPORTS

#define CV_EXPORTS

◆ CV_EXPORTS_AS

#define CV_EXPORTS_AS (   synonym)    CV_EXPORTS

◆ CV_EXPORTS_TEMPLATE

#define CV_EXPORTS_TEMPLATE   CV_EXPORTS

◆ CV_EXPORTS_W

#define CV_EXPORTS_W   CV_EXPORTS

◆ CV_EXPORTS_W_MAP

#define CV_EXPORTS_W_MAP   CV_EXPORTS

◆ CV_EXPORTS_W_PARAMS

#define CV_EXPORTS_W_PARAMS   CV_EXPORTS

◆ CV_EXPORTS_W_SIMPLE

#define CV_EXPORTS_W_SIMPLE   CV_EXPORTS

◆ CV_EXTERN_C

#define CV_EXTERN_C

◆ CV_FINAL

#define CV_FINAL   final

◆ CV_FP16_TYPE

#define CV_FP16_TYPE   0

◆ CV_Func

#define CV_Func   "<unknown>"

◆ CV_HARDWARE_MAX_FEATURE

#define CV_HARDWARE_MAX_FEATURE   512

◆ CV_IMAX

#define CV_IMAX (   a,
 
)    ((a) ^ (((a)^(b)) & (((a) > (b)) - 1)))

◆ CV_IMIN

#define CV_IMIN (   a,
 
)    ((a) ^ (((a)^(b)) & (((a) < (b)) - 1)))

min & max without jumps

◆ CV_IN_OUT

#define CV_IN_OUT

◆ CV_INLINE

#define CV_INLINE   static

◆ CV_IS_CONT_MAT

#define CV_IS_CONT_MAT   CV_IS_MAT_CONT

◆ CV_IS_MAT_CONT

#define CV_IS_MAT_CONT (   flags)    ((flags) & CV_MAT_CONT_FLAG)

◆ CV_IS_SUBMAT

#define CV_IS_SUBMAT (   flags)    ((flags) & CV_MAT_SUBMAT_FLAG)

◆ CV_LOG2

#define CV_LOG2   0.69314718055994530941723212145818

◆ CV_MAT_CN

#define CV_MAT_CN (   flags)    ((((flags) & CV_MAT_CN_MASK) >> CV_CN_SHIFT) + 1)

◆ CV_MAT_CN_MASK

#define CV_MAT_CN_MASK   ((CV_CN_MAX - 1) << CV_CN_SHIFT)

◆ CV_MAT_CONT_FLAG

#define CV_MAT_CONT_FLAG   (1 << CV_MAT_CONT_FLAG_SHIFT)

◆ CV_MAT_CONT_FLAG_SHIFT

#define CV_MAT_CONT_FLAG_SHIFT   14

◆ CV_MAT_TYPE

#define CV_MAT_TYPE (   flags)    ((flags) & CV_MAT_TYPE_MASK)

◆ CV_MAT_TYPE_MASK

#define CV_MAT_TYPE_MASK   (CV_DEPTH_MAX*CV_CN_MAX - 1)

◆ CV_MAX_DIM

#define CV_MAX_DIM   32

◆ CV_NODISCARD_STD

#define CV_NODISCARD_STD   /* nothing by default */

◆ CV_NOEXCEPT

#define CV_NOEXCEPT   noexcept

◆ CV_NORETURN

#define CV_NORETURN   /* nothing by default */

◆ CV_OUT

#define CV_OUT

◆ CV_OVERRIDE

#define CV_OVERRIDE   override

◆ CV_PI

#define CV_PI   3.1415926535897932384626433832795

◆ CV_PROP

#define CV_PROP

◆ CV_PROP_RW

#define CV_PROP_RW

◆ CV_SIGN

#define CV_SIGN (   a)    CV_CMP((a),0)

◆ CV_STDCALL

#define CV_STDCALL

◆ CV_STRONG_ALIGNMENT

#define CV_STRONG_ALIGNMENT   0

◆ CV_SUBMAT_FLAG

#define CV_SUBMAT_FLAG   (1 << CV_SUBMAT_FLAG_SHIFT)

◆ CV_SUBMAT_FLAG_SHIFT

#define CV_SUBMAT_FLAG_SHIFT   15

◆ CV_SWAP

#define CV_SWAP (   a,
  b,
 
)    ((t) = (a), (a) = (b), (b) = (t))

◆ CV_WRAP

#define CV_WRAP

◆ CV_WRAP_AS

#define CV_WRAP_AS (   synonym)

◆ CV_WRAP_DEFAULT

#define CV_WRAP_DEFAULT (   val)

◆ CV_WRAP_FILE_PATH

#define CV_WRAP_FILE_PATH

◆ CV_WRAP_MAPPABLE

#define CV_WRAP_MAPPABLE (   mappable)

◆ CV_WRAP_PHANTOM

#define CV_WRAP_PHANTOM (   phantom_header)

◆ MAX

#define MAX (   a,
 
)    ((a) < (b) ? (b) : (a))

◆ MIN

#define MIN (   a,
 
)    ((a) > (b) ? (b) : (a))

◆ OPENCV_ABI_COMPATIBILITY

#define OPENCV_ABI_COMPATIBILITY   400

Typedef Documentation

◆ AutoLock

◆ Cv16suf

typedef union Cv16suf Cv16suf

◆ Cv32suf

typedef union Cv32suf Cv32suf

◆ Cv64suf

typedef union Cv64suf Cv64suf

◆ ErrorCallback

typedef int(* cv::ErrorCallback) (int status, const char *func_name, const char *err_msg, const char *file_name, int line, void *userdata)

◆ HammingLUT

◆ Mutex

Enumeration Type Documentation

◆ CpuFeatures

Available CPU features.

Enumerator
CPU_MMX 
CPU_SSE 
CPU_SSE2 
CPU_SSE3 
CPU_SSSE3 
CPU_SSE4_1 
CPU_SSE4_2 
CPU_POPCNT 
CPU_FP16 
CPU_AVX 
CPU_AVX2 
CPU_FMA3 
CPU_AVX_512F 
CPU_AVX_512BW 
CPU_AVX_512CD 
CPU_AVX_512DQ 
CPU_AVX_512ER 
CPU_AVX_512IFMA512 
CPU_AVX_512IFMA 
CPU_AVX_512PF 
CPU_AVX_512VBMI 
CPU_AVX_512VL 
CPU_AVX_512VBMI2 
CPU_AVX_512VNNI 
CPU_AVX_512BITALG 
CPU_AVX_512VPOPCNTDQ 
CPU_AVX_5124VNNIW 
CPU_AVX_5124FMAPS 
CPU_NEON 
CPU_NEON_DOTPROD 
CPU_NEON_FP16 
CPU_NEON_BF16 
CPU_MSA 
CPU_RISCVV 
CPU_VSX 
CPU_VSX3 
CPU_RVV 
CPU_LSX 
CPU_LASX 
CPU_AVX512_SKX 

Skylake-X with AVX-512F/CD/BW/DQ/VL.

CPU_AVX512_COMMON 

Common instructions AVX-512F/CD for all CPUs that support AVX-512.

CPU_AVX512_KNL 

Knights Landing with AVX-512F/CD/ER/PF.

CPU_AVX512_KNM 

Knights Mill with AVX-512F/CD/ER/PF/4FMAPS/4VNNIW/VPOPCNTDQ.

CPU_AVX512_CNL 

Cannon Lake with AVX-512F/CD/BW/DQ/VL/IFMA/VBMI.

CPU_AVX512_CLX 

Cascade Lake with AVX-512F/CD/BW/DQ/VL/VNNI.

CPU_AVX512_ICL 

Ice Lake with AVX-512F/CD/BW/DQ/VL/IFMA/VBMI/VNNI/VBMI2/BITALG/VPOPCNTDQ.

CPU_MAX_FEATURE 

◆ SortFlags

Enumerator
SORT_EVERY_ROW 

each matrix row is sorted independently

SORT_EVERY_COLUMN 

each matrix column is sorted independently; this flag and the previous one are mutually exclusive.

SORT_ASCENDING 

each matrix row is sorted in the ascending order.

SORT_DESCENDING 

each matrix row is sorted in the descending order; this flag and the previous one are also mutually exclusive.

Function Documentation

◆ alignPtr()

template<typename _Tp >
static _Tp* cv::alignPtr ( _Tp *  ptr,
int  n = (int)sizeof(_Tp) 
)
inlinestatic

Aligns a pointer to the specified number of bytes.

The function returns the aligned pointer of the same type as the input pointer:

\[\texttt{(_Tp*)(((size_t)ptr + n-1) & -n)}\]

Parameters
ptrAligned pointer.
nAlignment size that must be a power of two.

◆ alignSize()

static size_t cv::alignSize ( size_t  sz,
int  n 
)
inlinestatic

Aligns a buffer size to the specified number of bytes.

The function returns the minimum number that is greater than or equal to sz and is divisible by n :

\[\texttt{(sz + n-1) & -n}\]

Parameters
szBuffer size to align.
nAlignment size that must be a power of two.

◆ checkHardwareSupport()

CV_EXPORTS_W bool cv::checkHardwareSupport ( int  feature)

Returns true if the specified feature is supported by the host hardware.

The function returns true if the host hardware supports the specified feature. When user calls setUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until setUseOptimized(true) is called. This way user can dynamically switch on and off the optimized code in OpenCV.

Parameters
featureThe feature of interest, one of cv::CpuFeatures

◆ Cholesky() [1/2]

CV_EXPORTS bool cv::Cholesky ( double *  A,
size_t  astep,
int  m,
double *  b,
size_t  bstep,
int  n 
)

proxy for hal::Cholesky

◆ Cholesky() [2/2]

CV_EXPORTS bool cv::Cholesky ( float *  A,
size_t  astep,
int  m,
float *  b,
size_t  bstep,
int  n 
)

proxy for hal::Cholesky

◆ cubeRoot() [1/2]

static double cv::cubeRoot ( double  val)
inlinestatic

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

cubeRoot with argument of double type calls std::cbrt(double)

◆ cubeRoot() [2/2]

CV_EXPORTS_W float cv::cubeRoot ( float  val)

Computes the cube root of an argument.

The function cubeRoot computes $\sqrt[3]{\texttt{val}}$. Negative arguments are handled correctly. NaN and Inf are not handled. The accuracy approaches the maximum possible accuracy for single-precision data.

Parameters
valA function argument.

◆ cv_abs() [1/5]

template<typename _Tp >
_Tp cv::cv_abs ( _Tp  x)
inline

◆ cv_abs() [2/5]

int cv::cv_abs ( schar  x)
inline

◆ cv_abs() [3/5]

int cv::cv_abs ( short  x)
inline

◆ cv_abs() [4/5]

int cv::cv_abs ( uchar  x)
inline

◆ cv_abs() [5/5]

int cv::cv_abs ( ushort  x)
inline

◆ cvCeil()

CV_INLINE int cvCeil ( double  value)

Rounds floating-point number to the nearest integer not smaller than the original.

The function computes an integer i such that:

\[i \le \texttt{value} < i+1\]

Parameters
valuefloating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.

◆ cvFloor()

CV_INLINE int cvFloor ( double  value)

Rounds floating-point number to the nearest integer not larger than the original.

The function computes an integer i such that:

\[i \le \texttt{value} < i+1\]

Parameters
valuefloating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.

◆ cvIsInf()

CV_INLINE int cvIsInf ( double  value)

Determines if the argument is Infinity.

Parameters
valueThe input floating-point value

The function returns 1 if the argument is a plus or minus infinity (as defined by IEEE754 standard) and 0 otherwise.

◆ cvIsNaN()

CV_INLINE int cvIsNaN ( double  value)

Determines if the argument is Not A Number.

Parameters
valueThe input floating-point value

The function returns 1 if the argument is Not A Number (as defined by IEEE754 standard), 0 otherwise.

◆ cvRound()

CV_INLINE int cvRound ( double  value)

Rounds floating-point number to the nearest integer.

Parameters
valuefloating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.

◆ divUp() [1/2]

static int cv::divUp ( int  a,
unsigned int  b 
)
inlinestatic

Integer division with result round up.

Use this function instead of ceil((float)a / b) expressions.

See also
alignSize

◆ divUp() [2/2]

static size_t cv::divUp ( size_t  a,
unsigned int  b 
)
inlinestatic

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

◆ dumpBool()

static CV_WRAP String cv::utils::dumpBool ( bool  argument)
inlinestatic

◆ dumpCString()

static CV_WRAP String cv::utils::dumpCString ( const char *  argument)
inlinestatic

◆ dumpDouble()

static CV_WRAP String cv::utils::dumpDouble ( double  argument)
inlinestatic

◆ dumpFloat()

static CV_WRAP String cv::utils::dumpFloat ( float  argument)
inlinestatic

◆ dumpInputArray()

CV_EXPORTS_W String cv::utils::dumpInputArray ( InputArray  argument)

◆ dumpInputArrayOfArrays()

CV_EXPORTS_W String cv::utils::dumpInputArrayOfArrays ( InputArrayOfArrays  argument)

◆ dumpInputOutputArray()

CV_EXPORTS_W String cv::utils::dumpInputOutputArray ( InputOutputArray  argument)

◆ dumpInputOutputArrayOfArrays()

CV_EXPORTS_W String cv::utils::dumpInputOutputArrayOfArrays ( InputOutputArrayOfArrays  argument)

◆ dumpInt()

static CV_WRAP String cv::utils::dumpInt ( int  argument)
inlinestatic

◆ dumpInt64()

static CV_WRAP String cv::utils::dumpInt64 ( int64  argument)
inlinestatic

◆ dumpRange()

static CV_WRAP String cv::utils::dumpRange ( const Range argument)
inlinestatic

◆ dumpRect()

static CV_WRAP String cv::utils::dumpRect ( const Rect argument)
inlinestatic

◆ dumpRotatedRect()

static CV_WRAP String cv::utils::dumpRotatedRect ( const RotatedRect argument)
inlinestatic

◆ dumpSizeT()

static CV_WRAP String cv::utils::dumpSizeT ( size_t  argument)
inlinestatic

◆ dumpString()

static CV_WRAP String cv::utils::dumpString ( const String argument)
inlinestatic

◆ dumpTermCriteria()

static CV_WRAP String cv::utils::dumpTermCriteria ( const TermCriteria argument)
inlinestatic

◆ dumpVectorOfDouble()

CV_EXPORTS_W String cv::utils::dumpVectorOfDouble ( const std::vector< double > &  vec)

◆ dumpVectorOfInt()

CV_EXPORTS_W String cv::utils::dumpVectorOfInt ( const std::vector< int > &  vec)

◆ dumpVectorOfRect()

CV_EXPORTS_W String cv::utils::dumpVectorOfRect ( const std::vector< Rect > &  vec)

◆ error() [1/2]

CV_EXPORTS CV_NORETURN void cv::error ( const Exception exc)

Signals an error and raises the exception.

By default the function prints information about the error to stderr, then it either stops if cv::setBreakOnError() had been called before or raises the exception. It is possible to alternate error processing by using redirectError().

Parameters
excthe exception raisen.
Deprecated:
drop this version

◆ error() [2/2]

CV_EXPORTS CV_NORETURN void cv::error ( int  _code,
const String _err,
const char *  _func,
const char *  _file,
int  _line 
)

Signals an error and raises the exception.

By default the function prints information about the error to stderr, then it either stops if setBreakOnError() had been called before or raises the exception. It is possible to alternate error processing by using redirectError().

Parameters
_code- error code (Error::Code)
_err- error description
_func- function name. Available only when the compiler supports getting it
_file- source file name where the error has occurred
_line- line number in the source file where the error has occurred
See also
CV_Error, CV_Error_, CV_Assert, CV_DbgAssert

◆ fastAtan2()

CV_EXPORTS_W float cv::fastAtan2 ( float  y,
float  x 
)

Calculates the angle of a 2D vector in degrees.

The function fastAtan2 calculates the full-range angle of an input 2D vector. The angle is measured in degrees and varies from 0 to 360 degrees. The accuracy is about 0.3 degrees.

Parameters
xx-coordinate of the vector.
yy-coordinate of the vector.

◆ fastFree()

CV_EXPORTS void cv::fastFree ( void *  ptr)

Deallocates a memory buffer.

The function deallocates the buffer allocated with fastMalloc . If NULL pointer is passed, the function does nothing. C version of the function clears the pointer pptr to avoid problems with double memory deallocation.

Parameters
ptrPointer to the allocated buffer.

◆ fastMalloc()

CV_EXPORTS void* cv::fastMalloc ( size_t  bufSize)

Allocates an aligned memory buffer.

The function allocates the buffer of the specified size and returns it. When the buffer size is 16 bytes or more, the returned buffer is aligned to 16 bytes.

Parameters
bufSizeAllocated buffer size.

◆ forEach_impl()

template<typename _Tp , typename Functor >
void cv::Mat::forEach_impl ( const Functor &  operation)
inlineprotected

idx is modified in this->rowCall

◆ format()

CV_EXPORTS String cv::format ( const char *  fmt,
  ... 
)

Returns a text string formatted using the printf-like expression.

The function acts like sprintf but forms and returns an STL string. It can be used to form an error message in the Exception constructor.

Parameters
fmtprintf-compatible formatting specifiers.

Note**:

Type Specifier
const char* s
char c
float / double f,g
int, long, long long d, ld, `lld
unsigned, unsigned long, unsigned long long u, lu, llu
uint64 -> uintmax_t, int64 -> intmax_t ju, jd
size_t zu

◆ getBuildInformation()

CV_EXPORTS_W const String& cv::getBuildInformation ( )

Returns full configuration time cmake output.

Returned value is raw cmake output including version control system revision, compiler version, compiler flags, enabled modules and third party libraries, etc. Output format depends on target architecture.

◆ getCPUFeaturesLine()

CV_EXPORTS_W std::string cv::getCPUFeaturesLine ( )

Returns list of CPU features enabled during compilation.

Returned value is a string containing space separated list of CPU features with following markers:

  • no markers - baseline features
  • prefix * - features enabled in dispatcher
  • suffix ? - features enabled but not available in HW

Example: SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?

◆ getCPUTickCount()

CV_EXPORTS_W int64 cv::getCPUTickCount ( )

Returns the number of CPU ticks.

The function returns the current number of CPU ticks on some architectures (such as x86, x64, PowerPC). On other platforms the function is equivalent to getTickCount. It can also be used for very accurate time measurements, as well as for RNG initialization. Note that in case of multi-CPU systems a thread, from which getCPUTickCount is called, can be suspended and resumed at another CPU with its own counter. So, theoretically (and practically) the subsequent calls to the function do not necessary return the monotonously increasing values. Also, since a modern CPU varies the CPU frequency depending on the load, the number of CPU clocks spent in some code cannot be directly converted to time units. Therefore, getTickCount is generally a preferable solution for measuring execution time.

◆ getElemSize()

static size_t cv::getElemSize ( int  type)
inlinestatic

◆ getHardwareFeatureName()

CV_EXPORTS_W String cv::getHardwareFeatureName ( int  feature)

Returns feature name by ID.

Returns empty string if feature is not defined

◆ getNumberOfCPUs()

CV_EXPORTS_W int cv::getNumberOfCPUs ( )

Returns the number of logical CPUs available for the process.

◆ getNumThreads()

CV_EXPORTS_W int cv::getNumThreads ( )

Returns the number of threads used by OpenCV for parallel regions.

Always returns 1 if OpenCV is built without threading support.

The exact meaning of return value depends on the threading framework used by OpenCV library:

  • TBB - The number of threads, that OpenCV will try to use for parallel regions. If there is any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns default number of threads used by TBB library.
  • OpenMP - An upper bound on the number of threads that could be used to form a new team.
  • Concurrency - The number of threads, that OpenCV will try to use for parallel regions.
  • GCD - Unsupported; returns the GCD thread pool limit (512) for compatibility.
  • C= - The number of threads, that OpenCV will try to use for parallel regions, if before called setNumThreads with threads > 0, otherwise returns the number of logical CPUs, available for the process.
    See also
    setNumThreads, getThreadNum

◆ getThreadNum()

CV_EXPORTS_W int cv::getThreadNum ( )

Returns the index of the currently executed thread within the current parallel region. Always returns 0 if called outside of parallel region.

Deprecated:
Current implementation doesn't corresponding to this documentation.

The exact meaning of the return value depends on the threading framework used by OpenCV library:

  • TBB - Unsupported with current 4.1 TBB release. Maybe will be supported in future.
  • OpenMP - The thread number, within the current team, of the calling thread.
  • Concurrency - An ID for the virtual processor that the current context is executing on (0 for master thread and unique number for others, but not necessary 1,2,3,...).
  • GCD - System calling thread's ID. Never returns 0 inside parallel region.
  • C= - The index of the current parallel task.
    See also
    setNumThreads, getNumThreads

◆ getTickCount()

CV_EXPORTS_W int64 cv::getTickCount ( )

Returns the number of ticks.

The function returns the number of ticks after the certain event (for example, when the machine was turned on). It can be used to initialize RNG or to measure a function execution time by reading the tick count before and after the function call.

See also
getTickFrequency, TickMeter

◆ getTickFrequency()

CV_EXPORTS_W double cv::getTickFrequency ( )

Returns the number of ticks per second.

The function returns the number of ticks per second. That is, the following code computes the execution time in seconds:

double t = (double)getTickCount();
// do something ...
t = ((double)getTickCount() - t)/getTickFrequency();
CV_EXPORTS_W double getTickFrequency()
Returns the number of ticks per second.
CV_EXPORTS_W int64 getTickCount()
Returns the number of ticks.
See also
getTickCount, TickMeter

◆ getVersionMajor()

CV_EXPORTS_W int cv::getVersionMajor ( )

Returns major library version.

◆ getVersionMinor()

CV_EXPORTS_W int cv::getVersionMinor ( )

Returns minor library version.

◆ getVersionRevision()

CV_EXPORTS_W int cv::getVersionRevision ( )

Returns revision field of the library version.

◆ getVersionString()

CV_EXPORTS_W String cv::getVersionString ( )

Returns library version string.

For example "3.4.1-dev".

See also
getMajorVersion, getMinorVersion, getRevisionVersion

◆ glob()

CV_EXPORTS void cv::glob ( String  pattern,
std::vector< String > &  result,
bool  recursive = false 
)

◆ isAligned() [1/5]

template<int N, typename T >
static bool cv::isAligned ( const T data)
inlinestatic

Alignment check of passed values.

Usage: isAligned<sizeof(int)>(...)

Note
Alignment(N) must be a power of 2 (2**k, 2^k)

◆ isAligned() [2/5]

template<int N>
static bool cv::isAligned ( const void *  p1)
inlinestatic

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

◆ isAligned() [3/5]

template<int N>
static bool cv::isAligned ( const void *  p1,
const void *  p2 
)
inlinestatic

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

◆ isAligned() [4/5]

template<int N>
static bool cv::isAligned ( const void *  p1,
const void *  p2,
const void *  p3 
)
inlinestatic

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

◆ isAligned() [5/5]

template<int N>
static bool cv::isAligned ( const void *  p1,
const void *  p2,
const void *  p3,
const void *  p4 
)
inlinestatic

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

◆ LU() [1/2]

CV_EXPORTS int cv::LU ( double *  A,
size_t  astep,
int  m,
double *  b,
size_t  bstep,
int  n 
)

proxy for hal::LU

◆ LU() [2/2]

CV_EXPORTS int cv::LU ( float *  A,
size_t  astep,
int  m,
float *  b,
size_t  bstep,
int  n 
)

proxy for hal::LU

◆ normInf() [1/2]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normInf ( const _Tp *  a,
const _Tp *  b,
int  n 
)
inlinestatic

◆ normInf() [2/2]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normInf ( const _Tp *  a,
int  n 
)
inlinestatic

◆ normL1() [1/4]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normL1 ( const _Tp *  a,
const _Tp *  b,
int  n 
)
inlinestatic

◆ normL1() [2/4]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normL1 ( const _Tp *  a,
int  n 
)
inlinestatic

◆ normL1() [3/4]

float cv::normL1 ( const float *  a,
const float *  b,
int  n 
)
inline

◆ normL1() [4/4]

int cv::normL1 ( const uchar a,
const uchar b,
int  n 
)
inline

◆ normL2Sqr() [1/3]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normL2Sqr ( const _Tp *  a,
const _Tp *  b,
int  n 
)
inlinestatic

◆ normL2Sqr() [2/3]

template<typename _Tp , typename _AccTp >
static _AccTp cv::normL2Sqr ( const _Tp *  a,
int  n 
)
inlinestatic

◆ normL2Sqr() [3/3]

static float cv::normL2Sqr ( const float *  a,
const float *  b,
int  n 
)
inlinestatic

◆ operator<<()

static std::ostream& cv::operator<< ( std::ostream out,
const TickMeter tm 
)
inlinestatic

output operator

TickMeter tm;
tm.start();
// do something ...
tm.stop();
std::cout << tm;

◆ redirectError()

CV_EXPORTS ErrorCallback cv::redirectError ( ErrorCallback  errCallback,
void *  userdata = 0,
void **  prevUserdata = 0 
)

Sets the new error handler and the optional user data.

The function sets the new error handler, called from cv::error().

Parameters
errCallbackthe new error handler. If NULL, the default error handler is used.
userdatathe optional user data pointer, passed to the callback.
prevUserdatathe optional output parameter where the previous user data pointer is stored
Returns
the previous error handler

◆ roundUp() [1/2]

static int cv::roundUp ( int  a,
unsigned int  b 
)
inlinestatic

Round first value up to the nearest multiple of second value.

Use this function instead of ceil((float)a / b) * b expressions.

See also
divUp

◆ roundUp() [2/2]

static size_t cv::roundUp ( size_t  a,
unsigned int  b 
)
inlinestatic

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

◆ saturate_cast() [1/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( double  v)
inlinestatic

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

◆ saturate_cast() [2/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( float  v)
inlinestatic

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

◆ saturate_cast() [3/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( hfloat  v)
inlinestatic

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

◆ saturate_cast() [4/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( int  v)
inlinestatic

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

◆ saturate_cast() [5/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( int64  v)
inlinestatic

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

◆ saturate_cast() [6/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( schar  v)
inlinestatic

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

◆ saturate_cast() [7/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( short  v)
inlinestatic

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

◆ saturate_cast() [8/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( uchar  v)
inlinestatic

Template function for accurate conversion from one primitive type to another.

The function saturate_cast resembles the standard C++ cast operations, such as static_cast<T>() and others. It perform an efficient and accurate conversion from one primitive type to another (see the introduction chapter). saturate in the name means that when the input value v is out of the range of the target type, the result is not formed just by taking low bits of the input, but instead the value is clipped. For example:

uchar a = saturate_cast<uchar>(-100); // a = 0 (UCHAR_MIN)
short b = saturate_cast<short>(33333.33333); // b = 32767 (SHRT_MAX)
unsigned char uchar
Definition: interface.h:51
uchar saturate_cast< uchar >(schar v)
Definition: saturate.hpp:101
short saturate_cast< short >(ushort v)
Definition: saturate.hpp:130

Such clipping is done when the target type is unsigned char , signed char , unsigned short or signed short . For 32-bit integers, no clipping is done.

When the parameter is a floating-point value and the target type is an integer (8-, 16- or 32-bit), the floating-point value is first rounded to the nearest integer and then clipped if needed (when the target type is 8- or 16-bit).

Parameters
vFunction parameter.
See also
add, subtract, multiply, divide, Mat::convertTo

◆ saturate_cast() [9/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( uint64  v)
inlinestatic

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

◆ saturate_cast() [10/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( unsigned  v)
inlinestatic

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

◆ saturate_cast() [11/11]

template<typename _Tp >
static _Tp cv::saturate_cast ( ushort  v)
inlinestatic

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

◆ saturate_cast< hfloat >() [1/10]

template<>
hfloat cv::saturate_cast< hfloat > ( double  v)
inline

◆ saturate_cast< hfloat >() [2/10]

template<>
hfloat cv::saturate_cast< hfloat > ( float  v)
inline

◆ saturate_cast< hfloat >() [3/10]

template<>
hfloat cv::saturate_cast< hfloat > ( int  v)
inline

◆ saturate_cast< hfloat >() [4/10]

template<>
hfloat cv::saturate_cast< hfloat > ( int64  v)
inline

◆ saturate_cast< hfloat >() [5/10]

template<>
hfloat cv::saturate_cast< hfloat > ( schar  v)
inline

◆ saturate_cast< hfloat >() [6/10]

template<>
hfloat cv::saturate_cast< hfloat > ( short  v)
inline

◆ saturate_cast< hfloat >() [7/10]

template<>
hfloat cv::saturate_cast< hfloat > ( uchar  v)
inline

◆ saturate_cast< hfloat >() [8/10]

template<>
hfloat cv::saturate_cast< hfloat > ( uint64  v)
inline

◆ saturate_cast< hfloat >() [9/10]

template<>
hfloat cv::saturate_cast< hfloat > ( unsigned  v)
inline

◆ saturate_cast< hfloat >() [10/10]

template<>
hfloat cv::saturate_cast< hfloat > ( ushort  v)
inline

◆ saturate_cast< int >() [1/5]

template<>
int cv::saturate_cast< int > ( double  v)
inline

◆ saturate_cast< int >() [2/5]

template<>
int cv::saturate_cast< int > ( float  v)
inline

◆ saturate_cast< int >() [3/5]

template<>
int cv::saturate_cast< int > ( int64  v)
inline

◆ saturate_cast< int >() [4/5]

template<>
int cv::saturate_cast< int > ( uint64  v)
inline

◆ saturate_cast< int >() [5/5]

template<>
int cv::saturate_cast< int > ( unsigned  v)
inline

◆ saturate_cast< int64 >()

template<>
int64 cv::saturate_cast< int64 > ( uint64  v)
inline

◆ saturate_cast< schar >() [1/9]

template<>
schar cv::saturate_cast< schar > ( double  v)
inline

◆ saturate_cast< schar >() [2/9]

template<>
schar cv::saturate_cast< schar > ( float  v)
inline

◆ saturate_cast< schar >() [3/9]

template<>
schar cv::saturate_cast< schar > ( int  v)
inline

◆ saturate_cast< schar >() [4/9]

template<>
schar cv::saturate_cast< schar > ( int64  v)
inline

◆ saturate_cast< schar >() [5/9]

template<>
schar cv::saturate_cast< schar > ( short  v)
inline

◆ saturate_cast< schar >() [6/9]

template<>
schar cv::saturate_cast< schar > ( uchar  v)
inline

◆ saturate_cast< schar >() [7/9]

template<>
schar cv::saturate_cast< schar > ( uint64  v)
inline

◆ saturate_cast< schar >() [8/9]

template<>
schar cv::saturate_cast< schar > ( unsigned  v)
inline

◆ saturate_cast< schar >() [9/9]

template<>
schar cv::saturate_cast< schar > ( ushort  v)
inline

◆ saturate_cast< short >() [1/7]

template<>
short cv::saturate_cast< short > ( double  v)
inline

◆ saturate_cast< short >() [2/7]

template<>
short cv::saturate_cast< short > ( float  v)
inline

◆ saturate_cast< short >() [3/7]

template<>
short cv::saturate_cast< short > ( int  v)
inline

◆ saturate_cast< short >() [4/7]

template<>
short cv::saturate_cast< short > ( int64  v)
inline

◆ saturate_cast< short >() [5/7]

template<>
short cv::saturate_cast< short > ( uint64  v)
inline

◆ saturate_cast< short >() [6/7]

template<>
short cv::saturate_cast< short > ( unsigned  v)
inline

◆ saturate_cast< short >() [7/7]

template<>
short cv::saturate_cast< short > ( ushort  v)
inline

◆ saturate_cast< uchar >() [1/9]

template<>
uchar cv::saturate_cast< uchar > ( double  v)
inline

◆ saturate_cast< uchar >() [2/9]

template<>
uchar cv::saturate_cast< uchar > ( float  v)
inline

◆ saturate_cast< uchar >() [3/9]

template<>
uchar cv::saturate_cast< uchar > ( int  v)
inline

◆ saturate_cast< uchar >() [4/9]

template<>
uchar cv::saturate_cast< uchar > ( int64  v)
inline

◆ saturate_cast< uchar >() [5/9]

template<>
uchar cv::saturate_cast< uchar > ( schar  v)
inline

◆ saturate_cast< uchar >() [6/9]

template<>
uchar cv::saturate_cast< uchar > ( short  v)
inline

◆ saturate_cast< uchar >() [7/9]

template<>
uchar cv::saturate_cast< uchar > ( uint64  v)
inline

◆ saturate_cast< uchar >() [8/9]

template<>
uchar cv::saturate_cast< uchar > ( unsigned  v)
inline

◆ saturate_cast< uchar >() [9/9]

template<>
uchar cv::saturate_cast< uchar > ( ushort  v)
inline

◆ saturate_cast< uint64 >() [1/4]

template<>
uint64 cv::saturate_cast< uint64 > ( int  v)
inline

◆ saturate_cast< uint64 >() [2/4]

template<>
uint64 cv::saturate_cast< uint64 > ( int64  v)
inline

◆ saturate_cast< uint64 >() [3/4]

template<>
uint64 cv::saturate_cast< uint64 > ( schar  v)
inline

◆ saturate_cast< uint64 >() [4/4]

template<>
uint64 cv::saturate_cast< uint64 > ( short  v)
inline

◆ saturate_cast< unsigned >() [1/7]

template<>
unsigned cv::saturate_cast< unsigned > ( double  v)
inline

◆ saturate_cast< unsigned >() [2/7]

template<>
unsigned cv::saturate_cast< unsigned > ( float  v)
inline

◆ saturate_cast< unsigned >() [3/7]

template<>
unsigned cv::saturate_cast< unsigned > ( int  v)
inline

◆ saturate_cast< unsigned >() [4/7]

template<>
unsigned cv::saturate_cast< unsigned > ( int64  v)
inline

◆ saturate_cast< unsigned >() [5/7]

template<>
unsigned cv::saturate_cast< unsigned > ( schar  v)
inline

◆ saturate_cast< unsigned >() [6/7]

template<>
unsigned cv::saturate_cast< unsigned > ( short  v)
inline

◆ saturate_cast< unsigned >() [7/7]

template<>
unsigned cv::saturate_cast< unsigned > ( uint64  v)
inline

◆ saturate_cast< ushort >() [1/8]

template<>
ushort cv::saturate_cast< ushort > ( double  v)
inline

◆ saturate_cast< ushort >() [2/8]

template<>
ushort cv::saturate_cast< ushort > ( float  v)
inline

◆ saturate_cast< ushort >() [3/8]

template<>
ushort cv::saturate_cast< ushort > ( int  v)
inline

◆ saturate_cast< ushort >() [4/8]

template<>
ushort cv::saturate_cast< ushort > ( int64  v)
inline

◆ saturate_cast< ushort >() [5/8]

template<>
ushort cv::saturate_cast< ushort > ( schar  v)
inline

◆ saturate_cast< ushort >() [6/8]

template<>
ushort cv::saturate_cast< ushort > ( short  v)
inline

◆ saturate_cast< ushort >() [7/8]

template<>
ushort cv::saturate_cast< ushort > ( uint64  v)
inline

◆ saturate_cast< ushort >() [8/8]

template<>
ushort cv::saturate_cast< ushort > ( unsigned  v)
inline

◆ setBreakOnError()

CV_EXPORTS bool cv::setBreakOnError ( bool  flag)

Sets/resets the break-on-error mode.

When the break-on-error mode is set, the default error handler issues a hardware exception, which can make debugging more convenient.

Returns
the previous state

◆ setNumThreads()

CV_EXPORTS_W void cv::setNumThreads ( int  nthreads)

OpenCV will try to set the number of threads for subsequent parallel regions.

If threads == 1, OpenCV will disable threading optimizations and run all it's functions sequentially. Passing threads < 0 will reset threads number to system default. The function is not thread-safe. It must not be called in parallel region or concurrent threads.

OpenCV will try to run its functions with specified threads number, but some behaviour differs from framework:

  • TBB - User-defined parallel constructions will run with the same threads number, if another is not specified. If later on user creates his own scheduler, OpenCV will use it.
  • OpenMP - No special defined behaviour.
  • Concurrency - If threads == 1, OpenCV will disable threading optimizations and run its functions sequentially.
  • GCD - Supports only values <= 0.
  • C= - No special defined behaviour.
    Parameters
    nthreadsNumber of threads used by OpenCV.
    See also
    getNumThreads, getThreadNum

◆ setUseOptimized()

CV_EXPORTS_W void cv::setUseOptimized ( bool  onoff)

Enables or disables the optimized code.

The function can be used to dynamically turn on and off optimized dispatched code (code that uses SSE4.2, AVX/AVX2, and other instructions on the platforms that support it). It sets a global flag that is further checked by OpenCV functions. Since the flag is not checked in the inner OpenCV loops, it is only safe to call the function on the very top level in your application where you can be sure that no other OpenCV function is currently executed.

By default, the optimized code is enabled unless you disable it in CMake. The current status can be retrieved using useOptimized.

Parameters
onoffThe boolean flag specifying whether the optimized code should be used (onoff=true) or not (onoff=false).

◆ tempfile()

CV_EXPORTS String cv::tempfile ( const char *  suffix = 0)

◆ useOptimized()

CV_EXPORTS_W bool cv::useOptimized ( )

Returns the status of optimized code usage.

The function returns true if the optimized code is enabled. Otherwise, it returns false.