I am trying to implement segmentation on an image. after a difference of Gaussians Process and applying weights to my edges I want to go through edge linking by local processing. I have seen this example with the van on multiple tutorials. I tried the second "real time" simplification.

what I do not understand is:

  • do I implement this algorithm on the gradient of the original image or the weighted edgels (I have tried both and got squat)?
  • If not. How can I use the gradient to implement an algorithm that will help me link the edgels?

This is) the image I am working with. enter image description here

This is the weighted DOG output. enter image description here

This is what I got from creating the g function from the original image and after filling gaps vertically enter image description here

and horizontally I got this. enter image description here

I am following the same thresholds as in the example.

This is a code snippet of my "gap filling":

        I2 = ~imopen(~padarray(g,[0,1],1),strel('line',k,0));
        HrizontalConnection  = I2(:,2:end-1);
        I2 = ~imopen(~padarray(g.',[0,1],1),strel('line',k,0));
        VerticalConnection  = I2(:,2:end-1);
  • $\begingroup$ You need to perform vertical filing and horizontal filling separately on the gradient image and then perform logical OR on both filled images. Looks like you did horizontal filling on top of vertically filled image. $\endgroup$ – Navin Prashath Dec 18 '16 at 13:32
  • $\begingroup$ @NavinPrashath I have edited to add a code snippet of the filling. As far as I understand I am doing what you instructed. Can you kindly review? Maybe I am doing something else wrong? $\endgroup$ – havakok Dec 18 '16 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.