For local enhancement using mean and variance, the condition is:
The local region used for enhancement must be chosen such that it is not influenced by significant discontinuities or edges within the image.
This ensures that the mean and variance values accurately reflect the local characteristics, such as uniformity or texture, without being affected by abrupt changes in intensity (which often occur at edges). If the region contains edges or sharp transitions, the calculated mean and variance may not represent the true local variations, leading to ineffective enhancement.