Re: find largest cluster?
- From: bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Apr 2008 09:45:34 +0100
mauro wrote:
On Apr 10, 2:22 am, bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I need "near" values; so the packed-sorting thing won't
do what I want.
so, your problem is not actually finding the largest cluster of "near"
colour (it would be easy), it is defining what "near" is. Working only
on colours it won't help, you should use some pattern recognition.
As a first approximation, I'd define the distance
between 2 RGB values as the linear distance
in 3D (RGB) space, with each dimension scaled
as per the usual (NTSC) conversion from RGB to grayscale.
gray = .3 * red + .59 * green + .11 * blue.
Thus distance = sqrt((.3 * delta(R))^2 + (.59 * delta(G))^2 + (.11 * delta (B))^2);
and if one is only doing comparisions, one can omit the sqrt.
BugBear
.
- References:
- find largest cluster?
- From: bugbear
- Re: find largest cluster?
- From: Martin Brown
- Re: find largest cluster?
- From: bugbear
- Re: find largest cluster?
- From: mauro
- find largest cluster?
- Prev by Date: Re: find largest cluster?
- Next by Date: Re: find largest cluster?
- Previous by thread: Re: find largest cluster?
- Next by thread: Re: find largest cluster?
- Index(es):