mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1118,6 +1118,13 @@ CV_EXPORTS_W void flip(InputArray src, OutputArray dst, int flipCode);
|
||||
*/
|
||||
CV_EXPORTS_W void flipND(InputArray src, OutputArray dst, int axis);
|
||||
|
||||
/** @brief Broadcast the given Mat to the given shape.
|
||||
* @param src input array
|
||||
* @param shape target shape. Should be a list of CV_32S numbers. Note that negative values are not supported.
|
||||
* @param dst output array that has the given shape
|
||||
*/
|
||||
CV_EXPORTS_W void broadcast(InputArray src, InputArray shape, OutputArray dst);
|
||||
|
||||
enum RotateFlags {
|
||||
ROTATE_90_CLOCKWISE = 0, //!<Rotate 90 degrees clockwise
|
||||
ROTATE_180 = 1, //!<Rotate 180 degrees clockwise
|
||||
|
||||
@@ -198,16 +198,32 @@ public:
|
||||
CV_WRAP GpuMat clone() const;
|
||||
|
||||
//! copies the GpuMat content to device memory (Blocking call)
|
||||
CV_WRAP void copyTo(OutputArray dst) const;
|
||||
void copyTo(OutputArray dst) const;
|
||||
//! bindings overload which copies the GpuMat content to device memory (Blocking call)
|
||||
CV_WRAP void copyTo(CV_OUT GpuMat& dst) const {
|
||||
copyTo(static_cast<OutputArray>(dst));
|
||||
}
|
||||
|
||||
//! copies the GpuMat content to device memory (Non-Blocking call)
|
||||
CV_WRAP void copyTo(OutputArray dst, Stream& stream) const;
|
||||
void copyTo(OutputArray dst, Stream& stream) const;
|
||||
//! bindings overload which copies the GpuMat content to device memory (Non-Blocking call)
|
||||
CV_WRAP void copyTo(CV_OUT GpuMat& dst, Stream& stream) const {
|
||||
copyTo(static_cast<OutputArray>(dst), stream);
|
||||
}
|
||||
|
||||
//! copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call)
|
||||
CV_WRAP void copyTo(OutputArray dst, InputArray mask) const;
|
||||
void copyTo(OutputArray dst, InputArray mask) const;
|
||||
//! bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call)
|
||||
CV_WRAP void copyTo(CV_OUT GpuMat& dst, GpuMat& mask) const {
|
||||
copyTo(static_cast<OutputArray>(dst), static_cast<InputArray>(mask));
|
||||
}
|
||||
|
||||
//! copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call)
|
||||
CV_WRAP void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
|
||||
void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
|
||||
//! bindings overload which copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call)
|
||||
CV_WRAP void copyTo(CV_OUT GpuMat& dst, GpuMat& mask, Stream& stream) const {
|
||||
copyTo(static_cast<OutputArray>(dst), static_cast<InputArray>(mask), stream);
|
||||
}
|
||||
|
||||
//! sets some of the GpuMat elements to s (Blocking call)
|
||||
CV_WRAP GpuMat& setTo(Scalar s);
|
||||
@@ -222,19 +238,31 @@ public:
|
||||
CV_WRAP GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
|
||||
|
||||
//! converts GpuMat to another datatype (Blocking call)
|
||||
CV_WRAP void convertTo(OutputArray dst, int rtype) const;
|
||||
void convertTo(OutputArray dst, int rtype) const;
|
||||
|
||||
//! converts GpuMat to another datatype (Non-Blocking call)
|
||||
CV_WRAP void convertTo(OutputArray dst, int rtype, Stream& stream) const;
|
||||
void convertTo(OutputArray dst, int rtype, Stream& stream) const;
|
||||
//! bindings overload which converts GpuMat to another datatype (Non-Blocking call)
|
||||
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, Stream& stream) const {
|
||||
convertTo(static_cast<OutputArray>(dst), rtype, stream);
|
||||
}
|
||||
|
||||
//! converts GpuMat to another datatype with scaling (Blocking call)
|
||||
CV_WRAP void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;
|
||||
void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;
|
||||
//! bindings overload which converts GpuMat to another datatype with scaling(Blocking call)
|
||||
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha = 1.0, double beta = 0.0) const {
|
||||
convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta);
|
||||
}
|
||||
|
||||
//! converts GpuMat to another datatype with scaling (Non-Blocking call)
|
||||
CV_WRAP void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
|
||||
void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
|
||||
|
||||
//! converts GpuMat to another datatype with scaling (Non-Blocking call)
|
||||
CV_WRAP void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
|
||||
void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
|
||||
//! bindings overload which converts GpuMat to another datatype with scaling (Non-Blocking call)
|
||||
CV_WRAP void convertTo(CV_OUT GpuMat& dst, int rtype, double alpha, double beta, Stream& stream) const {
|
||||
convertTo(static_cast<OutputArray>(dst), rtype, alpha, beta, stream);
|
||||
}
|
||||
|
||||
CV_WRAP void assignTo(GpuMat& m, int type = -1) const;
|
||||
|
||||
|
||||
@@ -2014,12 +2014,12 @@ inline v_int32x4 v_trunc(const v_float32x4& a)
|
||||
inline v_int32x4 v_round(const v_float64x2& a)
|
||||
{
|
||||
static const int32x2_t zero = vdup_n_s32(0);
|
||||
return v_int32x4(vcombine_s32(vmovn_s64(vcvtaq_s64_f64(a.val)), zero));
|
||||
return v_int32x4(vcombine_s32(vmovn_s64(vcvtnq_s64_f64(a.val)), zero));
|
||||
}
|
||||
|
||||
inline v_int32x4 v_round(const v_float64x2& a, const v_float64x2& b)
|
||||
{
|
||||
return v_int32x4(vcombine_s32(vmovn_s64(vcvtaq_s64_f64(a.val)), vmovn_s64(vcvtaq_s64_f64(b.val))));
|
||||
return v_int32x4(vcombine_s32(vmovn_s64(vcvtnq_s64_f64(a.val)), vmovn_s64(vcvtnq_s64_f64(b.val))));
|
||||
}
|
||||
|
||||
inline v_int32x4 v_floor(const v_float64x2& a)
|
||||
|
||||
@@ -924,6 +924,9 @@ inline scalartype v_reduce_sum(const _Tpvec& a) \
|
||||
return (scalartype)v_get0(res); \
|
||||
}
|
||||
OPENCV_HAL_IMPL_RVV_REDUCE_SUM_FP(v_float32, v_float32, vfloat32m1_t, float, f32, VTraits<v_float32>::vlanes())
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
OPENCV_HAL_IMPL_RVV_REDUCE_SUM_FP(v_float64, v_float64, vfloat64m1_t, float, f64, VTraits<v_float64>::vlanes())
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_REDUCE(_Tpvec, func, scalartype, suffix, vl, red) \
|
||||
inline scalartype v_reduce_##func(const _Tpvec& a) \
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/core/ocl.hpp>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
# elif defined WINRT || defined _WIN32_WCE
|
||||
/* not supported */
|
||||
# elif defined __ANDROID__ || defined __linux__ || defined _WIN32 || \
|
||||
defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__
|
||||
defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__ || \
|
||||
defined __GNU__
|
||||
# define OPENCV_HAVE_FILESYSTEM_SUPPORT 1
|
||||
# elif defined(__APPLE__)
|
||||
# include <TargetConditionals.h>
|
||||
|
||||
Reference in New Issue
Block a user