Livewire is a semi-automatic 2D image segmentation software. This implementation is based on python 3.7. It aims to be optimal and have minimum response time. It is based on paper of Dr Omer Ishaq on Livewire:
Image is read and converted to grayscale. It is converted in a undirected weight graph. The weights are calculated using simple gradient and each pixel is assigned weights (right and bottom). The edges of object gets the lowest weights. Dijkastra is used to compute the edge of object as it follows the shortest path.
The shortest path nodes (pixels) are returned and are converted to white to display the edge. Next edge can be calculated likewise.
- Run the script.
- Image will open
- Click and mouse left button at one point
- Relase mouse left button at another point
- Press 'c'
- New image will open showing the segment with white border
- You can press 'c' to close the new window and select the points again
Python 3.x
Libraries used:
- OpenCv
- Numpy
- math
- Dijkstar 2.5
- Time
Tested on Ubuntu 19.04, Ubuntu 18.04, Windows 10 with Python 3.7
Check contribution guidelines for more information
GNU GPL V3
See the License for more information