Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project Graduation. Prepared by: 1- Omar ahmed Nasser ail alhumikany 2- Aram jalal Abdullah mohsen 3- Ali gamal ail almansori 4- Mustafa Abdullah Omar.

Similar presentations


Presentation on theme: "Project Graduation. Prepared by: 1- Omar ahmed Nasser ail alhumikany 2- Aram jalal Abdullah mohsen 3- Ali gamal ail almansori 4- Mustafa Abdullah Omar."— Presentation transcript:

1 Project Graduation

2 Prepared by: 1- Omar ahmed Nasser ail alhumikany 2- Aram jalal Abdullah mohsen 3- Ali gamal ail almansori 4- Mustafa Abdullah Omar 5- Haia ahmed albidani 6- Anar Khalid Omar Supervisor : Supervisor : Dr. Adel Sallam Haidar.

3

4  In this chapter will explain the system in general Explain the idea of ​​ this project, what problems they solve, as well as the desired goals of the system and also to know the physical and software tools.

5  Introduction  Problems to be solved  Project Objectives  Tools used

6  Introduction The idea of ​​ the project is a security system that monitors the sensitive areas to prevent or security to alert when a penetration anywhere (E.g.: banks, corporate banking, safe home, etc....) outside working hours.

7  Problems to be solved The following are the problems that the system works to solve: The lack of effective security system (such as security guards). Difficulty with the security guard at the facility to monitor the place at the same time and alert to the presence of a security breach.

8 PPPProject Objectives 1- To provide a security system that monitors the occurrence of any movement in front of the camera and alarm, especially outside working hours. 2- Facilitate the task of the security guard in the process of monitoring and protection facility.

9 3- Facilitate the process of storing images and provide space used instead of video.

10  Tools used 1 - Physical tools: PC. Camera USB. Wires connected to USB. Modem Wi-Fi.

11 2- Software tools: Operating system Windows 7. The programming language that will be built by the system (C Sharp Dot Net) in order to force its dealings with external devices. Utility (PowerPoint _ Word).

12

13  Surveillance systems Surveillance systems is a set of processes is concerned with monitoring the behavior of people  Surveillance cameras Before about 20 years old was surveillance systems with cameras are very complex and you need to effortlessly human large to keep track of the monitoring process

14 TTTTypes of surveillance systems

15 1- analog surveillance systems Registration system in monitoring analog Video Cassette Recording (VCR(. The only way you can show where more than one camera on the TV screen is in the case of a split screen, which you must use a divider signals (Multiplexer) for receiving the signals from each camera and the allocation of part of the screen to them.

16 ( Video Multiplexer )

17  The benefits and advantages of analog surveillance systems : systems, low-cost and easy to use. You do not need any computational skills to operate it.

18 RRestrictions for analog surveillance systems: low-quality video compared to digital systems. must change the video every day. no ability to watch or remote control. less than the quality of the video with the passage of time.

19 2-surveillance systems, computer-based cards DVR Computer control systems that rely on DVR cards lets you connect any camera to the computer.  Available surveillance systems, computer-based DVR cards in the following capacities: DVR card for the four channels (four cameras max). DVR card to eight channels (eight cameras max). DVR Card for sixteen channel (sixteen camera max). DVR Card for thirty-two channels (Thirty-two cameras max).

20 Control systems computer-based cards (DVR(

21  The benefits of computerized surveillance systems: high resolution for recording. Ease of use and upgrade. Easy user interface multiple options. A standard for video compression. High storage capacity include days and perhaps months. Easy to connect to any network, internal or external.

22 RRestrictions on surveillance systems Computerized: Sensitivity to viruses and crashes because it is required to run most of the cards on the Windows operating system. Must owning the skills of computerized medium to deal with the system.

23 3-system of digital recording devices independent DVR Recording devices digital Independent is one of the optimal solutions for those who do not know how to use a computer. A digital recording Independent includes a copy of the operating system (Linux), (Unix) or other operating systems.

24 TThe benefits of digital recording system hardware Independent DVR high resolution video. Ease of use. Withstand extreme climatic conditions and ease of maintenance. Storage capacity is enormous. Easy to connect to any network, internal or external. RRestrictions on the system of digital recording devices Independent DVR Non-can be developed and Improvement.

25 ( system of digital recording devices independent DVR )

26 4-Systems Network Cameras (IP Cameras( Network cameras or what is referred to as (IP Cameras) are a type of cameras allocated to operations viewing, these cameras constitute a particularly attractive option for companies that are currently using CCTV. Remote access. Security surveillance. Remote monitoring.

27 TThe benefits Systems Network Camera ( IP Camera ) High resolution video. Ease of use. Can access all the camera alone. Unlimited number of cameras. High reliability and low maintenance cost. Low-cost cables. Possibility to update and upgrade. DDisadvantages of the network camera IP Camera The high cost of the camera. Weakening (Bandwidth) to connect to the Internet. Must possess the skills of computerized medium to deal with the system.

28 Network Camera (IP Camera(

29

30  Introduction In this chapter we discuss the important stages in this system and includes a description of the problem and the feasibility study for the new system (technical feasibility _ economic feasibility).

31  Description of the problem  Feasibility Study At this stage, will conduct a feasibility study of the system,feasibility study for this system is done through the following: Technical Feasibility Economic Feasibility

32 -T-The following table shows the operating costs of the new system:- TotalvalueNumberTypePart 1000 $ 1 CPU core i7 HDD 500gb PC 15 $ 1USBCamera 5 $ 1USB CableCable 15 $ 1SoundExternal speakers 200 $ 1WI-FIModem 1235 $Total

33  Analysis of Algorithms At this stage will be mentioned mechanism,and ways in which help accelerate the algorithm steps least possible time: capture the first image of the place and the image is considered safe. capture images periodically between each period of time (seconds). comparison between the captured image and the image of safe, and be the comparison between the two images in pixels. If there is any difference between the two images is launching alerts and save the image on your computer. send the image via e-mail to the mobile phone. steps are used to accelerate the algorithm: - - Reduce the image size when saved to reduce the transmission time via the Internet to speed up the algorithm.

34  Motion Detection The main concept behind the motion detection is used in the pictures is a relatively simple image. This as a basis to determine whether there has been any error. The camera will be constantly takes pictures and compares them against a reference image. In case of a difference is so Aletbih. Motion detection algorithms will also use a threshold value. Threshold values allow you to fine tune a particular motion detection algorithm for most needs.

35  Alternatives Security guard Traditional surveillance systems (use recording devices and linked to normal cameras). Type of comparison Security guard Traditional systems New system Efficiencymedium High Protectionmedium High CostHighmediumLow (Compare alternatives with the new system )

36 Project design Project design

37  Introduction In this chapter will be put interfaces for the system, which was designed and made ​​by the algorithm of the system.  Interface Design The following figure shows the interface of the system in all actions:-

38 1-The main interface when you start the program without action.

39 2-The main interface when you turn on the camera for live monit

40 3- The main interface when you take the picture Secure, where the software will take pictures every two seconds and compare it with the picture Secure.

41 4- When a difference when you compare the pictures, it saves the image and compressed and sent via e-mail.

42 5-Has a loss of internet connection or unavailability show us this message, so that alerts us not to provide Internet connection, but the program continues to work normally without sending the image via e-mail.

43  algorithms & code for the system

44  Algorithm explanation: Run the program. Choose a camera from which you want to surveillance. Take a picture secure. Capture images every two seconds to compare it with the picture Secure. Make sure there is a difference when comparing or not.Turn on audio alarm. Save the image in hard drive.Image compression to reduce the size. Make sure there is effective communication to the Internet. Send the image via email to the owner of the facility.

45 CCode explanation: 1-The definition of public libraries for the camera AForge.NET: AForge.NET is a C# framework for computer vision and artificial intelligence. using AForge.Video; using AForge.Video.DirectShow; using AForge; 2-The definition of the public library for input and output: using System.IO;

46 3-The definition of the public libraries for the e-mail: using System.Net.Mail; using System.Net; 4-The definition of the public library for graphics and image compression. using System.Drawing.Drawing2D;

47 5-This function to load the cameras associated with the computer and dedicated to selecting the camera from which you want to surveillance. private void Form1_Load(object sender, EventArgs e) { try { videocapturedivces = new FilterInfoCollection(FilterCategory.VideoInputDevice); foreach (FilterInfo videocapture in videocapturedivces) { comboBox1.Items.Add(videocapture.Name); } comboBox1.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show(ex.Message);} }

48 6- This function to display the image of the direct monitoring on the screen. void finalvideo_NewFrame(object sender, NewFrameEventArgs eventArgs) { Bitmap img = (Bitmap)eventArgs.Frame.Clone(); pictureBox1.Image = img; }

49 7-This function is intended to start a camera that has been selected. private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex == 0) { finalvideo = new VideoCaptureDevice(videocapturedivces[comboBox1.SelectedIndex].MonikerSt ring); finalvideo.NewFrame += new NewFrameEventHandler(finalvideo_NewFrame); finalvideo.Start(); } }

50 8- This function is intended to turn off the camera and close the program. private void Form1_FormClosed(object sender, FormClosedEventArgs e) { finalvideo.Stop(); Application.Exit(); } 9- This function is intended to capture the image secure. private void button4_Click(object sender, EventArgs e) { pictureBox3.Image = pictureBox1.Image; }

51 10- This function is intended for comparison, when capturing the image secure. private void timer1_Tick(object sender, EventArgs e) { if (pictureBox1.Image != null && pictureBox3.Image != null) { compare(); } }

52 11- This function is dedicated to a comparison between the two images and run voice alarm. public void compare() { string soundfile = @"f:\ALARM.wav"; byte[] bt = File.ReadAllBytes(soundfile); var sond = new System.Media.SoundPlayer(soundfile); pictureBox2.Image = pictureBox1.Image; n += 1; textBox4.Text = n.ToString(); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; string img1_ref, img2_ref; Bitmap img1, img2; count1 = 1; count2 = 1; Image t1 = pictureBox2.Image; Image t2 = pictureBox3.Image;

53 img1 = new Bitmap(t1); img2 = new Bitmap(t2); if (img1.Width == img2.Width && img1.Height == img2.Height) { for (int i = 0; i < img1.Width; i++) { for (int j = 0; j < img1.Height; j++) { j += 2; img1_ref = img1.GetPixel(i, j).ToString(); img2_ref = img2.GetPixel(i, j).ToString(); if (img1_ref != img2_ref) { if (count1 > v) { flag = false; } count2++; count1++; } } }

54 if (flag == false && count2 >= v) { textBox2.Text = count2.ToString(); sond.Play(); pictureBox4.Image = pictureBox2.Image; alert(); sond.Stop(); } else textBox3.Text = count2.ToString(); } else MessageBox.Show("can not compare this images"); }

55 12- This function is intended to save the image, compressed and sent via e-mail. public void alert() { a = pictureBox4.Image; Bitmap im = new Bitmap(a); im.Save("f:/aaa" + n + ".png"); im = new Bitmap(100, 100); using (Graphics graphics = Graphics.FromImage(im)) { graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.DrawImage(a, 0, 0, 100, 100); im.Save("f:/ssaaa" + n + ".png"); textBox1.Text = "saved"; }

56 try { //textBox1.Text = "send"; MailMessage mail = new MailMessage(); SmtpClient smtpserver = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("scamra4@gmail.com"); mail.To.Add("buturki1990@gmail.com"); mail.Subject = "Test Mail - 1"; mail.Body = "mail with item"; Attachment att; att = new Attachment("f:/ssaaa" + n + ".png"); //att = new Attachment("d:/saaa" + n + ".png"); mail.Attachments.Add(att);

57 smtpserver.Port = 587; smtpserver.Credentials = new NetworkCredential("scamra4@gmail.com", "a3o1m1h1"); smtpserver.EnableSsl = true; smtpserver.Send(mail); } catch { MessageBox.Show(" there is no internet connection "); }

58 Project application

59  Introduction In this chapter will be implemented and tested system that has been configured and verify the currency.

60 RRequirements for implementation of the system We need to implement the system to the following requirements : A computer. Windows 7 or higher. USB camera. Cable USB. Speakers Alert. Wi-Fi modem.

61 EExplanation of System Interfaces The main interface of the system: - 1- Combo box: - used to select the camera to be selected for monitoring. 2- Start: - is used to start the camera, but without control. 3- Take picture: - is used to capture the image of safe and begin monitoring system. 4- The upper screen: - the camera is turned on by setting the display and take pictures of them. 5- Central screen: - display image secure. 6- Screen left: - the captured image is stored on a regular basis and comparing them with the picture safe central screen.

62 7- The screen right: - when there is a difference between the two images, which screen Central and screen left, image is saved inside the screen right. 8- The first text box: - displays the number of captured images. 9- The second text box: - gives us confirmation when you save the image. 10- The third text box: - shows the percentage difference when penetration. 11- The fourth text box: - shows us the percentage of natural difference.

63

64

65  Conclusion After the implementation and testing of the system was found to meet all the objectives that established for it,where can this system monitoring all movements or intrusions that get in front of the camera and alarm occurrence.

66 FFuture work 1- The system can follow to achieve visible through direct observation from the security room by the computer using the cameras. 2- The system supports the identification from surveillance camera to be through. 3- Supports display all the events on the screens available interface system. 4- The system is characteristic of the image capture when a movement in front of the camera only. 5- As we used to capture images instead of video we have of reducing the space required for storage. 6- Through this system to achieve property warning so that if there is a penetration firing warning system to alert the security guard. 7- Supports sending pictures taken at the time of penetration to e-mail via mobile phone to the beneficiary of the system. 8- Supports the possibility of reviewing all the images that have been captured.

67  Some of the proposals that we recommend for the future development of the system: 1- make the system met to deal with more than one camera. 2- make the system met to send the messages (SMS).  References 1.http://www.smartsecurityest.com/ar/index.html ( Smart Security).http://www.smartsecurityest.com/ar/index.html 2. http://www.shamelatec.ly/index.html ( Shamela Tech ).http://www.shamelatec.ly/index.html 3. http://www.codeproject.com/ ( Code Project ).http://www.codeproject.com/ 4.http://arabteam2000-forum.com/ ( Arab Team ).http://arabteam2000-forum.com/ 5. http://www.aforgenet.com/framework/ ( Aforg.Net ).http://www.aforgenet.com/framework/ 6.http://msdn.microsoft.com/enus/library/618ayhy6%28v=vs.71%29.aspx ( Microsoft – C# language ).http://msdn.microsoft.com/enus/library/618ayhy6%28v=vs.71%29.aspx

68 Appendix

69  Codes Appendix using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using AForge.Video; using AForge.Video.DirectShow; using AForge; using System.IO; using System.Net.Mail; using System.Net; using System.Drawing.Drawing2D; namespace Security_Camera_2014

70 { Public partial class Form1 : Form { ////////public int v = 91450; //public int v = 102000; public int v = 101800; //public int v = 101950; int count1 = 1, count2; Boolean flag = true; int n = 1; Image a; // تستعل لتخزين جميع الكاميرات المصولة private FilterInfoCollection videocapturedivces; // تستعمل لتخزين الكاميرا التي تستعمل private VideoCaptureDevice finalvideo; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e)

71 { try { videocapturedivces = new FilterInfoCollection(FilterCategory.VideoInputDevice); foreach (FilterInfo videocapture in videocapturedivces) { comboBox1.Items.Add(videocapture.Name); } comboBox1.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show(ex.Message); }

72 void finalvideo_NewFrame(object sender, NewFrameEventArgs eventArgs) { Bitmap img = (Bitmap)eventArgs.Frame.Clone(); pictureBox1.Image = img; } private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex == 0) { finalvideo = new VideoCaptureDevice(videocapturedivces[comboBox1.SelectedIndex].MonikerStri ng); finalvideo.NewFrame += new NewFrameEventHandler(finalvideo_NewFrame); finalvideo.Start(); }

73 private void Form1_FormClosed(object sender, FormClosedEventArgs e) { finalvideo.Stop(); Application.Exit(); } private void button4_Click(object sender, EventArgs e) { pictureBox3.Image = pictureBox1.Image; }

74 private void timer1_Tick(object sender, EventArgs e) { if (pictureBox1.Image != null && pictureBox3.Image != null) { compare(); } public void compare() { string soundfile = @"f:\ALARM.wav"; byte[] bt = File.ReadAllBytes(soundfile); var sond = new System.Media.SoundPlayer(soundfile); pictureBox2.Image = pictureBox1.Image; n += 1; textBox4.Text = n.ToString(); ///////////////////////////////////////////////////////////////////////////////// المقارنة textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = "";

75 string img1_ref, img2_ref; Bitmap img1, img2; count1 = 1; count2 = 1; Image t1 = pictureBox2.Image; Image t2 = pictureBox3.Image; img1 = new Bitmap(t1); img2 = new Bitmap(t2); if (img1.Width == img2.Width && img1.Height == img2.Height) { for (int i = 0; i < img1.Width; i++) { for (int j = 0; j < img1.Height; j++)

76 { j += 2; img1_ref = img1.GetPixel(i, j).ToString(); img2_ref = img2.GetPixel(i, j).ToString(); if (img1_ref != img2_ref) { if (count1 > v) { flag = false; } count2++; count1++; }

77 if (flag == false && count2 >= v) { textBox2.Text = count2.ToString(); sond.Play(); pictureBox4.Image = pictureBox2.Image; alert(); sond.Stop(); } else textBox3.Text = count2.ToString(); } else MessageBox.Show("can not compare this images"); }

78 public void alert() { a = pictureBox4.Image; Bitmap im = new Bitmap(a); im.Save("f:/aaa" + n + ".png"); im = new Bitmap(100, 100); using (Graphics graphics = Graphics.FromImage(im)) { graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.DrawImage(a, 0, 0, 100, 100); im.Save("f:/ssaaa" + n + ".png"); textBox1.Text = "saved"; }

79 try { //textBox1.Text = "send"; MailMessage mail = new MailMessage(); SmtpClient smtpserver = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("scamra4@gmail.com"); mail.To.Add("buturki1990@gmail.com"); mail.Subject = "Test Mail - 1"; mail.Body = "mail with item"; Attachment att; att = new Attachment("f:/ssaaa" + n + ".png"); //att = new Attachment("d:/saaa" + n + ".png"); mail.Attachments.Add(att); smtpserver.Port = 587; smtpserver.Credentials = new NetworkCredential("scamra4@gmail.com", "a3o1m1h1"); smtpserver.EnableSsl = true; smtpserver.Send(mail); }

80 catch { MessageBox.Show(" there is no internet connection "); } private void panel1_Paint(object sender, PaintEventArgs e) { }


Download ppt "Project Graduation. Prepared by: 1- Omar ahmed Nasser ail alhumikany 2- Aram jalal Abdullah mohsen 3- Ali gamal ail almansori 4- Mustafa Abdullah Omar."

Similar presentations


Ads by Google