Code covered by the BSD License
-
...
USAGE: splits the image function x into half:
-
[W,Z,O,E]=msnn1(t,xcell,noHid...
This is a msnn backpropagation algorithm with 1 hiddenlayer
-
[WX,ZX,O,E]=msnn2(t,xcell,noH...
This is a msnn backpropagation algorithm with 1 hiddenlayer
-
convolution(I,selectedeye)
USAGE: this function performs convolution search on I
-
convolutionnex(I,selectedeye)
USAGE: this function performs convolution search on I
-
draw_lines(L, X, Y, lt)
-
eyecrop_testim(im)
USAGE: this function allows the user to select and crop
-
eyesearch(dataleft,dataright,...
-
eyesearch_amend(dataleft,data...
-
imline(I, p1x, p1y, p2x, p2y)
This function draws lines on a grayscale image I
-
imrect(I,ltx,lty,rbx,rby)
This function draws rectangles on a grayscale image I
-
logsigfx(t);
-
maxposition(I, n, range)
This function retrieves the max n position
-
prescale(x)
-
tansigfx(t);
-
detect.m
-
detecteyes.m
-
geteyelevel.m
-
main.m
-
readimage.m
-
traindata_newfinal.m
-
traineyes_datafinal.m
-
traineyes_testSHIFT.m
-
traineyes_valfinal.m
-
traintest_newfinal.m
-
validation.m
-
View all files
from
Morphological Shared-Weight Neural Network for Face Recognition
by Ethan Png
MSNN has the ability to learn feature extraction and perform classification at the same time.
|
| maxposition(I, n, range)
|
function [mvalue, y, x] = maxposition(I, n, range)
% This function retrieves the max n position
[height, width] = size(I);
mvalue(1:n) = range(1)-1;
y(1:n) = 0;
x(1:n) = 0;
for i=1:height
for j=1:width
val = I(i,j);
k = 1;
while( (k<=n) & (val<=mvalue(k)) )
k = k+1;
end
if( k <= n )
for m=n-1:-1:k
mvalue(m+1) = mvalue(m);
y(m+1) = y(m);
x(m+1) = x(m);
end
mvalue(k) = val;
y(k) = i;
x(k) = j;
end
end
end
|
|
Contact us at files@mathworks.com