imread
imwrite
imhist
imfinfo % fileinfo
imgetfile
imshow(I, [low high]) %show all values =< low and >= high
%convert matrix values to intensity values between 0 and 1
I = mat2gray(A,[AMIN AMAX])
im2bw
im2double
im2uint8(I) %Convert image to 8-bit unsigned integers
% array operation
v = round(rand(1,5)*100)
>> v = round(rand(1,10)*100)
v =
14 42 92 79 96 66 4 85 93 68
>> v(3:3)
ans =
92
>> v(3:4)
ans =
92 79
>> v(8:end)
ans =
85 93 68
% start start at position 1, and take every 5th element till end
>> v(1:5:end)
ans =
14 66
%do the same reverse ...
>> v(end:-5:1)
ans =
68 96
% creates n values between a and b
% linspace(a,b,n)
>> linspace(0,5,3)
ans =
0 2.5000 5.0000
%generators
rand %uniformly distributed
randn % normally distributed (gaussian 0 and variance 1)
ones
zeros
true
false
magic
%image operations
imadd
imsubtract
immultiply
imdivide
imabsdiff
imcomplement
imlincomb % linear combination of two or more images
%queries
all() % all values are > 0
any % any value is > 0
xor % both operand are logically different