That's the problem, I believe. 'imread' in mpl always reads
> images in as MxNx4, while Matlab will check if the image is
> B&W and just do MxN. Is there any way to force MxN behaviour
> in mpl?
No way currently, but one could modify the png reader to do it....
Probably easiest is to use PIL and get a grayscale numpy array out,
then mpl's colormapping and normalization will work as advertised.
JDH
Beautiful, that worked like a charm.
from PIL import Image
im = Image.open("4kSnake.png")
a = scipy.asarray(im)
ft = fftpack.fftshift(fftpack.fft2(a))
...
Perfect!
Thanks so much,
Jay P.
···
On 1/26/07, John Hunter <jdhunter@...4...> wrote:
> That's the problem, I believe. 'imread' in mpl always reads
> images in as MxNx4, while Matlab will check if the image is
> B&W and just do MxN. Is there any way to force MxN behaviour
> in mpl?
No way currently, but one could modify the png reader to do it....
Probably easiest is to use PIL and get a grayscale numpy array out,
then mpl's colormapping and normalization will work as advertised.