44#ifndef OPENCV_CORE_CVSTD_HPP
45#define OPENCV_CORE_CVSTD_HPP
48# error cvstd.hpp header must be compiled as C++
51#include "opencv2/core/cvdef.h"
66 static inline uchar abs(uchar a) {
return a; }
67 static inline ushort abs(ushort a) {
return a; }
68 static inline unsigned abs(
unsigned a) {
return a; }
69 static inline uint64 abs(uint64 a) {
return a; }
81#include "cvstd_wrapper.hpp"
113 typedef _Tp value_type;
114 typedef value_type* pointer;
115 typedef const value_type* const_pointer;
116 typedef value_type& reference;
117 typedef const value_type& const_reference;
118 typedef size_t size_type;
119 typedef ptrdiff_t difference_type;
124 explicit Allocator(Allocator
const&) {}
126 explicit Allocator(Allocator<U>
const&) {}
129 pointer address(reference r) {
return &r; }
130 const_pointer address(const_reference r) {
return &r; }
132 pointer allocate(size_type count,
const void* =0) {
return reinterpret_cast<pointer
>(
fastMalloc(count *
sizeof (_Tp))); }
133 void deallocate(pointer p, size_type) {
fastFree(p); }
135 void construct(pointer p,
const _Tp& v) {
new(
static_cast<void*
>(p)) _Tp(v); }
136 void destroy(pointer p) { p->~_Tp(); }
138 size_type max_size()
const {
return cv::max(
static_cast<_Tp
>(-1)/
sizeof(_Tp), 1); }
150class CV_EXPORTS FileNode;
152typedef std::string String;
154#ifndef OPENCV_DISABLE_STRING_LOWER_UPPER_CONVERSIONS
159static inline char char_tolower(
char ch)
161 return (
char)std::tolower((
int)ch);
164static inline char char_toupper(
char ch)
166 return (
char)std::toupper((
int)ch);
171static inline std::string toLowerCase(
const std::string& str)
173 std::string result(str);
174 std::transform(result.begin(), result.end(), result.begin(), details::char_tolower);
178static inline std::string toUpperCase(
const std::string& str)
180 std::string result(str);
181 std::transform(result.begin(), result.end(), result.begin(), details::char_toupper);
Definition: cvstd.hpp:120
Definition: cvstd.hpp:111
CV_EXPORTS_W void transform(InputArray src, OutputArray dst, InputArray m)
Performs the matrix transformation of every array element.
CV_EXPORTS_W void max(InputArray src1, InputArray src2, OutputArray dst)
Calculates per-element maximum of two arrays or an array and a scalar.
CV_EXPORTS_W void sqrt(InputArray src, OutputArray dst)
Calculates a square root of array elements.
CV_EXPORTS_W void exp(InputArray src, OutputArray dst)
Calculates the exponent of every array element.
CV_EXPORTS_W void pow(InputArray src, double power, OutputArray dst)
Raises every array element to a power.
CV_EXPORTS_W void min(InputArray src1, InputArray src2, OutputArray dst)
Calculates per-element minimum of two arrays or an array and a scalar.
CV_EXPORTS_W void log(InputArray src, OutputArray dst)
Calculates the natural logarithm of every array element.
softfloat abs(softfloat a)
Absolute value
Definition: softfloat.hpp:444
CV_EXPORTS void * fastMalloc(size_t bufSize)
Allocates an aligned memory buffer.
CV_EXPORTS void fastFree(void *ptr)
Deallocates a memory buffer.
CV_EXPORTS void swap(Mat &a, Mat &b)
Swaps two matrices
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75