Remove objects from border defined by a polygon

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Remove objects from border defined by a polygon

jumpfunky
Hi,

I've a binary image and inside that image is an area defined by a
polygon. I'm wondering if there is an easy way to remove all objects on
the border defined by this polygon.

Many thanks for any suggestion!

Cheers,
Thorsten

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Remove objects from border defined by a polygon

Herbie-3
Dear Thorsten,

what do you mean by "objects on the border [...of] this polygon"?

How can we imagine an object on a border? At best I can think of points
on a border. Do you mean objects outside a polygon selection?

Somehow clueless

Herbie

:::::::::::::::::::::::::::::::::::::::::
On 21.01.14 19:24, Thorsten Wagner wrote:

> Hi,
>
> I've a binary image and inside that image is an area defined by a
> polygon. I'm wondering if there is an easy way to remove all objects on
> the border defined by this polygon.
>
> Many thanks for any suggestion!
>
> Cheers,
> Thorsten
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Remove objects from border defined by a polygon

jumpfunky
Hi Herbie,

hehe, after trying to clarify the question for you I've found a solution
by myself! To close this thread, I try to give an tutorial on that
question:

Suppose we have an image with black foreground objects. It objective is
to remove all objects which are not fully immersed in a polygon
selection.

0. Duplicate your image
1. Do the polygon selection on the duplicated image and fill it with the
foreground color
2. Invert the original image and add it to the duplicated
3. You get a new image. Invert it and fill the holes.
4. Invert it again and substract it from the original image.
5. You get a another image where all objects are removed which are not
fully immersed in the polygon.

Cheers,
Thorsten

Am Dienstag, den 21.01.2014, 19:48 +0100 schrieb Herbie:

> Dear Thorsten,
>
> what do you mean by "objects on the border [...of] this polygon"?
>
> How can we imagine an object on a border? At best I can think of points
> on a border. Do you mean objects outside a polygon selection?
>
> Somehow clueless
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::
> On 21.01.14 19:24, Thorsten Wagner wrote:
> > Hi,
> >
> > I've a binary image and inside that image is an area defined by a
> > polygon. I'm wondering if there is an easy way to remove all objects on
> > the border defined by this polygon.
> >
> > Many thanks for any suggestion!
> >
> > Cheers,
> > Thorsten
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html