I have an LP optimization problem where I need to impose a linear constraint on the result of a median filter applied to an image. The issue is that the image already has had possible transformation applied to it, so if the original image is of the form $I = \{x_{ij} \mid 1 \leq i, j \leq n\}$, the transformed image is of the form $I' = \{x_{ij} + \delta_{ij} \mid 1 \leq i, j \leq n\}$, where the $\delta_{i, j}$ are variables satisfying $-1 \leq \delta_{i, j} \leq 1$.
I am then trying to impose the constraints $\mu_{st} = \text{median}(\{x_{s+i, t+j} \mid -m \leq i, j \leq m\})$, where we are taking the median of a $(2m+1) \times (2m+1)$ box around $(s, t)$. In another stackexchange post (Minimizing the median, integer programming), for a single such LP of this form, we can impose the conditions $\mu_{s, t} \geq x_{s+i, t+j} - Mz_{s, t, i, j}$ subject to $\sum_{i, j = -m}^{m} z_{s, t, i, j} = \frac{(2m+1)^2 - 1}{2}$ for a fixed $s, t$, where we are looking for $\min \mu_{s, t}$. However, if we were to do this for each $s, t$, would analogously computing $\min \sum_{s, t} \mu_{s, t}$ make each $\mu_{s, t}$ equal to the median? Is there a scenario where due to some choices of $\delta_{i, j}$, one of the $\mu_{s, t}$ does not achieve the median value here?