I've written an image processing program in MATLAB which makes heavy use of the MATLAB Image Processing Toolbox, especially the morphological operations (imopen, imclose) as well as imadjust. We do a lot of spline fit operations and medfilt2 and medfilt1 a lot also.
We have a client who wants us to convert this program to Java. I would like to hear a detailed description of a Java image processing library which can duplicate MATLAB's functionality in image processing and splines, especially how the interface compares with MATLAB's.
I have read about Java's Advanced Image Processing Library but I haven't been able to find any detailed documentation on it on the web. Also, the little documentation I've read about it seems to indicate that it uses a rather complex model of images, combining them into tiles and so-forth. It would be great if there was a Java library which allowed me to continue to treat gray scale images as just 2D or 3D arrays.
Also, it would be great to learn of any general gotchas in converting between MATLAB and Java.
Edit: our app currently segments images of a relatively simple object. It:
1. Starts with a 3D matrix of gray scale image slices representing a single area
2. Does a medfilt1 to even out each slice.
3. Does some imopen, imclose and imadjust operations on the image to remove some fuzziness,
4. Does some simple thresholding in various areas to find boundary points
5. Fits splines to the boundary points,
6. Uses the 3rd dimension in various ways to further perfect the point matching, especially using medfilt2.
7. Saves each slice with the boundary splines written in color on it.
I should note that we're doing "spline fitting" rather than spline matching - spline fitting is a least square match with a fixed number of knots - spline matching matches the points exactly with an arbitrary number of knots. I wouldn't want to implement spline matching from more simplistic spline functions.
MATLAB's Builder JA is an option but I would like to also know what's available in pure Java as well as know what kind of overhead Builder JA involves.
Edit 2:
Note that we are doing spine fitting - using a given point's fit to the spline as a way to decide whether to eliminate it - since the data is messy, we have a multi-step point elimination process, so splines are an integral part of the algorithm. And so, since I can't find any mention of splines in JAI at all, so if anyone knows a java library offering least-square spline fitting, that would be wonderful.
Edit 2.5: We're using a least-square approximation of a set of points using splines with a fixed number of knots (0-5 knots). If we have to re-implement that, things will get dicey, since right now we're using a MATLAB contributed library for it.
And we certainly don't want to revisit the algorithm. It was hard enough getting something that worked...