提交 febd0f14 编写于 作者: S Seon-Wook Park

spatialGradient: Don't dynamically alloc C array, use vector

上级 f92e2ed5
......@@ -74,9 +74,9 @@ void spatialGradient( InputArray _src, OutputArray _dx, OutputArray _dy,
// Store pointers to rows of input/output data
// Padded by two rows for border handling
uchar* P_src[H+2];
short* P_dx [H+2];
short* P_dy [H+2];
std::vector<uchar*> P_src(H+2);
std::vector<short*> P_dx (H+2);
std::vector<short*> P_dy (H+2);
int i_top = 0, // Case for H == 1 && W == 1 && BORDER_REPLICATE
i_bottom = H - 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册