다음은 Hough Transform을 적용하여 검색하는 완전한 예입니다. 작업을 위해 MATLAB을 사용 중입니다 ...
트릭은 이미지를 영역으로 나눠서 각각 다르게 처리하는 것입니다. 이것은 당신이 당신의 씬에서 다른 "텍스쳐"를 가지고 있기 때문입니다 (벽의 위쪽 영역에있는 타일들은 바닥에있는 어두운 영역과 상당히 다르며, 동시에 모든 이미지를 처리하는 것이 최적이 아닙니다).
작업 예를 들어, 생각이 하나를 얻을 수있는 매개 변수를 조정하면서
%# load image, blur it, then find edges
I0 = rgb2gray(imread('http://www.de-viz.ru/catalog/new2/Holm/hvannaya.jpg'));
I = imcrop(I0, [577 156 220 292]); %# select a region of interest
I = imfilter(I, fspecial('gaussian', [7 7], 1), 'symmetric');
BW = edge(I, 'canny');
%# Hough Transform and show accumulated matrix
[H T R] = hough(BW, 'RhoResolution',2, 'Theta',-90:0.5:89.5);
imshow(imadjust(mat2gray(H)), [], 'XData',T, 'YData',R, ...
'InitialMagnification','fit')
xlabel('\theta (degrees)'), ylabel('\rho')
axis on, axis normal, colormap(hot), colorbar, hold on
%# detect peaks
P = houghpeaks(H, 20, 'threshold',ceil(0.5*max(H(:))));
plot(T(P(:,2)), R(P(:,1)), 'gs', 'LineWidth',2);
%# detect lines and overlay on top of image
lines = houghlines(BW, T, R, P, 'FillGap',50, 'MinLength',5);
figure, imshow(I), hold on
for k = 1:length(lines)
xy = [lines(k).point1; lines(k).point2];
plot(xy(:,1), xy(:,2), 'g.-', 'LineWidth',2);
end
hold off



당신은 다른 지역에 대해 동일한 절차를 시도 할 수 좋은 결과 ..
http://stackoverflow.com/questions/2596722/is-there-any-super-fast-algorithm-for-finding-lines-on-picture 가능한 복제본 – andand