Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "types/opencv/core_utils"

Index

Type aliases

CpuFeatures

CpuFeatures: any

SortFlags

SortFlags: any

Variables

Const CPU_AVX

CPU_AVX: CpuFeatures

Const CPU_AVX2

CPU_AVX2: CpuFeatures

Const CPU_AVX512_CEL

CPU_AVX512_CEL: CpuFeatures

Const CPU_AVX512_CNL

CPU_AVX512_CNL: CpuFeatures

Const CPU_AVX512_COMMON

CPU_AVX512_COMMON: CpuFeatures

Const CPU_AVX512_ICL

CPU_AVX512_ICL: CpuFeatures

Const CPU_AVX512_KNL

CPU_AVX512_KNL: CpuFeatures

Const CPU_AVX512_KNM

CPU_AVX512_KNM: CpuFeatures

Const CPU_AVX512_SKX

CPU_AVX512_SKX: CpuFeatures

Const CPU_AVX_5124FMAPS

CPU_AVX_5124FMAPS: CpuFeatures

Const CPU_AVX_5124VNNIW

CPU_AVX_5124VNNIW: CpuFeatures

Const CPU_AVX_512BITALG

CPU_AVX_512BITALG: CpuFeatures

Const CPU_AVX_512BW

CPU_AVX_512BW: CpuFeatures

Const CPU_AVX_512CD

CPU_AVX_512CD: CpuFeatures

Const CPU_AVX_512DQ

CPU_AVX_512DQ: CpuFeatures

Const CPU_AVX_512ER

CPU_AVX_512ER: CpuFeatures

Const CPU_AVX_512F

CPU_AVX_512F: CpuFeatures

Const CPU_AVX_512IFMA

CPU_AVX_512IFMA: CpuFeatures

Const CPU_AVX_512IFMA512

CPU_AVX_512IFMA512: CpuFeatures

Const CPU_AVX_512PF

CPU_AVX_512PF: CpuFeatures

Const CPU_AVX_512VBMI

CPU_AVX_512VBMI: CpuFeatures

Const CPU_AVX_512VBMI2

CPU_AVX_512VBMI2: CpuFeatures

Const CPU_AVX_512VL

CPU_AVX_512VL: CpuFeatures

Const CPU_AVX_512VNNI

CPU_AVX_512VNNI: CpuFeatures

Const CPU_AVX_512VPOPCNTDQ

CPU_AVX_512VPOPCNTDQ: CpuFeatures

Const CPU_FMA3

CPU_FMA3: CpuFeatures

Const CPU_FP16

CPU_FP16: CpuFeatures

Const CPU_MAX_FEATURE

CPU_MAX_FEATURE: CpuFeatures

Const CPU_MMX

CPU_MMX: CpuFeatures

Const CPU_NEON

CPU_NEON: CpuFeatures

Const CPU_POPCNT

CPU_POPCNT: CpuFeatures

Const CPU_SSE

CPU_SSE: CpuFeatures

Const CPU_SSE2

CPU_SSE2: CpuFeatures

Const CPU_SSE3

CPU_SSE3: CpuFeatures

Const CPU_SSE4_1

CPU_SSE4_1: CpuFeatures

Const CPU_SSE4_2

CPU_SSE4_2: CpuFeatures

Const CPU_SSSE3

CPU_SSSE3: CpuFeatures

Const CPU_VSX

CPU_VSX: CpuFeatures

Const CPU_VSX3

CPU_VSX3: CpuFeatures

Const SORT_ASCENDING

SORT_ASCENDING: SortFlags

each matrix row is sorted in the ascending order.

Const SORT_DESCENDING

SORT_DESCENDING: SortFlags

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

Const SORT_EVERY_COLUMN

SORT_EVERY_COLUMN: SortFlags

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

Const SORT_EVERY_ROW

SORT_EVERY_ROW: SortFlags

Functions

CV_XADD

  • CV_XADD(addr: any, delta: int): any

Cholesky

LU

alignPtr

  • alignPtr(arg92: any, ptr: any, n?: int): any
  • The function returns the aligned pointer of the same type as the input pointer: \\[\\texttt{(_Tp*)(((size_t)ptr + n-1) & -n)}\\]

    Parameters

    • arg92: any
    • ptr: any

      Aligned pointer.

    • Optional n: int

      Alignment size that must be a power of two.

    Returns any

alignSize

  • 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

    • sz: size_t

      Buffer size to align.

    • n: int

      Alignment size that must be a power of two.

    Returns size_t

checkHardwareSupport

  • checkHardwareSupport(feature: int): bool
  • 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

    • feature: int

      The feature of interest, one of cv::CpuFeatures

    Returns bool

cubeRoot

  • 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

    • val: float

      A function argument.

    Returns float

cvCeil

  • The function computes an integer i such that: \\[i \\le \\texttt{value} < i+1\\]

    Parameters

    • value: double

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

    Returns int

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

    Parameters

    Returns int

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

    Parameters

    Returns int

cvFloor

  • The function computes an integer i such that: \\[i \\le \\texttt{value} < i+1\\]

    Parameters

    • value: double

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

    Returns int

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

    Parameters

    Returns int

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

    Parameters

    Returns int

cvIsInf

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

    Parameters

    • value: double

      The input floating-point value

    Returns int

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

    Parameters

    Returns int

cvIsNaN

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

    Parameters

    • value: double

      The input floating-point value

    Returns int

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

    Parameters

    Returns int

cvRound

  • Parameters

    • value: double

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

    Returns int

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

    Parameters

    Returns int

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

    Parameters

    Returns int

cv_abs

divUp

dumpInputArray

  • dumpInputArray(argument: InputArray): String

dumpInputArrayOfArrays

  • dumpInputArrayOfArrays(argument: InputArrayOfArrays): String

dumpInputOutputArray

  • dumpInputOutputArray(argument: InputOutputArray): String

dumpInputOutputArrayOfArrays

  • dumpInputOutputArrayOfArrays(argument: InputOutputArrayOfArrays): String

error

  • error(exc: any): void
  • error(_code: int, _err: any, _func: any, _file: any, _line: int): void
  • 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

    • exc: any

      the exception raisen.

    Returns void

  • 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]

    Parameters

    • _code: int

      error code (Error::Code)

    • _err: any

      error description

    • _func: any

      function name. Available only when the compiler supports getting it

    • _file: any

      source file name where the error has occurred

    • _line: int

      line number in the source file where the error has occurred

    Returns void

fastAtan2

  • 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

    • y: float

      y-coordinate of the vector.

    • x: float

      x-coordinate of the vector.

    Returns float

fastFree

  • fastFree(ptr: any): void
  • 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

    • ptr: any

      Pointer to the allocated buffer.

    Returns void

fastMalloc

  • fastMalloc(bufSize: size_t): any
  • 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

    • bufSize: size_t

      Allocated buffer size.

    Returns any

forEach_impl

  • forEach_impl(arg94: any, arg95: any, operation: any): any

getBuildInformation

  • getBuildInformation(): any
  • 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.

    Returns any

getCPUFeaturesLine

  • getCPUFeaturesLine(): any
  • 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?

    Returns any

getCPUTickCount

  • getCPUTickCount(): int64
  • 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 int64

getElemSize

getHardwareFeatureName

  • getHardwareFeatureName(feature: int): String

getNumThreads

  • getNumThreads(): int
  • 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]

    Returns int

getNumberOfCPUs

  • getNumberOfCPUs(): int

getThreadNum

  • getThreadNum(): int
  • 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]

    Returns int

getTickCount

  • 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]

    Returns int64

getTickFrequency

  • 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]

    Returns double

getVersionMajor

  • getVersionMajor(): int

getVersionMinor

  • getVersionMinor(): int

getVersionRevision

  • getVersionRevision(): int

getVersionString

  • getVersionString(): String

glob

  • glob(pattern: String, result: any, recursive?: bool): void

normInf

  • normInf(arg96: any, arg97: any, a: any, n: int): any
  • normInf(arg98: any, arg99: any, a: any, b: any, n: int): any

normL1

  • normL1(arg100: any, arg101: any, a: any, n: int): any
  • normL1(arg102: any, arg103: any, a: any, b: any, n: int): any
  • normL1(a: any, b: any, n: int): float
  • normL1(a: uchar, b: uchar, n: int): uchar

normL2Sqr

  • normL2Sqr(arg104: any, arg105: any, a: any, n: int): any
  • normL2Sqr(arg106: any, arg107: any, a: any, b: any, n: int): any
  • normL2Sqr(a: any, b: any, n: int): float

parallel_for_

  • parallel_for_(range: any, body: any, nstripes?: double): void
  • parallel_for_(range: any, functor: any, nstripes?: double): void

redirectError

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

    the previous error handler

    Parameters

    • errCallback: ErrorCallback

      the new error handler. If NULL, the default error handler is used.

    • Optional userdata: any

      the optional user data pointer, passed to the callback.

    • Optional prevUserdata: any

      the optional output parameter where the previous user data pointer is stored

    Returns ErrorCallback

roundUp

saturate_cast

  • saturate_cast(arg108: any, v: uchar): uchar
  • saturate_cast(arg109: any, v: schar): schar
  • saturate_cast(arg110: any, v: ushort): ushort
  • saturate_cast(arg111: any, v: short): any
  • saturate_cast(arg112: any, v: unsigned): any
  • saturate_cast(arg113: any, v: int): any
  • saturate_cast(arg114: any, v: float): any
  • saturate_cast(arg115: any, v: double): any
  • saturate_cast(arg116: any, v: int64): int64
  • saturate_cast(arg117: any, v: uint64): uint64
  • saturate_cast(arg118: any, v: float16_t): any
  • The function saturate_cast resembles the standard C++ cast operations, such as static_cast() 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)

    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]

    Parameters

    • arg108: any
    • v: uchar

      Function parameter.

    Returns uchar

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

    Parameters

    Returns schar

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

    Parameters

    Returns ushort

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

    Parameters

    Returns any

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

    Parameters

    Returns any

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

    Parameters

    • arg113: any
    • v: int

    Returns any

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

    Parameters

    Returns any

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

    Parameters

    Returns any

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

    Parameters

    Returns int64

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

    Parameters

    Returns uint64

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

    Parameters

    Returns any

setBreakOnError

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

    the previous state

    Parameters

    Returns bool

setNumThreads

  • setNumThreads(nthreads: int): void
  • 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]

    Parameters

    • nthreads: int

      Number of threads used by OpenCV.

    Returns void

setUseOptimized

  • setUseOptimized(onoff: bool): void
  • 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

    • onoff: bool

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

    Returns void

tempfile

  • tempfile(suffix?: any): String

testAsyncArray

  • testAsyncArray(argument: InputArray): AsyncArray

testAsyncException

useOptimized

  • useOptimized(): bool

Generated using TypeDoc