Skip to content

Commit

Permalink
Support ElemDepth compatibility API
Browse files Browse the repository at this point in the history
  • Loading branch information
cv3d committed Sep 22, 2018
1 parent 074b57d commit 4a01dd2
Show file tree
Hide file tree
Showing 10 changed files with 677 additions and 35 deletions.
97 changes: 86 additions & 11 deletions modules/core/include/opencv2/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,18 @@ output array to be changed.
CV_EXPORTS_W void add(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask = noArray(), ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void add(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, int ddepth)
{
add(src1, src2, dst, mask, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void add(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, ElemType ddepth)
{
add(src1, src2, dst, mask, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Calculates the per-element difference between two arrays or array and a scalar.
Expand Down Expand Up @@ -391,12 +397,18 @@ of the output array to be changed.
CV_EXPORTS_W void subtract(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask = noArray(), ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void subtract(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, int ddepth)
{
subtract(src1, src2, dst, mask, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void subtract(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, ElemType ddepth)
{
subtract(src1, src2, dst, mask, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API


Expand Down Expand Up @@ -424,12 +436,18 @@ Mat::convertTo
CV_EXPORTS_W void multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale = 1, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale, int ddepth)
{
multiply(src1, src2, dst, scale, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale, ElemType ddepth)
{
multiply(src1, src2, dst, scale, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Performs per-element division of two arrays or a scalar by an array.
Expand All @@ -455,24 +473,36 @@ case of an array-by-array division, you can only pass -1 when src1.depth()==src2
CV_EXPORTS_W void divide(InputArray src1, InputArray src2, OutputArray dst,
double scale = 1, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void divide(InputArray src1, InputArray src2, OutputArray dst,
double scale, int ddepth)
{
divide(src1, src2, dst, scale, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void divide(InputArray src1, InputArray src2, OutputArray dst,
double scale, ElemType ddepth)
{
divide(src1, src2, dst, scale, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @overload */
CV_EXPORTS_W void divide(double scale, InputArray src2,
OutputArray dst, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void divide(double scale, InputArray src2,
OutputArray dst, int ddepth)
{
divide(scale, src2, dst, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void divide(double scale, InputArray src2,
OutputArray dst, ElemType ddepth)
{
divide(scale, src2, dst, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Calculates the sum of a scaled array and another array.
Expand Down Expand Up @@ -524,12 +554,18 @@ can be set to CV_DEPTH_AUTO, which will be equivalent to src1.depth().
CV_EXPORTS_W void addWeighted(InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void addWeighted(InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, int ddepth)
{
addWeighted(src1, alpha, src2, beta, gamma, dst, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void addWeighted(InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, ElemType ddepth)
{
addWeighted(src1, alpha, src2, beta, gamma, dst, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Scales, calculates absolute values, and converts the result to 8-bit.
Expand Down Expand Up @@ -768,6 +804,15 @@ static inline void batchDistance(InputArray src1, InputArray src2,
{
batchDistance(src1, src2, dist, static_cast<ElemDepth>(ddepth), nidx, normType, K, mask, update, crosscheck);
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void batchDistance(InputArray src1, InputArray src2,
OutputArray dist, ElemType ddepth, OutputArray nidx,
int normType = NORM_L2, int K = 0,
InputArray mask = noArray(), int update = 0,
bool crosscheck = false)
{
batchDistance(src1, src2, dist, CV_MAT_DEPTH(ddepth), nidx, normType, K, mask, update, crosscheck);
}
#endif // CV_TYPE_COMPATIBLE_API


Expand Down Expand Up @@ -831,12 +876,18 @@ normalization.
CV_EXPORTS_W void normalize( InputArray src, InputOutputArray dst, double alpha = 1, double beta = 0,
int norm_type = NORM_L2, ElemDepth ddepth = CV_DEPTH_AUTO, InputArray mask = noArray());
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void normalize( InputArray src, InputOutputArray dst, double alpha, double beta,
int norm_type, int ddepth, InputArray mask = noArray())
{
normalize(src, dst, alpha, beta, norm_type, static_cast<ElemDepth>(ddepth), mask);
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void normalize( InputArray src, InputOutputArray dst, double alpha, double beta,
int norm_type, ElemType ddepth, InputArray mask = noArray())
{
normalize(src, dst, alpha, beta, norm_type, CV_MAT_DEPTH(ddepth), mask);
}
#endif // CV_TYPE_COMPATIBLE_API

/** @overload
Expand Down Expand Up @@ -936,11 +987,16 @@ otherwise, its type will be CV_MAKE_TYPE(ddepth, src.channels()).

CV_EXPORTS_W void reduce(InputArray src, OutputArray dst, int dim, int rtype, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void reduce(InputArray src, OutputArray dst, int dim, int rtype, int ddepth)
{
reduce(src, dst, dim, rtype, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void reduce(InputArray src, OutputArray dst, int dim, int rtype, ElemType ddepth)
{
reduce(src, dst, dim, rtype, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Creates one multi-channel array out of several single-channel ones.
Expand Down Expand Up @@ -1735,13 +1791,20 @@ CV_EXPORTS_W void mulTransposed( InputArray src, OutputArray dst, bool aTa,
InputArray delta = noArray(),
double scale = 1, ElemDepth ddepth = CV_DEPTH_AUTO);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(dtype, ddepth)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void mulTransposed(InputArray src, OutputArray dst, bool aTa,
InputArray delta,
double scale, int ddepth)
{
mulTransposed(src, dst, aTa, delta, scale, static_cast<ElemDepth>(ddepth));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(dtype, ddepth)
static inline void mulTransposed(InputArray src, OutputArray dst, bool aTa,
InputArray delta,
double scale, ElemType ddepth)
{
mulTransposed(src, dst, aTa, delta, scale, CV_MAT_DEPTH(ddepth));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @brief Transposes a matrix.
Expand Down Expand Up @@ -2032,12 +2095,18 @@ the set of input vectors.
CV_EXPORTS void calcCovarMatrix( const Mat* samples, int nsamples, Mat& covar, Mat& mean,
int flags, ElemDepth cdepth = CV_64F);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(ctype, ctype)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(ctype, ctype)
static inline void calcCovarMatrix(const Mat* samples, int nsamples, Mat& covar, Mat& mean,
int flags, int ctype)
{
calcCovarMatrix(samples, nsamples, covar, mean, flags, static_cast<ElemDepth>(ctype));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(ctype, ctype)
static inline void calcCovarMatrix(const Mat* samples, int nsamples, Mat& covar, Mat& mean,
int flags, ElemType ctype)
{
calcCovarMatrix(samples, nsamples, covar, mean, flags, CV_MAT_DEPTH(ctype));
}
#endif // CV_TYPE_COMPATIBLE_API

/** @overload
Expand All @@ -2051,12 +2120,18 @@ static inline void calcCovarMatrix(const Mat* samples, int nsamples, Mat& covar,
CV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,
InputOutputArray mean, int flags, ElemDepth cdepth = CV_64F);
#ifdef CV_TYPE_COMPATIBLE_API
CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(ctype, ctype)
CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(ctype, ctype)
static inline void calcCovarMatrix(InputArray samples, OutputArray covar,
InputOutputArray mean, int flags, int ctype)
{
calcCovarMatrix(samples, covar, mean, flags, static_cast<ElemDepth>(ctype));
}
CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(ctype, ctype)
static inline void calcCovarMatrix(InputArray samples, OutputArray covar,
InputOutputArray mean, int flags, ElemType ctype)
{
calcCovarMatrix(samples, covar, mean, flags, CV_MAT_DEPTH(ctype));
}
#endif // CV_TYPE_COMPATIBLE_API


Expand Down
42 changes: 40 additions & 2 deletions modules/core/include/opencv2/core/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,43 @@
#define CV_DEPRECATED_MAX_DEPTH_INT "max() between `ElemDepth` and `int` is deprecated"
#define CV_DEPRECATED_MIN_DEPTH_DEPTH "use `CV_MIN_DEPTH(...)` instead"
#define CV_DEPRECATED_MIN_DEPTH_INT "min() between `ElemDepth` and `int` is deprecated"
#define CV_DEPRECATED_ELEMTYPE_CMP_INT "comparing `ElemType` directly with `int` is deprecated. "
#define CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE "comparing `ElemType` and `ElemDepth` directly with each other is deprecated. " \
"Use `mat.depth()` or `CV_MAT_DEPTH(type)` for depth comparsion, or CV_MAKETYPE(depth, cn) for type comparsion instead. " \
" You can also utilize `mat.channels()` or `CV_MAT_CN(type)` for the number of channels"
#define CV_DEPRECATED_ELEMTYPE_CMP_INT "comparing `ElemDepth` directly with `int` is deprecated. "
#define CV_DEPRECATED_ELEMDEPTH_CMP_INT "comparing `ElemDepth` directly with `int` is deprecated. "
#define CV_DEPRECATED_PARAM(depr_type, depr_var, new_type, new_var) \
"parameter `" CV_STR(depr_type) " " CV_STR(depr_var) "` is deprecated. " \
"Use `" CV_STR(new_type) " " CV_STR(new_var) "` instead"


#ifdef OPENCV_ENABLE_DEPRECATED_WARNING_ELEMTYPE_OVERLOAD
#ifdef OPENCV_ENABLE_DEPRECATED_WARNING_ELEMDEPTH_ELEMTYPE_OVERLOAD
# define CV_DEPRECATED_MAX_DEPTH_DEPTH_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_MAX_DEPTH_DEPTH)
# define CV_DEPRECATED_MIN_DEPTH_DEPTH_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_MIN_DEPTH_DEPTH)
# define CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE)
# define CV_DEPRECATED_ELEMDEPTH_TO_ELEMTYPE_ATTR(depr_var, new_var) CV_DEPRECATED_MSG(CV_DEPRECATED_PARAM(ElemDepth, depr_var, ElemType, new_var))
# define CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(depr_var, new_var) CV_DEPRECATED_MSG(CV_DEPRECATED_PARAM(ElemType, depr_var, ElemDepth, new_var))
#else
# define CV_DEPRECATED_MAX_DEPTH_DEPTH_ATTR /* nothing, default */
# define CV_DEPRECATED_MIN_DEPTH_DEPTH_ATTR /* nothing, default */
# define CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR /* nothing, default */
# define CV_DEPRECATED_ELEMDEPTH_TO_ELEMTYPE_ATTR(depr_var, new_var) /* nothing, default */
# define CV_DEPRECATED_ELEMTYPE_TO_ELEMDEPTH_ATTR(depr_var, new_var) /* nothing, default */
#endif

#ifndef OPENCV_DISABLE_DEPRECATED_WARNING_INT_ELEMTYPE_OVERLOAD
# define CV_DEPRECATED_MAX_DEPTH_INT_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_MAX_DEPTH_INT)
# define CV_DEPRECATED_MIN_DEPTH_INT_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_MIN_DEPTH_INT)
# define CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_ELEMTYPE_CMP_INT)
# define CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR CV_DEPRECATED_MSG(CV_DEPRECATED_ELEMDEPTH_CMP_INT)
# define CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(depr_var, new_var) CV_DEPRECATED_MSG(CV_DEPRECATED_PARAM(int, depr_var, ElemDepth, new_var))
# define CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(depr_var, new_var) CV_DEPRECATED_MSG(CV_DEPRECATED_PARAM(int, depr_var, ElemType, new_var))
#else
# define CV_DEPRECATED_MAX_DEPTH_INT_ATTR /* nothing */
# define CV_DEPRECATED_MIN_DEPTH_INT_ATTR /* nothing */
# define CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR /* nothing */
# define CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR /* nothing */
# define CV_DEPRECATED_INT_TO_ELEMDEPTH_ATTR(depr_var, new_var) /* nothing */
# define CV_DEPRECATED_INT_TO_ELEMTYPE_ATTR(depr_var, new_var) /* nothing */
#endif

Expand Down Expand Up @@ -160,21 +174,45 @@ ATTRIBUTES static inline bool operator>(const LType left, const RType right)

//CV_OPERATOR_LOGICAL_EQ(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_EQ(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_EQ(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_EQ(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LOGICAL_EQ(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_LOGICAL_EQ(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

//CV_OPERATOR_LOGICAL_NOT_EQ(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_NOT_EQ(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_NOT_EQ(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
//CV_OPERATOR_LOGICAL_NOT_EQ(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LOGICAL_NOT_EQ(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_LOGICAL_NOT_EQ(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

CV_OPERATOR_LE(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_LE(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_LE(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LE(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LE(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_LE(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

CV_OPERATOR_LT(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_LT(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_LT(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LT(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_LT(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_LT(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

CV_OPERATOR_GE(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_GE(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_GE(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_GE(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_GE(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_GE(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

CV_OPERATOR_GT(ElemType, int, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_GT(int, ElemType, CV_DEPRECATED_ELEMTYPE_CMP_INT_ATTR);
CV_OPERATOR_GT(ElemDepth, int, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_GT(int, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_INT_ATTR);
CV_OPERATOR_GT(ElemDepth, ElemType, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);
CV_OPERATOR_GT(ElemType, ElemDepth, CV_DEPRECATED_ELEMDEPTH_CMP_ELEMTYPE_ATTR);

#endif // CV_TYPE_COMPATIBLE_API

Expand Down
8 changes: 8 additions & 0 deletions modules/core/include/opencv2/core/check.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,21 @@ static inline void CV_NORETURN check_failed_MatDepth(const int v1, const int v2,
{
check_failed_MatDepth(static_cast<ElemDepth>(v1), static_cast<ElemDepth>(v2), ctx);
}
static inline void CV_NORETURN check_failed_MatDepth(const ElemType v1, const ElemType v2, const CheckContext& ctx)
{
check_failed_MatDepth(CV_MAT_DEPTH(v1), CV_MAT_DEPTH(v2), ctx);
}
#endif // CV_TRANSNATIONAL_API
CV_EXPORTS void CV_NORETURN check_failed_MatType(const ElemType v1, const ElemType v2, const CheckContext& ctx);
#ifdef CV_TRANSNATIONAL_API
static inline void CV_NORETURN check_failed_MatType(const int v1, const int v2, const CheckContext& ctx)
{
check_failed_MatType(static_cast<ElemType>(v1), static_cast<ElemType>(v2), ctx);
}
static inline void CV_NORETURN check_failed_MatType(const ElemDepth v1, const ElemDepth v2, const CheckContext& ctx)
{
check_failed_MatType(CV_MAKETYPE(v1, 1), CV_MAKETYPE(v2, 1), ctx);
}
#endif // CV_TRANSNATIONAL_API
CV_EXPORTS void CV_NORETURN check_failed_MatChannels(const int v1, const int v2, const CheckContext& ctx);

Expand Down

0 comments on commit 4a01dd2

Please sign in to comment.