edge merging
Show older comments
Hello,
I am comparing different techniques for extraction grains from an image: one method that I want to test is using edge detection =>then fill the edge wit imfill and use regionprops to determine area, perimeter, centroid etc.
Now after some noise cleaning : edge(ImageFin1,'sobel') gives good results but the edge or broken at some places , so imfill does not work well.
http://imageshack.us/photo/my-images/269/testforupload.jpg/ (object labeled and plotted with centroid)
Now I was looking for some fast algorithms to connect the edge of the same grains, I could work with the fact that the centroid should be at a distance smaller than the average diameter of a grain , but that would be rather slow. I also tried some existing posts on edge linking like http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/LineSegments/drawedgelist.m but that algroithm does not make the connections, it only identifies edge, if I understood it correctly.
So two questions : does anybody knows a quick algroithm to connect the edges? e.g. by filling the in between pixels
or is there a way to join object based on their centroid, I mean how to join two seperately labeled objects to one object that can be assed bu regionprops
thanks for the help, time and effort in advance
Answers (2)
Elad
on 14 Jun 2012
0 votes
I asked something simular, check : http://www.mathworks.com/matlabcentral/answers/39600-close-lines-after-edge-detection
Iago Lopez Grobas
on 28 Apr 2020
0 votes
Hello, do you have an answer to this now? it would be very helpful since I am having the same problem
thanks
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!