Looking for algorithm to extract line network from binary images within LabView I would like to create a LabView VI that receives an input image and the RGB-color codes of the powerlines depicted in the image. The output should (eventually) consist of id'd polygonial connections and their coordinates.

Right now i've finished creating a VI that converts the source image to a binary image with the respective line color types extracted into a binary image (see below).

I've been trying to apply some of edge/line finding VIs supplied by LabView Vision, but the results have not been very convincing.

I have considered implementing some sort of vectorization algorithm like 'Straight Line Extraction Using Iterative Total Least Squares Methods' or even some sort of line-walking-and-mapping algorithm, but before I do so I'd like to know if there already is some kind of fitting algorithm out there.

Attached you can find examples for the source and binary images.

Thanks in advance for your input!
The go-to algorithm for extracting edges is to transform the image the an appropriate Hough space. Luckily, the Hough transformation for extracting straight lines is one of the best documented.

It looks like these folks may have a Hough transformation implementation for LabVIEW you could use. If not, it's a pretty well documented algorithm and you could try to roll your own or try to integrate an implementation from another language, eg: MatLab, OpenCV.

With the appropriate Hough transformation, you would be able to extract line segments from your image (converting to a binary image is a great start). These line segments may not connect perfectly, depending on how straight your line is and how clear your image is, and you may need to process the vectors a bit more to get the results you desire.