Re: shape recognition
- From: "Eduardo" <mm@xxxxxx>
- Date: Mon, 13 Oct 2008 18:30:40 -0300
"Peter T" <peter_t@discussions> escribió en el mensaje
news:umkBeDSLJHA.6000@xxxxxxxxxxxxxxxxxxxxxxx
Analyze the image in this way:
Start at the middle of each edge, and see the color of the pixels, each
one going towards the center.
Then go one pixel each time to one of the vertex and see if the same
pattern repeats, but more inward than when i looked in the middle.
I'm also thinking of making a function "ColorIsSimilar", because the
color may be not exactly the same, but similar.
When you say "similar" do you mean in terms of numerical RGB or
"visually".
Good point.
And of course, as they are images, they are for the human eye.
Point being, the eye does not perceive much separation with some colours,
eg greens, but very small differences in say cyan are very noticeable.
If by similar you mean "visually" it might be worth looking into the 3D
"colour shape" or "colour space" (search w/out the "u"). There are
numerous algorithms out there of varying complexity to define a colour
shape. Having defined your space, fix your RGB's at points in the 3D
space, return their xyz coordinates form some arbitrary origin.
The colour difference is the distance between the colours in the 3D space.
Well, the images can have a shadow, but they are just 2D (i think, though, i
don't know when an image pass from 2D to be considered as 3D).
If you are only looking for extremely small differences, eg up to about 5
in each RGB 0-255 scale (within range of say typical jpg representation of
same colour), it's probably OK to ignore the above for your purposes and
concentrate on what you are already doing.
I'm looking for much bigger differences. For the kind of differences that
the eye perceive as the outline of a shape (in a small bitmap).
You made a good point here about the difference of sensitivity of the eye to
different colors. I ignored that until now. I'll see what I'll do.
I think for the time being i'll keep ignoring that, and when i have the
recognition algorithm done, then i'll tweak the ColorsAreSimilar function.
Thanks.
Regards,
Peter T
.
- Follow-Ups:
- Re: shape recognition
- From: Peter T
- Re: shape recognition
- References:
- shape recognition
- From: Eduardo
- Re: shape recognition
- From: Larry Serflaten
- Re: shape recognition
- From: Eduardo
- Re: shape recognition
- From: Peter T
- shape recognition
- Prev by Date: Re: shape recognition
- Next by Date: Re: Visual Basic Express 2008 Edition and KB278379
- Previous by thread: Re: shape recognition
- Next by thread: Re: shape recognition
- Index(es):
Relevant Pages
|