Re: TBitmap - how to copy an "object"
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 14:55:04 +0200
"Peter Bauer" <PeterBauer@xxxxxxxx> wrote in message
news:4270c4d2$0$17551$9b622d9e@xxxxxxxxxxxxxxxxxx
> i'm trying to copy an "object" of one color out of a TBitmap,
> the problem i got is that i dont know when a pixel belongs to
> this object when the image contains more then one objects. it's
> also not possible to split the image, cause the objects are not
> seperated well.
I'll take a step back if you'll allow me, and solve one problem
at a time. Am I correct in describing the first problem as finding
a connected, single-colour area?
If you know where to start, you can search outwards in all directions
from the starting pixel, adding neighbouring pixels to your region
if they are still the same colour. It's easy to program as a
recursive algorithm; it's essentially a flood fill. Thinking back,
stack depth was a problem but this was in 1990 or so, still on a 16
bit platform.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: TBitmap - how to copy an "object"
- From: Ekkehard Domning
- Re: TBitmap - how to copy an "object"
- From: Peter Bauer
- Re: TBitmap - how to copy an "object"
- References:
- TBitmap - how to copy an "object"
- From: Peter Bauer
- TBitmap - how to copy an "object"
- Prev by Date: TBitmap - how to copy an "object"
- Next by Date: Re: TBitmap - how to copy an "object"
- Previous by thread: TBitmap - how to copy an "object"
- Next by thread: Re: TBitmap - how to copy an "object"
- Index(es):
Relevant Pages
|
|