This is very rough, but I think I'm on the right track. I changed how I compute the texture energy. Before I simply used the average value of all pixels in the neighborhood. Now I am comparing the neighborhoods pixel by pixel, and aggregating the distances. Here's an initial rough result.