## Object delete using boundary points

### Object delete using boundary points

I need to delete an object in a binary image for which I have a list of the boundary
points. There may be other objects in the image. The boundary is 8-way connected.
I think that the following algorithm should work:

if no. of boundary points =< 3 then
delete boundary points
else
// search for a point inside the object which is 4-way connected
for each boundary point (x, y)
if (x+1, y+1) has 4-way connectivity then
perform 4-way connected flood fill with (x+1, y+1) as the
seed
endif
endfor
repeat the above loop with the following offsets until all boundary
points have been deleted
(x-1, y-1), (x+1, y), (x-1, y), (x, y+1), (x, y-1),
(x+1, y-1), (x-1, y+1), (x-1, y+1), (x, y)
if after using all the above offset some of the boundary points haven't
been deleted then delete boundary points
endif

Has anyone any suggestions for improvements, alternative algorithms or source code
(perferrably C)?

Thanks.

Bill.

Hi everyone,

I've been spending my free time this week thinking about defining convex
n-dimensional objects as the intersection of half-hyperplanes.  In 2D, for
instance, a triangle would be the intersection of three hyperplanes; in 3D,
a cube would be the intersection of six planes.

From my quick look through the library, I gather this is a special case of
a form of solid modelling called Boundary-Defined Objects (or something
similar).  I wasn't able to get find info on this, however.  Since I'm sure
most of what I'm trying to do has been done before, does anyone know of any
good sources which touch on this?  Thanks!