0

I'm trying to complete the right edge of the large rectangle in the following image: this

The approach I've tried involves running a Sobel filter for edge detection on the image rotated by 45 degrees, following which I used the MATLAB Hough Transform to fill gaps in the detected edges. Then, I've tried to join the closest edges detected, which should in theory complete the desired rectangle edge.

The issues I'm facing are as follows:

1) Even though I've used a horizontal Sobel kernel on the image rotated by 45 degrees, which should ideally give me only edges that are originally diagonal, I'm getting most major edges that were originally horizontal and vertical as well.

2) I'm getting a lot of broken lines which I'm unable to unify using MATLAB houghpeaks() and houghlines() functions even after tweaking the parameters.

3) Following from 2, joining the two closest edges is nontrivial since the houghlines often fits multiple line segments to what is actually the same edge.

What else could I try to achieve such edge completion?

prestojunkie
  • 105
  • 1
  • 9
  • Which of the rectangles in this image are you talking about? – Jan Eglinger May 11 '15 at 13:00
  • Sorry, I should have been clearer. I'm talking about the large rectangle in the center of the circle. The bottom corners are occluded (this has been imaged through a collimator). The rectangle is complete apart for the right edge where you can see the two diagonal edges that extend towards the right. It is that gap between the origins of the two diagonal edges that I need to fill in order to complete the edge. – prestojunkie May 11 '15 at 13:05
  • Your answer to @JanEglinger makes it even more obscure. Are you showing the right image ? –  May 11 '15 at 13:24
  • I've changed the image. I've drawn a red rectangle over the edge that I need to complete. Hope this makes it clearer – prestojunkie May 11 '15 at 13:43
  • I'm voting to close this question as off-topic because it belongs to dsp.stackexchange.com – Andrey Rubshtein May 11 '15 at 13:47
  • 3
    I do not think this is offtopic. This is a question about what image processing algorithm would help to get a closed contour of a complicated object. http://stackoverflow.com/help/on-topic clearly states Questions about "a software algorithm, [...]" as on topic for SO. – Mailerdaimon May 11 '15 at 14:02

0 Answers0