connect lines from Canny algorithm

Loading...

connect lines from Canny algorithm

I get edges from canny algorithm, but between lines are little spaces. I need to connect lines together and reduce this space. 
For example: example image
I work with opencv in Android. 
Has anyone an idea how to do it?

Solutions/Answers:

Answer 1:

Consider using cvDilate() to dilate the image after canny is executed. This is one way to connect the line segments, and if the image gets too dilated for your purpose, you might want to execute Canny on the dilated image.

References

Loading...