For local enhancement using mean and variance, the condition is:
The local region must be small enough to capture local variations but large enough to provide reliable statistical estimates.
This condition ensures that the calculated mean and variance accurately represent the local characteristics, such as texture or contrast, without being overly influenced by noise or abrupt changes. If the neighborhood is too large, it might smooth out important details; if it is too small, the statistics may not be reliable enough for effective enhancement.
In summary, the condition is about selecting an appropriate neighborhood size to achieve a balance between capturing meaningful local variations and ensuring statistical reliability.