Structure-preserving image completion with multi-level dynamic patches