I use the following code to extract lines from a given 25x25 black&white-image:
[H, theta, rho] = hough(image);
peaks = houghpeaks(H, 20,'NHoodSize',[19 19]);
lines = houghlines(image, theta, rho, peaks, 'FillGap', 1, 'MinLength', 3);
I then plot the found lines on the given image. The result looks like this:
What I can't understand is, why this procedure does not find a line on the left border of the image, going from top to bottom (or vice versa). Instead for example the pink line is found, which I would think has less evidence in hough space to be there (since it touches less white pixels). Does anyone have an intuition why this might be the case?
I tried changing the parameters a little bit or add some padding to the image, but nothing has worked so far.
edit: original image as requested:
In