Professional Documents
Culture Documents
#Include #Include Using Namespace Int Int Char
#Include #Include Using Namespace Int Int Char
#Include #Include Using Namespace Int Int Char
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[]){
cout <<"my name is"<<argv[0] << endl;
system ("face.exe Rashid");
system ("PAUSE");
return 0;
}
.
#include<iostream>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[]){
cout <<"my name is"<<argv[0] << endl;
if(argc>1)
{
cout <<"First Argment is "<<argv[1] << endl;
}
system ("face.exe Rashid");
system ("PAUSE");
return 0;
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#include<iostream>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[]){
cout <<"my name is"<<argv[0] << endl;
if(argc>1)
{
cout <<"my name is"<<argv[0] << endl;
}
system ("PAUSE");
return 0;
.
#include<iostream>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[]){
cout <<"my name is"<<argv[0] << endl;
if(argc>1)
system ("PAUSE");
return 0;
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#include<iostream>
#include <stdio.h>
//////////////////////////////////////////////////
#include<iostream>
#include <stdio.h>
void main(int argc, char *argv){
printf("hello world!");
}
if ( event == CV_EVENT_LBUTTONDOWN){
counts++;
char buffer[33];
_itoa(counts,buffer,10);
str_count = buffer;
save = username+str_count+extention;
//save = str_count+extention;
if(imwrite(save.c_str(), frame)==1)
cout <<"Your Picture is saved as :"<< save <<endl;
else
cout <<"Error: Picture can not be saved"<< save <<endl;
}
}
int main( int argc, char *argv[] )
{
username = argv[1];
cout <<"username is:"<<username << endl;
CvCapture *capture;
IplImage *img,*temp_img;
int
key;
counts=0;
char image[100],crops[100],temp_image[100];
all \n";
VideoCapture cap(0);
if(!cap.isOpened()) {
cout <<"Error: Some other softwre is using that camera or there is no camera at
system("pause");
return -1;
}
namedWindow(window_name,1);
cvSetMouseCallback( window_name, my_mouse_callback);
for (;counts<7;)
{
cap >> frame;
// cvtColor(frame, edges, CV_BGR2GRAY);
imshow(window_name, frame);
if(waitKey(30) >= 0) break;
}
cap.release();
/* load the classifier
note that I put the file in the same directory with
this code */
storage = cvCreateMemStorage( 0 );
cascade = ( CvHaarClassifierCascade* )cvLoad( face_cascade, 0, 0, 0 );
if( !(cascade) )
{
fprintf( stderr, "ERROR: Could not load classifier cascade\n" );
return -1;
}
for(int j=1;j<8;j++)
{
int test[25]={},k=0,l;
//char a[25]="This is a test string.";
while(username[k]!='\0') {test[k]=username[k]; k++;}
for(l=0;l<k-1;l++) printf("%d ",test[l]);
sprintf(image,"C:\\Users\\USMAN\\Documents\\Visual Studio
2010\\Projects\\Speaker14\\Speaker\\bin\\Debug\\%d%d.jpg",test,j);
//sprintf(image,"%s%d.jpg",username,j);
img=cvLoadImage(image);
temp_img=cvLoadImage(image);
if(!img)
{
printf("Could not load image file and trying once again: %s\n",image);
}
printf("\n curr_image = %s",image);
detectFace(img,temp_img,j);
}
cvReleaseHaarClassifierCascade( &cascade );
cvReleaseMemStorage( &storage );
cvReleaseImage(&img);
cvReleaseImage(&temp_img);
system("PAUSE");
return 0;
}