Livewire Segmentation Technique
Livewire, also known as Intelligent Scissors, is a segmentation technique which allows a user to select regions of interest to be extracted quickly and accurately, using simple mouse clicks. It is based on the lowest cost path algorithm, by Edsger W. Dijkstra. Firstly Convolve the image with a Sobel filter to extract edges. Each pixel of the resulting image is a vertex of the graph and has edges going to the 4 pixels around it, as up, down, left, right. The edge costs are defined based on a cost function.
The user sets the starting point clicking on an image’s pixel, known as an anchor. Then, as he starts to move the mouse over other points, the smallest cost path is drawn from the anchor to the pixel where the mouse is over, changing itself if the user moves the mouse. If he wants to choose the path that is being displayed, he simply clicks the image again.
One can easily see in the right image, that the places where the user clicked to outline the desired region of interest are marked with a small square. It is also easy to see that the livewire has snapped on the image's borders.
Convolve the image with a Sobel filter to extract edges. Using this filtered image Create a graph using pixels as nodes with edges in four directions (up, down, left right). Edges are weighted with features gathered from the sobel filter making it less costly to stay on an edge. Several different cost methods are possible but the most important is the gradient magnitude
MORTENSEN, E. N.; BARRETT, W. A. Intelligent scissors for image composition. In: SIGGRAPH ’95: Proceedings of the 22nd annual conference on Computer graphics and interactive techniques. New York, NY, USA: ACM Press, 1995. p. 191–198. ISBN 0-89791-701-4.
- BAGGIO, Daniel L´elis. GPGPU Based Image Segmentation Livewire Algorithm Implementation. 2007. 108f. Thesis of Master in Science – Technological Institute of Aeronautics, S˜ao Jos´e dos Campos. http://gpuwire.googlecode.com/files/Master%20Thesis%20-%20Updated%20February%2015th.pdf