Region means in piecewise-constant segmentation
= Region means in piecewise-constant segmentation
{title2=$c_i=|E_i|^{-1}\int_{E_i}g$}
For a fixed positive-area region $E_i$, its least-squares grey value is $c_i=|E_i|^{-1}\int_{E_i}g$. The minimum fidelity equals $\int g^2-\sum_i(\int_{E_i}g)^2/|E_i|$. This eliminates the grey values before optimizing the partition geometry.