Excluding Hough transform artifacts at 45 and -45 degrees
Ältere Kommentare anzeigen
I am following steps in this example to find lines in my image, which contains a lot of nearly-horizontal lines. The Hough transform identifies several lines correctly, but there are additional incorrect lines at exactly 45 and -45 degrees, making an 'X' in my square image. I think these are a mathematical artifact (see Samuel Liew's answer here), and I would like to exclude them. The following works, but is there a better way? Or if you understand this artifact, could you please explain it?
angleList = -90:89; % All the permissable angles (note 90 can't be included)
angleList(angleList==45 | angleList==-45) = []; % Remove problematic -45, 45 degree angles
[H,T,R] = hough(BW, 'Theta', angleList);
1 Kommentar
Jordan Kennedy
am 22 Okt. 2020
In my dataset, I have true 45 degree artificats that are falsly amplified by the 45 degree angle artificat. So I did not want to remove 45 entirely. I still needed to maintain the true signal. With Michael Knetzger's explaination for the error I decided to use a 1D median filter on the H output of the Hough Transform. This is apart of the Signal Processing Toolbox. This seemed to work well for me.
tempangle = medfilt1(H,10,'truncate');
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Hough Transform finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
