# Infragram Sandbox infragram-sandbox

The [Infragram Sandbox](http://infragram.org/sandbox) is a browser based tool for experimenting with image compositing, intended for use with Public Lab [Infragram cameras](/wiki/infragram). Read [this research note](/notes/warren/08-17-2013/infragrammar-compositing-infrared-images-with-simple-mathematic-expressions#c6664) and watch this short video to get a quick idea of how to use it: ##Infragrammar Infragram Sandbox uses simple math expressions, which are actually written in JavaScript. Here are some examples: * [NDVI](/wiki/ndvi) = (R-B)/(R+B) for -1..1, or for 0..1 (((R-B)/(R+B))+1)/2 in the Monochrome input * ENDVI = ((R+G)-(2*B))/((R+G)+(2*B)) which MaxMax uses for its vegetation stress cameras, in the Monochrome input * A colormapped NDVI, scaled to emphasize differentiation: ((R-B)/(R+B)-0.2)*-720, in the Hue input, and tweaking the 0.2 value to between 0.1 and 0.9 ([read more here](/notes/warren/08-24-2013/infragrammar-with-hsv-color-model)) * (add yours here) ###Math Infragrammar can use [JavaScript math functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math). These include: * Math.log() - logarithms * Math.abs() - absolute value * Math.sin() - sine ###Sliders You can also link an equation to a slider; for now we are using the letter "X" to represent this value, but in the future, any string represented as {mystring} will generate a slider called "mystring". Move the slider to try different values in real time. [![infragrammar](http://publiclab.org/system/images/photos/000/001/174/medium/Screen_Shot_2013-08-17_at_11.52.00_AM.png)](http://publiclab.org/system/images/photos/000/001/174/original/Screen_Shot_2013-08-17_at_11.52.00_AM.png)...

Author Comment Last activity Moderation
warren "Hey just bumping this back up -- using Infragram.org Mathew L and I did a quick re-try on this, using the expression ((R-B)/(R+B))*-1 in the Hue fo..." | Read more » about 9 years ago
zorn "Wrote a comment, but it does not show up. damn. once again! Thanks a lot for the instructions! My question is: if i remove the internal filter, c..." | Read more » about 9 years ago
zorn "Thanks for the instructions, after reading this i punchraised a mobius from ebay, hopefully not a fake ^^ English is not my mothers tongue, so i h..." | Read more » about 9 years ago
cfastie "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 " | Read more » over 9 years ago
bc512 "I would love to see the raw image of this if possible? what setup are you using etc? thank you " | Read more » over 9 years ago
cfastie "There might be some math magic that will help, but that is beyond me. It will be important to check that whatever math is done, the resulting index..." | Read more » over 9 years ago
warren "I wonder if, although the absolute NDVI values seem not to be helpful, the images may still be able to distinguish between healthy and unhealthy ve..." | Read more » over 9 years ago
warren "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? Ho..." | Read more » almost 10 years ago
bc512 "Unfotunately this isnt working for me, it just fails and the chrome page does the "oh snap" thing :( " | Read more » almost 10 years ago
cfastie "Maybe try this brute force version with an infrablue photo with healthy plants in it: 1) Select an area of foliage. 2) Calculate means for both ..." | Read more » almost 10 years ago
warren "Chris, it occurs to me that we could try to come up with a way to generate an adaptation of NDVI based on a given un-white-balanced camera's photo ..." | Read more » almost 10 years ago
warren "Maybe we should call our version of NDVI "INDVI" for Infragram-NDVI or something? Or BNDVI for Blue-NDVI? I'm loathe to make an already obscure acr..." | Read more » almost 10 years ago
cfastie "kykytos, you are correct. The equation (NIR-R)/(NIR+R) is the standard one for NDVI. Substituting blue for red as in (NIR-B)/(NIR+B) also works wel..." | Read more » almost 10 years ago
kykytos "A pair of doubts: In the equation in the image, it should say (IR-B)/(IR+B) (like in the video) instead of (IR-R)/(IR+R), Shouldn't it? Is the (IR-..." | Read more » almost 10 years ago
warren "Haha, lots of fun stuff is possible. Try JavaScript math functions: R:Math.pow(R,2) G:Math.pow(G,2) B:Math.pow(B,2) I'm making a docs page here: h..." | Read more » almost 10 years ago
cfastie "Huge Breakthrough! We love sliders! Here is NBG of an astroturf putting green (R*S, B*1.3, G*0.1, WHEN S=100): And here is ENDVI = ((R+G)-..." | Read more » almost 10 years ago
donblair "(... and in case the resultant HTML is at all useful, it's here: https://github.com/Pioneer-Valley-Open-Science/infragram-js ) " | Read more » almost 10 years ago
donblair "I've got your code working locally, and it's gorgeous. Just to play around, I tried adding in some of your video instructions as explanation on th..." | Read more » almost 10 years ago
donblair "HOLY COW. " | Read more » almost 10 years ago