Human Face Identification

585 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
585
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Human Face Identification

  1. 1. 1.1 OVERVIEW This project is aimed to identify the criminals in any investigation department. Here thetechnique is we already store some images of the criminals in our database along with hisdetails and that images are segmented into many slices say eyes, hairs, lips, nose, etc. Theseimages are again stored in another database record so to identify any criminals;eyewitnesses will see the images or slices that appear on the screen by using it we developthe face, which may or may not be matched with our images. If any image is matched up to99% then we predict that he is only the criminal. Thus using this project it provides a veryfriendly environment for both operator and eyewitness to easily design any face can identifycriminals very easy. Face detection can be regarded as a specific case of object-class detection. In object-class detection, the task is to find the locations and sizes of all objects in an image thatbelong to a given class. Examples include upper torsos, pedestrians, and cars. That is, thedetection of faces that are either rotated along the axis from the face to the observer (in-plane rotation), or rotated along the vertical or left-right axis (out-of-plane rotation), or both.The newer algorithms take into account variations in the image or video by factors such asface appearance, lighting, and pose. 1
  2. 2. 1.2 OBJECTIVE This project is intended to identify a person using the images previously taken. TheIdentification will be done according the previous images of different persons. Facedetection is gaining the interest of marketers. A webcam can be integrated into a televisionand detect any face that walks by. The system then calculates the race, gender, and agerange of the face. Once the information is collected, a series of advertisements can beplayed that is specific toward the detected race/gender/age. Good face recognition algorithms and appropriate preprocessing of the images cancompensate for noise and slight variations in orientation, scale and illumination. Finally,technologies that require multiple individuals to use the same equipment to capture theirbiological characteristics potentially expose the user to the transmission of germs andimpurities from other users. However, face recognition is totally non-intrusive and does notcarry any such health risks. 2
  3. 3. 1.3 ADVANTAGES Very fast and accurate. No need of any extra manual effort. No fever of data loss. Just need a little knowledge to operate the system. Doesn’t require any extra hardware device. At last very easy to find the criminals.1.4 DISADVANTAGES Need of extra manual effort. It used to take much time to find any criminals. Not very much accurate. Danger of losing the files in some cases. Need Good Knowledge in drawing. 3
  4. 4. 2.1 OVERVIEW Construction and updating of the criminal record and face. Addition, Clipping. Comparing the image with the faces that are there in our database. If any new images are found then it should be entered into our database by add image module and then it should be segmented into different slices. You can also have a option to change the password. Segmentation is performed by comparing. 4
  5. 5. 2.2 FEASIBILITY STUDY Once the problem is clearly understood, the next step is to conduct feasibility study,which is high-level capsule version of the entered systems and design process. Theobjective is to determine whether or not the proposed system is feasible. The three tests offeasibility have been carried out. 2.2.1 Technical Feasibility 2.2.2 Economical Feasibility 2.2.3 Operational Feasibility 2.2.1 TECHNICAL FEASIBILITY In Technical Feasibility study, one has to test whether the proposed system can be developed using existing technology or not. It is planned to implement the proposed system using java technology. It is evident that the necessary hardware and software are available for development and implementation of the proposed system. Hence, the solution is technically feasible. 2.2.2 ECONOMICAL FEASIBILITY As part of this, the costs and benefits associated with the proposed system compared and the project is economically feasible only if tangible or intangible benefits outweigh costs. The system development costs will be significant. So the proposed system is economically feasible. 2.2.3 OPERATIONAL FEASIBILITY It is a standard that ensures interoperability without stifling competition and innovation among users, to the benefit of the public both in terms of cost and service quality. The proposed system is acceptable to users. So the proposed system is operationally feasible. 5
  6. 6. 2.3 SUMMARY Face Identification is a technique that is mainly used to identify criminals based on theclues given by the eyewitnesses. Based on the clues we develop an image by using theimage that we have in our database and then we compare it with the images already wehave. To identify any criminals we must have a record that generally contains name, age,location, previous crime, gender, photo, etc. 6
  7. 7. 3 PROBLEM DEFINITION The face recognition problem can be formulated as follows: Given an input face imageand a database of face images of known individuals, how can we verify or determine theidentity of the person in the input image. Furthermore, the human face is not a unique, rigid object. Indeed, there are numerousfactors that cause the appearance of the face to vary. The sources of variation in the facialappearance can be categorized into two groups: intrinsic factors and extrinsic ones. Intrinsicfactors are due purely to the physical nature of the face and are independent of the observer. Determine the identity of a face in an image The image can be a frame from a video Processing needs to be fast Classification problem Need faces images for training 7
  8. 8. 4.1 HARDWARE REQUIREMENTS Processor : 500 MHz above Hard disk : 500 MB RAM : 256 MB4.2 SOFTWARE REQUIREMENTS Operating System : Windows XP Database Server : SQLite Programming Language : Java 7 Frame Work : Swing4.3 PERIFERAL Webcam : 1.3 MP and above 8
  9. 9. 5.1 FLOWCHART/UML/CLASSES Fig.5.1.1:- Flow Chart 9
  10. 10. Fig.5.1.2:- Class DiagramFig.5.1.3:- Object Diagram 10
  11. 11. Fig.5.1.4:- ER Diagram 11
  12. 12. Fig.5.1.5:- Sequence Diagram 12
  13. 13. 5.2 SNAPSHOTS LOGIN FORM The inputs to the process are User Id and Password given by the developer to allow the software available for the user environment. After giving the inputs the code checks whether the entered ones are valid are not. It displays screen if match occurs otherwise error message if they are not matched. Fig.5.2.1:- Login Form MAIN FORM This process mainly explains the different screens that are available for the operator. Here the selection of the screen depends on the operator and he can select whatever screen he wants. Fig.5.2.2:- Main Form 13
  14. 14. NEW CRIMINAL FORM This process clearly illustrates adding the details of the criminal such as name,alias name, age, gender, location, address, state and city along with his photo. Fig.5.2.3:- New Criminal FormCLIP IMAGE FORM This is used for clipping the image into different slices say eyes, forehead, lips,hair and nose. The input for this is face which is divided into some slices which arestored in the database. Fig.5.2.4:- Clip Image Form 14
  15. 15. CONSTRUCT FACE FORM Based on the instruction given by the eyewitnesses, the operator brings the clipsof the images from the database and then goes for the construction of the image based onthose clips. Fig.5.2.5:- Construct Face FormFIND FACE FORM In this process we are finding the criminal’s face the image constructed beforeand stored in the database. Fig.5.2.6:- Find Face Form 15
  16. 16. MOST SUITABLE SUSPECT FORM In this form the image of the most possible suspect is displayed which had beenconstructed before this process. It is done on the basis of probability of matching clips tostored images. Fig.5.2.7:- Most Suitable Suspect Form 16
  17. 17. 5.3: CODING LOGIN FORM import java.awt.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.StyledEditorKit.BoldAction; import java.awt.event.*; import java.sql.*; import javax.swing.JPasswordField.*; class Login extends JFrame implements ActionListener { JLabel l,l1,l2; JTextField t1,t2; JButton b1,b2; Login() { super("Login Page"); l=new JLabel("Login to Face"); l.setFont(new Font("Times New Roman",Font.BOLD/Font.ITALIC,20)); l1=new JLabel(" User Name "); l2=new JLabel(" Password "); t1=new JTextField(10); t2=new JPasswordField(10); b1=new JButton(" Submit "); b2=new JButton(" Cancel"); 17
  18. 18. JPanel p1=new JPanel(); JPanel p2=new JPanel(); Container c=getContentPane(); c.setLayout(null); c.add(p1); c.add(p2); setSize(400,500); setResizable(false); java.awt.Dimensionscreen=java.awt.Toolkit.getDefaultToolkit().getScreenSize(); java.awt.Rectangle frame=getBounds(); this.setLocation((screen.width-frame.width)/2,(screen.height-frame.height)/2); p1.setBounds(20,20,300,300); p2.setBounds(20,350,300,100); l.setBounds(70,10,200,30); l1.setBounds(40,80,100,30); t1.setBounds(180,80,100,30); l2.setBounds(40,160,100,30); t2.setBounds(180,160,100,30); p1.setLayout(null); p1.add(l); p1.add(l1);p1.add(t1); p1.add(l2);p1.add(t2); 18
  19. 19. b1.setBounds(50,40,80,30); b2.setBounds(200,40,80,30); t1.setFont(new Font("Times New Roman",Font.BOLD/Font.ITALIC,18)); t2.setFont(new Font("Times New Roman",Font.BOLD/Font.ITALIC,18)); p2.setLayout(null); p2.add(b1);p2.add(b2); b1.addActionListener(this); b2.addActionListener(this); } int login_attempts=1; public void actionPerformed(ActionEvent ae) { JButton b=(JButton)ae.getSource(); if(b==b1) { String s1=t1.getText(); String s2=t2.getText(); try { Connection con; Statement stmt; Class.forName("org.sqlite.JDBC"); con=DriverManager.getConnection("jdbc:sqlite:mydb.sqlite"); stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("select pwd from users wherename="+t1.getText() + ""); 19
  20. 20. Boolean logfailed=true; if(rs.next()) { if((t2.getText()).equals(rs.getString(1))) { setVisible(false); dispose(); new FaceMenu().show(); logfailed=false; } } if(logfailed) { JOptionPane.showMessageDialog(this, "Invalid Username or Password","Sign In", JOptionPane.WARNING_MESSAGE); if( login_attempts == 3) { System.exit(0); } login_attempts++; t2.setText(""); t2.requestFocus(); } con.close(); }catch(Exception e){ JOptionPane.showMessageDialog(this, e.getMessage(), "Error",JOptionPane.ERROR_MESSAGE); } } 20
  21. 21. if(b==b2){System.exit(0); } }} public class LoginDemo { public static void main(String ar[]) { Login ob1=new Login(); ob1.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); ob1.show() }} 21
  22. 22. CLIP IMAGEimport java.awt.*;import java.awt.event.*;import javax.swing.*;import java.sql.*;import java.io.*;import java.awt.image.*;class ClipImageAnand extends JFrame implements ActionListener{ Connection cn; Statement stmt; int x1,x2,y1,y2; int w,h,pixels[]; Image orgimg=null; Image clipimg=null; SourceImageCanvas sourceimgcan=new SourceImageCanvas(); ClipImagePanel clipimgcan=new ClipImagePanel(); JButton btnForeHead,btnEyes,btnNose,btnLips,btnChin,btnHair,btnSave,btnCancel,btnPhoto, btnClip; JButton clearHair,clearForeHead,clearEyes,clearNose,clearLips,clearChin,btnClear; JComboBox jcbCrimId; String imgfile=""; boolean imgstatus=false; boolean clipstatus=false; JLabel lblHair,lblForeHead,lblEyes,lblNose,lblLips,lblChin,note; 22
  23. 23. int htHair=0, htForeHead=0, htEyes=0, htNose=0, htLips=0, htChin=0;File f1;String selcrimid="";ClipImageAnand(){super("Clipping Face Screen");Container cp=getContentPane();cp.setLayout(null);setSize(800,700);java.awt.Dimension screen=java.awt.Toolkit.getDefaultToolkit().getScreenSize();java.awt.Rectangle frame=getBounds();this.setLocation((screen.width-frame.width)/2,(screen.height-frame.height)/2);clearHair=new JButton("Clear Hair");clearHair.setToolTipText("Clear Hair Clip");clearForeHead=new JButton("Clear Forehead");clearForeHead.setToolTipText("Clear Forehead Clip");clearEyes=new JButton("Clear Eyes");clearEyes.setToolTipText("Clear Eyes Clip");clearNose=new JButton("Clear Nose");clearNose.setToolTipText("Clear Nose Clip");clearLips=new JButton("Clear Lips");clearLips.setToolTipText("Clear Lips Clip");clearChin=new JButton("Clear Chin");clearChin.setToolTipText("Clear Chin Clip");btnForeHead=new JButton("Forehead ");btnEyes=new JButton("Eyes ");btnNose=new JButton("Nose");btnLips=new JButton("Lips "); 23
  24. 24. btnChin=new JButton("Chin");btnHair=new JButton("Hair ");btnPhoto=new JButton("Photo");btnSave=new JButton("Save");btnCancel=new JButton("Cancel");btnClear=new JButton("Clear");jcbCrimId=new JComboBox();btnHair.setBounds(20,25,120,30);btnForeHead.setBounds(150,25,120,30);btnEyes.setBounds(280,25,120,30);btnNose.setBounds(410,25,120,30);btnLips.setBounds(540,25,120,30);btnChin.setBounds(670,25,120,30);clearHair.setBounds(20,580,120,30);clearForeHead.setBounds(150,580,120,30);clearEyes.setBounds(280,580,120,30);clearNose.setBounds(410,580,120,30);clearLips.setBounds(540,580,120,30);clearChin.setBounds(670,580,120,30);btnClear.setBounds(660,520,100,30);cp.add(clearForeHead);cp.add(clearEyes);cp.add(clearNose);cp.add(clearLips);cp.add(clearChin);cp.add(clearHair);btnSave.setBounds(400,520,100,30);cp.add(btnSave); 24
  25. 25. btnCancel.setBounds(530,520,100,30);cp.add(btnCancel);cp.add(btnClear);jcbCrimId.setBounds(20,520,120,30);cp.add(jcbCrimId);note=new JLabel("Note: Minimize the screen once");note.setFont(new Font("Times New Roman",Font.BOLD/Font.ITALIC,15));btnPhoto.setBounds(170,520,100,30);cp.add(btnPhoto);cp.add(btnForeHead);cp.add(btnEyes);cp.add(btnNose);cp.add(btnLips);cp.add(btnChin);cp.add(btnHair)btnForeHead.addActionListener(this);btnEyes.addActionListener(this);btnNose.addActionListener(this);btnLips.addActionListener(this);btnChin.addActionListener(this);btnHair.addActionListener(this);btnSave.addActionListener(this);btnCancel.addActionListener(this);btnPhoto.addActionListener(this);jcbCrimId.addItem("Select Criminal");btnClear.addActionListener(this);clearHair.addActionListener(this); 25
  26. 26. clearForeHead.addActionListener(this); clearEyes.addActionListener(this); clearNose.addActionListener(this); clearLips.addActionListener(this); clearChin.addActionListener(this); try { Class.forName("org.sqlite.JDBC"); Database d1=new Database(); cn=DriverManager.getConnection("jdbc:sqlite:mydb.sqlite"); stmt=cn.createStatement(); ResultSet rs=stmt.executeQuery("select cid from face"); while(rs.next()) { jcbCrimId.addItem(rs.getString(1)); } }catch(Exception e) { JOptionPane.showMessageDialog(this,e.getMessage(), "Clipping Image", JOptionPane.ERROR_MESSAGE); } } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnPhoto) { selcrimid=jcbCrimId.getSelectedItem().toString(); if(selcrimid.equalsIgnoreCase("Select Criminal")) JOptionPane.showMessageDialog(this,"Select the ID of theCriminal to clip the Photo", "clipping Photograph",JOptionPane.ERROR_MESSAGE); 26
  27. 27. else { imgstatus=true; try { ResultSet rs=stmt.executeQuery("select photo from face whereCID="+Integer.parseInt(selcrimid)); if(rs.next()) { imgfile=rs.getString(1); JOptionPane.showMessageDialog(this,"Criminal Selected", "clippingPhotograph", JOptionPane.INFORMATION_MESSAGE); repaint(); } }catch(Exception e){} } } if(evt.getSource()==btnHair) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid); clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htHair=h; lblHair.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipshairhair"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); 27
  28. 28. for(int i=0;i<pixels.length;i++) { dout.writeInt(pixels[i]); } dout.close(); fout.close(); }catch(Exception e) { JOptionPane.showMessageDialog(this, "op clodes","Criminal Details", JOptionPane.ERROR_MESSAGE); } } if(evt.getSource()==btnEyes) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid); clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htEyes=h; lblEyes.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipseyeseyes"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); for(int i=0;i<pixels.length;i++) { dout.writeInt(pixels[i]); } dout.close(); fout.close(); 28
  29. 29. }catch(Exception e) { JOptionPane.showMessageDialog(this, e.getMessage(),"Criminal Details", JOptionPane.ERROR_MESSAGE); } } if(evt.getSource()==btnForeHead) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid); clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htForeHead=h; lblForeHead.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipsforeheadforehead"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); for(int i=0;i<pixels.length;i++) { dout.writeInt(pixels[i]); } dout.close(); fout.close(); }catch(Exception e) { JOptionPane.showMessageDialog(this, e.getMessage(),"Criminal Details", JOptionPane.ERROR_MESSAGE); } } if(evt.getSource()==btnNose) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid); 29
  30. 30. clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htNose=h; lblNose.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipsnosenose"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); for(int i=0;i<pixels.length;i++) { dout.writeInt(pixels[i]); } dout.close(); fout.close(); }catch(Exception e) { JOptionPane.showMessageDialog(this, e.getMessage(),"Criminal Details", JOptionPane.ERROR_MESSAGE); } } if(evt.getSource()==btnLips) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid); clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htLips=h; lblLips.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipslipslips"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); for(int i=0;i<pixels.length;i++) 30
  31. 31. { dout.writeInt(pixels[i]); } dout.close();fout.close(); }catch(Exception e) { JOptionPane.showMessageDialog(this, e.getMessage(),"Criminal Details", JOptionPane.ERROR_MESSAGE); } } if(evt.getSource()==btnChin) { setTitle(x1+":"+y1+":"+w+":"+h+":"+x2+":"+y2+":"+"CriminalId"+":"+selcrimid);clipimg=createImage(new MemoryImageSource(w,h,pixels,0,w)); htChin=h; lblChin.setIcon(new ImageIcon(clipimg)); try { FileOutputStream fout=newFileOutputStream("Clipschinchin"+selcrimid+".gif"); DataOutputStream dout=new DataOutputStream(fout); for(int i=0;i<pixels.length;i++) { dout.writeInt(pixels[i]); } dout.close(); fout.close(); }catch(Exception e) 31
  32. 32. { JOptionPane.showMessageDialog(this, e.getMessage(),"Criminal Details", JOptionPane.ERROR_MESSAGE); } }if(evt.getSource()==btnSave) { try { String str="insert into face_height(cid, hair, forehead, eyes, nose,lips, chin) values(" + selcrimid + "," + htHair + "," + htForeHead + "," + htEyes + ","+ htNose + "," + htLips + "," + htChin + ")"; stmt.executeUpdate(str); JOptionPane.showMessageDialog(this,"Clips Stored Successfully","Clipping Images", JOptionPane.INFORMATION_MESSAGE); }catch(Exception e){} } if(evt.getSource()==btnCancel) { setVisible(false); dispose(); } { lblHair.setIcon(new ImageIcon("Iconsanand.bmp")); lblForeHead.setIcon(new ImageIcon("Iconsanand.bmp")); lblEyes.setIcon(new ImageIcon("Iconsanand.bmp")); lblNose.setIcon(new ImageIcon("Iconsanand.bmp")); lblLips.setIcon(new ImageIcon("Iconsanand.bmp")); lblChin.setIcon(new ImageIcon("Iconsanand.bmp")); jcbCrimId.setSelectedItem("Select Criminal"); setTitle(""); 32
  33. 33. } } class SourceImageCanvas extends Canvas implements MouseListener { Toolkit tkt; SourceImageCanvas(){ tkt=Toolkit.getDefaultToolkit(); addMouseListener(this); } public void paint(Graphics g) { if(imgstatus) { orgimg=tkt.getImage("Images"+imgfile); g.drawImage(orgimg,0,0,this); } } public void mousePressed(MouseEvent evt) { x1=evt.getX(); y1=evt.getY(); } public void mouseReleased(MouseEvent evt) { try { x2=evt.getX(); y2=evt.getY(); w=200; h=y2-y1; 33
  34. 34. pixels=new int[w*h]; PixelGrabber pg=newPixelGrabber(orgimg,x1,y1,w,h,pixels,0,w); pg.grabPixels(); clipstatus=true; } catch(Exception e){JOptionPane.showMessageDialog(this,e.getMessage(),"error",1); } } public void mouseClicked(MouseEvent evt) { } public void mouseEntered(MouseEvent evt) { } public void mouseExited(MouseEvent evt) { } } class ClipImagePanel extends Canvas { public void paint(Graphics g) { if(clipstatus) { g.drawImage(clipimg,0,0,this); } } }}class ClipImage 34
  35. 35. { public static void main(String args[]) { ClipImageAnand ob=new ClipImageAnand(); ob.show(); ob.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); }} 35
  36. 36. CONSTRUCT FACEimport java.awt.*;import javax.swing.*;import java.awt.event.*;import java.io.*;import java.awt.image.*;import java.sql.*;import java.util.*;class Construct extends JFrame implements ActionListener{ String stor; String selcrimid=""; int i,hr,fr,ey,no,lip,ch; int ht1,ht2,ht3,ht4,ht5,ht6; int ha1,ha2,ha3,ha4,ha5,ha6; int cids[]=new int[6]; int finalhairht,finalfhht,finaleyesht, finalnoseht, finallipsht, finalchinht; ArrayList hairAL=new ArrayList(); ArrayList fhAL=new ArrayList(); ArrayList eyesAL=new ArrayList(); ArrayList noseAL=new ArrayList(); ArrayList lipsAL=new ArrayList(); ArrayList chinAL=new ArrayList(); Connection con; Statement st; int nextheight=0; JComboBox cHair,cForehead,cEyes,cNose,cLips,cChin; 36
  37. 37. JButton bSave,bCancel,bClear; JLabel lHair,lForehead,lEyes,lNose,lLips,lChin; JLabel lHair1,lForehead1,lEyes1,lNose1,lLips1,lChin1; int hair,forehead,eyes,nose,lips,chin; String s=""; Construct() { super("Construct Face Screen"); cHair=new JComboBox(); cForehead=new JComboBox(); cEyes=new JComboBox(); cNose=new JComboBox(); cLips=new JComboBox(); cChin=new JComboBox(); cHair.setBounds(10,40,130,30); cForehead.setBounds(180,40,130,30); cEyes.setBounds(330,40,130,30); cNose.setBounds(480,40,130,30); cLips.setBounds(630,40,130,30); cChin.setBounds(780,40,130,30); bSave=new JButton("Save"); bCancel=new JButton("Cancel"); bClear=new JButton("Clear"); bSave.setBounds(100,600,100,30); bCancel.setBounds(350,600,100,30); bClear.setBounds(600,600,100,30); 37
  38. 38. bClear.addActionListener(this);bCancel.addActionListener(this);bSave.addActionListener(this);lHair=new JLabel(" Hair ");lForehead=new JLabel(" Forehead ");lEyes=new JLabel(" Eyes ");lNose=new JLabel(" Nose ");lLips=new JLabel(" Lips ");lChin=new JLabel(" Chin ");lHair1=new JLabel("");lForehead1=new JLabel("");lEyes1=new JLabel("");lNose1=new JLabel("");lLips1=new JLabel("");lChin1=new JLabel("");lHair.setBounds(30,10,130,30);lForehead.setBounds(200,10,130,30);lEyes.setBounds(350,10,130,30);lNose.setBounds(500,10,130,30);lLips.setBounds(650,10,130,30);lChin.setBounds(800,10,130,30);lHair1.setBounds(350,150,250,30);lForehead1.setBounds(350,181,250,30);lEyes1.setBounds(350,212,250,30);lNose1.setBounds(350,243,250,30);lLips1.setBounds(350,274,250,30);lChin1.setBounds(350,305,250,30); 38
  39. 39. cHair.addActionListener(this);cForehead.addActionListener(this);cEyes.addActionListener(this);cNose.addActionListener(this);cLips.addActionListener(this);cChin.addActionListener(this);Container c=getContentPane();c.setLayout(null);c.add(cHair);c.add(cForehead);c.add(cEyes);c.add(cNose);c.add(cLips);c.add(cChin);c.add(bSave);c.add(bCancel);c.add(bClear);c.add(lHair);c.add(lForehead);c.add(lEyes);c.add(lNose);c.add(lLips);c.add(lChin);c.add(lHair1);c.add(lForehead1);c.add(lEyes1);c.add(lNose1);c.add(lLips1); 39
  40. 40. c.add(lChin1); setSize(950,700); setResizable(false); java.awt.Dimensionscreen=java.awt.Toolkit.getDefaultToolkit().getScreenSize(); java.awt.Rectangle frame=getBounds(); this.setLocation((screen.width-frame.width)/2,(screen.height-frame.height)/2); try { Class.forName("org.sqlite.JDBC"); Database d1=new Database(); con=DriverManager.getConnection("jdbc:sqlite:mydb.sqlite"); st=con.createStatement(); ResultSet rs=st.executeQuery("select * from face_height"); while(rs.next()) { JOptionPane.showMessageDialog(this,"t", "constructingPhotograph", JOptionPane.ERROR_MESSAGE); ArrayList a1=new ArrayList(); selcrimid=rs.getString(1); a1.add(new Integer(Integer.parseInt(selcrimid))); if(selcrimid.equalsIgnoreCase("Select Hair"))JOptionPane.showMessageDialog(this,"Select the hair of the Criminal to construct thePhoto", "constructing Photograph", JOptionPane.ERROR_MESSAGE); FileInputStream hairfin=newFileInputStream("Clipshairhair"+selcrimid+".gif"); DataInputStream hairdin=new DataInputStream(hairfin); 40
  41. 41. int len=hairfin.available(); int hairpixels[]=new int[len]; int i=0; while(hairfin.available()>0) { hairpixels[i]=hairdin.readInt(); i++; } hairfin.close(); hairdin.close(); int hairht=Integer.parseInt(rs.getString(2)); a1.add(new Integer(hairht)); hairAL.add(a1); Image hairclipimg=createImage(newMemoryImageSource(200,hairht,hairpixels,0,200)); ImageIcon hairicn=new ImageIcon(hairclipimg); cHair.addItem(hairicn); ArrayList a2=new ArrayList(); FileInputStream fhfin=newFileInputStream("Clipsforeheadforehead"+selcrimid+".gif"); DataInputStream fhdin=new DataInputStream(fhfin); len=fhfin.available(); int fhpixels[]=new int[len]; i=0; while(fhfin.available()>0) { fhpixels[i]=fhdin.readInt(); i++; } fhfin.close(); 41
  42. 42. fhdin.close(); int fhht=Integer.parseInt(rs.getString(3)); a2.add(new Integer(Integer.parseInt(selcrimid))); a2.add(new Integer(fhht)); fhAL.add(a2); Image fhclipimg=createImage(newMemoryImageSource(200,fhht,fhpixels,0,200)); ImageIcon fhicn=new ImageIcon(fhclipimg); cForehead.addItem(fhicn); ArrayList a3=new ArrayList(); FileInputStream eyesfin=newFileInputStream("Clipseyeseyes"+selcrimid+".gif"); DataInputStream eyesdin=new DataInputStream(eyesfin); len=eyesfin.available(); int eyespixels[]=new int[len]; i=0; while(eyesfin.available()>0) { eyespixels[i]=eyesdin.readInt(); i++; } eyesfin.close(); eyesdin.close(); int eyesht=Integer.parseInt(rs.getString(4)); a3.add(new Integer(Integer.parseInt(selcrimid))); a3.add(new Integer(eyesht)); eyesAL.add(a3); Image eyesclipimg=createImage(newMemoryImageSource(200,eyesht,eyespixels,0,200)); ImageIcon eyesicn=new ImageIcon(eyesclipimg); cEyes.addItem(eyesicn); 42
  43. 43. ArrayList a4=new ArrayList(); FileInputStream nosefin=newFileInputStream("Clipsnosenose"+selcrimid+".gif"); DataInputStream nosedin=new DataInputStream(nosefin); len=nosefin.available(); int nosepixels[]=new int[len]; i=0; while(nosefin.available()>0) { nosepixels[i]=nosedin.readInt(); i++; } nosefin.close(); nosedin.close(); int noseht=Integer.parseInt(rs.getString(5)); a4.add(new Integer(Integer.parseInt(selcrimid))); a4.add(new Integer(noseht)); noseAL.add(a4); Image noseclipimg=createImage(newMemoryImageSource(200,noseht,nosepixels,0,200)); ImageIcon noseicn=new ImageIcon(noseclipimg); cNose.addItem(noseicn); ArrayList a5=new ArrayList(); FileInputStream lipsfin=newFileInputStream("Clipslipslips"+selcrimid+".gif"); DataInputStream lipsdin=new DataInputStream(lipsfin); len=lipsfin.available(); int lipspixels[]=new int[len]; i=0; while(lipsfin.available()>0) { lipspixels[i]=lipsdin.readInt(); 43
  44. 44. i++; } lipsfin.close(); lipsdin.close(); int lipsht=Integer.parseInt(rs.getString(6)); a5.add(new Integer(Integer.parseInt(selcrimid))); a5.add(new Integer(lipsht)); lipsAL.add(a5); Image lipsclipimg=createImage(newMemoryImageSource(200,lipsht,lipspixels,0,200)); ImageIcon lipsicn=new ImageIcon(lipsclipimg); cLips.addItem(lipsicn); ArrayList a6=new ArrayList(); FileInputStream chinfin=newFileInputStream("Clipschinchin"+selcrimid+".gif"); DataInputStream chindin=new DataInputStream(chinfin); len=chinfin.available(); int chinpixels[]=new int[len]; i=0; while(chinfin.available()>0) { chinpixels[i]=chindin.readInt(); i++; } chinfin.close(); chindin.close(); int chinht=Integer.parseInt(rs.getString(7)); a6.add(new Integer(Integer.parseInt(selcrimid)));a6.add(new Integer(chinht)); chinAL.add(a6); 44
  45. 45. Image chinclipimg=createImage(newMemoryImageSource(200,chinht,chinpixels,0,200)); ImageIcon chinicn=new ImageIcon(chinclipimg); cChin.addItem(chinicn); } }catch(Exception e) { JOptionPane.showMessageDialog(this,e.getMessage(), "Construct Face",JOptionPane.ERROR_MESSAGE); } } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==bClear) { cHair.setSelectedIndex(0); cForehead.setSelectedIndex(0); cEyes.setSelectedIndex(0); cNose.setSelectedIndex(0); cLips.setSelectedIndex(0); cChin.setSelectedIndex(0); } if(ae.getSource()==bCancel) { setVisible(false); dispose(); } 45
  46. 46. if(ae.getSource()==cHair) { int selind=cHair.getSelectedIndex(); ArrayList selhair=(ArrayList)hairAL.get(selind); Integer selhairht=(Integer)selhair.get(1); finalhairht=selhairht.intValue(); Integer selhairid=(Integer)selhair.get(0);cids[0]=selhairid.intValue(); ImageIcon selhairicn=(ImageIcon)cHair.getSelectedItem(); Rectangle recthair=lHair1.getBounds(); lHair1.setBounds(newRectangle((int)recthair.getX(),(int)recthair.getY(),(int)recthair.getWidth(),finalhairht)); lHair1.setIcon(selhairicn); } if(ae.getSource()==cForehead) { int selind=cForehead.getSelectedIndex(); ArrayList selfh=(ArrayList)fhAL.get(selind); Integer selfhht=(Integer)selfh.get(1); finalfhht=selfhht.intValue(); Integer selfhid=(Integer)selfh.get(0); cids[1]=selfhid.intValue(); ImageIcon selfhicn=(ImageIcon)cForehead.getSelectedItem(); Rectangle rectfh=lForehead1.getBounds(); Rectangle recthair=lHair1.getBounds(); lForehead1.setBounds(newRectangle((int)rectfh.getX(),(int)recthair.getY()+finalhairht,(int)rectfh.getWidth(),finalfhht)); lForehead1.setIcon(selfhicn); } 46
  47. 47. if(ae.getSource()==cEyes){ int selind=cEyes.getSelectedIndex(); ArrayList seleyes=(ArrayList)eyesAL.get(selind); Integer seleyesht=(Integer)seleyes.get(1); finaleyesht=seleyesht.intValue(); Integer seleyesid=(Integer)seleyes.get(0);cids[2]=seleyesid.intValue(); ImageIcon seleyesicn=(ImageIcon)cEyes.getSelectedItem(); Rectangle recthair=lHair1.getBounds(); Rectangle rectfh=lForehead1.getBounds(); Rectangle recteyes=lEyes1.getBounds(); lEyes1.setBounds(newRectangle((int)rectfh.getX(),(int)recthair.getY()+finalhairht+finalfhht,(int)rectfh.getWidth(), finaleyesht)); lEyes1.setIcon(seleyesicn); } if(ae.getSource()==cNose) { int selind=cNose.getSelectedIndex(); ArrayList selnose=(ArrayList)noseAL.get(selind); Integer selnoseht=(Integer)selnose.get(1); finalnoseht=selnoseht.intValue(); Integer selnoseid=(Integer)selnose.get(0); cids[3]=selnoseid.intValue(); ImageIcon selnoseicn=(ImageIcon)cNose.getSelectedItem(); Rectangle rectnose=lNose1.getBounds(); Rectangle recthair=lHair1.getBounds(); Rectangle rectfh=lForehead1.getBounds(); Rectangle recteyes=lEyes1.getBounds(); 47
  48. 48. lNose1.setBounds(newRectangle((int)rectfh.getX(),(int)recthair.getY()+finalhairht+finalfhht+finaleyesht,(int)rectfh.getWidth(), finalnoseht));lNose1.setIcon(selnoseicn); } if(ae.getSource()==cLips){ /*ImageIcon sttLips=(ImageIcon)cLips.getSelectedItem(); ht5=sttLips.getIconHeight(); int wt5=sttLips.getIconWidth(); lLips1.setBounds(400,ha4,wt5,ht5); ha5=ha4+ht5; lLips1.setIcon(sttLips); lip=cLips.getSelectedIndex();*/ int selind=cLips.getSelectedIndex(); ArrayList sellips=(ArrayList)lipsAL.get(selind); Integer sellipsht=(Integer)sellips.get(1); finallipsht=sellipsht.intValue(); Integer sellipsid=(Integer)sellips.get(0); cids[4]=sellipsid.intValue(); ImageIcon sellipsicn=(ImageIcon)cLips.getSelectedItem(); Rectangle rectfh=lForehead1.getBounds(); Rectangle recthair=lHair1.getBounds(); Rectangle recteyes=lEyes1.getBounds(); Rectangle rectnose=lNose1.getBounds(); Rectangle rectlips=lLips1.getBounds(); 48
  49. 49. lLips1.setBounds(newRectangle((int)rectfh.getX(),(int)recthair.getY()+finalhairht+finalfhht+finaleyesht+finalnoseht,(int)rectfh.getWidth(), finallipsht)); lLips1.setIcon(sellipsicn); }if(ae.getSource()==cChin) { int selind=cChin.getSelectedIndex(); ArrayList selchin=(ArrayList)chinAL.get(selind);Integer selchinht=(Integer)selchin.get(1); finalchinht=selchinht.intValue(); Integer selchinid=(Integer)selchin.get(0); cids[5]=selchinid.intValue(); ImageIcon selchinicn=(ImageIcon)cChin.getSelectedItem(); Rectangle rectfh=lForehead1.getBounds(); Rectangle recthair=lHair1.getBounds(); Rectangle recteyes=lEyes1.getBounds(); Rectangle rectnose=lNose1.getBounds(); Rectangle rectlips=lLips1.getBounds(); Rectangle rectchin=lChin1.getBounds(); lChin1.setBounds(newRectangle((int)rectfh.getX(),(int)recthair.getY()+finalhairht+finalfhht+finaleyesht+finalnoseht+finallipsht,(int)rectfh.getWidth(), finalchinht)); lChin1.setIcon(selchinicn); } if(ae.getSource()==bSave) { Rectangle recthair=lHair1.getBounds(); 49
  50. 50. lHair1.setBounds(newRectangle((int)recthair.getX(),(int)recthair.getY(),(int)recthair.getWidth(),(int)recthair.getHeight())); Rectangle rectfh=lForehead1.getBounds(); nextheight=(int)recthair.getY()+(int)recthair.getHeight(); lForehead1.setBounds(newRectangle((int)rectfh.getX(),nextheight,(int)rectfh.getWidth(),(int)rectfh.getHeight()));Rectangle recteyes=lEyes1.getBounds(); nextheight=nextheight+(int)rectfh.getHeight();lEyes1.setBounds(newRectangle((int)recteyes.getX(),nextheight,(int)recteyes.getWidth(),(int)recteyes.getHeight())); Rectangle rectnose=lNose1.getBounds(); nextheight=nextheight+(int)recteyes.getHeight(); lNose1.setBounds(newRectangle((int)rectnose.getX(),nextheight,(int)rectnose.getWidth(),(int)rectnose.getHeight())); Rectangle rectlips=lLips1.getBounds(); nextheight=nextheight+(int)rectnose.getHeight(); lLips1.setBounds(newRectangle((int)rectlips.getX(),nextheight,(int)rectlips.getWidth(),(int)rectlips.getHeight())); Rectangle rectchin=lChin1.getBounds(); nextheight=nextheight+(int)rectlips.getHeight(); 50
  51. 51. lChin.setBounds(newRectangle((int)rectchin.getX(),nextheight,(int)rectchin.getWidth(),(int)rectchin.getHeight())); nextheight=nextheight+(int)rectchin.getHeight(); int crid=0; try { ResultSet rs=st.executeQuery("select max(crimeid) fromface_suspectphoto"); if(rs.next()) { String crimeid=rs.getString(1); if(crimeid!=null) crid=Integer.parseInt(crimeid); crid++; writePhoto(cids,crid); st.executeUpdate("insert into face_suspectphoto(crimeid,suspectphoto, photo_height) values("+crid+",suspect"+crid+".gif,"+nextheight+")"); for(int i=0;i<6;i++) { st.executeUpdate("insert into face_suspects(crimeid,cid) values("+crid+","+cids[i]+")"); } JOptionPane.showMessageDialog(this,"Photo savedsuccessfully for the Crime Identification Number: "+crid, "Crime Status",JOptionPane.INFORMATION_MESSAGE); } }catch(Exception e) { 51
  52. 52. JOptionPane.showMessageDialog(this, e.getMessage(), "Construct Image",JOptionPane.ERROR_MESSAGE); } } } public void writePhoto(int a[],int crid) { try { FileOutputStream suspectfout=newFileOutputStream("Suspectssuspect"+crid+".gif"); DataOutputStream suspectdout=new DataOutputStream(suspectfout); FileInputStream hairfin=newFileInputStream("Clipshairhair"+cids[0]+".gif"); DataInputStream hairdin=new DataInputStream(hairfin);while(hairfin.available()>0){ suspectdout.writeInt(hairdin.readInt()); } hairfin.close(); hairdin.close(); FileInputStream fhfin=newFileInputStream("Clipsforeheadforehead"+cids[1]+".gif"); DataInputStream fhdin=new DataInputStream(fhfin); while(fhfin.available()>0) { suspectdout.writeInt(fhdin.readInt());} fhfin.close(); 52
  53. 53. fhdin.close(); FileInputStream eyesfin=newFileInputStream("Clipseyeseyes"+cids[2]+".gif"); DataInputStream eyesdin=new DataInputStream(eyesfin); while(eyesfin.available()>0) { suspectdout.writeInt(eyesdin.readInt()); } eyesfin.close(); eyesdin.close(); FileInputStream nosefin=newFileInputStream("Clipsnosenose"+cids[3]+".gif"); DataInputStream nosedin=new DataInputStream(nosefin); while(nosefin.available()>0) { suspectdout.writeInt(nosedin.readInt());} nosefin.close(); nosedin.close(); FileInputStream lipsfin=new FileInputStream("Clipslipslips"+cids[4]+".gif"); DataInputStream lipsdin=new DataInputStream(lipsfin); while(lipsfin.available()>0) { suspectdout.writeInt(lipsdin.readInt()); } lipsfin.close(); lipsdin.close(); 53
  54. 54. FileInputStream chinfin=new FileInputStream("Clipschinchin"+cids[5]+".gif"); DataInputStream chindin=new DataInputStream(chinfin); while(chinfin.available()>0) { suspectdout.writeInt(chindin.readInt()); } chinfin.close(); chindin.close(); suspectdout.close(); suspectfout.close(); }catch(Exception e) { JOptionPane.showMessageDialog(this, e.getMessage()); } }}class ConstructFace{ public static void main(String ar[]) { Construct ob=new Construct(); ob.show(); ob.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); }} 54
  55. 55. FIND FACEimport java.awt.*;import java.awt.event .*;import javax.swing.*;import javax.swing.event.*;import java.sql.*;import java.awt.image.*;import java.io.*;import java.util.*;import javax.swing.border.*;public class FindFace extends JFrame { Connection cn; Statement stmt; boolean selectstatus=false; int cids[]=new int[6]; public FindFace() { initComponents(); setSize(650,650); java.awt.Dimensionscreen=java.awt.Toolkit.getDefaultToolkit().getScreenSize(); java.awt.Rectangle frame=getBounds(); this.setLocation((screen.width-frame.width)/2,(screen.height-frame.height)/2); setTitle("Find Face & Criminal Details Screen"); 55
  56. 56. setResizable(false); try { Class.forName("org.sqlite.JDBC"); Database d1=new Database(); cn=DriverManager.getConnection("jdbc:sqlite:mydb.sqlite"); stmt=cn.createStatement(); ResultSet rs=stmt.executeQuery("select *from face_suspectphoto"); cmbCrimeId.removeAllItems(); cmbCrimeId.addItem("Select"); while(rs.next()) { cmbCrimeId.addItem(rs.getString(1)); } }catch(Exception e) { javax.swing.JOptionPane.showMessageDialog(this, e.getMessage(),"Suspect Details", javax.swing.JOptionPane.ERROR_MESSAGE); } selectstatus=true; } private void initComponents() { lblPhoto = new javax.swing.JLabel(); cmbCrimeId = new javax.swing.JComboBox(); lblCrimeId = new javax.swing.JLabel(); btnAllSuspects = new javax.swing.JButton(); btnMostSupspect = new javax.swing.JButton(); btnClose = new javax.swing.JButton(); 56
  57. 57. jLabel1 = new javax.swing.JLabel(); getContentPane().setLayout(null); addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt); } }); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); getContentPane().add(lblPhoto); lblPhoto.setBounds(200, 200, 250, 280); cmbCrimeId.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cmbCrimeIdActionPerformed(evt); } }); getContentPane().add(cmbCrimeId); cmbCrimeId.setBounds(90, 100, 160, 25); lblCrimeId.setText("Crime ID"); getContentPane().add(lblCrimeId); lblCrimeId.setBounds(20, 100, 150, 16); btnAllSuspects.setText("Show All Suspects"); btnAllSuspects.addActionListener(new java.awt.event.ActionListener() { 57
  58. 58. public void actionPerformed(java.awt.event.ActionEvent evt) { btnAllSuspectsActionPerformed(evt); } }); getContentPane().add(btnAllSuspects); btnAllSuspects.setBounds(20, 550, 200, 30); btnMostSupspect.setText("Show Most Suitable Supect"); btnMostSupspect.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnMostSupspectActionPerformed(evt); } }); getContentPane().add(btnMostSupspect); btnMostSupspect.setBounds(230, 550, 200, 30); btnClose.setText("Close"); btnClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCloseActionPerformed(evt); } }); getContentPane().add(btnClose); btnClose.setBounds(450, 550, 100, 30); jLabel1.setFont(new java.awt.Font("Times New Roman",Font.BOLD/Font.ITALIC, 25)); jLabel1.setText("Suspected Criminal Faces"); getContentPane().add(jLabel1); jLabel1.setBounds(150, 10, 300, 30); 58
  59. 59. pack(); } private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) { setVisible(false); dispose(); } private void btnMostSupspectActionPerformed(java.awt.event.ActionEvent evt) { new ShowMaxPossibleSuspect(this, true, cids, false).show(); } private void btnAllSuspectsActionPerformed(java.awt.event.ActionEvent evt) { new ShowMaxPossibleSuspect(this, true, cids, true).show(); } private void cmbCrimeIdActionPerformed(java.awt.event.ActionEvent evt) { if(cmbCrimeId.getSelectedIndex()!=0) { String crimeid=cmbCrimeId.getSelectedItem().toString(); try { ResultSet rs=stmt.executeQuery("select * from face_suspectphoto where crimeid=" +crimeid); String photofile=""; int photoheight=0; while (rs.next()) { photofile=rs.getString(2); 59
  60. 60. photoheight=Integer.parseInt(rs.getString(3)); } FileInputStream fin=new FileInputStream("Suspects" + photofile); DataInputStream din=new DataInputStream(fin); int len=fin.available(); int pixels[]=new int[len]; int i=0; while(fin.available()>0) { pixels[i]=din.readInt(); i++; } fin.close(); din.close(); Image clipimg=createImage(newMemoryImageSource(200,photoheight,pixels,0,200)); ImageIcon eyesicn=new ImageIcon(clipimg); lblPhoto.setIcon(eyesicn); rs.close(); rs=stmt.executeQuery("select * from face_suspects where crimeid=" +crimeid); i=0; while(rs.next()) { cids[i]=Integer.parseInt(rs.getString(2)); i++; } }catch(Exception e) { javax.swing.JOptionPane.showMessageDialog(this, e.getMessage(), "PhotoStatus", javax.swing.JOptionPane.ERROR_MESSAGE); } } 60
  61. 61. } private void formMousePressed(java.awt.event.MouseEvent evt) { } private void exitForm(java.awt.event.WindowEvent evt) { System.exit(0); } public static void main(String args[]) { new FindFace().show(); } private javax.swing.JButton btnClose; private javax.swing.JButton btnMostSupspect; private javax.swing.JButton btnAllSuspects; private javax.swing.JLabel lblPhoto; private javax.swing.JLabel lblCrimeId; private javax.swing.JComboBox cmbCrimeId; private javax.swing.JLabel jLabel1;} 61
  62. 62. 5.4 TESTING The completion of a system is achieved only after it has been thoroughly tested.Though this gives a feel the project is completed, there cannot be any project without goingthough this stage. Though the programmer may have taken many precautions not to commitany mistakes that crop up during the execution stage. Hence in this stage it is decidedwhether the project can under go the real time environment execution without any breakdowns, therefore a package can be rejected even at this stage. The testing phase involves the testing of the developed system using various kinds ofdata. An elaborated testing of data is prepared and a system is tested using the test data.While testing errors are noted and corrections remade, the corrections are also noted forfuture use. 5.4.1 SYSTEM TESTING Testing is a set of activities that can be planned in advance and conducted systematically. The proposed system is tested in parallel with the software that consists of its own phases of analysis, implementation, testing and maintenance. Following are the tests conducted on the system. 5.4.2 UNIT TESTING During the implementation of the system each module of the system was tested separately to uncover errors with in its boundaries. User interface was used as a guide in the process. 62
  63. 63. Table.5.4.2 Unit TestingSr.No. Screen Input Output Remarks 1 Login Page User Id User User will enter into Password validation Main Screen 2 Main Screen Criminal Details are New Menu is  File Details are stored in selected to enter new New entered the criminal details. database 3 Main Screen Display option Criminal Display details menu  File is clicked. Details are is selected to get Show displayed details from database. Details 4 Main Screen Exit Option is Screen Screen will be shut  File Clicked. will be down Exit exited 5 Main Screen Criminal Image The clips Clip image menu is  Edit is clipped into are stored selected to clip image Clip Image different parts in database and store them in database 6 Main Screen Changes in the Details of Update details menu  Edit details of the the is selected to update Update criminals are criminal the details of the Details entered are updated criminals 7 Main Screen Different clips Face of Construct face menu  Identificatio of criminals are the is to construct the n selected and criminal is criminal face from Construct arranged in constructed various clips stored in Face order the database. 63
  64. 64. 8 Main Screen Show all All Show more suspect  Identificatio suspects is suspects menu is selected to n checked detail along get the details of all Find Face with photo suspects and more are possible suspect displayed involved in crime.9 Main Screen About Face The About face  Help Identification is version and identification system About checked the menu is selected to overview get the details of of the above system. system is displayed 64
  65. 65. 6.1 FUTURE WORK All current face recognition algorithms fail under the vastly varying conditions underwhich humans need to and are able to identify other people. Next generation personrecognition systems will need to recognize people in real-time and in much less constrainedsituations. Technology used in smart environments has to be unobtrusive and allow users toact freely. Wearable systems in particular require their sensing technology to be small, lowpowered and easily integral with the users clothing. Considering all the requirements,identification systems that use face recognition and speaker identification seem to us to havethe most potential for wide-spread application. Audio and video based recognition systemshave the critical advantage that they use the modalities humans use for recognition. Finally,researchers are beginning to demonstrate that unobtrusive audio-and-video based personidentification systems can achieve high recognition rates without requiring the user to be inhighly controlled environments.6.2 CONCLUSION The purpose of face Identification system is to identify criminals. In past years thisprocess is carried out by humans. This process gives the exact image of the criminal but it isvery difficult to identify the criminal details and also it requires much amount of humanburden. The main aim of our project is to overcome the drawbacks of human based system byusing the machine based face Identification process. In this process we store the details ofcriminal into the database along with his photo or image. Then we make the imageinto different clips containing hair, forehead, eyes, nose, lips and chin and store these clipsinto the database. When any crime occurs we compare the details given by the eyewitnesswith the clips already stored in the database and we will identify the criminal. This projectcan be extended to adjust the gaps between the clips after construction of the image to be aperfect photograph using Image processing Techniques. 65
  66. 66. 7 REFERENCES IEEE/REPUTED JOURNAL PAPERS [1]Yang M.H., Kriegman D.J., and Ahuja N., “Detecting Faces in Images: A Survey”, IEEE Transaction on Pattern Analysis and Machine Intelligence, Vol.24, No.1, January 2002. [2] Rowley H. A., Baluja S. , Kanade T., “Neural Network- Based Face Detection”, IEEE Trans. On Pattern Analysis and Machine Intelligence, vol.20, No. 1, Page(s). 39- 51, 1998. [3] S. Arya and D.M. Mount. Algorithms for fast vector quantization. In J. A. Storer and M. Cohn, editors, Proceedings of DCC 93: Data Compression Conference, pages 381– 390. IEEE Press, 1993. BOOKS [4] Herbert Schildt,”The Complete Reference Java2”, Tata McGraw-Hill, Chapter No.1, publishing Company Limited, Page. No.3-9. [5] Roger S. Pressman,”Software Engineering”, A Practitioner’s Approach”, Tata McGraw-Hill Publishing Company Limited, Page. No.6-13. WEBSITES [6] http://www.java.sun.com/products/java.index.php [7] http://www.facedetec tion.org/ facedetec tion [8] http://www.faceidentification.com.php 66

×