Code covered by the BSD License  

Highlights from
Morphological Shared-Weight Neural Network for Face Recognition

image thumbnail

Morphological Shared-Weight Neural Network for Face Recognition

by

 

31 Dec 2004 (Updated )

MSNN has the ability to learn feature extraction and perform classification at the same time.

imrect(I,ltx,lty,rbx,rby)
function M = imrect(I,ltx,lty,rbx,rby)
% This function draws rectangles on a grayscale image I
% where ltx(i), lty(i): left top point(x,y) and
% rbx(i), rby(i): right bottom point(x,y)
% and returns M, the image matrix with rectangles drawn.

len = length(ltx);
for i=1:len
   for p=ltx(i):rbx(i)
      I(lty(i),p) = 0;
      I(rby(i),p) = 0;
   end
   for p=lty(i):rby(i)
      I(p,ltx(i)) = 0;
      I(p,rbx(i)) = 0;
   end
end
M = I;

Contact us