A crappy Python implementation of intelligent scissors/livewire Mainly based on this paper
Mortensen E N, Barrett W A. Intelligent scissors for image composition[C]//Proceedings of the 22nd annual conference on Computer graphics and interactive techniques. ACM, 1995: 191-198.
========== It was a verification script for a C++ module.
Todo:
- Other method to replace min()
- Other method(lookup table) to avoid arccos in gradient direction calculation, or don't use arccos based method at all
- Rewrite get_neighbors()
- Data structure with linear search time to replace the dict for path matrix, and other if needed
- Use numpy more carefully
- Path cooling
- Dynamic training