Skip to content

Implement 'Image deformation using moving least squares' with pybind11 and python3 and opencv2

License

Notifications You must be signed in to change notification settings

ygean/pybind11-Scene-Text-Image-Transformation

Repository files navigation

pybind11-Scene-Text-Image-Transformation

Contributions

Codes borrows from

A tool for scene text data augmentation. provided the tool to avoid overfitting and gain robustness of models.

Requirements

Installation

  • install OpenCV and python3 on ubuntu 16.04

  • try docker Recommend✔

docker push allenzhou1996/mls-pybind11:latest

Build project:

./build.sh
python test_mls_pybind11.py

Demo

  • Original Image

  • Distortion

  • Stretch

  • Perspective

Speed

To transform an demo image with size (H:101, W:842), it takes less than 2.4ms (0.0024 sec) using a i5-8400 @2.8GHz CPU.

Citation

@inproceedings{schaefer2006image,
  title={Image deformation using moving least squares},
  author={Schaefer, Scott and McPhail, Travis and Warren, Joe},
  booktitle={ACM transactions on graphics (TOG)},
  volume={25},
  number={3},
  pages={533--540},
  year={2006},
  organization={ACM}
}

About

Implement 'Image deformation using moving least squares' with pybind11 and python3 and opencv2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages