[lug] Weighting of factors and whatnot (a bit OT)
D. Stimits
stimits at comcast.net
Sat Jan 27 12:09:46 MST 2007
...
>
> It seems like a class membership, set theory, perhaps permutation sort
> of thing. I don't have any books on this topic. I suspect there's
> more than one way to do this. Does this problem remind you of any
> similar known problems with known solutions? What do you suggest?
>
You could be describing conversions between color spaces, where various
aspects of color are normalized from 0 to 1. Take for example conversion
from RGB to grayscale, and you have something very similar. For RGB to
grayscale, you have three components: Red, Green, and Blue. The end
result is a single component which matches the overall intensity of the
original three, the gray. 0 is black or non-existent, 1 is fully white
when using grayscale.
One way to convert is geometrically. If you look at gimp or a number of
graphics apps, you'll see they let you select colors in multiple ways,
each of which is something of a different "view". If you open up gimp,
one of those views is represented as a triangle with a ring around it,
which is really a 2D variation on HSV model; moving it around always
shows a point of black (a corner), white (a corner), and intermediate
gray (an edge between black and white). It also has a full-intensity
color on the third corner, the hue. By moving the triangle around, you
get to look at a combined effect of three primary colors with maximum
score on one corner, and any degree of membership within those corners
at any other location on the triangle. A 3D view of this would be much
better, as you have 3 primary colors, so in 3D you can show all
possibilities in 1 image.
It's hard to describe in text, but here's the basic idea: Any color is
made of of components, with those components being a pure
characteristic, such as red or blue. The geometric distance between two
points on any given view describes how close two colors are to each
other. No matter how many colors you have, you can do a conversion to a
representation with fewer dimensions, e.g., 3 primary colors of 3
vectors can be converted to grayscale of 1 vector. Two different mixed
colors could be compared soley by the intensity (length) of the
resulting grayscale vector. Instead of converting to grayscale, you
could take a view which keeps the three primary colors, find a point on
the surface of the view for each of the two colors being compared, and
measure the distance between them as difference/sameness; extended,
perhaps use the direction of the line between them as a "trend" to say
one tends to be slightly more influenced by red. The math to measure
distances apart is extensible to more dimensions, and basically is just
a series of hypotenuses on right triangles. The HSV view in 3D is a good
concept, and you can find a lot of information from any text with
information on "color models".
D. Stimits, stimits AT comcast DOT net
More information about the LUG
mailing list