Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

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!

Source image (in this case a snipped of poland) binary image of extracted green lines binary image of extracted red lines

share|improve this question

migrated from stackoverflow.com Jan 7 '13 at 12:45

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
PS: you may be able to clean up your binary images a bit further using binary morphology techniques. –  Sean Connolly Jan 6 '13 at 16:55
    
Hello John and thank you for your extensive answer. –  Igby Jan 6 '13 at 19:08
    
I've uploaded an example to show the current result, but the lines found are only very rough approximations to the desired result. Am I misinterpreting the usage of this transformation? Is it more like an iterative approach (find first, extract single line from source and save, repeat?) –  Igby Jan 6 '13 at 19:13
1  
The Hough transformation can take some fiddling to get right for your use case. The two problems here, it seems, are that it is connecting disparate lines just because they line up and that you are only getting the most significant of these. As you simplified your problem by preprocessing the image, you can lower your threshold a lot to bring in more lines. Also, perhaps a sliding window based approach would give better detail. We shouldn't have a long conversation here though, if the Hough transform brings up questions you'll find lots of folks willing to answer specifics on here. Cheers. –  Sean Connolly Jan 6 '13 at 19:29
1  
Here is nice resource with 'guidelines for use': homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm (sorry if the link rots) –  Sean Connolly Jan 6 '13 at 19:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.