• Videos
  • Projects
  • Home
  • Training
  • About Us
  • Location
  • Contact Us
  • Blog
  • Career
  • gallery
  • Projects
TwitterFacebookGoogleYouTube

Training Workshop Projects

  • Videos
  • Projects
    • Electronics Embedded projects ludhiana jallandhar punjab chandigarh patiala phagwara ambla
    • Mechanical Projects
    • Electrical Projects capstone phagwara jallandhar ludhiana bathinda chandigarh
    • Automobile Engineering Projects
    • mechannical projects chandigarh electronics electrical
    • Mechanical project ambala
    • mechannical projects chandigarh electronics electrical
    • Mechanical Projects Ludhiana chandigarh bathinda patiala
    • Electronics Projects Gurdaspur
    • Civil Engineering capstone projects
  • Home
  • Training
    • PLC Automation Training
    • Arduino Training
    • Six Weeks industrial Training Ludhiana
    • Robotics Training Ludhiana
    • robotics training amritsar ludhiana jalandhar chandigarh
    • Six Months Industrial Training For Btech BCA MCA
    • Industrial Training
    • Robotics Training jalandhar
    • embedded training projects
  • About Us
    • Minor Projects Mini kits
    • Latest projects
    • Price List Electronics Projects
    • Engineering projects
    • Science fair project ideas
    • Robotics Projects
    • AVR Projects
    • Civil Project
    • Gallery
    • Final Year Btech major ece projects Ludhiana Bathinda Gurdaspur hoshiarpur jalandhar amritsar ferozepur chandigarh ambala
    • Artificial intelligence
    • capstone projects help near phagwara
    • ECE projects
    • Major Projects final year Btech
    • Pneumatic Projects
    • Science Fair projects
    • Engineering Colleges in Punjab
    • B.tech Engineering Projects
  • Location
  • Contact Us
  • Blog
  • Career
  • gallery
  • Projects

Tag Archives: face recognition project

Face Recognition DSP based project

Jun

5

2013

bansal212
Share
Tweet

1 1 2 2 3 3 4% Source code of Face recognition system

%Use open Source OCTAVE SOFTWARE to run dsp programs.
clear all % To clear all the variable
close all % To close all the windows
clc

% number of images on your training set.
M=13;

%Chosen std and mean.
%It can be any number that it is close to the std and mean of most of the images.
um=100;
ustd=80;

%read and show images(bmp);
S=[]; %img matrix
figure(1);
for i=1:M
str=strcat(int2str(i),’.jpg’); %concatenates two strings that form the name of the image
eval(‘img=imread(str);’);
subplot(ceil(sqrt(M)),ceil(sqrt(M)),i)
imshow(img)
if i==3
title(‘Training set’,’fontsize’,18)
end
drawnow;
[irow icol]=size(img); % get the number of rows (N1) and columns (N2)
temp=reshape(img’,irow*icol,1); %creates a (N1*N2)x1 matrix
S=[S temp]; %X is a N1*N2xM matrix after finishing the sequence
%this is our S
end

%Here we change the mean and std of all images. We normalize all images.
%This is done to reduce the error due to lighting conditions.
for i=1:size(S,2)
temp=double(S(:,i));
m=mean(temp);
st=std(temp);
S(:,i)=(temp-m)*ustd/st+um;
end

%show normalized images
figure(2);
for i=1:M
str=strcat(int2str(i),’.jpg’);
img=reshape(S(:,i),icol,irow);
img=img’;
eval(‘imwrite(img,str)’);
subplot(ceil(sqrt(M)),ceil(sqrt(M)),i)
imshow(img)
drawnow;
if i==3
title(‘Normalized Training Set’,’fontsize’,18)
end
end

%mean image;

m=mean(S,2); %obtains the mean of each row instead of each column
tmimg=uint8(m); %converts to unsigned 8-bit integer. Values range from 0 to 255
img=reshape(tmimg,icol,irow); %takes the N1*N2x1 vector and creates a N2xN1 matrix
img=img’; %creates a N1xN2 matrix by transposing the image.
figure(3);
imshow(img);
title(‘Mean Image’,’fontsize’,18)

% Change image for manipulation
dbx=[]; % A matrix
for i=1:M
temp=double(S(:,i));
dbx=[dbx temp];
end

%Covariance matrix C=A’A, L=AA’
A=dbx’;
L=A*A’;

% vv are the eigenvector for L
% dd are the eigenvalue for both L=dbx’*dbx and C=dbx*dbx’;
[vv dd]=eig(L);

% Sort and eliminate those whose eigenvalue is zero
v=[];
d=[];
for i=1:size(vv,2)
if(dd(i,i)>1e-4)
v=[v vv(:,i)];
d=[d dd(i,i)];
end
end

%sort, will return an ascending sequence
[B index]=sort(d);
ind=zeros(size(index));
dtemp=zeros(size(index));
vtemp=zeros(size(v));
len=length(index);
for i=1:len
dtemp(i)=B(len+1-i);
ind(i)=len+1-index(i);
vtemp(:,ind(i))=v(:,i);
end
d=dtemp;
v=vtemp;

%Normalization of eigenvectors
for i=1:size(v,2) %access each column
kk=v(:,i);
temp=sqrt(sum(kk.^2));
v(:,i)=v(:,i)./temp;
end

%Eigenvectors of C matrix
u=[];
for i=1:size(v,2)
temp=sqrt(d(i));
u=[u (dbx*v(:,i))./temp];
end

%Normalization of eigenvectors
for i=1:size(u,2)
kk=u(:,i);
temp=sqrt(sum(kk.^2));
u(:,i)=u(:,i)./temp;
end

% show eigenfaces;
figure(4);
for i=1:size(u,2)
img=reshape(u(:,i),icol,irow);
img=img’;
img=histeq(img,255);
subplot(ceil(sqrt(M)),ceil(sqrt(M)),i)
imshow(img)
drawnow;
if i==3
title(‘Eigenfaces’,’fontsize’,18)
end
end

% Find the weight of each face in the training set.
omega = [];
for h=1:size(dbx,2)
WW=[];
for i=1:size(u,2)
t = u(:,i)’;
WeightOfImage = dot(t,dbx(:,h)’);
WW = [WW; WeightOfImage];
end
omega = [omega WW];
end

% Acquire new image
% Note: the input image must have a bmp or jpg extension.
% It should have the same size as the ones in your training set.
% It should be placed on your desktop
InputImage = input(‘Please enter the name of the image and its extension \n’,’s’);
InputImage = imread(strcat(‘E:\MATLAB6p5\work\’,InputImage));
figure(5)
subplot(1,2,1)
imshow(InputImage); colormap(‘gray’);title(‘Input image’,’fontsize’,18)
InImage=reshape(double(InputImage)’,irow*icol,1);
temp=InImage;
me=mean(temp);
st=std(temp);
temp=(temp-me)*ustd/st+um;
NormImage = temp;
Difference = temp-m;

p = [];
aa=size(u,2);
for i = 1:aa
pare = dot(NormImage,u(:,i));
p = [p; pare];
end
ReshapedImage = m + u(:,1:aa)*p; %m is the mean image, u is the eigenvector
ReshapedImage = reshape(ReshapedImage,icol,irow);
ReshapedImage = ReshapedImage’;

%show the reconstructed image.
subplot(1,2,2)
imagesc(ReshapedImage); colormap(‘gray’);
title(‘Reconstructed image’,’fontsize’,18)

InImWeight = [];
for i=1:size(u,2)
t = u(:,i)’;
WeightOfInputImage = dot(t,Difference’);
InImWeight = [InImWeight; WeightOfInputImage];
end

ll = 1:M;
figure(6)
subplot(1,2,1)
stem(ll,InImWeight)
title(‘Weight of Input Face’,’fontsize’,14)

% Find Euclidean distance
e=[];
for i=1:size(omega,2)
q = omega(:,i);
DiffWeight = InImWeight-q;
mag = norm(DiffWeight);
e = [e mag];
end

kk = 1:size(e,2);
subplot(1,2,2)
stem(kk,e)
title(‘Eucledian distance of input image’,’fontsize’,14)

MaximumValue=max(e)
MinimumValue=min(e)

if (MinimumValue <= 1.8180e+004)
disp(‘Input image exist in the present Database’)
else
disp(‘This Photo does not belong to this Database ‘)
end

Posted in computer projects, computer training, digital projects, Electronics Projects, major projects, Uncategorized | Tags: DSP projects, face recognition project, ocatave software, open source | 1 Comment |

Pages

  • Arduino based Auto Intensity Control of Street Lights
  • Arduino based Underground Cable Fault Detection
  • Arduino Training
    • VHDL Training
  • Arduino weather station part 2 using arduino
  • ARM based Final year projects
  • ARM Cortex (STM32) based Solar Street Light
  • Artificial intelligence
  • AVR Projects
  • Career
  • Dealers Required
  • DS1307 I²C Clock using arduino
  • ECE projects
  • Electricity Theft Detection
  • Electronic project list 1
  • Electronics Projects chandigarh Ambala bathinda hoshiarpur amritsar jalandhar
  • Electronics Projects Jalandhar
  • Electronics projects list 2
  • Electronics projects Ludhiana
  • Electronics Projects Ludhiana
  • gallery
  • Industrial Training
  • innovative ludhiana
  • IOT garbage collection system
  • Mechanical Projects Ludhiana chandigarh bathinda patiala
  • PLC Automation Projects
  • PLC Automation Training
  • Prepaid energy meter
  • Robotics Training jalandhar
  • Robotics Training Ludhiana
  • Science fair project ideas
  • Science Fair projects
  • Six week Training Ludhiana jalandhar chandigarh bathinda patiala rajpura ambala phagwara punjab
  • VHDL projects FPGA CPLD SMT
  • Videos
  • Home
  • Gallery
  • About Us
    • Engineering Colleges in Punjab
  • Projects
    • Automobile Engineering Projects
    • Civil Engineering capstone projects
    • Electrical Projects capstone phagwara jallandhar ludhiana bathinda chandigarh
    • Electronics Embedded projects ludhiana jallandhar punjab chandigarh patiala phagwara ambla
    • embedded training projects
    • GSM based Final year btech ece projects
    • Mechanical Projects
    • Robotics Projects
    • Electronics Projects Embedded Training Six Months Major Projects Ambala
    • Mechanical Projects
      • Electrical projects
      • Pneumatic Projects
    • Minor Projects Mini kits
    • Price List Electronics Projects
    • Civil Project
    • Computer Projects
    • Major Projects final year Btech
    • capstone projects help near phagwara
    • Final Year Btech major ece projects Ludhiana Bathinda Gurdaspur hoshiarpur jalandhar amritsar ferozepur chandigarh ambala
    • Latest projects
    • Engineering projects
    • Six Months Industrial Training For Btech BCA MCA
    • Six Weeks industrial Training Ludhiana
  • Location
    • B.tech Engineering Projects
    • Electronics Projects Gurdaspur
    • Electronics Projects Ludhiana chandigarh bathinda patiala jalandhar phagwara mumbai lucknow jaipur amabala
  • Mechanical project ambala
  • mechannical projects chandigarh electronics electrical
  • Contact Us
  • Blog
  • Career

Archives

  • January 2021
  • December 2020
  • May 2020
  • April 2020
  • January 2020
  • November 2019
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • October 2018
  • August 2018
  • July 2018
  • November 2017
  • October 2017
  • August 2017
  • July 2017
  • April 2017
  • February 2017
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • March 2016
  • February 2016
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • September 2014
  • August 2014
  • July 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • January 2011

Categories

  • Admission in engineering (9)
  • Arduino Projects (30)
  • arduino training (18)
  • ARM Based projects (23)
  • ARM projects (26)
  • atmega 16 (25)
  • atmega 328 training (20)
  • atmega 8 training (12)
  • Atmega Projects (21)
  • Atmel projects based on 89s52 (15)
  • autobraking system (6)
  • automation PLC projects (35)
  • automobile project (19)
  • Automobile Projects (17)
  • AVR projects (25)
  • best engineering colleges (11)
  • best engineering colleges of ludhiana (10)
  • best engineering colleges of Punjab (11)
  • Bluetooth projects (19)
  • C++ projects (6)
  • Civil engineering projects (1)
  • civil projects (4)
  • computer projects (21)
  • computer training (5)
  • Datasheet dowload (4)
  • digital projects (106)
  • DTMF based Projects (27)
  • ece projects (196)
  • electrical projects (109)
  • electronics components (40)
  • electronics parts (36)
  • Electronics Projects (378)
  • Embedded projects (42)
  • embedded traininig (22)
  • engineering colleges (18)
  • Finger Print module (5)
  • FPGA/CPLD projects (14)
  • gesture robot (18)
  • GPS receiver (28)
  • GSM modem (31)
  • GSM projects (29)
  • GSM Robot (29)
  • industrial automations projects (15)
  • innovative cse training phagwara (3)
  • innovative java training phagwara (2)
  • innovative phagwara (23)
  • innovative projects phagwara (24)
  • innovative training phagwara (23)
  • IT courses (22)
  • java projects (3)
  • LCD detail (1)
  • LED Matrix (2)
  • major projects (120)
  • mechincal projects (34)
  • mini projects (78)
  • minor projects (42)
  • Mobile charger (3)
  • php projects (9)
  • pic 16f676 training (1)
  • pic 16f84 training (1)
  • PIC Based projects (8)
  • PIC controller Projects (12)
  • PLC projects (19)
  • polytechnic colleges in punjab (32)
  • polytechnic near bathinda (32)
  • polytechnic near jalandhar (32)
  • polytechnic near ludhiana (33)
  • polytechnic near patiala (33)
  • power system projects (27)
  • Prepaid energy meter (14)
  • propeller clocj (11)
  • propeller clock (18)
  • Raspberry pi ludhiana (2)
  • RF controlled Robot (17)
  • RF projects (22)
  • Robotics (34)
  • robotics parts (16)
  • School Models (11)
  • school projects (14)
  • Science projects (10)
  • Six Months Training (13)
  • Six months training bathinda (14)
  • Six months training hoshiarpur (13)
  • Six months training jalandhar (15)
  • Six months training Ludhiana (14)
  • Six months training patiala (14)
  • Six months training phagwara (13)
  • Six months training punjab (13)
  • Six weeks Training (12)
  • speed breaker (1)
  • Steering head Light Control (1)
  • stepper motor (1)
  • Traffic Light Control (1)
  • training during engineering (10)
  • training engineering (10)
  • training in ludhiana engineering (12)
  • Ultrasonic based projects (1)
  • Uncategorized (106)
  • Verilog training punjab (10)
  • vhdl projects (18)
  • VLSI Projects (17)
  • web development (1)
  • XBee projects (3)

WordPress

  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
© Innovative Project Solutions 9888708401