Open dwblair opened 11 years ago
I think we should generate both; with some filesize optimizations as in #18, this will be sustainable in space and processing power
Grayscale NDVI would be good to have because 1) all the colors can be confusing, and 2) it might be possible to do science more easily with grayscale. In Ned's Fiji plugin, the grayscale NDVI images have actual NDVI values (-1 to +1) in each pixel (I don't know how he does that -- does it have to be a tiff?). So you can get NDVI data directly from the image.
For most users, what might be an even more useful addition than grayscale NDVI is NBG. I described this in #23. People will like NBG.
We risk having a whole bunch of different "products" however if we make it process 500px wide small images by default, and only offer larger images when the user clicks on them, we can probably sustain up to 6 types.
One question I have is -- are the NIR and Blue channels really super useful? Would you prefer offering (by default) greyscale NDVI and NBG instead of those two? We can of course offer the remaining types lower on the page.
Most important products in order: Color NDVI, NBG, NIR.
Comparing the blue and red channels has educational and diagnostic value, and the blue channel can become a retro black and white photo (19th century emulsions were sensitive mostly to blue), but most people will not get much out of it. It might be of interest to people if there was a sandbox for tweaking, or if they could download it and tweak in Photoshop, etc. (but those people can open an infrablue photo in Photoshop and make their own blue channel image).
Grayscale NDVI has scientific value, and could be a fallback for comparison among NDVI results if people use different color tables and get overwhelmed with what NDVI color means. Grayscale NDVI has great scientific value if the actual NDVI values are used instead of DNs (0-255). But most casual users will not get much from grayscale NDVI. However, even users who can open an infrablue photo in Photoshop may balk at making their own NDVI, so a real grayscale NDVI with data in it could provide a useful service to sciencey users.
NBG is awesome, and can be a dramatic way to present a (pseudo-) scientific result with the photographic qualities of the original (which can be lost in NDVI). But I'm pretty sure it requires custom tweaking for each infrablue photo. A smart image analysis bot could do it, but I think two sliders (hue and saturation) will be easier. Auto levels prior to channel switching is also recommended.
Color NDVI is a basic product, but many early users are going to be disappointed with the results. Unless the infrablue photo has certain qualities, color NDVI can be boring, mostly because the NDVI values are low, between 0 and 0.4, and compressed, with little range. To increase satisfaction, a slider could be added which scales the NDVI values, effectively moving them into the more colorful portion of the color table. This could be a fancy scaling, or it could just add an increment to all values. The goal would be to 1) get the NDVI values for plant pixels into the 0.2 to 0.8 range, and 2) stretch the values for plant pixels so they range between 0.2 and 0.8 (or 0.3 and 0.7). Such a slider would eliminate any hope of making scientific comparisons between independent NDVI results, but that might be much less important than producing interesting looking results. The original Infrapix app did this type of scaling by default, but that made it hard for newcomers to grasp what was happening.
NIR is a basic product because it helps people understand how Infragram works, because it has diagnostic value, and because of the retro potential to be a B&W infrared photo. To get the most out of the retro potential, a sandbox (or a couple of sliders) is desirable.
An unintended conclusion of my rant above is that the most important Infragram results, color NDVI, NBG, and NIR, all benefit greatly from sliders. Being able to tweak each of the results is going to add enormously to the usefulness and enjoyment of the site.
Agreed; i've been thinking about this too, and it will be quite a project, actually -- a complete porting of some of the code into JavaScript. But the benefits will be very exciting. It may also be possible to have a plugin architecture as in SpectralWorkbench for people to generate new image filters and composites.
On Tue, Aug 13, 2013 at 6:37 PM, Fastie notifications@github.com wrote:
An unintended conclusion of my rant above is that the most important Infragram results, color NDVI, NBG, and NIR, all benefit greatly from sliders. Being able to tweak each of the results is going to add enormously to the usefulness and enjoyment of the site.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22603034 .
@jywarren, @dwblair
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here. While it roughly functions, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat. That being said I need some sleep; in the morning I'll try to clean things up.
whoa... do you have an online instance of it? Shall we put it up at js.infragram.org for the time being? Awesome! I haven't done much coffeescript but it looks pretty readable.
On Wed, Aug 14, 2013 at 1:57 AM, Ben Gamari notifications@github.comwrote:
@jywarren https://github.com/jywarren, @dwblairhttps://github.com/dwblair
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here https://github.com/bgamari/infragram-js. Of course, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat but I need some sleep. In the morning I'll try to sort things out.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22616452 .
BEN GAMARI FTW!
Coffeescript is like Haskell meets Javascript on Match.com, they hit it off, and move to Park Slope nine months later -- or so I've heard?
So exciting! Go, Ben, go!
On Wed, Aug 14, 2013 at 9:49 AM, Jeffrey Warren notifications@github.comwrote:
whoa... do you have an online instance of it? Shall we put it up at js.infragram.org for the time being? Awesome! I haven't done much coffeescript but it looks pretty readable.
On Wed, Aug 14, 2013 at 1:57 AM, Ben Gamari notifications@github.comwrote:
@jywarren https://github.com/jywarren, @dwblair< https://github.com/dwblair>
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here https://github.com/bgamari/infragram-js. Of course, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat but I need some sleep. In the morning I'll try to sort things out.
— Reply to this email directly or view it on GitHub< https://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22616452>
.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22636466 .
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
I'm following the instructions here for installing node.js and coffeescript on Ubuntu:
http://stackoverflow.com/questions/16302436/install-nodejs-on-ubuntu-12-10
Note that if you try to add the ppa via add-apt-repository and get response:
sudo: add-apt-repository: command not found
it seems you just need to run
sudo apt-get install software-properties-common
then try again.
On Wed, Aug 14, 2013 at 10:03 AM, Don Blair donblair@pvos.org wrote:
BEN GAMARI FTW!
Coffeescript is like Haskell meets Javascript on Match.com, they hit it off, and move to Park Slope nine months later -- or so I've heard?
So exciting! Go, Ben, go!
On Wed, Aug 14, 2013 at 9:49 AM, Jeffrey Warren notifications@github.comwrote:
whoa... do you have an online instance of it? Shall we put it up at js.infragram.org for the time being? Awesome! I haven't done much coffeescript but it looks pretty readable.
On Wed, Aug 14, 2013 at 1:57 AM, Ben Gamari notifications@github.comwrote:
@jywarren https://github.com/jywarren, @dwblair< https://github.com/dwblair>
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here https://github.com/bgamari/infragram-js. Of course, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat but I need some sleep. In the morning I'll try to sort things out.
— Reply to this email directly or view it on GitHub< https://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22616452>
.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22636466 .
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
The above was for installing node.js and npm (required for coffeescript). Then, to install coffeescript itself, use the instructions here:
... which amount to: sudo npm install -g coffee-script
On Wed, Aug 14, 2013 at 10:25 AM, Don Blair donblair@pvos.org wrote:
I'm following the instructions here for installing node.js and coffeescript on Ubuntu:
http://stackoverflow.com/questions/16302436/install-nodejs-on-ubuntu-12-10
Note that if you try to add the ppa via add-apt-repository and get response:
sudo: add-apt-repository: command not found
it seems you just need to run
sudo apt-get install software-properties-common
then try again.
On Wed, Aug 14, 2013 at 10:03 AM, Don Blair donblair@pvos.org wrote:
BEN GAMARI FTW!
Coffeescript is like Haskell meets Javascript on Match.com, they hit it off, and move to Park Slope nine months later -- or so I've heard?
So exciting! Go, Ben, go!
On Wed, Aug 14, 2013 at 9:49 AM, Jeffrey Warren <notifications@github.com
wrote:
whoa... do you have an online instance of it? Shall we put it up at js.infragram.org for the time being? Awesome! I haven't done much coffeescript but it looks pretty readable.
On Wed, Aug 14, 2013 at 1:57 AM, Ben Gamari notifications@github.comwrote:
@jywarren https://github.com/jywarren, @dwblair< https://github.com/dwblair>
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here https://github.com/bgamari/infragram-js. Of course, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat but I need some sleep. In the morning I'll try to sort things out.
— Reply to this email directly or view it on GitHub< https://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22616452>
.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22636466 .
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
Eeek. Sorry. I should be sending my trials and tribulations with this somewhere else.
But final note: when I tried using coffee to compile a file, I got:
"/usr/bin/env: node: No such file or directory"
The note here helped: https://github.com/joyent/node/issues/3911
-- which suggested a symbolic link:
ln -s /usr/bin/nodejs /usr/bin/node
... and now it's all workin'.
On Wed, Aug 14, 2013 at 10:32 AM, Don Blair donblair@pvos.org wrote:
The above was for installing node.js and npm (required for coffeescript). Then, to install coffeescript itself, use the instructions here:
... which amount to: sudo npm install -g coffee-script
On Wed, Aug 14, 2013 at 10:25 AM, Don Blair donblair@pvos.org wrote:
I'm following the instructions here for installing node.js and coffeescript on Ubuntu:
http://stackoverflow.com/questions/16302436/install-nodejs-on-ubuntu-12-10
Note that if you try to add the ppa via add-apt-repository and get response:
sudo: add-apt-repository: command not found
it seems you just need to run
sudo apt-get install software-properties-common
then try again.
On Wed, Aug 14, 2013 at 10:03 AM, Don Blair donblair@pvos.org wrote:
BEN GAMARI FTW!
Coffeescript is like Haskell meets Javascript on Match.com, they hit it off, and move to Park Slope nine months later -- or so I've heard?
So exciting! Go, Ben, go!
On Wed, Aug 14, 2013 at 9:49 AM, Jeffrey Warren < notifications@github.com> wrote:
whoa... do you have an online instance of it? Shall we put it up at js.infragram.org for the time being? Awesome! I haven't done much coffeescript but it looks pretty readable.
On Wed, Aug 14, 2013 at 1:57 AM, Ben Gamari notifications@github.comwrote:
@jywarren https://github.com/jywarren, @dwblair< https://github.com/dwblair>
I put up a proof-of-concept client-side Javascript (or rather, Coffeescript, which is at least slightly more tolerable) implementation of the NVDI renderer here https://github.com/bgamari/infragram-js. Of course, the code is terrible (well, it is only one step removed from Javascript, afterall), there are bugs (image size is incorrect, among other things), it doesn't have nearly the feature set of the Python implementation, and it may kill your cat but I need some sleep. In the morning I'll try to sort things out.
— Reply to this email directly or view it on GitHub< https://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22616452>
.
— Reply to this email directly or view it on GitHubhttps://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/5#issuecomment-22636466 .
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
web: http://dwblair.github.io <---- info, projects, docs, etc skype: dwingateb voice & SMS: +1-651-252-4765 twitter: @donwblair
I should have been a bit more clear. Node.js isn't necessary as everything is done on the client-side. To try things out,
$ git clone --recursive git@github.com:bgamari/infragram-js.git
$ cd infragram-js
$ make
$ firefox infragram.html
Don't get your hopes up though, there's still a lot of things to be done.
@dwblair, concerning CoffeeScript, I'd say things have a long ways to go before it can hold a candle to Haskell in terms of power of abstraction. I'd say it's more a cross between Javascript and Python. I considered using Fay or GHCJS but frankly the application is simple enough that I decided that the course of least resistance would be to inflict a small dose of Javascript-ish-ness on myself.
OK, we should move this discussion to https://github.com/Pioneer-Valley-Open-Science/infrapix-flask/issues/19 or to the infragram-js repo, but in any case I've installed it on infragram.org and am moving conversation to #19 now
(Since it's very hard to work backwards from a colored NDVI to the original values)