Changeset 682
- Timestamp:
- 02/20/10 13:56:44 (2 years ago)
- Files:
-
- 1 modified
-
branches/2010-image-rec/hist_test.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2010-image-rec/hist_test.m
r680 r682 9 9 10 10 %fn = 'images/elphel/cam-000094.jpeg'; 11 %fn = 'images/elphel/cam-000081.jpeg';11 fn = 'images/elphel/cam-000081.jpeg'; 12 12 13 13 fprintf('Running on %s... ', fn); … … 109 109 mask = imclose(mask, se); 110 110 111 tempMask=mask*-1+1; 112 bottomlist=bottomFind(tempMask); 113 imshow(tempMask); 114 hold on; 115 scatter(bottomlist(:,1),-bottomlist(:,2)); 116 117 111 118 line_mask = texture; 112 119 for threshold = .42 113 120 line_mask(texture > threshold & mask == 0) = 1; 114 121 line_mask(texture <= threshold | mask ~= 0) = 0; 115 imtool(line_mask); 122 figure; 123 imshow(line_mask); 116 124 end 117 125 %keyboard; … … 178 186 179 187 end 180 188 function bottomlist = bottomFind(bw) 189 list=zeros(size(bw,2),2); 190 temp=bw; 191 for i = 1:size(bw,2) 192 temp(1,:)=1; 193 list(i,2)=find(temp(:,i)==1,1,'last'); 194 list(i,1)=i; 195 end 196 bottomlist=list; 197 end

