Update demosaicing.cpp

pull/18590/head
Krushnal Patel 4 years ago committed by Alexander Alekhin
parent d2dbc9d7a0
commit 1fb6c6e6e5
  1. 6
      modules/imgproc/src/demosaicing.cpp

@ -1566,9 +1566,9 @@ public:
int x = 1;
if (start_with_green)
{
D[blue<<1] = (S[-sstep] + S[sstep]) >> 1;
D[blue<<1] = (S[-sstep] + S[sstep] + 1) >> 1;
D[1] = S[0];
D[2-(blue<<1)] = (S[-1] + S[1]) >> 1;
D[2-(blue<<1)] = (S[-1] + S[1] + 1) >> 1;
D += dcn;
++S;
++x;
@ -1584,7 +1584,7 @@ public:
{
D[0] = S[0];
D[1] = (std::abs(S[-1] - S[1]) > std::abs(S[sstep] - S[-sstep]) ? (S[sstep] + S[-sstep] + 1) : (S[-1] + S[1] + 1)) >> 1;
D[2] = (S[-sstep-1] + S[-sstep+1] + S[sstep-1] + S[sstep+1]) >> 2;
D[2] = (S[-sstep-1] + S[-sstep+1] + S[sstep-1] + S[sstep+1] + 2) >> 2;
D[3] = (S[0] + S[2] + 1) >> 1;
D[4] = S[1];

Loading…
Cancel
Save