For local enhancement using mean and variance, the condition is:
The local region must not contain any sharp discontinuities or edges.
This is because local enhancement using mean and variance works best when the neighborhood is relatively uniform, allowing the statistical measures (mean and variance) to accurately represent the characteristics of the area. If the region includes edges or abrupt changes, the computed mean and variance could be distorted, leading to ineffective enhancement or unwanted artifacts.