Commit bf29b16d authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed bug in cv::Sobel (ddepth < 0)

parent 58e26313
...@@ -474,6 +474,8 @@ void cv::Sobel( const InputArray& _src, OutputArray _dst, int ddepth, int dx, in ...@@ -474,6 +474,8 @@ void cv::Sobel( const InputArray& _src, OutputArray _dst, int ddepth, int dx, in
int ksize, double scale, double delta, int borderType ) 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()) ); _dst.create( src.size(), CV_MAKETYPE(ddepth, src.channels()) );
Mat dst = _dst.getMat(); Mat dst = _dst.getMat();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment