Re: 'Silent' client-side image processing with ImageJ
Posted by gj384 on May 23, 2015; 4:11am
URL: http://imagej.273.s1.nabble.com/Silent-client-side-image-processing-with-ImageJ-tp5012894p5012921.html
Hi Curtis,
Thanks so much for your advice. The reason I had hoped to do the processing
on the client side was due to the fact that our web host doesn't allow Java
applets on shared hosting (which we have) due to potential high CPU
requirements - we'll need to move to virtual private server or dedicated
server hosting to do that, which will cost us more than 10 times what we're
currently paying. Not completely out of the question though if that's the
only way we can make it work.
An alternative of course might be to package an ImageJ-based front end
desktop application that the user can download and install to carry out the
image processing on his own machine, but if it's possible to do it as a web
application then I believe that would be best as it would make it easier to
upgrade and improve the system in the future.
So here's a little more detail, in case it helps:
- The TIFF images we need to process are actually GeoTIFFs and comprise 3
bands - near-infrared, green and blue. I understand that ImageJ doesn't
currently handle GeoTIFF metadata (that is to say I can't find any plugins
that look like they can do it), and I'm experimenting with a few different
ways to copy the GeoTIFF metadata from the input image and apply it
post-processing to the output image, but that's not a pressing issue for
now.
- The processing involves a simple formula which creates a new single-band
TIFF in which each pixel is assigned a value from 0-255, representing a
real value of -1.0 to +1.0 (0 is -1.0, 128 is 0.0 and 255 is +1.0).
The -1.0 to +1.0 index value is a result of the formula (N-G)/(N+G). This
is a fairly widely used formula which can give an indication of crop health
and stress among other things - high values indicate healthy crops, low
values indicate unhealthy crops or very little crop biomass, and slight
negative values indicate water or snow. I've been using Ned Horning's
PhotoMonitoring plugin to do this via the GUI with very good results.
- I then apply a custom LUT which helps emphasise the variations across the
paddock, and categorise each zone into different range classes.
- Finally I'd like to automatically add a border, colour legend, scale bar,
North arrow etc - not up to this part yet though.
- The final output needs to be in TIFF format. Ideally I'd like to output
the maps in PDF format too but for now I'm just looking to get the basic
process working automatically for a group of web users without input from
my end each time an image is submitted for processing.
Thanks again. If anyone can give me any additional advice on getting this
to work through 'silent' client-side processing (i.e. without any of
the ImageJ GUI elements being displayed to the user at any time) I'd really
appreciate it. If this is simply not possible then that will also answer
many of my questions!
Cheers,
Gareth