Changeset 674
- Timestamp:
- 02/17/10 22:45:43 (2 years ago)
- Location:
- branches/2010-image-rec
- Files:
-
- 14 added
- 2 modified
-
docs/81withclearshown.eps (added)
-
docs/81withclearshown.png (added)
-
docs/houghof81.eps (added)
-
docs/houghof81.png (added)
-
docs/linesimage.png (added)
-
docs/objectimageish.png (added)
-
docs/sobelwithsobelblurred.eps (added)
-
docs/sobelwithsobelblurred.png (added)
-
docs/withwidelines.eps (added)
-
docs/withwidelines.png (added)
-
docs/withwidelines2.eps (added)
-
docs/withwidelines2.png (added)
-
hist_test.asv (modified) (1 diff)
-
hist_test.m (modified) (6 diffs)
-
images/elphel/Thumbs.db (added)
-
images/elphel/whatevs.asv (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/2010-image-rec/hist_test.asv
r663 r674 175 175 176 176 end 177 -
branches/2010-image-rec/hist_test.m
r663 r674 7 7 fn = 'images/elphel/cam-000086.jpeg'; % Hard image 8 8 fn = 'images/course-walk/cimg4989.jpg'; 9 9 10 fn = 'images/elphel/cam-000094.jpeg'; 10 11 fn = 'images/elphel/cam-000081.jpeg'; 11 12 12 13 13 fprintf('Running on %s... ', fn); … … 75 75 grass_t_hist = hist(reshape(clear_area(:,:,4), 1, []), hist_bins); 76 76 77 %hist(reshape(clear_area(:,:,1), 1, []), hist_bins); %displays histogram 78 %of Hue space 79 77 80 % Make matrices with values that are indices into the histograms 78 81 h = ceil(im(:,:,1) * (hist_bins - 1)) + 1; … … 112 115 imtool(line_mask); 113 116 end 114 117 keyboard; 115 118 % Display 116 119 figure(2); 117 imshow([double(im_rgb) / 255 ; bw2rgb(mask)]);120 imshow([double(im_rgb) / 255])%; bw2rgb(mask)]); 118 121 119 122 % Draw a box over the "clear" area … … 123 126 right_x = round((1 - clear_area_left) * cols); 124 127 line([left_x right_x right_x left_x left_x], ... 125 [top_y top_y bottom_y bottom_y top_y] );128 [top_y top_y bottom_y bottom_y top_y],'LineWidth',4,'Color','red'); 126 129 127 130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 … … 143 146 for k = 1:length(lines) 144 147 xy = [lines(k).point1; lines(k).point2]; 145 plot(xy(:,1),xy(:,2),'LineWidth', 2,'Color','blue');148 plot(xy(:,1),xy(:,2),'LineWidth',8,'Color','blue'); 146 149 147 150 % plot beginnings and ends of lines 148 plot(xy(1,1),xy(1,2),'x','LineWidth', 2,'Color','yellow');149 plot(xy(2,1),xy(2,2),'x','LineWidth', 2,'Color','red');151 plot(xy(1,1),xy(1,2),'x','LineWidth',8,'Color','yellow'); 152 plot(xy(2,1),xy(2,2),'x','LineWidth',8,'Color','red'); 150 153 151 154 % determine the endpoints of the longest line segment … … 158 161 159 162 % highlight the longest line segment 160 plot(xy_long(:,1),xy_long(:,2),'LineWidth', 2,'Color','cyan');163 plot(xy_long(:,1),xy_long(:,2),'LineWidth',8,'Color','cyan'); 161 164 162 165

