# Infragrammar with HSV color model

by warren | 24 Aug 16:12

A new idea that evolved in this thread -- use the hue, saturation, value color model to generate colormaps directly with Infragrammar. While this idea is not fully developed and has had some good criticisms from Ben, I thought this proof of concept was interesting enough to continue exploring.

I used this expression in the HUE field of the HSV input (i tweaked it a bit until it seemed to use an attractive span of the color wheel):

((R-B)/(R+B)-0.5)*-360

It accepts a color value from 0-360, and allows for negative values, it seems, like -180, since it's really just an angle on this kind of color wheel:

I used a maximum value of 1 for each of Saturation and Value. That resulted in this fairly nice image:

Compare that with the build-in colormapping function Ben implemented:

Unfotunately this isnt working for me, it just fails and the chrome page does the "oh snap" thing :(

Is this when you press the "run" button? Can you post which version of Chrome and which OS, and which expression you were using in Infragrammar? Hopefully we can debug.

Is this a question? Click here to post it to the Questions page.

I would love to see the raw image of this if possible?

what setup are you using etc?

thank you

Is this a question? Click here to post it to the Questions page.

The infrablue photos from the camera for this scene is here: http://publiclab.org/notes/warren/05-27-2013/infragram-test-photos-from-a-plane-window

This isn't working for me either. I get a red or blue image, but not a NDVI-style color map.

As i pointed out in the comments here yesterday, this HSV approach is pretty interesting and conceptually fun, but not ideal for real work with LUTs. I spent some time thinking about it and did some sketches of a new interface:

This might also include the "auto adjust" pictured which would basically just auto-set the range of the color table it'd actually use. We could let people do that with a couple sliders, too, as a more advanced feature, but automating in a consistent way is probably best.

The algorithm would be pretty similar to HSV, except that instead of looking up a color by converting from a 0-1 range into a color value from the color wheel, we'd just look up the color from the selected LUT, where the left edge is 0 and the right edge is 100%. Sorry if that's obvious.

I'm not sure if the LUTs should be computationally generated (Ben G provided for this in his own color mapping system -- his version of Chris's default green-cutoff LUT is actually generated, not stored) or just based on images we upload to the server. It could get kind of weird if we wanted to just do 6 block colors with no gradients... maybe we can stick to just images for now, not equations.

This formula doesn't produce anything like NDVI for me. I always get an image that looks the same as unprocessed, with some artifacting.

Yeah that doesn't look like it's working at all -- can you link to your Infragrammar.org image so I can try to debug?

Is this a question? Click here to post it to the Questions page.

sure image is here.

Is this a question? Click here to post it to the Questions page.

I couldn't find a way to download Mathew's original Infragram from Infragram.org. Is there a way? All I could get was the result image.

Is this a question? Click here to post it to the Questions page.

Ah, good call. There are a zillion features we need to add to Infragram, but I think i can add that one reasonably fast. Let me try.

Mathew, The white balance settings for both of your Mobius shots at infragram.org are 288, 256, 432. That suggests the camera was doing auto white balance. Is that true? Have you tried something like 300, 500, 700?

Is this a question? Click here to post it to the Questions page.

I was having trouble getting the white balance settings to load. figured it out from a manual editing page on RC groups: http://www.rcgroups.com/forums/showpost.php?p=25170908&postcount=3

Is this a question? Click here to post it to the Questions page.

Is it possible to put a LUTs for the HDV? I did a few images that came out great using the HDV, and I would like to put a scale on them. Maybe I missed something in this thread. Thanks in advance.

Is this a question? Click here to post it to the Questions page.

HSV is kind of a shortcut to actually making a LUT, but they're not exactly the same thing. As I mentioned in my comment on your post today, HSV has some drawbacks, mainly due to not being as simple as just applying a LUT. Are there things you like better about HSV than using LUTs?

Is this a question? Click here to post it to the Questions page.