Commit 22682f93 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #6760 from alalek:issue_6653

parents da69cd08 8b05a4bf
......@@ -8394,7 +8394,11 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
CV_OCL_RUN( _src.dims() <= 2 && _dst.isUMat() && !(depth == CV_8U && (code == CV_Luv2BGR || code == CV_Luv2RGB)),
ocl_cvtColor(_src, _dst, code, dcn) )
Mat src = _src.getMat(), dst;
Mat src, dst;
if (_src.getObj() == _dst.getObj()) // inplace processing (#6653)
_src.copyTo(src);
else
src = _src.getMat();
Size sz = src.size();
CV_Assert( depth == CV_8U || depth == CV_16U || depth == CV_32F );
......
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