mirror of
https://github.com/opencv/opencv.git
synced 2026-12-03 05:33:03 -06:00
core: support N-D Mats in cv::magnitude and cv::phase
This commit is contained in:
@@ -152,7 +152,7 @@ void magnitude( InputArray src1, InputArray src2, OutputArray dst )
|
||||
CV_INSTRUMENT_REGION();
|
||||
|
||||
int type = src1.type(), depth = src1.depth(), cn = src1.channels();
|
||||
CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F));
|
||||
CV_Assert( src1.sameSize(src2) && type == src2.type() && (depth == CV_32F || depth == CV_64F));
|
||||
|
||||
CV_OCL_RUN(dst.isUMat() && src1.dims() <= 2 && src2.dims() <= 2,
|
||||
ocl_math_op(src1, src2, dst, OCL_OP_MAG))
|
||||
@@ -188,7 +188,7 @@ void phase( InputArray src1, InputArray src2, OutputArray dst, bool angleInDegre
|
||||
CV_INSTRUMENT_REGION();
|
||||
|
||||
int type = src1.type(), depth = src1.depth(), cn = src1.channels();
|
||||
CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F));
|
||||
CV_Assert( src1.sameSize(src2) && type == src2.type() && (depth == CV_32F || depth == CV_64F));
|
||||
|
||||
CV_OCL_RUN(dst.isUMat() && src1.dims() <= 2 && src2.dims() <= 2,
|
||||
ocl_math_op(src1, src2, dst, angleInDegrees ? OCL_OP_PHASE_DEGREES : OCL_OP_PHASE_RADIANS))
|
||||
|
||||
Reference in New Issue
Block a user