Public Lab Research note


Infragrammar with HSV color model

by warren | August 24, 2013 16:12 24 Aug 16:12 | #9054 | #9054

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:

hsl_top.jpg

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

Screen_Shot_2013-08-24_at_12.09.01_PM.png

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

Screen_Shot_2013-08-24_at_12.11.25_PM.png


17 Comments

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

Reply to this comment...


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.

Reply to this comment...


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.

Reply to this comment...


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

Reply to this comment...


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

Reply to this comment...


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:

colormapping.jpg

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.

Reply to this comment...


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

Screen_Shot_2014-04-29_at_12.34.37_PM.png

Reply to this comment...


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.

Reply to this comment...


sure image is here.

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

Reply to this comment...


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.

Reply to this comment...


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.

Reply to this comment...


Added!

Reply to this comment...


Thanks, download works!
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.

Reply to this comment...


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

uploading a few momentarily...

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

Reply to this comment...


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.

Reply to this comment...


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.

Reply to this comment...


I will get a few more images for you to look at. It seems with this type of plant, that the HSV really jumps out at the true NIR reflectance. I am still new to this, but I should also process with an image that can use a LUTs and compare the two. More to come.

Reply to this comment...


Login to comment.