From: Daniel on 28 Apr 2010 18:13 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 28 Apr 2010 19:24 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 28 Apr 2010 19:40 img = imread('http://www-ece.rice.edu/~wakin/images/lena512.bmp'); imagesc(img) colormap(gray) axis image Looks very close.
From: Daniel on 28 Apr 2010 20:17 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 28 Apr 2010 20:36
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]) |