diff --git a/modules/photo/src/contrast_preserve.hpp b/modules/photo/src/contrast_preserve.hpp index 1afd4bc3e3..5681779fc9 100644 --- a/modules/photo/src/contrast_preserve.hpp +++ b/modules/photo/src/contrast_preserve.hpp @@ -285,9 +285,9 @@ void Decolor::grad_system(const Mat &im, vector < vector < double > > &polyGrad, add_vector(comb,idx,r,g,b); for(int i = 0;i(i,j)= + curIm.at(i,j)=static_cast( pow(rgb_channel[2].at(i,j),r)*pow(rgb_channel[1].at(i,j),g)* - pow(rgb_channel[0].at(i,j),b); + pow(rgb_channel[0].at(i,j),b)); vector curGrad; gradvector(curIm,curGrad); add_to_vector_poly(polyGrad,curGrad,idx1);