|
Last change
on this file since 20500 was 20500, checked in by Mathieu Morlighem, 10 years ago |
|
merged trunk-jpl and trunk for revision 20497
|
|
File size:
537 bytes
|
| Line | |
|---|
| 1 | function [mask]=nunataks(mask)
|
|---|
| 2 | %NUNATAKS - bias mask towards increased 0 coverage
|
|---|
| 3 | %
|
|---|
| 4 | % mask is an image of arbitrary size, format binary, with values 1 for foreground, and 0 for background
|
|---|
| 5 | %
|
|---|
| 6 | % Usage: mask=nunataks(mask)
|
|---|
| 7 | % [mask]=aggregation(mask);
|
|---|
| 8 | %
|
|---|
| 9 | % See also CLOSING, OPENING, DILATION, EROSION, AGGREGATION
|
|---|
| 10 |
|
|---|
| 11 | rocks=~mask;
|
|---|
| 12 |
|
|---|
| 13 | %matrices for convolution:
|
|---|
| 14 | matrix=[0 1 0; 1 0 1; 0 1 0];
|
|---|
| 15 |
|
|---|
| 16 | %do not exist, i.e. locations that stand pretty much alone.
|
|---|
| 17 | mask=filter2(matrix1,mask,'same');
|
|---|
| 18 | pos=find(~crocks & rocks);
|
|---|
| 19 |
|
|---|
| 20 | mask(pos)=0;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.