im2 = myimage (im,...) - Make im viewable by normalizing greylevels and more
Scales the values of im so that they range in [0,255]. The smallest element
of im (or range(1), if the "range" option is used) is mapped to zero, and the
largest (or range(2)) is mapped to 255.
If both dimensions are less than 180,
If the save option is not used, and nargout is 0, then im2 will be displayed,
rather than returned. NaN and Inf pixels become black or, if the image is
saved as a .png or .gif, transparent.
OPTIONS:
--------
"range", [min,max] : Graylevel range to be mapped to 0:255.
Default:[min(im(:)),max(im(:))]
"qrange", [minq,maxq]: Map quantiles between minq and maxq to 0 and 255.
"minsz", [Rows,Cols] : Minimum dims of im2. im will be scale by an integral
factor so that at least one of its dimensions matches
minsz. Default: [180 180]
"scl", scl : Scale image size up (scl>1) or down (scl<1)
"invert" : Invert image (black becomes white and vice versa).
"is_col" : Color image, consecutive rows being R, G and B.
"colormap", : Convert greylevel image to a 'rainbow' colormap
"show_range" : Place a graylevel scale below image.
"scale_sz",sz : Width of graylevel scale. Implies show_range.
"text", [x,y], str : Annotate image with str, at position x,y, with size sz
"text", [x,y,sz],str
"line", [x,y,x,y,R,G,B,W] or
"line", [x,y,x,y,R,G,B] or
"line", [x,y,x,y,C,W] or
"line", [x,y,x,y,C] or
"line", [x,y,x,y]
"save", filename : Save im2 in filename.
"display", yesno : Display im2 or not. Default: False iff save requested
or nargout!=0.
EXAMPLES: type "demo myimage" to run the examples below
---------
myimage (randn(3,3), "show_range")
myimage (rand(9,3), "is_col")
myimage (randn(32,32), "minsz",[32,50])
myimage (ones(64,1)*linspace(0,1,256), "colormap")
myimage (linspace(0,3,256)'*ones(1,64), "range",[3 1])
myimage (zeros(200,200), "text",[10,20],">> 1 + pi\nans = 4.1416\n>>")
im = kron (ones(4), kron (eye(2),ones(10)));
im += ones (80,1)*linspace(0,1/2,80);
myimage (im,"text",[11,5],"Hello","text", [10,30,30],"world")
FIXME: scl < 1 seems to be buggy