comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » color value interpolation from colorbar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: color value interpolation from colorbar [message #64202 is a reply to message #64128] Sat, 06 December 2008 04:44 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Dec 5, 10:50 am, "j.coe...@gmail.com" <j.coe...@gmail.com> wrote:
> I fixed the RGB plot and uploaded it to Picasa:
>
> http://picasaweb.google.com/j.coenia/ColorInterpolation?auth key=H9iPr...
>
> I will look into how the images were made.  The colors were
> automatically overlaid on the images by the scanning equipment.  Maybe
> I will have to contact the manufacturers.
>
> Someone has given me a brute force HSV color matching function.  There
> is no curve  fitting involved, but it seems promising.  The text below
> is from the header notes:
>
> ;  The input colors (sampled from the colorbar) are broken into blocks
> every n colors, and
> ;  the extremes of H, S, and V are used to define a cube.  All
> possible HSV-tuples
> ;  within the cube are selected that correspond to possible colors in
> RGB space, which can
> ;  optionally be reduced by a compression factor.  The function
> returns a 3xn array of
> ;  rgb triples corresponding to the INTERPOLATED colors in the reduced
> rgb colorspace
> ;  (num of colors = (256/compression)^3 ).
>
> I'll post the results from this function soon, and I'll try to
> implement Peter's more elegant approach (next week?).
>
> Thanks again.

Looking at the new version, I think the R and G curves are broken
lines, not single curves, in which case I'm not sure how well the
methods that try to fit them to single functions (either polynomials,
like Peter said, or power laws like Paolo suggested) will work. Maybe
you could split the image points by intensity and do the linear method
using either the lower part or the upper part separately, but you
might well get artifacts for colours around the break point.

The good news is, if they really are broken lines then you can make a
huge simplification to my algorithm - instead of using the entire
colour bar, you can reduce it to 3 points: the bottom point, the break
point, and the top point.

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ITTVIS code contribution site
Next Topic: independent idlhelp on Mac

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:10:26 PDT 2025

Total time taken to generate the page: 0.63143 seconds