Home

Embedded System - Digital Library

image

Contents

1. Embedded System Capstone Project Surveillance Camera View recorded videos Control video Program Is 1 Click on The video opened Playback starts to play button Play button 2 Choose change to date Pause 3 Choose button Play the camera lt lt Play TuDVT TuDVT Pass video 4 Choose play backward hour button become 5 Click on available Play Play gt gt button play forward button become available 1 Program is 1 Click on The playing opened Pause video is Danse the IS button stopped TuDVT TuDVT Pass video playing Pause button change to Play button Embedded System Capstone Project Surveillance Camera 10 11 12 1 Program is 1 Click on 1 The video starts Play video opened Play playing with X2 with X2 button normal speed TuDVT TuDVT Pass speed 2 Video is playing 1 Program is 1 Click on 1 The video starts Play video opened Play playing with X4 gt gt button normal speed with X4 2 Video is TuDVT TuDVT Pass speed playing with X2 speed 1 Program is 1 Click on 1 The video starts Play opened Pause button playing backward e 2 Click on lt lt AnhVQ AnhVQ Pass 2 Video is Play button playing 1 Program is 1 Click on lt lt 1 The video starts Play opened Play button p
2. Camera has been turned on 2 Camera has connected to the network 3 Camera capture 4 Send video Connect computer to the network 2 Open Code Composer Studio 6 0 1 on computer 3 Start the connection between camera and computer 4 Run project and view the processing of camera 1 State State Camera handling frame rate stability Cc3200 handling 4 5 pictures per second DuyNT DuyNT Pass Embedded System Table 24 Test case for SC Capstone Project Surveillance Camera Embedded System 5 2 2 SmartConfig Android App SAA Test Cases Function No Large Mea Smal Pre condition Step of testing n Create by Result function function function Connect to 1 Camera has 1 Connect 1 New a network been turn on Android camera s 2 Android device to a is added to device network the device Connect connected to 2 Open SAA list cameras Connect the network 3 Enter name 2 Camera to network and pass work connected ThangHM ThangHM Pass network of the network to the also enter the network name of the camera 4 Click on Start Embedded System Capstone Project Surveillance Camera Connect to 1 Camera has 1 Connect 1 A message an been turn on Android box unavailable 2 Android device to a appears network device did network with not conn
3. n J D emm Figure 59 Add succesful Embedded System Capstone Project Surveillance Camera 115 After above steps a new camera will be created with entered setting Te Setting SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Camera5 1435 test Figure 60 Return Setting screen 6 3 2 2 Edit camera Follow these steps below to edit information of an added camera in the camera list 1 On the Setting screen choose a camera on the list and click on Edit button Embedded System Capstone Project Surveillance Camera 116 ei Setting ll oss SETTING CAMERA Camera Name Port Description 1 Camera1 8080 Cameratest 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 L J Figure 61 Choose Camera for editting 2 Camera s information form appear with all information of the chosen camera ai Setting SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Camera5 1435 test ud Camera s Information Le Name Port 1435 Description test 4 P cl rm aiia ke Figure 62 Editting screen 3 Ch
4. Camera s area of application is blank if 1 the application is opened for the first time or there was no camera connection in the last time application was opened User click on Setting button Setting screen is opened 2 Camera list is shown include camera s information such as name port number and description Embedded System Capstone Project Surveillance Camera EE User click on Add button Adding form appears which ask user for 3 camera s information name port number and description not require User click on OK button Application change back to Setting 4 screen New camera appears on the camera list User close Setting screen Setting screen is closed 5 A camera box appear in camera s area of the application Alternative Scenario Embedded System No Actor Action System Response 4a Click Cancel or X button at the Setting screen is closed No camera is top right corner of the Setting added No new camera box is created screen Exceptions No Actor Action System Response 1 Port number textbox is left blank Appear message Invalid port number Please check then try again in the top of the form 2 Entered port number is already A message box appear appears with used content This port is already used try enter another port 3 The name of the camera is left Camera is added with the default nam
5. config Config SettingForm LoadCamera void CreateFileXML void btnAdd_Click object sender EventArgs e void CreateNote string camld string camName string camPort string cameDes XmlTextWriter writer void btnEdit Click object sender EventArgs e void SaveToXML List lt Camera gt cams void btnDelete Click object sender EventArgs ei void ReadXML List lt Camera gt btnClose_Click object sender EventArgs e void s PlayBackForm listVideoBoxs List lt VideoBox gt listLabels List lt Label gt rootPath string listBtnStatus List lt Button gt ListButtons List lt Button gt groupBox GroupBox config Config config Config folderFile string cameraPortReader CameraPortReader selected int begin int MainForm N EE SetUpCamera void playMode Boolean btnSetting Click object sender EventArgs e void speed int btnPlayBack Click object sender EventArgs e void EventSelectButtonStatus object sender EventArgs e void PlayBackForm LoadButtonTime void LoadListCamera void CheckExistFilelmage void GetlmageFromStore string pathTime void Displaylmage string path void statusCam int Nextlmage void isRunning Boolean Prelmage void reader CameraPortReader EventSelectButtonTime object sender EventArgs e void tReader Thread a EventSelectCamera object sender EventArgs e void mode VideoMode EventSelectDateTimePicker object
6. Capstone Project Surveillance Camera K 34 2 No cameras are found A message box appears with message No new device has been found 3 No network connection A message box appears with message No Wifi connection detected What would you like to do Relationship N A Table 9 Connect cameras to network use case Description 3 2 2 2 Watch Videos Function Surveillance Camera Monitor ef A e extend EL SEEN TEEN Wa ees SE Videos Figure 9 Watch Videos Use case Diagram USE CASE UC002 Watch Videos Use case No UC002 Use case Version 1 0 Use case Name Watch Videos Author Nguy n Tu Duy Date 2015 02 11 Priority Normal Embedded System Capstone Project Surveillance Camera E 3b Actor User Summary This use case allow user watch videos from cameras after setting appropriate camera information and connecting to the camera through network connection Goal The windows application successfully connect to cameras via network connection Triggers User click on Start below the video box Preconditions Camera is ON Computer connected to a network Camera is connected to the same network with the computer Post Conditions The video which transmitted from the added camera is received and played Main Success Scenario Step Actor Action System Response User open the applicati
7. Table 27 Test Report 5 3 Test Evident 5 3 1 Test SmartConfig Android App SAA User open the application on Android device for choosing which Wi Fi network that user want the camera to connect to 2 User enter name and password of the Wi Fi network that user want the camera to connect 3 Click Start to run user has to wait until app finish searching Capstone Project Surveillance Camera alley OO R al T20 9 27 Device Configuration Network Name Tenda_20F630 Cancel Figure 42 SAA Searching 4 If searching result is not found system will show error notification If there is any searching result user will find result keyword MAC information cc3200 Or Fal 7x8 9 27 23 DO S 4 xB 9 28 Devices c E Recently Added 3 78A504111FFO mysimplelink Devices New Device Found New device found You can view it at the Devices tab Figure 43 SAA Show Result Capstone Project Surveillance Camera 5 3 2 Test Surveillance Camera SC 1 User open the Code Composer Studio 6 0 1 CCS application connect SC to application and executes it 2 System will start SC and connect to network successful peux ACCS Debug ip camera tcp main c Code Composer Studio file Edit View Project Tools Scripts Run Window Help os prigovorio sole m CCS Edit CCS Debug He a v hor Project Explorer LI Debug O Variables 11 amp Expressions Di Registers
8. USE CASE UC008 View Recorded Videos Use case No UCO08 Use case Version 1 0 Use case Name View Recorded Videos Author Nguy n Tu Duy Date 2015 02 11 Priority Normal Embedded System Capstone Project Surveillance Camera 54 Actor User Summary This use case allow user to play recorded videos Goal Arecord video starts to play Triggers User click on Playback button on the application Preconditions The application is opened Post Conditions The recorded videos are successful started to play User can control videos Main Success Scenario Step Actor Action System Response Clicks on Playback button The playback form appear I Play lt lt Play and Play gt gt button is disable 2 iR padat urea The chosen date is selected and appear Choose date on the textbox Click on Camera combo box The chosen camera display on the combo box Choose a camera 3 Available hour s button among 24 buttons will be marked with red color in background The rest of the 24 buttons will be Embedded System Capstone Project Surveillance Camera E 55 disable Choose an available hour 4 Click on an available hour button The video appears on the left area Play buttons become available Click on Play button The video starts playing Play gt gt and
9. lt lt Play button become available 6 Click on Play gt gt button The video starts playing with 2X speed 7 Click on Play gt gt button The video starts playing with 4X speed 8 Click on lt lt Play button The video starts playing backward Alternative Scenario Step Actor Action System Response 4a Click on an unavailable hour button A message box appear appears with content There is no records in this hour 6a Click on lt lt Play button The video starts playing with 2X speed 7a Click on lt lt Play button The video starts playing with 4X speed Exceptions N A Relationship View recorded videos Control video Business Rules N A Table 16 View Recorded Videos Use Case Description Embedded System Capstone Project Surveillance Camera 56 3 2 33 Non functional Requirements 3 2 3 1 Reliability The cameras have to play 24 7 without errors or disconnecting from network All computers in the network can connect to cameras if the monitor application is installed 3 2 3 2 Availability All computers in the network can connect to cameras if the monitor application is installed 3 2 3 3 Security Sending videos in the network using TCP protocol connection 3 2 3 4 Maintainability Flexible mechanical designing to make it easy to replace any components and modules The CC3200 Launchpad can be ordered easi
10. DCT Discrete Cosine Transform Embedded System Capstone Project Surveillance Camera k 12 1 INTRODUCTION 1 1 Project Information Project name Surveillance Camera Project Code SC Product Type Camera Embedded System Windows Application Start Date January 2015 End Date April 2015 1 2 Introduction Compared to the past cameras are used more common all around the world nowadays due to the decreasing of the cost as well as the raise in the needs of a monitoring tool There are a wide range of camera s uses and the main use is monitoring people tend to use cameras to monitor the security of their houses families offices and poverties For example now many families can take care of their babies easier by putting cameras in baby s rooms bosses can just sit in their rooms and manage their employees through cameras in offices Modern cameras also provide many valuable features such as two way communication it is not only capable of allowing you to hear what is happening at the place where the camera is set up but will also allow you to speak through the camera s built in speaker The integrated sensors also make the cameras become more helpful and enlarge the list of uses of cameras to be more specific thermal and movement sensor help people know if there are thieves broke into their houses or buildings for example An Internet protocol camera or IP camera is a type of digital video camera com
11. ssssssssssceseseseseseseseeeeeeeseseeeseeeeeeesesasasassesenenenetatataeaeaeaeaees 78 Embedded System Capstone Project Surveillance Camera E Figure 33 SmartConfig Sequence Diagram ees eee eeeeenen ente tentent teta aan inteso tnos 78 Figure 34 SC Monitor Main Form ENEE 79 Figure 35 Setting FOrm E 80 Elementen 81 Figure 37 Edit Camera POPITL i ies ea ctae indus tonus Ra ri ee 82 Figure 38 Playback FOrM EE 83 Figure 39 SAA Smart COnkie Taben 84 Figure 40 SAA Devices E E 85 Figure 41 Camera Database Deeler aed ca edunt huma ninia 64 eege 102 Figure 43 SAA SNOW Keelt eenegen 102 Figure 44 SC Connect ee 103 Eemer Eege 104 Figure 46 SCM Test ViewVideo 105 Figure 27 SCM Test Blanne eerste ai nd toda a Dn det DUI LU ena 106 Figure 40 SAA Welcome Screen esee eese eren ente tenter ente toten tento naan naa nua aan ense tonos 107 Figure 41 Start connect camera to the network seus tecicnscun EENEG 108 Figure 42 Searching for matched cameras eee eseeeeenen ente tenter tete tatnen into nns 109 Figure 43 Connect camera to the network succesful essent 110 Figure 44 Before start watching eere enaa samaan enaa serene a un tetas a naa naamaan atanan so sa a aava nennen n 111 Figure 45 Start et E 111 Figure 4b ee RE ven majat Du NH pu Ou n ae RUNEN Oi 112
12. Camera tes 4 D m D egen undam mdi w l Figure 69 Return Setting screen 6 3 3 Playback User can use playback feature by clicking on Playback button in the main screen n m cm Is ICE CAMERA SYSTEM a Figure 70 Choose Playback button Playback screen will appear user can choose the date camera and hour of the Embedded System Capstone Project Surveillance Camera recorded video that they want to watch o PlayBack p W acim PLAYBACK Toa DECH x Figure 71 Playback screen After choosing camera hour button will become available if there is videos that were recorded in that time e CES aj PLAYBACK Monday Jed 13 05 O Camera SE 4 Video a 22 Figure 72 Hour buttons Choose an available hour and click on its button the video will appear in the video Embedded System 121 Capstone Project Surveillance Camera 122 box in the left side Play button will become available Fe PlayBack S i PLAYBACK Monday Api 13 2015 B Camera Camera2 v ja 22 Figure 73 Video appear Embedded System Capstone Project Surveillance Camera Fotz The video starts playing after user click on Play button Two other buttons lt lt Play and Play gt gt which help user to play the video with 2X and 4X speed forward
13. Capstone Project Surveillance Camera m 9 4 7 UserInterface Design Hardware Interface Design 4 7 1 Mam Form e oo o X 0 eR M 000 SURVEILLANCE CAMERA SYSTEM rop z n 2Click show camera 3 mE Games Camera2 Camera3 5 6 3x ze Ca e a D v F se BEd Je Figure 20 SC Monitor Main Form No Item Description 1 Label Title SURVEILLANCE CAMERA SYSTEM 2 Label Title Click show camera 3 Combobox Display of camera 4 Label Camera name 5 VideoBox Show camera image 6 Button Start Stop camera connection 7 Button Open Playback Form 8 Button Open Setting Form Table 17 SC Monitor Main Form Description Embedded System Capstone Project Surveillance Camera EE 4 7 2 Setting Form Cameral SC Monitor MEME S O 5 an e 11 4 40 E SURVEILLANCE CAMERA SYSTEM Click show camera Show 3camers 1SETTING CAMERA Camera Name o Description Cameral Cameratest 1 Camera2 Cameratest 2 Camera3 Cameratest 3 PlayBack am CEN ec a Gp X Figure 21 Setting Form 4 18 PM 47 205 EN S Ci sal No Item Description 1 Label Title SETTING CAMERA 2 ListView Show information of added cameras 3 Button Open Add Camera Form 4 Button Open Edit Camera Form 5 Butto
14. RTE RR EEN 112 Pig tare 45 Choose Add En sau niri PIER ci uci plecti ae e uu mea t Geeta ean 113 Feed deer geed 113 Figure 50 Enter camera Red e 114 Figure 51 Add EE 114 Figure 52 Return Setting screen ae m a nana maan naa mama tn tette teta totae ana mme annann anne 115 Figure 53 Choose Camera for editting EENEG 116 Figure 54 Editting SETeeb auae air ax rt da a ii a a E dS Eden 116 Figure 55 Change camera information eee naan aa entente totns a a ente tete ttnan inteso nos 117 Figure SO ET E 117 Figure 57 Return Setting screen a a a n aa ma e mn a a a a aa tete tete ta TKT TIIA inso tesis 118 Embedded System Capstone Project Surveillance Camera k Figure 58 Choose camera for Celeting ssssssscccssssscsssceessesessssescssesessessseeeseaesnsseseeseaesneasseessseansneneeseeaeas 118 Figure 58 Delete dialog appear iecit qe idee sca ecu cha C Gu lnscn tx ade xeu dua denda 119 Figure 60 Delete TE 119 Figure 61 Return Setting screen eese mann nn aan m eaa aan a aa a nn aa Taa nannat 120 Figure 52 Choose Playback e D 120 Figure 63 Playback screen EE 121 Figure 64 Hour e de E 121 Figure 65 Video Appear E 122 Figure 66 Play VideO E 123 Embedded System Capstone Project Surveillance Camera ig 10 Definitions Acronyms and Abbreviations IP Internet Protocol SC WW M The camera which is inte
15. Setting screen choose a camera on the list and click on Delete button a Setting eS SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camere test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 m J H am IL Figure 66 Choose camera for deleting 2 A dialog appears asking if user is sure want to delete the chosen camera Embedded System Capstone Project Surveillance Camera 119 Click on Yes button ud Setting SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Abc 8765 abc Figure 67 Delete dialog appear 3 A message box will appear to announce if the deleting is successful Click on OK to close this message box e Setting o RH X SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Abc 8765 abc i i b ssi mcn Figure 68 Delete succesful After above steps the chosen camera will be removed from the list Embedded System Capstone Project Surveillance Camera 120 eas r ud Setting SETTING CAMERA Description Camera test 1 Camera test 2 Camera test 3
16. Study about camera Study about camera module ThangHM TuDVT module MT9D111 MT9D111 Identify and research about Ip camera which should be made Choose end devices Research about needed design DuyNT ThangHM Planning Make plan schedule and assign DuyNT task Identify risk and how to manage Document Make team s report Introduction AnhVQ TuDVT SPMP Table 4 Phase 1 Preliminary study and planning 2 3 2 2 Phase 2 Prepare hardware Task Description Author Identify requirement and planning Which devices should be made What components are needed DuyNT ThangHM AnhVQ TuDVT Buy material CC3200 Launchpad Camera module MT9D111 Other materials ThangHM DuyNT Document Make team s report SRS SDD ThangHM DuyNT AnhVQ TuDVT Table 5 Phase 2 Design prepare hardware Capstone Project Surveillance Camera r 28 2 3 2 3 Phase 3 Develop camera firmware Task Description Author Implement camera firmware algorithms in Implement algorithms in camera firmware DuyNT ThangHM Implement Android App for Implement Android App for DuyNT smartconfig smartconfig Testing Testif all devices work correctly AnhVO DuyNT Document Update SRS SDD ThangHM DuyNT AnhVQ TuDVT Table 6 Phase 3 Develop camera firmware 2 3 2 4 Phase 4 Develop window appl
17. challenges amp risks identified from each increment can be utilized applied to the next increment e Risk analysis is better e It supports changing requirements e Initial Operating time is less e Better suited for large and mission critical projects e During life cycle software is produced early which facilitates customer evaluation and feedback Embedded System Capstone Project Surveillance Camera 2 2 2 Roles and Responsibilities No Name Role Responsibilities 1 Phan Duy H ng Ext Supervisor Support technical issue Specify requirement Control the development process 2 Nguy n Tu Duy Team Leader Managing process Developer Tester Assign tasks Designing hardware GUI design Create test cases Coding Clarifying requirements Support technique Prepare documents 3 Ho ng Minh Th ng Team Member GUI Design Developer Tester Prepare hardware Coding Testing Create test cases Prepare documents 4 D Van Thanh T Team Member GUI Design Developer l Tester Testing Prepare documents Embedded System Capstone Project Surveillance Camera EE 23 5 V Qu Anh Team Member Testing Tester Prepare documents Table 2 Roles and Responsibilities 2 2 3 Tools and Techniques 2 2 3 1 Camera development Hardware The camera hardware can be classified into the following parts e Camera mod
18. data mining agents etc It is a textual data format with strong support via Unicode for different human languages It can adhere to a concrete schema if so you choose Once it validates you can say it s correct and start parsing near ubiquitous support in a wide array of languages and frameworks xml version 1 0 encoding UTF 8 standalone true gt lt Table gt lt Camera gt lt Id gt 1 lt Id gt lt Name gt Camerai lt Name gt lt Port gt 8080 lt Port gt lt Description gt Camera test 1 lt Description gt lt Camera gt lt Camera gt lt Id gt 2 lt Id gt lt Name gt Camera2 lt Name gt lt Port gt 8081 lt Port gt lt Description gt Camera test 2 lt Description gt lt Camera gt lt Camera gt lt Id gt 3 lt Id gt lt Name gt Camera3 lt Name gt lt Port gt 5555 lt Port gt lt Description gt Camera test 3 lt Description gt lt Camera gt lt Camera gt lt Id gt 4 lt Id gt lt Name gt Camera4 lt Name gt lt Port gt 1232 lt Port gt lt Description gt adw lt Description gt lt Camera gt lt Table gt camera 4 17 2015 4 27 PM XML Document m IPCamera 11 20 16 PW Application 86 IDCamera eve 4 10 9015 8 42 DM XMI Canfintratin 1 KR Figure 41 Camera Database Design Embedded System Capstone Project Surveillance Camera r 87 5 SYSTEM IMPLEMENTATION amp TEST SIT 5 1 Introduction 5 1 1 System Overview In this section all necessary info
19. or backward will become available Play button also change to Stop button j uj PlayBack zc PLAYBACK Monday April 13 2015 Er Camera Camera2 v lt lt Play Play gt gt Play with normal speed Figure 66 Play video Capstone Project Surveillance Camera ski REFERENCES Texas instrument website version dated 2014 12 7 URL http www ti com Holloway Catherine JPEG Image Compression Transformation Ouantization and Encoding April 2008 Accessed 22 Sept 2009 Wallace Gregory K The JPEG Still Picture Compression Standard Communications of the ACM 1 April 1991 30 44 Accessed 4 Sept 2009 Andrew S Tanenbaum Computer Networks Douglas E Comer Internetworking with TCP IP Principles Protocols and Architecture W Richard Stevens The Protocols TCP IP Illustrated Volume 1 Addison Wesley Professional 1st edition December 31 1993 Alexandr Lytkin IP Video Surveillance An Essential Guide 2012 Cornett Ben Intro to Surveillance Camera Technologies Poynton Charles Digital Video and HDTV Algorithms and Interfaces Penfield Paul Chapter 3 Compression Notes 12 Feb 2004 MIT Accessed 6 Sept 2009
20. selected cameras can be viewed from any computer anywhere and also from many mobile smartphones and other devices Disadvantages Embedded System High network bandwidth requirements it needs a larger bandwidth for sending higher resolution images and videos Higher initial cost per camera High risk of being hacked or controlled by hackers if the video is transmitted over the public internet instead of private LAN network Capstone Project Surveillance Camera m 17 1 5 Feature Functions The system is intended to build contains 3 parts e Module camera Mt9d111 connected with CC3200 Launchpad Surveillance Camera SC e SmartConfig Android App SAA e Surveillance Camera Monitor SCM The camera can connects to a LAN network or the Internet through Wi Fi connection The video which are sent by the camera through wireless connection must work probably without errors Using the window application monitor user can watch what is happening at place where camera was set up The window application monitor provide user an option to view saved videos in the using computer 1 6 Project Team No Name Role Contact 1 Truong Vinh L n Supervisor Email lantv fpt edu vn 2 Nguy n Tu Duy Leader Email duyntse60775 fpt edu vn 3 Ho ng Minh Th ng Member Email thanghmse60754 fpt edu vn 4 D6 Van Thanh T Member Email tudvt60500 fpt edu vn 5 Vii Qu Anh Member Email anhvg00840 G fpt edu v
21. sender EventArgs e void RealTime TimerSlide object sender EventArgs e void VideoBox FromStorage Play int interval void Start VideoMode vm IPAddress address int port void btnStop Click object sender EventArgs e void Stop void E btnPlayPre Click object sender EventArgs e void reader FrameReceived Frame frame void btnPlayNext Click object sender EventArgs e void Figure 14 Surveillance Camera Class Diagram Capstone Project Surveillance Camera 4 4 2 4 SC Class Diagram Explanation 4 4 2 4 1 MainForm Attributes Attributes Type Visibility Description list Videobox List lt Videobox gt Public List Videobox listLabels List lt Label gt Public List Labels listBtnStatus List lt Button gt Public List Button Config Config Private class config cameraPortReader cameraPortReader Private Camera PortReader Methods Methods Type Visibility Description setupCamera Void Private Setup to Camera btnSetting_click Void Private Show Setting Form btnPlayback_click Void Private Show Playback Form EventSelectButtonStatus Void Public Display event button 4 4 2 4 2 AddCamera Attributes Attributes Type Visibility Description Config Config Private Class config Methods Methods Type Visibility Description btnOk click Void Private Confirm to add Camera btnCancel click Void Private Cancel add Camera Ev
22. ti mes config 2 websock camera maine H hw typesh i camera appc Bbootasm Mwlianh Ron camera appe E C 10 0 a Disassembly H Memory Browser orare Enter location here D Console am Oer 7 5 S Memory Allocation ip camera tcp CIO Please select a project START SimpleCamera connect network ok start TCP nend TC length 19825 idFrame 1 length 19825 idFrame 2 length 19825 idFrame 3 length 19825 idFrame 4 5 6 The Memory Allocation view graphically displays your project s memory allocation details When memory allocation fails the view would recommend altemative object placements Select a project to view it s memory allocation length 19825 idFrame length 19825 idFrame 6 length 18033 idFrame 7 length 19825 idFrame 8 length 18033 idFrame 9 length 18033 idFrame 10 length 19825 idFrame 11 length 13425 idFrame 12 length 10097 idFrame 13 length 8561 idFrame 14 length 8561 idFrame 15 length 10097 idFrame 16 length 10097 idFrame 17 Free License LE Figure 45 SC Send Data 5 3 3 Test Surveillance Camera Monitor SCM 5 3 3 1 Test ViewVideo User open the Visual Studio choose SC project and executes it 2 User can choose to display the number of cameras and click Start camera 3 After clicking on Start button the computer starts receiving video signal from added port number of the camera and the v
23. video box reader FrameReceived Void Public Read frame image Embedded System Capstone Project Surveillance Camera K 74 4 5 Flow Chart 4 5 1 Main Flow PinMuxConfig ConnectrToNetwork i Notwork connected 7 Yes ConnectTcpsServer Server connected 7 Yes StartCamera Captureimage SendData Yea Remaining connection AI Figure 15 Main Flowchart Embedded System Capstone Project Surveillance Camera x 75 4 5 2 Init Camera I2C Init CamcControllerinit CameralntEnable CameraSensorinit StartSensorlinJpeaMode Capturelmage CreateJpeg N heck CameralntEnable No Figure 16 Init Camera Flowchart Embedded System Capstone Project Surveillance Camera Kn 76 4 5 3 Send Package HashArray SendPackage N Is last package Check connect server Figure 30 Send Package Flowchart Embedded System Capstone Project Surveillance Camera mr 77 4 54 SmartConfig WlanPrafileDel WlanPolicysSet WlansmartContigStart Connect Network Figure 17 SmartConfig Flowchart Embedded System Capstone Project Surveillance Camera 4 6 Sequence Diagram 4 6 1 View camera Open TCP socket Start TCP Listener on specified port Connect TCP and send data Stream data into video Figure 18 View Camera Sequence Diagram 4 6 2 SmartConfig Figure 19 SmartConfig Sequence Diagram Embedded System
24. with Windows 7 Operating System which connected to the same network with SC o An Android smartphone o Visual studio 2013 Community Embedded System 5 2 Test Case Capstone Project Surveillance Camera 5 2 1 Surveillance Camera SC Test Cases Function No Large Medun Small Pre condition Step of testing Expected result d uuo Result function function function Connect to 1 Camera has 1 Connect 1 New camera is a network been turned on Android added to the device to a device list in network SAA 2 Open SAA 2 Camera is 3 Enter name connected to 1 Camera n and pass the network DuyNT DuyNT Pass network work of the 3 State data red network led in camera is also enter blinking the name of the camera 4 Click on Start Capstone Project Surveillance Camera Send 1 Camera has 1 Connect 1 State video video been turned on computer to the plays for 1 hour network without errors 2 Camera has 2 0pen SCM 2 State data red connected to on computer led in camera is the network 3 Add the blinking camera with a specific port number in W ge e DuyNT DuyNT Pass video transmit the video via network connection 4 Start the connection between camera and computer Embedded System Capstone Project Surveillance Camera Send video Handling picture
25. Android App SAA Test Cases sse tenente tentent nnnnen 92 5 2 3 Surveillance Camera Monitor SCM Test Cases nennen tentes 94 5 2 4 Test i Teo a RR 101 c MEME i i Te Sanoma iai Aaaa Eai aA aasa etree nya SESTA ante N 101 5 2 1 Test SmartConfig Android App SAA een 101 5 2 2 Test Surveillance Camera SC eene 103 Embedded System Capstone Project Surveillance Camera 5 2 3 Test Surveillance Camera Monitor SCM sess tentent 104 6 SYSTEM USER S MANUAL SUM acria escorts passent a Omaa una saas naa n 107 6 1 System RequlEermie E 107 6 2 SmartConfig Android App SAA eese mate mama n maan a aa tete a maan ea aa a enaa 107 6 3 Surveillance Camera Monitor SCM eese naama a aa a a aa an naa enaa 110 531 Watching eie 110 6 3 2 Control Camera eau soupe paid en tincid deuten bru Dd E DUE ON AM EE 112 6 3 3 ET eva M c 120 EE ddidinieslme NK L UMA in 124 Embedded System Capstone Project Surveillance Camera EINE List of Tables Table MEL AI M 17 Table 2 Roles and ResponsibilItIBs E 22 Table een e 26 Table 4 Phase 1 Preliminary study and planning etana aa ana nam a ae a aa nenne 27 Table 5 Phase 2 Design prepare hardware eese entente entere tentorio tesi e nannaa 27 T
26. Attributes Type Visibility Description Frameld Int Public Frameid Size Int Public Size Frame TotalPackage Int Public Total package CreateTime Datetime Public Create datetime now FrameData Byte Public Frame data Methods Methods Type Visibility Description ReceiveData Boolean Public Copy data from camera SaveFile Boolean Public Save image file to folder Embedded System Capstone Project Surveillance Camera 4 4 2 3 Surveillance Camera Class Diagram check String Camerald string EditForm CameraName string A E CameraPort string EditForm String number String name String port String des KI btnSaveEdit Click object sender EventArgs e void sCameraDes string btnCancelEdit Click object sender EventArgs e void getCamerald string setCamerald string camerald void getCameraName string setCameraName string cameraName void getCameraPort string setCameraPort string cameraPort void o Addamra sis getCameraDesf string Addcamera setCameraDes string cameraDes void nums List lt L abel gt Config config checkBoxs List lt CheckBox gt AddCamera txtNames List lt TextBox gt btnOk Click object sender EventArgs e void txtDess List lt TextBox gt btnCancel Click object sender EventArgs e void txtPorts List lt TextBox gt CheckValid object sender EventArgs e void EventValidPort object sender EventArgs e void
27. MINISTRY OF EDUCATION AND TRAINING ggo Fpt University meee TRUONG DAI HOC FPT FPT UNIVERSITY Capstone Project Document Surveillance Camera Group Embedded System Nguy n Tu Duy Team Leader SE60775 Ho ng Minh Th ng Team Member SE60754 D6 Van Thanh Tu Team Member SE60500 V Qu Anh Team Member 00840 Group Members Supervisor Mr Truong Vinh L n Ext Supervisor Mr Phan Duy H ng Capstone Project Code ii Ha Noi January 2015 This page is intentionally left blank Capstone Project Surveillance Camera 4 1 ACKNOWLEDGEMENTS We couldn t have finished this project without the help and technical assistance of many people The amount of time and effort that goes into this project is hard to measure Especially we truly had a fantastic person helping us Mr Phan Duy Hung his professional guidance and his experience help us to overcome the obstacles even the hardest time when we think we can t continue with this project anymore He has truly had a significant impact on the success of this project We would like to extend a special thank you to our friends who have support us throughout 4 months of this project Embedded System Capstone Project Surveillance Camera EE 2 Table of Contents Table OTC ORKON D 0 UC ET oS EE PM eee eee comer 6 bistor D 7 Definitions Acronyms and Abbreviations ececuuoususus
28. PTION SDD iicet ett 57 SEP L0 rcc k yd 57 42 System Architecture Desig i s ass e cti riae S Eu cds str Dep a bid rtu RR i 57 43 Component DIaBf afi ue uiu nd one Rccien m e t kee tj tt m yk e ve stmk p t yseim akty 58 44 Detailed Design of COMPONENES uoc nii cric diri sv ka ctr EEN 59 4AT HardWare eC jet 59 4 4 2 cou e enees 66 4 5 TOM Te ed dade aa aiaa aiaia Tea r a EEK eo 74 4 5 1 Main STEE 74 4 5 2 e ele E 75 4 5 3 ENEE eege EE 76 Z5 Smarttenlli sans saas a uon uua uuu en EAD D UI DE 77 4 6 Sequence Did Sain ENEE 78 Embedded System Capstone Project Surveillance Camera 261 eeneg 78 202 SSAC Essu see eit dee ee ees 78 4 7 User Interface Design Hardware Interface Design essere ennen 79 BPA Mali POT 79 AT Setting S FON D 80 4 7 3 Playback le E 83 CONI NEC Si T e A 84 AB Camera Database Deslighi uei iiiter uates susto ieii k Kd deel 86 5 SYSTEM IMPLEMENTATION amp TEST Eeer 87 MEE nois sammakoita mao eiv ee 87 SLL System OVerVIew eene eee e skr erer 87 CNN MEME d ooo s Pc 87 5 13 EMI noe 87 514 4T sbpass Tull CTS IA Deemer eer t rine v est aae tpe ah o E auma n 87 CC ge Ea iei dcc 88 Se dac c 89 5 2 1 Surveillance Camera SC Test Cases EEN 89 5 2 2 SmartConfig
29. U and a sophisticated image flow processor IFP with a real time JPEG encoder It also includes a programmable general purpose I O module GPIO which can be used to control external auto focus optical zoom or mechanical Embedded System Capstone Project Surveillance Camera shutter Features e Ultra low power consumption progressive scan e 200 million pixels resolution 1600 H x 1200 V e 1 3 2 inch optical format e framerate up to 15 fps under full resolution e Real time JPEG encoding e Integrated with processor with much flexibility e Many automatic functions including correcting or enhancing images and fast exposure adjustment e Integrated 10 bit ADC chip e Support ITU R BT 656 YCbCr 565RGB 555RGB 444RGB and original output data format e Support JPEG 4 2 2 and 4 2 0 output CG n 3 SQOOGDOOOOO JOTTODOOOOO NE Figure 23 MT9D111 PIN Embedded System Capstone Project Surveillance Camera Header 20 2x10 O 00 A EP L d LJ 19 l 2 3 4 5 6 7 8 9 2 23 N 5 26 27 28 29 30 Figure 24 MT9D111 Schematic Capstone Project Surveillance Camera 4 4 1 3 Mapping cc3200 Launchpad to Mt9d111 cc3200 Launchpad Module mt9d111 vec 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 STANDBY T Driver IN 19 Driver EN 20 Figure 12 Mapping Launchpad to Mt9d111 Capstone Project Surveillance Camera Km 4 4 2 Software 4 4 2 1 SC Server Cl
30. a 4 4 2 4 5 Camera Attributes Attributes Type Visibility Description Camerald String Public Id camera CameraName String Public Camera name CameraPort String Public Camera port CameraDes String Public Camera description 4 4 2 4 6 Config Methods Methods Type Visibility Description CreateFileXml Void Public Create file xml CreateNote Void Public Create information xml SavetoXml Void Public Save information to xml ReadXML List lt Camera gt Public List camera Embedded System Capstone Project Surveillance Camera rr Us 4 4 2 4 7 SettingFrom Attributes Attributes Type Visibility Description Config Config Private Class config checkBoxs List lt checkbox gt Public List checkbox txtNames List lt TextBox gt Public List camera name txtDes List lt TextBox gt Public List camera description textPort List lt TextBox gt Public List camera port Methods Methods Type Visibility Description btnAdd_click Void Private Add new camera to xml btnEdit_click Void Private Edit camera to xml btnDelete_click Void Private Delete camera to xml btnClose_click Void Private Close form 4 4 2 4 8 Videobox Attributes Attributes Type Visibility Description statusCam Int Public Status camera isRunning Boolean Private Check videobox Methods Methods Type Visibility Description Start Void Public Start video box Stop Void Public Stop
31. able 6 Phase 3 Develop camera firmware eese eere tenente tette tonno tete nanten aa 28 Table 7 Phase 4 Develop window application 28 Table 8 Phase 5 Integration and system test for the behavior in System EE 29 Table 9 Connect cameras to network use case Description 33 Table 10 Watch Videos Use case Description 35 Table 11 Add Camera Use Case Description eese essent tette teen annan unen 39 Table 12 Change Name Use Case Description 42 Table 13 Change Port Use Case Description scuta Eege dE 46 Table 14 Change Description Use Case Description NEEN 48 Table 15 Delete Camera Use Case Description eese esee eeenen entente tnter tnter 52 Table 16 View Recorded Videos Use Case Description eese ente tentnenn 55 Table 17 SC Monitor Main Form Description ciconia ce tkorerkccusee acr rim egenen 79 Table 18 Setting Form Description eege dese 80 Fable 19 Add Camera Form DeseriptlQpi uei eni rata massaa averted 81 Table 20 Edit Camera Form DescFIEIOTI acsi credis cepi eR bruce eias na us prac ucc md 82 Table 21 Playback Form Description eese aa una annan aa ana na naa nana eaa ana annua annan 83 Table 22 SAA SmartConfie Tab Descriptlonosu ui ein aae op crt coral aon een 85 Table 23 SAA Devices Tab Description eese essen nen enne naan a tete eaa aa tete tentes i
32. amera turned on to play 3 Start button change to Stop 1 Stop button Stop N ane to Se ee 1 Click on N Gre ThangH AnhVQ video Stop button Video stops at the M network last received scene 1 Camera 1 Click on 1 Start button connected Start button changes to Re receive t fhe Stop ThangH AnhVQ Pass the video network 2 Video continues M 2 Video to play freezes Embedded System Capstone Project Surveillance Camera 1 Click on 1 Camera is added Setting to the list button 2 Camera box for 2 Click on the new camera is Control Add Add A Add appear Se NeW is opened Euros DuyNT AnhVO Pass cameras camera camera 3 Enter camera information 4 Click on Add button Embedded System Capstone Project Surveillance Camera Click on 1 Information of Setting the camera is button changed in the 2 Choose a list camera l p l 1 Program is 3 Click on Edit informatio opened Edit DuyNT AnhVQ Pass camera n of a ation SES 4 Enter camera information 5 Click on Save button Camera IS 1 Click on removed to the Program is MEN Setting list Delete a opened button 2 Camera box of Delete NE S 100 2 Choose a the chosen DuyNT AnhVQ_ Pass SSES from the ji a P camera camera is list SERT AU Delete button
33. ange information of the camera and click on Save button Embedded System Capstone Project Surveillance Camera 117 sl Setting e BR x SETTING CAMERA Camera Name Port Description 1 Camera1 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Figure 63 Change camera information 4 A message box will appear to announce if the updating is successful Click on OK to close this message box ud Setting cg PX SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 5 Camera5 1435 test e all Camera s Information bj Port 8765 Description abc sl LJ Figure 64 Edit successful After above steps the chosen camera will be updated with new setting Embedded System Capstone Project Surveillance Camera n ud Setting SETTING CAMERA 1 2 3 4 Camera Name Camera Camera2 Camera3 Camera4 Port 8080 8081 5555 1234 Description Cameratest 1 Camera test 2 Camera test 3 Camera tes 4 118 5 Abc 8765 abc Figure 65 Return Setting screen 6 3 2 3 Delete camera Follow these steps below to edit information of an added camera in the camera list 1 On the
34. apstone Project Surveillance Camera 108 2 User enter name and password of the Wi Fi network that user want the camera to connect to PO OF lm 14 06 Device Configuration Network Name test Password CD metesse Device Name cc3200 This is the device name that will serve for discovery optional 9 E Smart Config Dev Figure 49 Start connect camera to the network Embedded System Capstone Project Surveillance Camera 109 3 The application searches if there is any camera match the entered name then it will sends a command to the camera to connect to the Wi Fi network using the entered information Device Configuration Network Name test Password tmm Device Name cc3200 This is the device name that will serve for discovery optional Cancel Figure 50 Searching for matched cameras Embedded System Capstone Project Surveillance Camera 4 After the searching is completed the application will change to Devices tab with the list of cameras Devices gt Recently Added Devices cc3200 T Devices Figure 51 Connect camera to the network succesful 6 3 Surveillance Camera Monitor SCM 6 3 1 Watching videos User can choose to display the number of cameras Next user can start watching videos from specific cameras by clicking on Start button below every camera box 110 Capstone Project Surveillance Camera SURVEILLANCE CAMERA SYSTEM mme Se
35. ass Diagram SaveFile string folderPath void CreateNote string camld string camName string camPort XmlTextWiriter writer void ReadXML List lt Camera gt Camerald string CameraName string CameraPort string getCamerald string setCamerald string camerald void getCameraName string setCameraName string cameraName void getCameraPort string setCameraPort string cameraPort void CameraPortReader path string pathDate string pathCamera string pathTime string frame Frame FrameReceived ReceiveFrame ipAddress IPAddress port int statusCamera Boolean config Config listCamera List lt Camera gt server TcpListener client TcpClient CameraPortReader CameraPortReader IPAddress add int p Readlmage void CloseSocket void ChangeStatusCameraf Boolean Frameld mi CreateFolderDay void Size int 5 CreateFolderCameraf void TotalPackage int CreateFolderTime void ReceivedPackage int Ge CreateTime DateTime E FrameDate byte Frame int frameld int size ReceiveData byte data int packagelndex int offset Boolean SaveFile string folderPath Boolean Figure 13 SC Server Class Diagram Embedded System Capstone Project Surveillance Camera run 67 4 4 2 2 SC Server Class Diagram Explanation 4 4 2 2 1 Config Methods Methods Type Vi
36. button Setting screen is opened 2 Camera list is shown include camera s information such as name port number and description Choose a camera on the list Camera s information form is opened S Click Edit button Information of the chosen camera is shown in textboxes Change the name of the camera A message box appear appears with Embedded System Capstone Project Surveillance Camera Er 43 Click Save button content Update successful 5 Click OK button The name of the camera is changed in the list Click Cancel or X button at the 6 top right corner of the Setting The name of the camera in the camera screen box is changed Alternative Scenario Step Actor Action System Response 3a Click on Edit button A message box appear appears with content Choose a camera on the list 4a Click Cancel or X button at the top right corner of the camera s The form is closed no change is information form executed Exceptions No Actor Action System Response 1 The name of the camera is left Camera is added with the default name blank CameraX X is the number of the camera 2 The entered name is already exist A message box appear appears with content This name is already used try enter another name Relationship Control cameras Business Rules N A Table 12 Change Name Use Case Description Embedded Syste
37. d Design of Components 4 4 1 Hardware 4 4 1 1 CC3200 Launchpad UART signals Y A j 02 mo C320 A JNCH i a Rev 2 e u2 al Eem S nReset ZS ce pu nReset mii ji d ah 4 t a TT 3 R c FTDI JTAG Sense on power headers SOP pins 20 pin LP connector 20 pin LP S flash connector t 23 3 gt wis 13 MTS mm xi I v tui 22 712233 Ubi tutti e 33 ID DA W Ji CH LE LJ JA mut NA cene z E LA pe Chip antenna Figure 99 CC3200 Launchpad Overview Embedded System Capstone Project Surveillance Camera Kn D prae Figure 100 CC3200 Launchpad Schematic The high performance CC3200 is the industry s first single chip Microcontroller MCU with built in Wi Fi connectivity for the LaunchPadTM ecosystem Created for the Internet of Things IoT the SimpleLink Wi Fi CC3200 device is a wireless MCU that integrates a high performance ARM Cortex M4 MCU allowing customers to develop an entire application with a single IC With on chip Wi Fi internet and robust security protocols no prior Wi Fi experience is needed for faster development The CC3200 LaunchPad is a low cost evaluation platform for ARM Embedded System Capstone Project Surveillance Camera Cortex M4F based microcontrollers The LaunchPad design highlights the CC3200 Internet on a chip M solution and WiFi capabilities The CC3200 LaunchPad also f
38. e blank CameraX X is the number of the camera 4 The entered name is already exist A message box appear appears with content This name is already used try enter another name Capstone Project Surveillance Camera EXE 41 Relationship Control cameras Table 11 Add Camera Use Case Description Change Name Surveillance Camera Monitor O L Control cameras User Ma lt lt Figure 42 Change Name Use Case Diagram USE CASE UC004 Change Name Use case No UC004 Use case Version 1 0 Use case Name Change Name Author Ho ng Minh Th ng Date 2015 02 15 Priority Normal Embedded System Capstone Project Surveillance Camera r 42 Actor User Summary This use case allow user to change the current name of an added camera Goal Name ofthe chosen camera is changed Triggers User click on Edit button on Setting screen which is opened by clicking on Setting button Preconditions Camera s is are added and shown in the list of camera Post Conditions Name ofthe camera is changed Main Success Scenario Step Actor Action System Response User open the application Application is opened Camera s area of application is blank if I the application is opened for the first time or there was no camera connection in the last time application was opened User click on Setting
39. e label 2 Label Port label 3 Label Description label 4 TextBox Name of selected camera enter new value to change 5 TextBox Port of selected camera enter new value to change 6 TextBox Description of selected camera enter new value to change 7 Button Save new information of camera to XML file 8 Button Cancel editing camera and close form Embedded System Table 20 Edit Camera Form Description Capstone Project Surveillance Camera 4 7 3 Playback Form 1PLAYBACK 3 Friday REI 2015 Br Zones Camera 5 CMe _ OC EEE TT 808080 S p Setting ES Stat 9 3g elolmI lt 7 0 Figure 23 Playback Form No Item Description 1 Label Title PLAYBACK 2 PictureBox Show recorded video 3 DateTimePicker Choose date of recorded video 4 Label Name label 5 ComboBox Choose camera name to view 6 Button Choose hour of the recorded video in specified date red button means that hour has recorded video 7 Button Playing video backward with 1x 2x 4x speed 8 Button Play Stop recorded video 9 Button Playing video forward with 1x 2x 4x speed Embedded System Table 21 Playback Form Description Capstone Project Surveillance Camera EXE 4 74 SmartConfig 4 7 4 1 SmartConfig Tab OF AT 14 06 1 Device Configuration 2 Network Name 3 test A Password 1m 6Device Name 7 cc3200 This is the device name t
40. e blinky ip camera tcp Code Composer Studio Device Debugging Name Type Value Location driverlib Stellaris In Circuit Debug Interface O Cortex M4 0 Running 3 ip camera 12 ip camera tcp Active Release 15 oslib amp simplelink main c Pl hw typesh A camera app c bootasm W wlanh amp osih camera appe dizeconfige 1 SS Disassembly D Memory Browser s KACKM A Enter location here void main 1ong 1RetVal 1 Console amp ii B v 75v O E Memory Allocation D ip camera tcp CIO Project ip camera tcp Link successful gt SRAM_CODE 82944 97 280 START SimpleCamera connect network ok SRAM DATA Free License LE Writable Smart Insert 287 1 103 Figure 44 SC Connect Successful 3 If connecting result SC send data to SCM Embedded System Capstone Project Surveillance Camera 104 P ura d s n an Getae eee ING File Edit View Project Tools Scripts Run Window Help Gs E as GErRAMPI EAS Bri Avior m ces Edit amp CCS Debug Project Explorer S Debug B oi Variables amp f Expressions Mit Registers t amp S blinky 4 ip camera tcp Code Composer Studio Device Debugging Name Type Value Location V driverlib 4 if Stellaris In Circuit Debug Interface 0 Cortex M4 0 Suspended SW Breakpoint 2 ip camera C 10 0 Ox2000E68E C 1O is an assembly function 12 ip camera tcp Active Release S oslib 2 simplelink S tcp socket G
41. eatures programmable user buttons RGB LED for custom applications and onboard emulation for debugging The stackable headers of the CC3200 LaunchPad XL interface demonstrate how easy it is to expand the functionality of the LaunchPad when interfacing with other peripherals on many existing BoosterPack add on boards such as graphical displays audio codec antenna selection environmental sensing and much more Features e CC3200 Wi Fi wireless MCU e USB interface to PC for CCS IAR using FTDI USB drivers e Flash update over the USB using SimpleLink Programmer e 220 pin connectors enables compatibility with other TI LaunchPads with added functions e Standalone development platform featuring sensors LEDs and push buttons e Power from USB for the LaunchPad as well as external BoosterPack e Operates from 2 AA alkaline batteries e On board antenna and U FL connector selectable using a capacitor re work e Supports 4 wire JTAG and 2 Wire SWD e GNU Debugger GDB support over Open On chip debugger OpenOCD e BoosterPack headers Embedded System Capstone Project Surveillance Camera ARM Cortex M4 80 MHz JTAG Oscillators DC2DC BAT Monitor z Wi Fi NWP Figure 11 CC3200 Overview of Peripherals 4 4 1 2 MT9D111 Camera Module Figure 22 MT9D111 Camera Module MT9DI11 is a 1 3 2 inch 2 megapixel CMOS image sensor with an integrated advanced camera system The camera system features a microcontroller MC
42. ect 2 Open SAA message to the No Wifi ThangHM ThangHM Pass network connection detected What would you like to do Connect 1 Camera has 1 Connect 1 A message cameras to been turn on Android box the 2 Android device to a appears network device network with with wrong connected to 2 Open SAA message password the network 3 Enter wrong No new hangHM ThangHM Pass name passwor device has d of the been network found 4 Click on Start Capstone Project Surveillance Camera Connect 1 Android 1 Connect 1 A message unavailable device Android box cameras to connected to device to a appears the the network network with 4 network 2 Open SAA message ThangHM ThangHM Pass 3 Enter wrong No new name of the device has camera been 4 Click on found Start Table 25 Test case for SAA 5 2 3 Surveillance Camera Monitor SCM Test Cases Function INO Large VSK Pre condition Step of testing Expected result Create by Result function function function Embedded System Capstone Project Surveillance Camera Camera Receive video Program 1 Add a new 1 A new camera was camera box appears opened 2 Click on 2 Video First time 2 Camera Start transmitted from ThangH connect to has been button the camera starts M AnhVQ Pass c
43. ect Surveillance Camera 113 6 3 2 1 Add camera Follow these steps below to add a new camera to camera list 1 Click on Add button on the Setting screen a Setting Brim SETTING CAMERA Camera Name Pot Description 1 Camera1 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 Figure 56 Choose Add button 2 Adding form appears a Setting elm x SETTING CAMERA Camera Name Port Description Camera1 8080 Cameratest 1 Camera2 8081 Camera test 2 Camera3 5555 Camera test 3 P ON m d le H Figure 57 Adding Screen Embedded System Capstone Project Surveillance Camera 114 3 Fill in textboxes with information of the camera aJ Setting am x SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camera test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 m min Figure 58 Enter camera information 4 A message box will appear to announce if the adding is successful Click on OK to close this message box fi ud Setting cm X N SETTING CAMERA Camera Name Port Description 1 Camera 8080 Camere test 1 2 Camera2 8081 Camera test 2 3 Camera3 5555 Camera test 3 4 Camera4 1234 Camera tes 4 Add successful
44. eet hard copy 2 4 Convention Rules The following rules follow The standard rules for developing application using C C http users ece cmu edu eno coding CCodingStandard html MSDN s CH Coding Conventions CZ Programming Guide http msdn microsoft com en us library vstudio ff926074 28v vs 110 29 aspx Embedded System Capstone Project Surveillance Camera 3 SYSTEM REQUIREMENTS SPECIFICATIONS SRS 3 1 User Requirement Specification There are 5 main functions Connect cameras to network User can use SmartConfig Android App to connect cameras to network Watch videos User can watch videos which are transmitted by connected cameras Auto save videos The video which are transmitted by connected cameras will be saved to the computer automatically Control cameras User can change camera s setting such as name port number and description User can also add or remove a camera View recorded videos User can watch the recorded videos which are saved automatically when cameras stream to the computer User can choose the time and the camera they want to watch The video control is also needed for improving user s convenience which allow user to play the video forward with 2X and 4X speed it is the same for the backward playing 3 2 System Requirement Specification 3 2 1 External Interface Requirements 3 2 1 1 User Interface The interface must be designed to be satisfied the following require
45. entValidPort Void Public Check Valid Port Capstone Project Surveillance Camera m 71 4 4 2 4 3 PlaybackForm Attributes Attributes Type Visibility Description rootPath String Private Address folder camera Config Config Private Class config listButton List lt Button gt Public List Button folderFile String Private Folder file Selected Int Private Choose image in folder Speed Int Private Load speed image Methods Methods Type Visibility Description setupCamera Void Private Stop to Camera btnStop click Void Private Stop playback btnPlayPre click Void Private Deceleration play video btnPlayNext click Void Private Acceleration play video LoadButtonTime Void Public Load button in form loadListCamera Void Public Load list camera in form CheckExistFileImage Void Public Check file image GetImageFromStore Void Public Get file image DisplayImage Void Public Display Image NextImage Void Public Next Image PreImage Void Public Previous Image Embedded System Capstone Project Surveillance Camera es 72 4 4 2 4 4 EditFrom Attributes Attributes Type Visibility Description Check String Public Check data in xml Methods Methods Type Visibility Description btnSaveEdit click Void Private Save data camera btnCancelEdit click Void Private Cancel edit camer
46. hat will serve for discovery optional 8 Start 9 10 Smart Config Figure 24 SAA SmartConfig Tab No Item Description 1 Label Title Device Configuration 2 Label Network Name label 3 EditText Enter network name 4 Label Password label 5 Edit Text Enter password of the network 6 Label Device Name label Embedded System Capstone Project Surveillance Camera Fa 85 7 EditText Enter device name to configure 8 Button Start device configuration based on information above 9 Tab Change to SmartConfig tab 10 Tab Change to Devices tab Table 22 SAA SmartConfig Tab Description 4 7 4 2 Devices Tab 1 Devices 2 3 Recently Added Devices 4 cc3200 5 e Devices Figure 40 SAA Devices Tab No Item Description 1 Label Title Devices Embedded System Capstone Project Surveillance Camera EE 2 Button Refresh added device list 3 Label Recently added devices label 4 Item Show added devices 5 Tab Change to SmartConfig tab 6 Tab Change to Devices tab Table 23 SAA Devices Tab Description 4 8 Camera Database Design Information coded in XML is easy to read and understand plus it can be processed easily by computers Tags attributes and element structure provide context information opening up new possibilities for highly efficient search engines intelligent
47. ication Task Description Author Identify requirement Which application should provide feature services the DuyNT ThangHM TuDVT Implement communication Implement how application communicates with cameras DuyNT ThangHM Implement GUI andi Implement application on ThangHM TuDVT Interaction windows to help users control cameras Testing Test system behavior and AnhVQ TuDVT performance Document Update SRS SDD ThangHM DuyNT AnhVQ TuDVT Table 7 Phase 4 Develop window application Embedded System Capstone Project Surveillance Camera 29 2 3 2 5 Phase 5 Integration and system test for the behavior in system Task Description Author Identify reguirement and Which feature the system can be DuyNT ThangHM planning improved AnhVQ TuDVT Test performance Check the performance of system DuyNT ThangHM Create test case Check the behavior of system DuyNT ThangHM when risk occurred Execute test case Create test cases to cover DuyNT AnhVQ Check the result and fix bug Collect test result DuyNT ThangHM AnhVQ TuDVT If any bug occurred fixed them Document Add test plan and test result AnhVQ TuDVT Create User Manual Table 8 Phase 5 Integration and system test for the behavior in System 2 3 3 Task Sheet Assignments and Timetable See the Task sh
48. ideo starts playing in the camera box Embedded System Capstone Project Surveillance Camera 105 SURVEILLANCE CAMERA SYSTEM Click show camera Show 2 camera Camera2 Figure 46 SCM Test View Video 5 3 3 2 Test PlayBack User open the Visual Studio choose SC project and executes it 2 User can click button Playback then PlaybackForm is show 3 In PlaybackForm user can choose Calendar Camera and Times Next you click Play and see video Embedded System GEN Capstone Project Surveillance Camera o Click show camera EGUEEELEEET 3 SURVEILLANCE CAMERA SYSTEM PLAYBACK Embedded System Figure 47 SCM Test Playback 7 Wmp fe BR must applic Wen More Learn 106 Capstone Project Surveillance Camera ster 6 SYSTEM USER S MANUAL SUM 6 1 System Requirement CPU Intel Pentium 4 2 4Ghz or higher RAM 512MB or higher EX OS 32bit or 64bit Windows 7 8 8 1 Software Microsoft NET Framework 4 Client Profile or higher Communication Ethernet or Wi Fi connection Free disk space 15MB Table 27 System Requirement 6 2 SmartConfig Android App SAA User must follow these steps to connect cameras to the specific network 1 User open the application on Android device for choosing which Wi Fi network that user want the camera to connect to IP CAMERA SYSTEM SMART CONFIG Figure 48 SAA Welcome Screen C
49. illance Camera EE Click Edit button shown in textboxes Change the port of the camera E Click Save button A message box appear appears with content Update successful 5 Click OK button The port of the camera is changed in the list Alternative Scenario Step Actor Action System Response 3a Click on Edit button A message box appear appears with content Choose a camera on the list 4a Click Cancel or X button at the top right corner of the Setting screen The form is closed no change is made Exceptions No Actor Action System Response 1 The port number textbox is left A message box appears with content blank Please enter the connection port 2 The entered port is already exist A message box appears with content This port is already used try enter another port Relationship Control cameras Business Rules The input port number must be a number in range of 1 65535 Table 13 Change Port Use Case Description Embedded System Capstone Project Surveillance Camera m 47 Change Description Surveillance Camera Monitor Control cameras k eu o k maa a User M Change description Figure 5 Change Description Use Case Diagram USE CASE UC006 Change Description Use case No UC006 Use case Version 1 0 Use case Name Change Descripti
50. is left Camera is added with the default name blank CameraX X is the number of the camera Embedded System Capstone Project Surveillance Camera EE 37 Relationship Autosave videos Table 10 Watch Videos Use case Description 3 2 2 3 Control Cameras Surveillance Camera Monitor Change name Control cameras User Kess Change description Figure 10 Control Cameras Use case Diagram Embedded System Capstone Project Surveillance Camera Add Camera Surveillance Camera Monitor Control cameras User Figure 11 Add Camera Use case Diagram USE CASE UC003 Add Camera Use case No UCO003 Use case Version 1 0 Use case Name Add Camera Author Ho ng Minh Th ng Date 2015 02 15 Priority Normal Embedded System Capstone Project Surveillance Camera Actor User Summary This use case allow user adding cameras Goal Anew camera is added to the list of cameras Triggers User click on Add button on Setting screen which is opened by clicking on Setting button Preconditions Camerais ON Computer connected to a network Camera is connected to the same network with the computer Post Conditions Anew camera is added to the camera list Acamera box is added for the new camera Main Success Scenario Step Actor Action System Response User open the application Application is opened
51. is opened for the first time or there was no camera connection in the last time application was opened User click on Setting button Setting screen is opened 2 Camera list is shown include camera s information such as name port number and description Embedded System Capstone Project Surveillance Camera K 52 Choose a camera on the list 3 A dialog appears with contents Do you User click on Delete button want to delete this camera User click on Yes button Application change back to Setting screen 4 The chosen camera is removed from the list Click Cancel or X button at the Setting screen is closed 5 top right corner of the Setting Ser A camera box appear in camera s area of the application Alternative Scenario Step Actor Action System Response 3a Click on Delete button A message box appear appears with content Choose a camera on the list 4a Click No button Return to Setting screen No change is made Exceptions N A Relationship Control cameras Business Rules N A Table 15 Delete Camera Use Case Description Embedded System Capstone Project Surveillance Camera 53 3 2 2 4 View Recorded Videos Function Surveillance Camera Monitor extend View recorded videos gt Control video Figure 76 View Recorded Use Case Diagram
52. ive to interference and ground loops e Long distance applications are more difficult if your surveillance needs encompass a wide area analog cameras may not be your best choice Analog cameras generally do not accommodate big Embedded System Capstone Project Surveillance Camera EE 19 distances and getting them to work over broad ranges can be difficult Wireless analog is very unreliable and poor quality and underground cables are extremely prone to lightning and a whole host of other problems 2 1 3 2 The proposed System There is the need of invention of a new system of camera that is more reliable and easier to set up as well as have many advantages e More secure e Uses less devices compared to the analog camera system e Realtime streaming and recording e Flexible for setting up in different conditions We design the system with good hardware and platform The camera has a compact design and high mobility 2 1 3 3 Boundaries of the System The system which is intended to build contains 3 parts e Surveillance Camera SC The camera s uses for electronic motion picture acguisition and transmit video through network connection e Surveillance Camera Monitor SCM A windows application for users to monitor the cameras through network connection e SmartConfig Android App SAA An Android application for users to connect cameras to the network Embedded System Capstone Project Surveillance Camera Fig
53. laying backward backward with X2 normal AnhV AnhV P with X2 2 Viden is speed Q Q nee speed playing backward Embedded System Capstone Project Surveillance Camera 100 Program is opened 1 Click on lt lt Play button 1 The video starts playing backward Se ith 4 b cbwatd with X4 norma 13 Pon 2 Video is speed AnhVQ AnhVQ Pass vam playing speed backward with X2 speed l l 1 Connected 1 Click View video on 14 bui iw to the Start SCH AnhVQ Anhvo Pass video video network button 2 Start SCM 1 Connected 1 View video 4 5 picture per Test Processin to the 2 View second 15 E network picture in AnhVQ AnhVQ Pass 2 Start SCM folder Camera 1 Connected 1 View Size picture 16 Ten Ti to the picture in 640x480 pixel AnhVQ AnhVQ Pass picture picture network folder 2 Start SCM Camera Table 26 Test Cases for SCM Embedded System Capstone Project Surveillance Camera steet 5 2 4 Test Report ProjectName Surveillance Camera Creator ThangHM DuyNT ProjcetCode SC Reviewer Approver HungPD DocumentCode SC TestReport v1 0 Issue Date Note All off module 1 Surveillance Camera 3 0 0 0 3 2 SmartConfig Android App 4 0 0 0 4 3 Surveillance Camera Monitor 16 0 0 0 16 Test coverage 100 Test successful coverage 100
54. ly in TI website and camera module mt9d111 can be purchased using EBay or Taobao The system is divided into separate modules SC SAA SCM The firmware code and software code is easy to maintain and upgrade 3 2 3 5 Portability N A 3 2 3 6 Performance Module Mt9d111 handling maximum frame rate 15 fps at full resolution 1200x1600 30 fps in preview mode 800 x 600 Cc3200 handling 4 5 fps and transmitted image size 640x480 pixel Embedded System Capstone Project Surveillance Camera 4 SOFTWARE DESIGN DESCRIPTION SDD 4 1 Design Overview This document describes technical board design and user interface design of Smart IP Camera It includes e System architectural design which describes system s model system s layers layer s component and the function of each layer e The detailed description of components and the relationship between each component e Sequence diagram to know how to the system run e User Interface design which describes system s screens and how users interact to systems Each screen includes functions types of input output and event handling 4 2 System Architecture Design Figure 87 System Architecture Design Capstone Project Surveillance Camera 4 3 Component Diagram CC3200 LaunchPad TCP amp Mt9d11 Camera Module amp J NET Framework Figure 18 Component Diagram Embedded System Capstone Project Surveillance Camera 4 4 Detaile
55. m Capstone Project Surveillance Camera K Change Port Surveillance Camera Monitor Change port Control cameras Figure 13 Change Port Use Case Diagram USE CASE UC005 Change Port Use case No UC005 Use case Version 1 0 Use case Name Change Port Author Ho ng Minh Th ng Date 2015 02 15 Priority Normal Embedded System Capstone Project Surveillance Camera 45 Actor User Summary This use case allow user to change the current port of an added camera Goal Port of the chosen camera is changed Triggers User click on Edit button on Setting screen which is opened by clicking on Setting button Preconditions Camera s is are added and shown in the list of camera Post Conditions Port of the camera is changed Main Success Scenario Step Actor Action System Response User open the application Application is opened Camera s area of application is blank if the application is opened for the first time or there was no camera connection in the last time application was opened User click on Setting button Setting screen is opened 2 Camera list is shown include camera s information such as name port number and description Choose a camera on the list Camera s information form is opened Information of the chosen camera is Embedded System Capstone Project Surve
56. ment e Besimple and user friendly e Meet all the main functions and easily to identify each of functions e Use obvious icons to avoiding misunderstanding 3 2 1 2 Hardware Interface The hardware interface the camera using must be designed to be satisfied Embedded System Capstone Project Surveillance Camera E EN the following requirement e Low cost hardware module e Easy to consume e Easy to replace for maintenance 3 2 1 3 Communication Protocols The cameras and the windows application must use network connection to connect each other using integrated Wi Fi module in CC3200 Launchpad The video is sent to the computer using TCP protocol 3 2 2 Functional Requirements SmartConfig Android App Connect camera to network Surveillance Camera Monitor extend Waen ydeon gt Change name at Change port Control cameras ana Change description User va Control video Figure 7 Use case Diagram Embedded System Capstone Project Surveillance Camera 3 2 2 1 Connect cameras to network i Connect cameras to network User Figure 8 Connect cameras to network use case Diagram USE CASE UC001 Connect Cameras To Network Use case No UC001 Use case Version 1 0 Use case Name Connect cameras to network Author Nguy n Tu Duy Date 2015 02 11 Priority Normal Embedded System Capstone Project Surveillance Camera Actor User Su
57. mmary This use case allow user to use SmartConfig Android App SAA to connect camera s to a specific network Goal Connect camera to the network Triggers Userclick on Start button on the application Preconditions User s Android devices connected to a network Post Conditions Camerais on the device list of the Android App Camera connected to the network Main Success Scenario Step Actor Action System Response Open the App 1 App is opened Welcome screen is shown Click on SmartConfig tab Change to SmartConfig tab Name of the network is auto filled with 2 the name of the network which Android device is currently connected to Click on Start button Start searching for cameras match the entered name Send command to those cameras to 3 connect to the network A message box appears with content New device found You can view it at the Devices tab Click on OK button Return to SmartConfig tab Click on Devices tab P 5 Change to Devices tab List of the connected cameras is shown Alternative Scenario Step Actor Action System Response 3a Click on Cancel button during the searching Return to SmartConfig tab No change is made Exceptions Step Actor Action System Response 1 Enter wrong password A message box appears with message You did not enter a password Whould you like to continue Embedded System
58. monly employed for surveillance it also can connects to an IP network such as a LAN Local Area Network or the Internet An IP camera can have either a CMOS or a CCD sensor and is available in the same styles as traditional surveillance cameras such as Pan Tilt Zoom domes bullets box infrared covert and wireless IP cameras are typically equipped with an embedded web server and can be accessed and controlled over any IP network such as a WAN LAN Intranet or Internet By utilizing a standard web browser or client software users can view an Embedded System Capstone Project Surveillance Camera um 13 IP camera s video output from any local or remote location IP cameras combine the capabilities of a camera with some PC functionality do not require a direct connection to a PC to operate and can be placed anywhere within a network Just like any other PC on the network an IP camera is a network appliance It has its own IP address connects directly to a wired or wireless network and requires maintenance Through the network the camera can stream video that can be accessed easily either by using web browsers or apps on technology devices such as laptops smart phones and tablets Embedded System Capstone Project Surveillance Camera Figure 1 Camera applications in real life Embedded System Capstone Project Surveillance Camera 15 1 3 Existing types of camera Figure 2 Analog camera and h
59. n Table 1 Project team Embedded System Capstone Project Surveillance Camera 48 18 2 SYSTEM PROJECT MANAGEMENT PLAN SPMP 2 1 Problem Definition 2 1 1 Name and Main Points of Capstone Project English Surveillance Camera Vietnamese Camera gi m s t The system reguires design a camera comes along with an application monitor in computer and an Android App for camera network configuration The design for camera uses CC3200 Launchpad from Texas Instruments camera module mt9d111 program on hardware 2 12 Problem Abstract It is common knowledge that IP cameras cost more than analog cameras To make people switch IP needs to be either significantly cheaper or offer significant economic benefits that analog cannot offer Also components for building an IP camera is not cheap at all not to mention the fact that the video must be transmitted over the network connection without dropping frames or any errors 2 1 3 Project Overview 2 1 3 1 The current System The most common video camera that are using all around the world is analog it has a majority market share in the past few years Simply defined an analog camera captures information videos and images and sends the video signal in a format that can be viewed on an analog television and or recorded over storage disks DVRs That is where it ends Although it is widely used it also has some drawbacks e Lowresolution e Oldtechnology e Very sensit
60. n Delete selected camera 6 Button Close Setting Form Embedded System Table 18 Setting Form Description Capstone Project Surveillance Camera ei 81 4 7 2 1 Add Camera Form Cameral SC Monitor PlayBack SURVEILLANCE CAMERA SYSTEM Click show camera Show 3camers ad Setting e BR X SETTING CAMERA Camera Name Port Description Stat x k 3 05 elo m aa CH Figure 22 Add Camera Form EN a Py al PM No Item Description 1 Label Name label 2 Label Port label 3 Label Description label 4 TextBox Enter camera name 5 TextBox Enter camera port to connect 6 TextBox Enter description of camera 7 Button Add new camera based on information above 8 Button Cancel adding camera and close form Embedded System Table 19 Add Camera Form Description 4 7 2 2 Edit Camera Form Capstone Project Surveillance Camera EE 82 G icons i e a S SURVEILLANCE CAMERA SYSTEM PlavBack Click show camera Show 3 camera ui Setting E X d SETTING CAMERA Camera Name Pot Description 5 E al Camera s Information qe ASS 2 Port 5 5555 3 Description GComestest3 Stat p Add R 30 e ol amp s s O Figure 37 Edit Camera Form No Item Description 1 Label Nam
61. nded to design and implement SCM Surveillance Camera The window application to monitor and Monitor control the cameras LAN Local Area Network WAN Wide Area Network GUI Graphical user interface I2C is a multi master serial single I2C Inter Integrated Circuit ended computer bus invented by the Philips semiconductor division I O Input Output UART is a piece of computer Universal asynchronous UART hardware that translates data receiver transmitter between parallel and serial forms MCU Microcontroller unit PC Personal Computer Complementary Metal GMOS Oxide Semiconductor CCD Charge Coupled Device CCTV Closed circuit television National Television NISE System Committee PAL Phase Alternating Line SECAM Sequential Color with Memory WPA Wi Fi Protected Access A Wi Fi standart Embedded System Capstone Project Surveillance Camera a 11 TKIP Temporal KEEN Leger Protocol AES Avance o Enerypuon A Wi Fi standart Standard SAA SmartConfig Android Android application for configurating the App network for cameras DVR Digital Video Recorder IoT Internet of Things IFP Image Flow Processor GPIO General Purpose Input Output JTAG Joint Test Action Group SWD Serial Wire Debug ADC Analog to Digital Converter JPEG JoinePaptographie An Image standard Experts Group TCP Transmission Control Protocol HTTP Hyper Text Transfer Protocol HTML Hyper Text Markup Language
62. nteso toten 86 Table 24 Test Case e WE 89 Table 25 Test case for SAA E VAKAAT 92 Table 26 Test Cases For SCM orirun aE a qi usa ciun bor a 95 Table 27 Ie TER er 101 Table 25 System Requi reme suae dereen edd 107 Embedded System Capstone Project Surveillance Camera E 7 List of Figures Figure 1 Camera applications in real dE 14 Figure 2 Analog camera and how it works iere a aan vaaka cac ivta aC eura vaso Da ua kana an 15 Figure 3 Analog camera and how it works eee essere entere a eaa tete tatnen into totns 15 Figure 4 Surveillance Camera betr uacua casis geed a Lira tu RE xu Lcd Six a ER cse RE diam EROS 16 Figure 5 Boundaries of the System eese esee eene tete te a aa intet aa aa a a e annua annan aan 20 Figure 6 Iterative and Incremental development model essere 20 Figure 7 Use case Diagram ENEE 31 Figure 8 Connect cameras to network use case Diagram NEEN 32 Figure 9 Watch Videos Use case Diagram eese naa aa aa naa a eaa tete totns tn tete tnus 34 Figure 10 Control Cameras Use case Diagram esee eene entere aa maa maana 37 Figure 11 Add Camera Use case Diagram suvussa vaatia Ce icu puts eva Eua naa ek kuna md 38 Figure 12 Change Name Use Case Diagram suumussamsomiaaassaamaasemaaa avaamaan maa Lava nama a avaa Ana ma
63. o inappropriate uses Lack of money Problems with shipping Capstone Project Surveillance Camera Develop camera Implement camera Completed 75 man Depend on Components can be broken firmware firmware camera firmware days Preliminary due to wrong settings code code study and Implement an Android planning and Problems with components App for users to Anroid App for Prepare may occur due to the connect cameras to smartconfig hardware producer s errors specific Wi Fi network Develop window Implement an window Window 20 man N A Lack of experience in application application for users to application days designing and developing a view and control software for controlling cameras via network cameras connection Integration and Create test plan test Integrated system 20 man Depend on Lack of experience in system test for the cases and expected days Develop window creating test plan and test behavior in system result Test plan test application and cases cases and test Develop Execute test cases result camera and collect test result Embedded System Table 3 Project Iterations 2 3 2 Capstone Project Surveillance Camera Iteration detail 2 3 2 1 Phase 1 Preliminary study and planning Task Description Author Study about CC3200 Study about CC3200 Launchpad DuyNT AnhVQ Launchpad
64. on Author Ho ng Minh Th ng Date 2015 02 15 Priority Normal Embedded System Capstone Project Surveillance Camera r Actor User Summary This use case allow user to change the current description of an added camera Goal Description of the chosen camera is changed Triggers User click on Edit button on Setting screen which is opened by clicking on Setting button Preconditions Camera s is are added and shown in the list of camera Post Conditions Description ofthe camera is changed Main Success Scenario Step Actor Action System Response User open the application Application is opened Camera s area of application is blank if 1 the application is opened for the first time or there was no camera connection in the last time application was opened User click on Setting button Setting screen is opened 2 Camera list is shown include camera s information such as name port number and description Embedded System Capstone Project Surveillance Camera EE Choose a camera on the list Camera s information form is opened 3 Click Edit button Information of the chosen camera is shown in textboxes Change the description of the 4 camera A message box appear appears with Click Save button content Update successful 5 Click OK button The description of the camera is changed in the list Al
65. on Application is opened Camera s area of application is blank if 1 the application is opened for the first time or there was no camera connection in the last time application was opened User click on Setting button Setting screen is opened 2 Camera list is shown include camera s information such as name port number Embedded System Capstone Project Surveillance Camera and description User click on Add button Adding form appears which ask user for 3 camera s information name port number and description not require User click on OK button Application change back to Setting 4 screen New camera appears on the camera list User close Setting screen Setting screen is closed A camera box appear in camera s area of the application User click on Start button The computer starts receiving video from the added port 6 Video in the video box starts playing The video is automatically saved in the local disk in order to watch again later Alternative Scenario N A Exceptions No Actor Action System Response 1 Port number is left blank A message box appears with message Invalid port number Please check then try again in the top ofthe form 2 The port number is already used A message box appears with message The port is already used for another camera please enter another port 3 The name of the camera
66. ow it works Alarm UO 3 Monitor Camera Figure 3 Analog camera and how it works There are two popular analog standards in the world for television NTSC e g as used in North America and Japan and PAL used in many other countries especially in Europe There is also SECAM but it is not a common standard in CCTV world Disadvantage e Required to convert the video back to analog in order to transmit e Do not have capabilities above the NTSC PAL standards e Only record in the moment activity for future access cannot Embedded System Capstone Project Surveillance Camera ES 16 broadcast live information for monitoring purposes o Low video guality e Relied on human reliability 1 4 Proposed Solution REMOTE MONITORING Ga Wired f iptor Figure 4 IP camera system Ip camera is a proposed solution which provides a higher standard camera system It is undeniable that it brings us many benefits from switching from analog cameras to Ip cameras Firstly the cost for installing an Ip camera system are now more affordable More reliable than the old analog system Easier installing or adding cameras Higher resolution images and videos Encryption amp authentication IP cameras offer secure data transmission through encryption and authentication methods such as WPA WPA2 TKIP and AES Flexibility IP cameras can be moved around anywhere on a network wireless Remote accessibility live video from
67. rmation about test plan test cases test result the environment for testing and test pass fail criteria are provided as well as risks estimations and a checklist for testing this system 5 1 2 Test Approach Goal To test the whole system based on the core workflow Method Black box Testing The purpose of this section is to verify and ensure that SC s function meets its design specification and other reguirements from user The following part will describe which features to be tested 5 1 3 Test plan We have two main test phases Function test Integration test and System test For Integration test we use the functional test This kind of test shows us the working of each function right or wrong We focus on the result of the function in different cases The System test check all the activities of the camera after setup such as how it works and if something happen what it will do We create test cases to check each activity of the cameras from turn on to turn off Then we observe and record the result 5 1 4 Test past fail criteria For system testing the criteria are e 90 of the test cases must pass o 100 of test cases about hardware module must pass o All test cases dealing with critical functionality must pass e All medium and high severity defects must be fixed Embedded System Capstone Project Surveillance Camera o Test coverage must be at least 90 5 1 5 Test environment Test tool o 2 PCs
68. sibility Description CreateFileXml Void Public Create file xml CreateNote Void Public Create information xml SavetoXml Void Public Save information to xml ReadXML List Camera Public List camera 4 4 2 2 2 Camera Attributes Attributes Type Visibility Description Camerald String Public Id camera CameraName String Public Camera name CameraPort String Public Camera port CameraDes String Public Camera description 4 4 2 2 3 CameraPortReader Attributes Attributes Type Visibility Description path string private Address folder camera pathDate String private pathDate pathCamera String private pathCamera pathTime String private pathTime Frame Frame Private Class Frame ipAddress IPaddress Private ipAddress Embedded System Capstone Project Surveillance Camera Port Int Private Port number statusCamera Boolean Public Status camera Config Config Private Class config listCamera List lt Camera gt Private List Camera Methods Methods Type Visibility Description ReadImage Void Public Read image CloseSocket Void Public Close Socket ChangeStatussCamera Boolean Public Change status camera CreateFolderDay void Public Create folder day CreateFolderCamera void Public Create folder camera CreateFolderTime void Public Create folder time SavetoFolder Void Public Save image to folder 4 4 2 2 4 Frame Attributes
69. ternative Scenario Step Actor Action System Response 3a Clickon Edit button A message box appear appears with content Choose a camera on the list 4a Click Cancel or X button at the top right corner of the Setting screen The form is closed no change is made Exceptions N A Relationship Control cameras Business Rules N A Table 14 Change Description Use Case Description Embedded System Capstone Project Surveillance Camera Delete Camera Surveillance Camera Monitor Control cameras Delete camera Figure 65 Delete Camera Use Case Diagram USE CASE UC007 Delete Camera Use case No UC007 Use case Version 1 0 Use case Name Delete Camera Author Ho ng Minh Th ng Date 2015 02 15 Priority Normal Embedded System Capstone Project Surveillance Camera CE 51 Actor User Summary This use case allow user to delete a camera from the list Goal The chosen camera is removed from the list Triggers User click on Delete button on Setting screen which is opened by clicking on Setting button Preconditions The application is opened Post Conditions The recorded videos are successful started to play Main Success Scenario Step Actor Action System Response User open the application Application is opened Camera s area of application is blank if 1 the application
70. ting Click show camera Cameral Camera2 Camera3 Start Start Start Figure 52 Before start watching After clicking on Start button the computer starts receiving video signal from added port number of the camera and the video starts playing in the camera box O scMonitor e UO boo em Aa JA om SURVEILLANCE CAMERA SYSTEM ae L Camera Camera2 Camera3 Start Start Camera4 Figure 53 Start watching User can click on Stop button to stop watching video from a specific camera Embedded System 111 Capstone Project Surveillance Camera sooo E i fe i aS EEE EE CAMERA SYSTEM age Latins Click show camera Show 4 camera Cameral Camera2 Camera3 Camera4 Figure 54 Stop watching 6 3 2 Control cameras User can control their cameras by entering setting screen using Setting button The list of camera is shown in setting screen which include all information of cameras name port number and description In this screen user can add new camera edit and delete an existing camera ico Ae ms o e 8080 E E SURVEILLANCE CAMERA SYSTEM Pierius Click show camera Show 4 camera v Camera SETTING CAMERA Port Description 8080 Camera test 1 8081 Camera test 2 5555 Camera test 3 1232 adw Dag Camera4 Figure 55 Setting screen Embedded System 112 Capstone Proj
71. u vaa naa 41 Figure 13 Change Port Use Case Depart usse teatri cioe voor by tv acp ca Rd Dude 44 Figure 14 Change Description Use Case Diagram sees ana ana tnter ntn n anana 47 Figure 15 Delete Camera Use Case Diagram esse eseeeeenen ente tentent tesoro toto e aaenan 50 Figure 16 View Recorded Use Case Diagram eee nananana eere terere tnt ae a enaa nannaa 53 Figure 17 System Architecture DeSIBTI s 2 toi trdina oco epa cS Ersset e potuerat Ee 57 Figure 18 Component KEE gu ME 58 Figure 19 CC3200 Launchpad Cette 59 Figure 20 CC3200 Launchpad Schematic asssassamssssasvaaaa aa sana aa na va nOKaaKnka K KAKA KKKA ANNK AKT NM A HAN VA annaa 60 Figure 21 CC3200 Overview of Peripherals eenegen aici 62 Figure 22 MT9D111 Camera Module cuseuoueeseuesmunusnsuuunuaun aa uuaun naamaa annua ua naan annan aamu ana e nannaa maana 62 Eigute23 MT9D1T1 ME 63 Figure 24 MT9D111 SCH Le 64 Figure 25 Mapping Launchpad to MtBOTT1 iusti dest 64 Figur 26 SC Server Class DIGBEGBITI s ierer 66 Figure 27 Surveillance Camera Class Diagram eee taamaan sente nennen ana aamen ae 69 Fig re 28 Main Floweh ft inisinia EE 74 Figure 29 Init Camera been 75 Figure 30 Send Package TE dE 76 Figure 31 SmartConfig Flowchart uiae recede erratic sucum trece tte e he etant tec cu 77 Figure 32 View Camera Sequence Diagram
72. ule MT9D111 e Mainboard Ti CC3200 Launchpad e Wireless Communication Integrated Wifi module e Addition hardware Program Debug Devices Software Operating System Windows 7 Professional Flash tool CCS Uniflash Terminal Emulator TeraTerm 4 84 IDE Code Composer Studio 6 0 1 2 2 3 2 Android application development IDE Eclipse with Android Developer Tool add on Technologies JAVA 2 2 3 3 Windows application development Wireless Communication Network connection Technologies NET Framework 4 0 IDE Microsoft Visual Studio 2013 Community Embedded System Capstone Project Surveillance Camera 24 2 2 3 4 Communication F2 By Facebook Gmail Skype and in class with Supervisor Embedded System 2 3 Project Management Plan Capstone Project Surveillance Camera 2 3 1 Iteration Phase Description Deliverables Resource Dependencies Risks needed and Constraints Iteration Preliminary study Study how to program Notes about 40 man N A Lack of information about and planning on CC3200 Launchpad CC3200 Launchpad days hardware Study how to work Project s plan with camera module MT9D111 Identify and research algorithm and devices Make project s plan Prepare hardware Find materials and Component 15 man N A The supplier not supply the components supplier devices days material on time Materials can be broken due t
73. ure 5 Boundaries of the System 2 2 Overview 2 24 1 System Process Model Project is developed under Iterative and Incremental development model Requirements N Analysis amp Design N N T Figure 6 Iterative and Incremental development model Planning Initial X Planning Deployment esting Embedded System Capstone Project Surveillance Camera E 21 Iterative and incremental software development is a method of software development that is modeled around a gradual increase in feature additions and a cyclical release and upgrade pattern Iterative and incremental software development begins with planning and continues through iterative development cycles involving continuous user feedback and the incremental addition of features concluding with the deployment of completed software at the end of each cycle Advantages when applying this model in our project e Some working functionality can be developed quickly and early in the life cycle e Results are obtained early and periodically e Parallel development can be planned e Progress can be measured e Lesscostly to change the scope requirements e Testing and debugging during smaller iteration is easy e Risks are identified and resolved during iteration and each iteration is an easily managed milestone e Easier to manage risk High risk part is done first e With every increment operational product is delivered e Issues
74. ususat etenee aan a n n naa e am eaa a nene neean 10 der EREECHEN 12 1 1 Project E gn 12 MM dies nie s 12 13 Existing types Ol CaMera E 15 1 4 E e ee ER te E 16 1 5 Feature FUNCIONS t 17 1 6 Gre Ee AT 17 2 SYSTEM PROJECT MANAGEMENT PLAN SPIMIP 1u muossutamsan a avaan amen nune tentes tnra npn n Ke 18 PEE eee EPI rds UU nm 18 2 1 1 Name and Main Points of Capstone Project EEN 18 2127 Problem ADStraCt T 18 2 1 3 Project OVervi m E AEN 18 2 2 COVER VIC 20 121 System Process Model ciae sedet eet 20 2 2 2 Roles and Responsibilities piso cea disput cepi S uc cta ua ca vica cpu m Ga 22 223 Tooisand Teens 23 Jj Project Management PIG cecidere acida Dei m ota a sk suat aa Amma 25 Embedded System Capstone Project Surveillance Camera NC a ME 25 232 BON ANN E 27 2 3 3 Task Sheet Assignments and Timetable serere 29 Zo E ug eng 29 3 SYSTEM REQUIREMENTS SPECIFICATIONS Eegeregie 30 3 1 User Requirement Specification geneet 30 3 2 System Requirement Specification eese eese eeeten entere a eaa tete tatnen intuens 30 3 2 1 External Interface Requirements 2 tease acides cet v n i a tarta latus 30 3 2 2 Functional Re quirermenibsauesiesce ce dre eerste EEN 31 3 2 3 Non functional Reg lremielits un tede ek ade leer 56 4 SOFTWARE DESIGN DESCRI

Download Pdf Manuals

image

Related Search

Related Contents

usv enthalten  〇ジュニアシートは、 車両シートベルトでお子さまを抱東し固定    AMG: EVOS User Manual - Thermo Fisher Scientific  COMMISSION CENTRALE DES MARCHÉS  EN-US - Getinge Infection Control  

Copyright © All rights reserved.
Failed to retrieve file