For local enhancement using mean and variance, the condition is:
The local region should be homogeneous enough to allow the mean and variance to represent the characteristics of the area accurately.
This ensures that the computed mean and variance can effectively highlight important local features like texture or contrast without being distorted by abrupt changes such as edges or noise. If the region includes significant transitions (like edges), the statistics might not provide reliable enhancements. Therefore, selecting a suitable local region that avoids major intensity changes is crucial for effective enhancement.