Computer Graphics researchers Volker Scholz and Marcus Magnor developed an amazing algorithm that allows one to substitute the texture and shape on a fabric in a real-life video accurately. I know that doesn’t describe much, but I’d venture it is probably more easily understood as compared to their abstract:
In this paper, we present a video processing algorithm for texture replacement of moving garments in monocular video recordings. We use a color-coded pattern which encodes texture coordinates within a local neighborhood in order to determine the geometric deformation of the texture. A time-coherent texture interpolation is obtained by the use of 3D radial basis functions. Shading maps are determined with a surface reconstruction technique and applied to new textures which replace the color pattern in the video sequence. Our method enables exchanging fabric pattern designs of garments worn by actors as a video post-processing step.
Well, a video speaks about a million words – so see for yourself: