Texture Synthesis Based on Minimum Energy Cut and Its Applications