- Reproduction of Kaiming He's Paper Content-Aware Rotation on ICCV 2013.
- I just test this project on Windows 10, there may be something wrong on Linux system.
-
Rotation Manipulation
suppose that :
,
then we have :
further, we can get the derivative : -
Line Preservation
suppose that :
,
then we have :
further, we can get the derivative : -
Shape Preservation
suppose that :
,
then we have :
further, we can get the derivative : -
Optimization
-
Step 1 : Fix θ solve for V
Sparse Linear System :
V is the minimum point of total energy above, thus, let :
we can get the solution for V. -
Step 2 : Fix V solve for θ
Part 1 : Fix Φ, update θ
suppose that :
we have :
then let :
by solving a sparse linear system, we can get the solution of θ :
Part 2 : Fix θ, update Φ
the solution of Φ can be easily approximately reached by enumeration based on iteration methods(increase β gradually).
- How to Use : download the whole project and run main.py
- folder ep : images which are used for formula derivation and some results.
- folder image : images which are used in original paper.
- folder lsd : line segment detection algorithm in python version.
- warp_mesh.py : image warping method realized by embedded function in tensorflow.