Rose-Hulman Robotics Team

Changeset 657

Show
Ignore:
Timestamp:
02/06/10 14:13:27 (2 years ago)
Author:
taborts
Message:

texture from opencv images

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/2010-image-rec/hist_test.m

    r655 r657  
    99fn = 'images/elphel/cam-000094.jpeg'; 
    1010fn = 'images/elphel/cam-000081.jpeg'; 
     11 
    1112 
    1213fprintf('Running on %s... ', fn); 
     
    2324s_mean_factor = 0.2; % Seems to most effect obstacle detection 
    2425v_mean_factor = 0.1; % Obstacles and lines 
    25 t_mean_factor = 0.; 
     26t_mean_factor = 0.01; 
    2627texture_band = 2; 
    2728 
     
    4041vedges = filter2(fsobel', imbig(:,:,texture_band)); 
    4142edges = sqrt(hedges .^ 2 + vedges .^ 2); 
     43edges=double(imread('images/elphel/cam-000081.jpeg-sobel-v-5.png'))/255; 
    4244texture = filter2(fspecial('average', 10), edges); 
     45texture = filter2(fspecial('average', 10), texture); 
     46texture = filter2(fspecial('average', 10), texture); 
     47texture = filter2(fspecial('average', 10), texture); 
    4348texture = filter2(fspecial('average', 10), texture); 
    4449texture = filter2(fspecial('average', 10), texture); 
     
    5863im(:,:,4) = texture; 
    5964 
     65 
     66 
    6067% Area at the bottom of the image assumed to be grass, clear of obstacles 
    61 clear_area = im(round(clear_area_top * rows):end, ... 
     68clear_area = im(round(clear_area_top * rows):end-20, ... 
    6269                round(clear_area_left * cols): ... 
    6370                    round((1 - clear_area_left) * cols), :); 
     
    106113% Draw a box over the "clear" area 
    107114top_y = round(clear_area_top * rows); 
    108 bottom_y = rows; 
     115bottom_y = rows-20; 
    109116left_x = round(clear_area_left * cols); 
    110117right_x = round((1 - clear_area_left) * cols);