Professional Documents
Culture Documents
Aritmetics
MIPS out = add(in1,in2);
MATLAB out = in1 + in2;
Binary opertions
Too complicated to describe shortly: distcad, distmap, distroute, distskel,
levialdi, logop, logop4, ocrdecide, thin1, thin2
Correlation
Too complicated to describe shortly: bpof, corr, corrc, corrdc, corrdcp,
corrn, pof, smoothpad, spof
Fingerprints
Too complicated to describe shortly: calcex, calcf2x, calclx, fingerimpl,
fingimp
MIPS out=calcAngle(iE1,iE2,0);
MATLAB angle = atan2(iE2,iE1);
out = ((angle<0).*(atan2(iE2,iE1)+2*pi) +
(angle>=0).*(atan2(iE2,iE1)))*255/(2*pi);
MIPS out=calcMagn(iE1,iE2);
MATLAB out = sqrt(iE1.^2+iE2.^2);
MIPS out=fingaver(in,averVariance,0);
MATLAB averKernel = exp(-((-averVariance:1:averVariance).^2)/
(averVariance*2));
averKernel = averKernel*averKernel/
(sum(sum(averKernel))^2);
out = conv2(in,averKernel,same);
MIPS out=fingeraver(in,no);
MATLAB simpleAver = [1 2 1 ;2 4 2 ;1 2 1]/16;
for k=1:no
in = conv2(in,simpleAver,same);
end
out = in;
Image enhancement
Too complicated to describe shortly: shadcorr, wiener
Image sequences
Too complicated to describe shortly: optflow.m, rtf.m
Linear filters
Too complicated to describe shortly: circconv.m
Similar technique as for bpcfilter and lpcfilter:
bprfilter, bscfilter, bsrfilter, hpcfilter, hprfilter, lpcfilter,
lprfilter
Logical functions
MIPS out = andBinary(in1, in2);
MATLAB out = double(in1 & in2);
Nonlinear filters
Too complicated to describe shortly: nagao
Resampling
Too complicated to describe shortly: rect2pol, resample
Statistics
MIPS out = distanshistogram(in);
MATLAB [counts, positions] = imhist(mat2gray(in,[0 255]));
counts(1) = 0;
out = counts;
Thresholding
Too complicated to describe shortly: mittp, ocrselectthresh1,
ocrselectthresh2
Transforms
Too complicated to describe shortly: ihough
Windows
MIPS out = gauss(in, gain, ssize);
MATLAB s = size(in);
[x y] = meshgrid(-s(2)/2:s(2)/2-1, -s(1)/2:s(1)/2-1);
r0 = ssize*s(1);
a = r0^2/log(.1);
out = exp( (x.^2+y.^2)/a ) * gain .* in;
MIPS out = hamming(in, gain, ssize);
MATLAB s = size(in);
[x y] = meshgrid(-s(2)/2:s(2)/2-1, -s(1)/2:s(1)/2-1);
R = sqrt(sum(s.^2)/8);
tmp = (0.54 + 0.46*cos(pi*sqrt(x.^2+y.^2)/(R*ssize))) *
gain .* in;
out = lpcfilter(tmp, ssize);