diff --git a/modules/photo/src/fast_nlmeans_denoising_opencl.hpp b/modules/photo/src/fast_nlmeans_denoising_opencl.hpp index 515237983..2ec9b9487 100644 --- a/modules/photo/src/fast_nlmeans_denoising_opencl.hpp +++ b/modules/photo/src/fast_nlmeans_denoising_opencl.hpp @@ -72,7 +72,7 @@ static bool ocl_fastNlMeansDenoising(InputArray _src, OutputArray _dst, float h, int type = _src.type(), cn = CV_MAT_CN(type); Size size = _src.size(); - if ( type != CV_8UC1 || type != CV_8UC2 || type != CV_8UC4 ) + if ( type != CV_8UC1 && type != CV_8UC2 && type != CV_8UC4 ) return false; int templateWindowHalfWize = templateWindowSize / 2;