mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
fixed bug in cv::Scharr and cv::Laplacian (ddepth < 0)
This commit is contained in:
parent
bf29b16d1d
commit
79b500eb0d
@ -507,6 +507,8 @@ void cv::Scharr( const InputArray& _src, OutputArray _dst, int ddepth, int dx, i
|
|||||||
double scale, double delta, int borderType )
|
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();
|
||||||
|
|
||||||
@ -538,6 +540,8 @@ void cv::Laplacian( const InputArray& _src, OutputArray _dst, int ddepth, int ks
|
|||||||
double scale, double delta, int borderType )
|
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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user