Matlab's imresize
Posted by cihat eldeniz on Sep 10, 2009; 1:40pm
URL: http://imagej.273.s1.nabble.com/Matlab-s-imresize-tp3691242.html
Hello,
Matlab's imresize and FloatProcessor's resize functions are giving different
results when both are using bilinear interpolation [I didn't try the other
interpolation methods for comparison].
What could be causing this? Are they supposed to be different? I went
through the IJ source code, but I could not do the same in matlab [since I
got stuck in tformarray.m].
For your reference, I am shortly writing down what I am doing:
In Java,
*for(k=0;k<stackSize;k++)
{
ImageProcessor ip = imp.getStack().getProcessor(k+1);
ip.setInterpolationMethod(ImageProcessor.BILINEAR);
ip = ip.resize(128, 128);
stack.addSlice("NewImage", ip);
}
*
In Matlab,
*for k = 1:numberOfSlices
NewImage(:,:,k) = imresize(squeeze(originalImage(:,:,k)),[128
128],'bilinear');
end*
I would appreciate any comments. Thank you very much.