Changeset 688
- Timestamp:
- 02/21/10 17:37:10 (2 years ago)
- Files:
-
- 1 modified
-
branches/2010-image-rec/hist_test.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2010-image-rec/hist_test.m
r687 r688 8 8 %fn = 'images/course-walk/cimg4921.jpg'; 9 9 %fn = 'images/elphel/cam-000078.jpeg'; 10 % $fn = 'images/elphel/cam-000086.jpeg'; % Hard image10 %fn = 'images/elphel/cam-000086.jpeg'; % Hard image 11 11 %fn = 'images/course-walk/cimg4989.jpg'; 12 12 fn = 'images/elphel-09/test29.jpg'; 13 13 %fn = 'images/elphel/cam-000094.jpeg'; 14 fn = 'images/elphel/cam-000081.jpeg';14 %fn = 'images/elphel/cam-000081.jpeg'; 15 15 end 16 16 … … 44 44 fprintf('Blurring sobel\n'); 45 45 texture = imresize(edges, .25); 46 %texture = filter2(fspecial('average', 3), texture);46 texture = filter2(fspecial('average', 3), texture); 47 47 texture(texture > 1) = 1; 48 48 … … 154 154 fprintf('Hough transform\n'); 155 155 156 [H,T,R] = hough(line_mask );156 [H,T,R] = hough(line_mask,'RhoResolution',1,'ThetaResolution',1); 157 157 figure('Name','Hough peaks'); 158 158 imshow(H,[],'XData',T,'YData',R,'InitialMagnification','fit'); 159 159 xlabel('\theta'), ylabel('\rho'); 160 160 axis on, axis normal, hold on; 161 P = houghpeaks(H, 5,'NHoodSize',[161,161]); %ceil(0.3*max(H(:))));161 P = houghpeaks(H,2,'NHoodSize',[161,161],'Threshold',ceil(0.5*max(H(:)))); 162 162 x = T(P(:,2)); 163 163 y = R(P(:,1)); … … 178 178 end 179 179 180 if ~show_ points180 if ~show_images 181 181 print('-depsc', [fn '-hough-lines.eps']); 182 182 end

