![](http://www.weebly.com/weebly/images/file_icons/gz.png)
multitouch18.zip | |
File Size: | 442 kb |
File Type: | zip |
clc
close all
clear all
vid=videoinput('winvideo',1, 'YUY2_640x480');
vid.ReturnedColorspace = 'rgb';
J=getsnapshot(vid);
figure(243),imshow(J);
preview(vid);
pwd = [ 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 0];
pwd1 = [ 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 1];
VA=input('Press Enter to enter the gesture password')
for i=1:1:10
I=getsnapshot(vid);
I=I-J;
%figure(i),imshow(I);
k=num2str(i);
imwrite(I,strcat(k,'.jpg'));
%figure(i+10),imshow(bin);
end
stoppreview(vid);
J=rgb2gray(J);
[m n1 z]=size(J);
outI = (zeros(m,n1));
for i=1:1:10
K=num2str(i);
I = imread(strcat(K,'.jpg'));
[out bin] = generate_skinmap(I);
% bin=double(bin);
figure()
imshow(bin);
outI=double(outI);
outI = outI|bin;
end
figure()
imshow(outI);
[m n]=size(outI);
cutx=m/4;
cuty=n/4;
C = mat2cell(outI,[cutx cutx cutx cutx],[cuty cuty cuty cuty]);
%
% outI=uint8(outI);
for i=1:1:4
for j=1:1:4
summat(i,j)=sum(sum(C{i,j}));
if(summat(i,j)>4000)
pwd(i,j)=1;
end
end
end
% figure(244)
% imshow(outI);
s=serial('com6');
set(s,'BaudRate',9600);
fopen(s);
for i=1:1:4
for j=1:1:4
if(pwd(i,j)==1)
if(i==1 && j==1)
disp('a');
fwrite(s,'a');
end
if(i==1 && j==2)
disp('b');
fwrite(s,'b');
end
if(i==1 && j==3)
disp('c');
fwrite(s,'c');
end
if(i==1 && j==4)
disp('d');
fwrite(s,'d');
end
if(i==2 && j==1)
disp('e');
fwrite(s,'e');
end
if(i==2 && j==2)
disp('f');
fwrite(s,'f');
end
if(i==2 && j==3)
disp('g');
fwrite(s,'g');
end
if(i==2 && j==4)
disp('h');
fwrite(s,'h');
end
if(i==3 && j==1)
disp('i');
fwrite(s,'i');
end
if(i==3 && j==2)
disp('j');
fwrite(s,'j');
end
if(i==3 && j==3)
disp('k');
fwrite(s,'k');
end
if(i==3 && j==4)
disp('l');
fwrite(s,'l');
end
if(i==4 && j==1)
disp('m');
fwrite(s,'m');
end
if(i==4 && j==2)
disp('n');
fwrite(s,'n');
end
if(i==4 && j==3)
disp('o');
fwrite(s,'o');
end
if(i==4 && j==4)
disp('p');
fwrite(s,'p');
end
end
end
end
fclose(s)
delete(s)
clear s
zpass=abs(pwd-pwd1);
zpassum=sum(sum(zpass))
if (zpassum == 0)
imshow('C:\Data\March15\6\info\1.jpg')
else
disp('Passowrd do not match!')
end
close all
clear all
vid=videoinput('winvideo',1, 'YUY2_640x480');
vid.ReturnedColorspace = 'rgb';
J=getsnapshot(vid);
figure(243),imshow(J);
preview(vid);
pwd = [ 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 0];
pwd1 = [ 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 1];
VA=input('Press Enter to enter the gesture password')
for i=1:1:10
I=getsnapshot(vid);
I=I-J;
%figure(i),imshow(I);
k=num2str(i);
imwrite(I,strcat(k,'.jpg'));
%figure(i+10),imshow(bin);
end
stoppreview(vid);
J=rgb2gray(J);
[m n1 z]=size(J);
outI = (zeros(m,n1));
for i=1:1:10
K=num2str(i);
I = imread(strcat(K,'.jpg'));
[out bin] = generate_skinmap(I);
% bin=double(bin);
figure()
imshow(bin);
outI=double(outI);
outI = outI|bin;
end
figure()
imshow(outI);
[m n]=size(outI);
cutx=m/4;
cuty=n/4;
C = mat2cell(outI,[cutx cutx cutx cutx],[cuty cuty cuty cuty]);
%
% outI=uint8(outI);
for i=1:1:4
for j=1:1:4
summat(i,j)=sum(sum(C{i,j}));
if(summat(i,j)>4000)
pwd(i,j)=1;
end
end
end
% figure(244)
% imshow(outI);
s=serial('com6');
set(s,'BaudRate',9600);
fopen(s);
for i=1:1:4
for j=1:1:4
if(pwd(i,j)==1)
if(i==1 && j==1)
disp('a');
fwrite(s,'a');
end
if(i==1 && j==2)
disp('b');
fwrite(s,'b');
end
if(i==1 && j==3)
disp('c');
fwrite(s,'c');
end
if(i==1 && j==4)
disp('d');
fwrite(s,'d');
end
if(i==2 && j==1)
disp('e');
fwrite(s,'e');
end
if(i==2 && j==2)
disp('f');
fwrite(s,'f');
end
if(i==2 && j==3)
disp('g');
fwrite(s,'g');
end
if(i==2 && j==4)
disp('h');
fwrite(s,'h');
end
if(i==3 && j==1)
disp('i');
fwrite(s,'i');
end
if(i==3 && j==2)
disp('j');
fwrite(s,'j');
end
if(i==3 && j==3)
disp('k');
fwrite(s,'k');
end
if(i==3 && j==4)
disp('l');
fwrite(s,'l');
end
if(i==4 && j==1)
disp('m');
fwrite(s,'m');
end
if(i==4 && j==2)
disp('n');
fwrite(s,'n');
end
if(i==4 && j==3)
disp('o');
fwrite(s,'o');
end
if(i==4 && j==4)
disp('p');
fwrite(s,'p');
end
end
end
end
fclose(s)
delete(s)
clear s
zpass=abs(pwd-pwd1);
zpassum=sum(sum(zpass))
if (zpassum == 0)
imshow('C:\Data\March15\6\info\1.jpg')
else
disp('Passowrd do not match!')
end
![](http://www.weebly.com/weebly/images/file_icons/xls.png)
multitouch.pptx | |
File Size: | 2390 kb |
File Type: | pptx |
![](http://www.weebly.com/weebly/images/file_icons/xls.png)
multitouch.pptx | |
File Size: | 2341 kb |
File Type: | pptx |
PPTs
void setup() {
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);
pinMode(16, OUTPUT);
pinMode(17, OUTPUT);
pinMode(18, OUTPUT);
pinMode(19, OUTPUT);
}
void loop()
{
digitalWrite(4, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(5, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(4, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(6, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(5, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(7, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(6, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(8, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(7, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(9, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(8, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(10, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(9, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(11, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(10, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(11, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(12, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(14, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(15, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(14, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(16, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(15, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(17, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(16, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(18, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(17, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(19, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(18, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(4, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(19, LOW); // turn the LED off by making the voltage LOW
delay(1000);
}
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);
pinMode(16, OUTPUT);
pinMode(17, OUTPUT);
pinMode(18, OUTPUT);
pinMode(19, OUTPUT);
}
void loop()
{
digitalWrite(4, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(5, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(4, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(6, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(5, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(7, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(6, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(8, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(7, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(9, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(8, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(10, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(9, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(11, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(10, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(11, HIGH); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(12, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(14, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(15, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(14, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(16, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(15, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(17, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(16, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(18, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(17, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(19, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(18, LOW); // turn the LED off by making the voltage LOW
delay(1000);
digitalWrite(4, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(19, LOW); // turn the LED off by making the voltage LOW
delay(1000);
}
Blackbook:-
Blackbook1
Blackbook2
Blackbook3
Blackbook4
Blackbook5
Blackbbok6
Blackbook7
Blackbook8
Blackbook9
Blackbook10
Blackbook11
Blackbook12
Blackbook13
Blackbook14
Blackbook2
Blackbook3
Blackbook4
Blackbook5
Blackbbok6
Blackbook7
Blackbook8
Blackbook9
Blackbook10
Blackbook11
Blackbook12
Blackbook13
Blackbook14
Presentation:-
Datasheet:-