switched to Input/Output Array in gpu::absdiff

This commit is contained in:
Vladislav Vinogradov
2013-04-25 13:37:44 +04:00
parent 3ee12cbeb4
commit 5ec8c51b98
3 changed files with 64 additions and 59 deletions

View File

@@ -69,6 +69,9 @@ static inline void divide(double src1, InputArray src2, OutputArray dst, int dty
divide(src1, src2, dst, 1.0, dtype, stream);
}
//! computes element-wise absolute difference of two arrays (dst = abs(src1 - src2))
CV_EXPORTS void absdiff(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null());
//! computes the weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma)
CV_EXPORTS void addWeighted(const GpuMat& src1, double alpha, const GpuMat& src2, double beta, double gamma, GpuMat& dst,
int dtype = -1, Stream& stream = Stream::Null());
@@ -79,11 +82,6 @@ static inline void scaleAdd(const GpuMat& src1, double alpha, const GpuMat& src2
addWeighted(src1, alpha, src2, 1.0, 0.0, dst, -1, stream);
}
//! computes element-wise absolute difference of two arrays (c = abs(a - b))
CV_EXPORTS void absdiff(const GpuMat& a, const GpuMat& b, GpuMat& c, Stream& stream = Stream::Null());
//! computes element-wise absolute difference of array and scalar (c = abs(a - s))
CV_EXPORTS void absdiff(const GpuMat& a, const Scalar& s, GpuMat& c, Stream& stream = Stream::Null());
//! computes absolute value of each matrix element
//! supports CV_16S and CV_32F depth
CV_EXPORTS void abs(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null());