Home > Archive > Matlab > January 2008 > How to morphologically break a fork?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to morphologically break a fork?
|
|
| Joaquim Luis 2008-01-30, 11:14 pm |
| Hi,
I'm trying to build a system that would allow the automatic
identification of lineaments (faults) on sea-bottom terrain
models. I managed to advance quite a while in it but now
I'm stuck with cases where lineaments cross each other.
Since I want to vectorize the result I need to be able to
break the crossings and that's where I'm stuck. I read,
reread and tried all options of the bwmorph() function but
to no success.
One typical case is exemplified by this
mask = false(7,8);
mask([13 14 19 25 29 30 31 32 40 48 49]) = true;
image(mask)
set(gcf,'colormap',[0 0 0; 1 1 1])
Anyone whith a bright idea on how to break this fork?
Thanks
Joaquim Luis
| |
| Joaquim Luis 2008-01-30, 11:15 pm |
| "Joaquim Luis" <jluis@--ualg--.pt> wrote in message
<fnqtt3$6l0$1@fred.mathworks.com>...
> Hi,
> I'm trying to build a system that would allow the
automatic
> identification of lineaments (faults) on sea-bottom
terrain
> models. I managed to advance quite a while in it but now
> I'm stuck with cases where lineaments cross each other.
> Since I want to vectorize the result I need to be able to
> break the crossings and that's where I'm stuck. I read,
> reread and tried all options of the bwmorph() function
but
> to no success.
> One typical case is exemplified by this
>
> mask = false(7,8);
> mask([13 14 19 25 29 30 31 32 40 48 49]) = true;
> image(mask)
> set(gcf,'colormap',[0 0 0; 1 1 1])
Well, I found a way.
Not perfect and, honestly, not that I really understand
what it does, but it works
lut = makelut('sum(x(:)) == 4', 3);
mask2 = ~applylutc(mask,lut);
mask3 = mask & mask2;
image(mask3)
set(gcf,'colormap',[0 0 0; 1 1 1])
J. Luis
|
|
|
|
|