提交 79b500eb 编写于 作者: V Vladislav Vinogradov

fixed bug in cv::Scharr and cv::Laplacian (ddepth < 0)

上级 bf29b16d
......@@ -507,6 +507,8 @@ void cv::Scharr( const InputArray& _src, OutputArray _dst, int ddepth, int dx, i
double scale, double delta, int borderType )
{
Mat src = _src.getMat();
if (ddepth < 0)
ddepth = src.depth();
_dst.create( src.size(), CV_MAKETYPE(ddepth, src.channels()) );
Mat dst = _dst.getMat();
......@@ -537,7 +539,9 @@ void cv::Scharr( const InputArray& _src, OutputArray _dst, int ddepth, int dx, i
void cv::Laplacian( const InputArray& _src, OutputArray _dst, int ddepth, int ksize,
double scale, double delta, int borderType )
{
Mat src = _src.getMat();
Mat src = _src.getMat();
if (ddepth < 0)
ddepth = src.depth();
_dst.create( src.size(), CV_MAKETYPE(ddepth, src.channels()) );
Mat dst = _dst.getMat();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册