Sunday, 25 October 2015

computer vision - Connecting edges detected by an edge detector


I have a binary image obtained from a canny edge detector. The edges are not nicely detected in the center and I need to join them. The connection of edges is orientation and neighborhood dependent. I need to connect the vertices if they are below a threshold (say less than 5 pixel distance). If my almost linear features are nicely oriented, this threshold should be relaxed. (This is the best case.) image


I tried the Hough transform, but it didn't work for me because I don't have straight lines. Dilation and erosion are also not good; they make the images messier.



The approach I am trying is to first detect vertices and nodes (in MATLAB with bwmorph) and then make leaves as a separate feature. This is done as follows:



  1. Scanning in a 3x3 window, look for neighbors.

  2. Traverse the complete connected object.

  3. Try to fit a line (or maybe a quadratic polynomial).

  4. Check feature-by-feature if it's worth a connection or not.


The implementation is not straightforward since the decision-making part where vertices need to be connected is tricky.




No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...