edge merging

조회 수: 9 (최근 30일)
Jürgen
Jürgen 2012년 6월 14일
답변: Iago Lopez Grobas 2020년 4월 28일
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

답변 (2개)

Elad
Elad 2012년 6월 14일
  댓글 수: 1
Jürgen
Jürgen 2012년 6월 14일
Hi,
I 've looked at the function edgelink but that function puts all pixels that belong to one edge in a list, so you get a cell array of N edges that's cool but not exactly what I want, because I want to merge the edge that belong together. teh function mergeseg seemed promising but it merges only line segments and that's not my case.
Now one way to go would be to use the edgelist and calculate the distance form the extreme point to all other extreme point and connect those point.
but exactly it would be faster if I could use regionprops, centroid and calculated distances between the centroid and then merge the objects of which the centroid are close,
So exactly I would like an algorithm or a function that merges objects after labeling by bwlabel?

댓글을 달려면 로그인하십시오.


Iago Lopez Grobas
Iago Lopez Grobas 2020년 4월 28일
Hello, do you have an answer to this now? it would be very helpful since I am having the same problem
thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by