I am creating a synthetic dataset to train a model that needs to find documents in an image. the documents will be far from perfect, i.e they were folded, creased and wrinkled crinkled.

I could find a few ways of doing it in photoshop but I was wondering if someone has a better idea of doing this augmentation in opencv without trying to reverse engineer the photoshop process.

for example (from <https://www.photoshopessentials.com/photo-effects/folds-creases/>):
[![folds](https://i.stack.imgur.com/qEuT9.jpg)](https://i.stack.imgur.com/qEuT9.jpg)
to:
[![enter image description here](https://i.stack.imgur.com/iIyk7.jpg)](https://i.stack.imgur.com/iIyk7.jpg)

or crinkles (from <https://www.myjanee.com/tuts/crumple/crumple.htm>):
[![crinkles](https://i.stack.imgur.com/xIdXj.jpg)](https://i.stack.imgur.com/xIdXj.jpg)