Rose-Hulman Robotics Team

Changeset 674

Show
Ignore:
Timestamp:
02/17/10 22:45:43 (2 years ago)
Author:
taborts
Message:
 
Location:
branches/2010-image-rec
Files:
14 added
2 modified

Legend:

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

    r663 r674  
    175175 
    176176end 
    177  
  • branches/2010-image-rec/hist_test.m

    r663 r674  
    77fn = 'images/elphel/cam-000086.jpeg'; % Hard image 
    88fn = 'images/course-walk/cimg4989.jpg'; 
     9 
    910fn = 'images/elphel/cam-000094.jpeg'; 
    1011fn = 'images/elphel/cam-000081.jpeg'; 
    11  
    1212 
    1313fprintf('Running on %s... ', fn); 
     
    7575grass_t_hist = hist(reshape(clear_area(:,:,4), 1, []), hist_bins); 
    7676 
     77%hist(reshape(clear_area(:,:,1), 1, []), hist_bins);  %displays histogram 
     78%of Hue space 
     79 
    7780% Make matrices with values that are indices into the histograms 
    7881h = ceil(im(:,:,1) * (hist_bins - 1)) + 1; 
     
    112115    imtool(line_mask); 
    113116end 
    114  
     117keyboard; 
    115118% Display 
    116119figure(2); 
    117 imshow([double(im_rgb) / 255; bw2rgb(mask)]); 
     120imshow([double(im_rgb) / 255])%; bw2rgb(mask)]); 
    118121 
    119122% Draw a box over the "clear" area 
     
    123126right_x = round((1 - clear_area_left) * cols); 
    124127line([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'); 
    126129  
    127130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 
     
    143146       for k = 1:length(lines) 
    144147         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'); 
    146149  
    147150         % 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'); 
    150153  
    151154         % determine the endpoints of the longest line segment  
     
    158161  
    159162       % 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'); 
    161164  
    162165