Changeset 657
- Timestamp:
- 02/06/10 14:13:27 (2 years ago)
- Files:
-
- 1 modified
-
branches/2010-image-rec/hist_test.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2010-image-rec/hist_test.m
r655 r657 9 9 fn = 'images/elphel/cam-000094.jpeg'; 10 10 fn = 'images/elphel/cam-000081.jpeg'; 11 11 12 12 13 fprintf('Running on %s... ', fn); … … 23 24 s_mean_factor = 0.2; % Seems to most effect obstacle detection 24 25 v_mean_factor = 0.1; % Obstacles and lines 25 t_mean_factor = 0. ;26 t_mean_factor = 0.01; 26 27 texture_band = 2; 27 28 … … 40 41 vedges = filter2(fsobel', imbig(:,:,texture_band)); 41 42 edges = sqrt(hedges .^ 2 + vedges .^ 2); 43 edges=double(imread('images/elphel/cam-000081.jpeg-sobel-v-5.png'))/255; 42 44 texture = filter2(fspecial('average', 10), edges); 45 texture = filter2(fspecial('average', 10), texture); 46 texture = filter2(fspecial('average', 10), texture); 47 texture = filter2(fspecial('average', 10), texture); 43 48 texture = filter2(fspecial('average', 10), texture); 44 49 texture = filter2(fspecial('average', 10), texture); … … 58 63 im(:,:,4) = texture; 59 64 65 66 60 67 % Area at the bottom of the image assumed to be grass, clear of obstacles 61 clear_area = im(round(clear_area_top * rows):end , ...68 clear_area = im(round(clear_area_top * rows):end-20, ... 62 69 round(clear_area_left * cols): ... 63 70 round((1 - clear_area_left) * cols), :); … … 106 113 % Draw a box over the "clear" area 107 114 top_y = round(clear_area_top * rows); 108 bottom_y = rows ;115 bottom_y = rows-20; 109 116 left_x = round(clear_area_left * cols); 110 117 right_x = round((1 - clear_area_left) * cols);

