Changeset 14525
- Timestamp:
- 04/09/13 17:15:31 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/morphological
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/morphological/dilation.m
r14520 r14525 18 18 19 19 %convolve mask: 20 mask=filter2(matrix,~mask,'same'); 21 pos=find(mask~=0); mask(pos)=1; 20 convol=filter2(matrix,mask,'same'); 22 21 23 %opposite to recover the foreground: 24 mask=~mask; 22 pos=find(mask==0); 23 pos2=find(convol(pos)~=0); 24 25 mask(pos(pos2))=1; -
issm/trunk-jpl/src/m/morphological/erosion.m
r14520 r14525 19 19 20 20 %convolve mask: 21 mask=filter2(matrix,mask,'same'); 22 pos=find(mask~=0); mask(pos)=1; 21 convol=filter2(matrix,mask,'same'); 22 23 pos=find(mask==1); 24 pos2=find(convol(pos)<neighboorhood); 25 26 mask(pos(pos2))=0; -
issm/trunk-jpl/src/m/morphological/opening.m
r14520 r14525 4 4 mask=erosion(mask,neighboorhood); 5 5 mask=dilation(mask,neighboorhood); 6
Note:
See TracChangeset
for help on using the changeset viewer.