Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: multi-dimensional range lookup

by injunjoel (Priest)
on May 08, 2007 at 20:18 UTC ( #614236=note: print w/replies, xml ) Need Help??


in reply to multi-dimensional range lookup

One thing that comes to mind is possibly converting each of the color triplets into HSV color space and indexing them based on Hue... if you are not interested in the saturation or brightness of the color, but rather whether its there or not. Though there is no standard for the conversion most seem to use the following for conversion:
V = max (r,g,b) S = (max (r,g,b)) - min (r,g,b)/max (r,g,b) H = depends on which of r,g,b is the maximum where r,g,b are your 0 - 255 values.
just a thought... perhaps a CPAN module in the making eh?

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://614236]
help
Chatterbox?
[marto]: Hey Corion, how are things?
[Corion]: Fine! It's amazing how productive I can be with a 3hour daily workload removed :)
[Corion]: My to-do emails level is at a 12-months-low of 21 , from 36 last week ;)
[marto]: I'm recovering from a bad day yesterday, on most counts :P
[Corion]: Also , I made great progress in actually writing the automation script that will run large parts of the 3hour workload now, largely by discussing what error conditions need to be handled by manual intervention and reducing these :)
[Corion]: marto: Ow! What was so bad about yesterday?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2018-05-24 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?