each matrix row is sorted in the descending order; this flag and the previous one are also mutually exclusive.
each matrix column is sorted independently; this flag and the previous one are mutually exclusive.
The function returns the aligned pointer of the same type as the input pointer:
\\[\\texttt{(_Tp*)(((size_t)ptr + n-1) & -n)}\\]
Aligned pointer.
Alignment size that must be a power of two.
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.
The feature of interest, one of cv::CpuFeatures
The function computes an integer i such that: \\[i \\le \\texttt{value} < i+1\\]
floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The function computes an integer i such that: \\[i \\le \\texttt{value} < i+1\\]
floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The function returns 1 if the argument is a plus or minus infinity (as defined by IEEE754 standard) and 0 otherwise.
The input floating-point value
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The function returns 1 if the argument is Not A Number (as defined by IEEE754 standard), 0 otherwise.
The input floating-point value
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
floating-point number. If the value is outside of INT_MIN ... INT_MAX range, the result is not defined.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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()].
the exception raisen.
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()].
[CV_Error], [CV_Error_], [CV_Assert], [CV_DbgAssert]
error code (Error::Code)
error description
function name. Available only when the compiler supports getting it
source file name where the error has occurred
line number in the source file where the error has occurred
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.
Pointer to the allocated 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.
Allocated buffer size.
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.
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?
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.
Returns empty string if feature is not defined
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.
[setNumThreads], [getThreadNum]
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.
[setNumThreads], [getNumThreads]
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.
[getTickFrequency], [TickMeter]
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();
[getTickCount], [TickMeter]
For example "3.4.1-dev".
getMajorVersion, getMinorVersion, getRevisionVersion
The function sets the new error handler, called from [cv::error()].
the previous error handler
the new error handler. If NULL, the default error handler is used.
the optional user data pointer, passed to the callback.
the optional output parameter where the previous user data pointer is stored
The function saturate_cast resembles the standard C++ cast operations, such as static_cast
uchar a = saturate_cast<uchar>(-100); // a = 0 (UCHAR_MIN)
short b = saturate_cast<short>(33333.33333); // b = 32767 (SHRT_MAX)
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).
This operation is used in the simplest or most complex image processing functions in OpenCV.
[add], [subtract], [multiply], [divide], [Mat::convertTo]
Function parameter.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If threads == 0, OpenCV will disable threading optimizations and run all it's functions sequentially. Passing threads < 0 will reset threads number to system default. This function must be called outside of parallel region.
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.
[getNumThreads], [getThreadNum]
Number of threads used by OpenCV.
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.
The boolean flag specifying whether the optimized code should be used (onoff=true) or not (onoff=false).
The function returns true if the optimized code is enabled. Otherwise, it returns false.
Generated using TypeDoc
each matrix row is sorted in the ascending order.