src(x′,y′)r−loDiffr≤src(x,y)r≤src(x′,y′)r+upDiffr,\texttt{src} (x’,y’)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x’,y’)_r+ \texttt{upDiff} _r,src(x′,y′)r−loDiffr≤src(x,y)r≤src(x′,y′)r+upDiffr,
src(x′,y′)g−loDiffg≤src(x,y)g≤src(x′,y′)g+upDiffg\texttt{src} (x’,y’)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x’,y’)_g+ \texttt{upDiff} _gsrc(x′,y′)g−loDiffg≤src(x,y)g≤src(x′,y′)g+upDiffg
and
src(x′,y′)b−loDiffb≤src(x,y)b≤src(x′,y′)b+upDiffb\texttt{src} (x’,y’)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x’,y’)_b+ \texttt{upDiff} _bsrc(x′,y′)b−loDiffb≤src(x,y)b≤src(x′,y′)b+upDiffb
- in case of a color image and fixed range(彩色图,固定范围)
src(seedPoint.x,seedPoint.y)r−loDiffr≤src(x,y)r≤src(seedPoint.x,seedPoint.y)r+upDiffr,\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,src(seedPoint.x,seedPoint.y)r−loDiffr≤src(x,y)r≤src(seedPoint.x,seedPoint.y)r+upDiffr,
src(seedPoint.x,seedPoint.y)g−loDiffg≤src(x,y)g≤src(seedPoint.x,seedPoint.y)g+upDiffg\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _gsrc(seed