From: Daniel on
If I open this B/W BMP image (http://www-ece.rice.edu/~wakin/images/lena512.bmp) with Matlab using:

img = imread('.....\lena512.bmp');
image(img);

I get this one http://img121.imageshack.us/img121/3259/20131081.png

How can I open it correctly?

thanks in advance.
From: Walter Roberson on
Daniel wrote:
> If I open this B/W BMP image
> (http://www-ece.rice.edu/~wakin/images/lena512.bmp) with Matlab using:
>
> img = imread('.....\lena512.bmp');
> image(img);
>
> I get this one http://img121.imageshack.us/img121/3259/20131081.png
>
> How can I open it correctly?
> thanks in advance.

Try

colormap(gray)

From: Matt Fig on
img = imread('http://www-ece.rice.edu/~wakin/images/lena512.bmp');
imagesc(img)
colormap(gray)
axis image

Looks very close.
From: Daniel on
Thanks, but image from colormap(gray) isn't 100% like original.

I just want to open it like any image program does.
From: Matt Fig on
Does this look closer?

img = imread('http://www-ece.rice.edu/~wakin/images/lena512.bmp','bmp');
colormap(gray)
imagesc(img,[0 255])
set([gcf,gca],'units','pix','pos',[0 0 512 512])