This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
In this project the concept behind a mobile application for CCTV streaming will be examined thoroughly. In the beginning, a thorough research of the history of the evolution of mobile phones and CCTV systems will be presented making important clarifications about the origins of these two inventions, their improvements throughout the ages and their importance to today's societies. Notable breakthroughs will be presented in details. As the report will continue, the techniques used in order to design the application will be explained and also the methodology path followed will also be presented in detail. Last but not least, difficulties that were faced during the development of the application will be presented and also the knowledge gain from the project will be conferred.
Table of Contents
What I chose to do as Dissertation for my Master's Degree is to create a cell phone application that will be used in order to stream a live video feed from a Closed-Circuit Television System (CCTV). I chose this specific project because as a Software Engineering student, I always try to learn new things and broaden my horizons when it comes to applying my skills and knowledge into various applications. For my dissertation I wanted to do something I had never done before and a cell phone application was definitely the way to go. Cell phones are continuously becoming a bigger part of our everyday lives and unlike 20 years ago, today they are not used only to make calls to one another but they are used for a variety of applications that are increasing everyday. This growth of applications is heavily based on the fact that the needs of the users always change as days go by. In the beginning, cell phones where used with a basic feature which was to make calls. Then, the SMS feature was introduced and allowed users to send text messages to each other. Next, as the camera hardware feature was created, people needed a way to end their pictures to each other and as a result the MMS feature was brought to public. These applications count only as a small percentage to what can be done by the use of cell phones which have essentially become a hub for all our communication and entertainment needs. Furthermore, with the implementation of network connectivity, cell phones became a vital part of the Internet as people use them very frequently in order to access its various aspects such as checking their e-mails or connecting to their accounts to the various social websites. The most effective characteristic of cell phones, is that that whatever a user chooses to do, it can be done 'on the go' and as people don't have to use Personal Computers in order to achieve whatever they want to do, they tend to (in some occasions) replace them with the use of cell phones. All the aspects and principles behind the project will be thoroughly examined in the following chapters.
The project involves the development of a cell phone application that will be able to stream the live feed of a CCTV system. The specification list of the project is the following:
A Windows Phone application should be developed in C# language in order to stream the video feed.
A server based application should be created in order to broadcast the CCTV feed to the Internet.
The application should have the ability to connect to the Internet in order to connect to the broadcasting server.
It should also have a friendly Graphical User Interface (GUI) for ease of use.
Details of Relevant Theories
The project involves two major characteristics. The first one is how to broadcast the feed from the CCTV system and the other is the application itself. This chapter is dedicated to the explanation of both in depth.
History of Closed-Circuit Television Systems
Throughout the ages, humans have valued their life and the lives of their loved ones. Next in value has always been their property. Throughout history in order to protect property against criminals many techniques have been developed. In the beginning, whoever wanted to protect their property, they had to hire "watchmen" that were guarding the property and were able to prevent crime. But the high cost of this solution made the development of a more robust and cost-effective way of surveillance, imperative. Thus the introduction of CCTV systems to public was the perfect means of property protection.
Since the invention of the video camera and the television in the early to mid-20th century, CCTV systems have been used for various applications. The first Closed-Circuit Television system was developed by Siemens AG in Germany in the early 1940s and was used for the surveillance of V-2 rockets during launch [Dornberger, 1954]. CCTV systems are still used for the closer examination of rocket malfunctions although the most common usage of CCTV systems, nowadays, is the prevention of crime. The most important factor behind the bloom in the use of CCTV has been the worldwide increase in theft and crime in general.
After the terrorist attack on September 11, 2001, a new evaluation of asset security was introduced. In order to protect against crime and terrorism, every state-of-the-art security installation should include a video feed as it provides the "remote eyes" for the close inspection of certain assets and personnel. During the 1990s, the video technology evolved from the analog to the digital era and as a result it became compatible with computers. In the late 1990s, digital cameras were made available to the public and combined with the advances in the field of computers (faster microprocessors, larger hard disks and random access memory), people were able to install systems in their houses or businesses that were able to record and playback digital CCTV cameras. When to these two advances, the Internet was added; the whole acceptance of CCTV systems bloomed rapidly. The Internet brought new characteristics to the table such as near real-time video transmission to computers that were able to view that transmission from virtually everywhere.
The application of CCTV systems is a cost effective way to reduce theft and threatening situations in general. Video feed is a very effective means of deterring crimes and protecting properties and personnel and can be used as evidence for the prosecution and conviction of offenders. Theft is not only the unauthorised removal of valuable property but also the removal of information such as computer software and optical disks. Video provides the best potential against crime when combined with other sensing systems such as motion detection sensors and smoke detection sensors. It offers multiple functions in the overall security plan as it adds the function of property protection by monitoring the activity in the location of the assets.
As the development of the Internet continued, the number of homes connected to it increased rapidly. That meant that a new way of surveillance system that was cheap (compared to the professional and business solutions) and accessible to the masses had to be created. In mid 1990s such a system was created and it's the common Internet Protocol (IP) cameras. These digital cameras can be used in order to send and receive data directly via a computer. Most of these cameras are common webcams that can be connected to a network of computers (by cable or wirelessly) and then to the Internet and its feed can be accessed through it. The resolution of these cameras can vary between VGA resolution (640x480) and up to several megapixels. IP cameras offer great flexibility as they can be placed anywhere inside the IP network especially when wireless and also offer a secure data transmission through encryption and authentication protocols such as AES, WEP, WPA and WPA2. But the biggest advantage is that they can be accessed by a mobile phone through the usage of the Internet and specifically designed applications.
The History of Cell Phones
The car phone era
Shortly after the World War II had ended, the prosperity that was present throughout the world brought a lot of technological advances - that were made during the war - to the public sector. One of these technological advances was the car phone which was essentially a hybrid of the radio and the telephone. They weren't cellular phones because each unit was a city-wide transmitter but they weren't radio dispatch systems as they were connecting the user to the telephone network. As they were way too big to be carried by a person, they were installed to cars and as their price was very high, only the privileged could afford one. Despite these disadvantages though, the popularity of car phones was so great that advances in the service quality and also in capacity eventually led to the development of cell phones.
The first mobile phone service was created in 1946 by AT&T in the United States and particularly in the city of St. Louis. The typical price for such an equipment was at around 2,000$ which - when converted to today's rates - is the same price of a typical new car. Back in these days, the equipment and techniques used in car phones, was primitive especially when compared to the new technologies that cell phones use. Some of the disadvantages of car phones were the lack of a direct-dial feature which meant that the user had to give the phone number to the operator who would then make the call. If there were no available channels, then the user had to wait until one was free. The quality of the calls was very poor and as a result a lot of calls were being dropped. Finally, the unit was push-to-talk and that meant that the call made was the same experience as a walkie-talkie call.
Despite all the disadvantages of the car phone, a large customer base was created for the mobile phone. Improvements were made in 1955 to the call quality and also the growth of channels in each city meant less time was needed for the users to make their calls. The customer base increased and it's important to note that the number of mobile phones in the United States in 1964 was 1.5 million.
The Cell Phone Era
The cellular phone was brought to public in the 1980s a short-range FM receiver and transmitter. This technology took many forms by the use of standards which are the information that each manufacturer and service provider should follow in order to create a working unit and to operate a system. The cell phone system is heavily base on the principle of decreasing the transmit power to allow frequency reuse in a specific area. That meant that more users could connect to a station simultaneously. The other important idea is that cell phones can switch between towers in order to acquire the strongest signal and as a result provide the best possible quality. These concepts were created by Bell Labs in 1947 and for the next three decades, Bell Labs performed most of the research that would lead to today's cell phones [Ring, 1979]. Even as the cell phone was made available to the market, the concept of the cell phone in its current form would have been impossible to create without the invention of other technologies such as the Integrated Circuit and the Liquid-Crystal Display.
The Cellular Network
The area over which reliable and clear radio communications can occur between radio towers and mobile units is called a cell. In diagrams, cells are represented by hexagons although in real life they are irregular in shape as the terrain they cover can vary drastically. A typical cellular network can be viewed in Figure X. The towers are in the center of each cell when the central tower's antenna is omnidirectional. In the case of directional antennas which broadcast in a single direction, towers are placed at the corners of each cell. A single tower is able to serve three cells with three different directional antennas. Interference between neighbouring cells is very common as a result of frequency reuse restrictions.
Figure : A typical cellular network.
Each cell operates in an autonomous fashion but still within the overall system. The central tower and its controlling equipment have the function to operate within its cell with all mobile units within it. The central tower also has some amount of control over the mobile units as communication is needed. In some cases, the control tower can change the transmit power of mobile units according to signal quality. In hierarchy, above the central tower is the system controller and it essentially controls the whole network and it also connects each cell in the cellular network to the wired telephone lines. The connection between the central towers and the system controllers can be conducted through wires or fixed wireless links. The system controllers also assign a frequency to a mobile unit when it enters a new cell.
While the cellular concept advantages are many, there are also some disadvantages. In contrast to the concept systems that were using powerful transmitters in order to overcome losses or weaknesses in the radio links, the commercial systems would have to operate with lower transmit power to avoid interference between cells. That meant that fades in signal strength were present in some occasions. Fading is a problem that occurs in all mobile radio signals. If the received power is dropped in a very low value, the signal can be completely lost. Fades are distinguished into two categories: slow fades and fast fades.
Slow fades basically occur when different obstacles such as tunnels interrupt the signal and don't allow it to reach a mobile unit. Fast fades are essentially interference that is causing the signal strength to fluctuate. It mostly appear indoors and is the effect that when being inside a house and while using a cell phone, the signal strength can change rapidly even by the movement of few meters. This is caused because the signals inside a structure are reflections of some sort.
The Smartphone Era
Figure : The IBM Simon. In early 1990s the Internet started to be used in commercial applications such as emails and that particular feature was very important for businessmen around the world. The ability to check emails on-the-go from a cell phone would enable businessmen to decrease the time that would take them in order to respond. This increasing need made the companies to focus on the production of a cell phone that would have such capabilities. In 1993, IBM produced the first cell phone with these features. It was named "Simon" and it was the first basic smartphone. The user had the ability to read emails and send faxes which was an important breakthrough in the process of reaching the standards of nowadays. C:\Users\Alex\Desktop\IMG_0853.jpeg
The term smartphone and the concept behind it was conceptualised by Theodore Paraskevakos which is a Greek inventor. In 1973, he patented the concepts of combining data processing and visual display screens with telephones and outlining basic functions of today's smartphones such as paying bills and banking. Although, the term "smartphone" was not used until 1997 when Ericsson the concept GS88 as a "Smart Phone".
The main advantage of the smartphones was the fact that they had an Operating System (OS) that was able to work better with third-party applications. That meant that manufacturers were able to integrate more features to their phones. The main operating systems that have been used by manufacturers are the Android OS, iOS, Blackberry OS, Palm OS, Symbian OS and Windows Mobile OS and its replacement being the Windows Phone OS. A brief explanation of these operating systems is following:
Symbian OS: It was created by Symbian Ltd. that was established in 1998 as a partnership between Motorola, Nokia, Ericsson and Psion. It became a major success when used in the Nokia S60 platform in 2002 and since then it became the most popular OS until 2010 when it was overtaken by the Android OS. It is still on the market and is used in cheaper solutions.
Figure : Symbian OS running in a Nokia C6 Handset.
Palm OS: It was developed by Palm Inc. who was originally designed for Personal Digital Assistants (PDA) in 1996. The main advantage of the Palm OS was that it was designed for usage of touchscreen-based Graphical User Interfaces (GUI). Its development stopped in 2007 as it was considered by many as out-of-date.
Figure : Google Android OS running on a LG Nexus Handset. Android OS: It is a conception of Android Inc. and it was founded in 2003. In 2005, Android Inc. was bought by Google Inc. and that caused a drastic growth in the development of the operating system. It is essentially a Linux-based operating system for mobile devices. That particular aspect promoted the development of third-party applications as it is open-source. That means that anybody with programming skills can create an application. That meant that the number of applications available started growing rapidly and an application market had to be created in order to control the vast number of applications. That led to the creation of the Android Market in 2008 which then transformed to Google Play. In 2010, it surpassed the Symbian OS as the most popular smartphone operating system its community still grows fast. C:\Users\Alex\Desktop\about-feature-widgets.png
Blackberry OS: In 1999, the first Blackberry phone was produced by Research in Motion Ltd. (RIM). It was using the Blackberry OS and it was the first operating system to enable real-time push-email communications on wireless devices. The new phone was very appealing to businessmen as it featured a full QWERTY keyboard which made the compilation of emails very fast and easy. Updated versions of the Blackberry OS are still used in current phones.
iOS: When Apple Inc. released the original iPhone in 2007, it revolutionised the way smartphones were built as it was designed with the idea of having a big touch screen that was taking up the whole front side of the phone. It also offered a capacitive screen which supported multi-touch control and basically negated the usage of a stylus and keyboards which were the main tool used in order to operate the touch screen in previous smartphones. The first generation of the iOS offered no support for native applications and that's why some did not regard it as a smartphone. Late the same year though, Apple announced that they would offer support for third-party native applications. In 2008, the App Store was introduced which was a way to distribute applications easily to all customers. These applications can be free or paid. The new OS offered an improved number of new built-in applications that were promoting the ease of use of the phone such as the automated voice command application Siri. s
Windows Mobile Operating Systems: This family of operating systems are being developed by Microsoft Co. and was first introduced in 1996 with the release of the Windows CE platform. The main advantage of the new platform was that it could run in systems with minimal memory as it could run with less than one megabyte of memory. The advantages of the new platform were numerous and that was the main reason for the development of a number of operating systems such as Windows Mobile and its successor Windows Phone. The Windows Mobile OS was first introduced in 2000 and it brought fresh ideas to the table as it offered many applications that would cover a broad spectrum of needs. For example a mobile version of the famous Microsoft Office Suite was implemented and also mobile counterparts of Windows Media Player and Internet Explorer were added. It offered features such as multitasking and file system similar to the desktop versions of the Windows OS. As its sales dropped rapidly, in 2010 Microsoft unveiled the next-generation mobile operating system named Windows Phone 7. It featured the new "Metro Design Language" user interface. It implemented all the services currently produced by the company such as Microsoft SkyDrive, Microsoft Office and Bing Search. The new OS breathed new life into the family of the Windows smartphone operating systems family. It supported the development of third-party applications and alongside the release of Windows Phone 7; the Windows Phone Marketplace was also launched. After a number of updates, in late 2012 it was replaced by Windows Phone 8 that was using the Windows NT platform - instead of Windows CE - that made it compatible with Windows 8. As a result, applications can be easily ported between the two operating systems.
Figure : A comparison between Apple iOS (left) and Windows Phone OS (right).
Development of Smartphone Applications
The term mobile application (or shortly mobile app) is used in order to describe a piece of software that is designed to run on mobile platforms. These platforms are mainly smartphones and tablet computers followed by other mobile devices such as mobile music players. When first introduced, mobile applications were focused on the tasks of general productivity such as compiling emails and checking the stock market and weather. But it was soon before long that costumers demanded applications that were offering a great variety of genres. Software developers, with the usage of developer tools that were released by the operating system companies, were able to create a vast number of applications that varied from a simple game to complex GPS software. This sudden explosion in the number of applications forced the companies to create platforms that would be used to distribute the applications to each costumer with ease-of-use that required just a simple download of the application. These distributing platforms became very popular and each operating system developer had one. The main distribution platforms are the Google Play for the Android OS, App Store for the Apple iOS devices, Blackberry App World for the Blackberry devices and Windows Phone Store for devices based on the Windows Phone OS. The term "app" rapidly became extremely popular and as result in 2010 it was voted the most popular word [American Dialect Society, 2010]. Applications can be free of charge when others in have to be purchased from the users with a value that can be between mere pennies and up to several hundred pounds depending on their nature. In general the mobile application industry creates revenue of billions every year which is still increasing.
Summary of Background
With the explanation of mobile applications, a conclusion of the background is drawn and in the next chapter the techniques used in order to develop these applications and as an extent, the design of the application behind this project.
Analysis of Techniques and Methodology
Introduction to Analysis
In this chapter the techniques that were utilised in the project will be introduced and explained. The project is revolved around the concept of using IP cameras such as a webcam in order to be used as a CCTV sytem for a small space such as a room of a house. During the process of designing the project the first idea was to use the Windows Mobile OS platform but as the project progressed it was decided that a switch to the Windows Phone OS platform and particularly the Windows Phone 7 OS would be more ideal. This decision was made as the project should be something new that was relevant to the hardware and software of that is currently available on the market. As the final decision was made - regarding the platform - intensive research was launched and the conclusion, of what type of tools and programming language should be used, was made. In this chapter, everything regarding the techniques and the process of designing the application will be covered.
Techniques and Developing Tools
In this part, development tools that were used will be described. An explanation of the programming language used will be conveyed. The developing tools used in this project are the following:
Microsoft Visual Studio 2010 Express for Windows Phone: This developing tool is developed by Microsoft Co. and is essentially the main program that is used for the writing part of the code of the application. This particular version comes with embedded libraries so one can develop Windows Phone 7 OS application out of the box without having to install additional libraries manually. It also includes a Windows Phone emulator that is used in order to run the code and check how the application works in real-time. Last but not least, this version includes the assembling references that convert the code to a type that can be used by the Windows Phone OS and also provide the basic aspects of a Windows Phone handset.
Microsoft Visual Studio 2012 Ultimate: This is essentially an updated version of Visual Studio 2010 described above. The only difference is that this version is focused on the Windows Phone 8 OS and it wasn't an integral part of the development as only a small amount of coding was done with it. It was mainly used for practising purposes before starting the project.
Microsoft Expression Blend for Visual Studio 2010: This software comes with Visual Studio 2010 and it is a designing software that is used by developers in order to create a slick and easy-to-use Graphical User Interface (GUI). It was the main software that was used for the design of the Graphical User Interface of the application, although the code running at the background of the GUI had to be written manually. These pieces of code are used in order to connect a button to a certain function conducted by the application such as Play, Pause and Stop.
Microsoft Silverlight 5 SDK: This is a Software Development Kit which was used within Windows Visual Studio 2010 and is a very important part of the application as it provides the libraries which make the streaming part of the application possible.
Microsoft Expression Encoder 4: This is a very useful tool that gives the ability to easily broadcast the video captured from a source (in this case a webcam) with audio synced to the video and it is used as a prime broadcasting solution
The programming language that was chosen for the development of the application is the C# language and it was the perfect choice as it is Object-Oriented and that helps when developing complicated, interactive applications.
Development of Application
During the development of the application two different applications were created with the second being an evolution of the first. They were named Mark 1 & 2 for apparent reasons. Mark 1 will be explained first and then Mark 2 will follow.
There are three main components that consist the Mark 1 version which are the following:
Client Application: It is an application which is ran on the computer and it basically captures the image from the webcam and will then generate the main data that will be transmitted to the mobile application. In this application, Windows Presentation Foundation (WPF) is utilised which includes DirectX libraries and is the evolution of the stand-alone DirectX libraries used in older applications developed with older versions of Visual Basic.
Windows Communication Foundation (WCF) Service: It is also executed on the computer and provides the link between the webcam and the mobile application. It actually transmits the data from the webcam application to the mobile application through a user-defined network port.
Windows Phone 7 Application: It is the actual application which is executed on the handset and displays the data received from the webcam through the WCF service. It follow the same architecture as the webcam application but it only receives data from it which is then displayed on the screen.
Mark 1 Issues and Problems
This version was a very simple approach to the task of streaming and although it was performing adequately, there were some issues which dictated that a new approach had to be created. The main problem of Mark 1 is that in order to execute it, you have to run three different Visual Studio projects simultaneously making the usage a complicated to some extent. Another problem is that there was no Graphical User Interface on the phone and that meant that the mobile application had no buttons or menus. Furthermore, the way the whole system worked was a tad out-dated as the webcam applications was sending single bits of data through the WCF service and that meant that there was no actual video file but a stream of frames that were displayed in a moving-picture sense. That meant a new model was needed and the designing of Mark 2 started.
The new version was a more slick approach to the problem and it was also more modern. It uses the Silverlight SDK that is a new platform. The mobile application is also created with the Model View ViewModel (MVVM) - which is used in Windows Phone OS - in mind and that meant that buttons and menus are implemented. The MVVM is an architectural pattern that is created by Microsoft Co. and is used by Silverlight and also WPF. It allows the programmer to distinguish the main core of the application from the GUI and that means that the whole design is much more robust. As an extent, the ViewModel is created in order to integrate the streaming capabilities to the application and then a View (GUI) is created separately in order to achieve a fully functional application. Numerous testing through trial and error had to be done as this architecture is relatively new.
The Mark 2 mobile application is a Silverlight application and that means there are a lot of new features offered such as the ability to play Windows Media files including Windows Media Video ones. As a result, the application is able to play video streams with quality that varies from basic VGA (640x480) resolution and up to Full High-Definition 1080p; although these capabilities can be limited from hardware specification and the bandwidth of the Internet connection used. For example by using a higher resolution, the delay of the feed can increase dramatically as the file transfer takes more time to be completed but also the time needed to encode and decode the file takes significantly more time and use a lot more resources. Another feature of Mark 2 is that it doesn't utilise the stream of individual video frames as Mark 1 did but instead it compiles the frames in a WMV file and then transfers it to the mobile application. As a result the whole process is smoother and there are no frames that are getting lost during the transferring process. Additionally, as there is a video file and not a frame of pictures, Mark 2 can play audio alongside the video stream.
Mark 2 Issues and Problems
As the Mark 2 version brings an important improvement in the whole process of streaming, there are some disadvantages. The first disadvantage is that there is more lag when compared to Mark 1 but it is considered natural as the size of the data is much greater. Another problem is that it needs a good level of resources - Internet speed and good hardware - in order to run smoothly.
Conclusion and Thoughts
Throughout the whole process of creating my Dissertation, I was challenged to the highest level possible and I had to always be really careful when conducting any research as anything that wasn't evaluated properly might have caused problems to the smoothness of the process. I had to test my skills and knowledge in a totally new field of Software Engineering as I never had the chance conduct any work on mobile platforms and their applications as an extent. Additionally, it was a journey into self-discovery as I even had to question my reasoning and judgement. To conclude, this Dissertation was an excellent opportunity to further broaden my knowledge and also improve my analytical skills and the progress made was significant.
This dissertation would have never been completed without the guidance and understanding of my supervisor Dr. Yonghong Peng and also the head of my department Mr. Mick Ridley. I would also like to deeply thank my parents Thanasis and Katerina alongside my sister Eleni for their never-ending support and understanding. Furthermore I would like to thank my girlfriend Marisa for her love that she tenders me with and as well as her support that was defining in many occasions. Last but not least, I would like to thank my friends Stavroula and Nikos who had to put up with me and my cranky mood during the course of this dissertation.
[Dornberger, 1954] Dornberger Walter: V-2, The Viking Press, 1955, ASIN: B000P6L1ES, page 14.
[Ring, 1974] Douglas H. Ring: Advanced Mobile Phone Service: The cellular concept, Bell System Technical Journal (January 1979), pp. 15-41
[American Dialect Society, 2010] American Dialect Society's Word of the Year (accessed on 24/02/2013): http://www.americandialect.org/app-voted-2010-word-of-the-year-by-the-american-dialect-society-updated