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 have just started doing image processing, and I am currently working on line detection. I am using Hough transform on the image below.

enter image description here

I'm wondering how I can improve the efficiency of the Hough transform? Before applying the transform what can be done (pre-processes) to improve the performance?

share|improve this question
2  
Welcome to dsp.SE :) some more information on your current approach would help us answering your problems: What kind of results are you getting now? How good do your results need to be (e.g. how/for what will your solution be applied)? Also, mentioning the approaches you explored on your own could be nice. –  penelope Nov 28 '12 at 9:29
    
Try not to see the image as a human sees it. Try to see it as a function of brightness vs position. One of the lines you want to find is darker than its surroundings at one point, then lighter than its surroundings at another point! If you do edge detection it should find both, but will be confused by the transition region in the middle. Maybe there's a way to reverse the effects of the lighting like I tried to do here, though I don't really know how. –  endolith Nov 28 '12 at 16:53

1 Answer 1

Are you using openCV? Anyway, if you are running an edge-detection, and then the hough transform on the edges, it might help to smooth/blur the edges with some bluring functions. OpenCV got some different ones for that.

In particular a boxFilter with a 2x2 sized kernel, anchor=Point(-1,-1), and normalize=false. It will hopefully make all the edges "thicker", filling in gaps and inconsitencies in the process.

share|improve this answer
    
I am using MATLAB. –  Amadeus Bachmann Nov 28 '12 at 3:14
    
@HenrikKjusAlstad Welcome to dsp.SE, and thank you for contributing. We aim for questions and answers here to not be language-specific, so would it maybe be possible for you to describe the openCV arguments you recommend? It's fine that your solutions are in OpenCV, but they should be understandable and reproducible in any other language suitable for the problem :) –  penelope Nov 28 '12 at 9:26
    
@Zxy, I havent used matlab before, but the key idea would be the same, no matter which language or tool you use. I would look into some blur functions and see if they can smooth the edges to make them fall more into a line. –  Henrik Kjus Alstad Nov 28 '12 at 11:57

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.