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

This commit is contained in:
Vladislav Vinogradov 2011-05-10 06:24:44 +00:00
parent 58e26313dd
commit bf29b16d1d

View File

@ -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();