Locally Adaptive Thresholding - How to Detect if Image Block is Uniform
If you calculate the standard deviation of the blocks (from the average) it could serve as a good measure to the smoothness of a block (assuming there is no an extraordinary value and the specific use of the "system")