Re: find largest cluster?



On Apr 9, 5:22 pm, bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Martin Brown wrote:
On Apr 9, 11:35 am, bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Given a list of RGB (or other triple) colours,
rgb0, rgb1... rgbN I would like to be able
to detect what the largest "common" colour.

It isn't clear what you mean by "largest" here. If you mean most
frequently occurring colour

yes, that's what I want.

Tolerances would require prescaling the r,g,b values to generate a
suitable unique index tag for each colour you consider acceptably
distinct.

Hmm. That would work, although isn't quite the same
as clustering on a "visible difference" measure.

Is this a standard problem, or does
anyone have an ah-hah algorithm?

An alternative for large images is to create a full histogram of all
the values that occur more than once.

I'm actually trying to implement "majority voting" on corresponding
pixels of a stack of aligned photographs.

Do you have any particular reason to believe this approach will work
any better than median filtering the pixel values that you have for
each cell. Under a wide range of conditions and noise distributions
the median should give pretty good results. Only if you have reason to
expect huge systematic biasses in some pixels would majority voting
help.

For each pixel, I want the (RGB) value that the majority of the photographs
agree on. Since lighting conditions vary with time, and no camera
is perfect, I'll need the tolerance.

You may be better off working in YUV space (rather than RGB) or some
other representation.

Are you trying to decrease the number of colours in an image by any
chance to palettise it?

Regards,
Martin Brown
.



Relevant Pages

  • Re: image dump of hidden X session
    ... That is in fact the reason. ... I found that when X was not the active VC, grabing the screenshot ... the cases I tried counting the rows of pixels. ... Kasper Dupont -- der bruger for meget tid paa usenet. ...
    (comp.os.linux.x)
  • Re: image dump of hidden X session
    ... That is in fact the reason. ... I found that when X was not the active VC, grabing the screenshot ... the cases I tried counting the rows of pixels. ... Kasper Dupont -- der bruger for meget tid paa usenet. ...
    (comp.os.linux.development.apps)
  • Re: image dump of hidden X session
    ... That is in fact the reason. ... I found that when X was not the active VC, grabing the screenshot ... the cases I tried counting the rows of pixels. ... Kasper Dupont -- der bruger for meget tid paa usenet. ...
    (comp.os.linux.development.system)
  • Re: [preview.sty] Need some *hints* in creating an image of an equation
    ... TeX-wise, but not in "mine". ... Is there a reason you snipped the part about using \displaystyle in a ... resampling exactly at 500 pixels in GIMP with bicubic interpolation. ...
    (comp.text.tex)
  • Re: UL List. Is this possible?
    ... Scripsit shapper: ... And now you know one reason why that was wrong. ... is marked up as a list with two items, the first one consisting of an image only and the second one consisting of three pieces of text? ... window narrower than 400 pixels, and you "need" to restrict the width to 400 pixels, no matter what the font size is. ...
    (comp.infosystems.www.authoring.stylesheets)