Vous êtes sur la page 1sur 6

SECRET VIDEO

RECORDER II. SYSTEM DESIGN


As shown in Figure 1, the overall system consists of
the intelligent System and the Android client. The
Abstract—In view of the shortcoming that the traditional video
intelligent System mainly makes up of the camera
monitoring device is inconvenient to move, in this paper, we take
module, the WiFi module, the PHONE Processor, the
the tracked intelligent System as the research object and
design a mobile video monitoring system based on Android. The
L298N Rotation drive module, and so on. The camera
system collects the video information of the environment around module is used to collect the environment information
the intelligent System through the camera and then transmits the around the intelligent System. The WiFi module is used
video information to the Android client. The Android client to forward the control instruction sent by the Android
obtains the video information through the Hyper Text Transport client to the PHONE Processor and transmit the video
Protocol (HTTP) and Uniform Resource Locator (URL) from the information collected by the camera module to the Android
WiFi module. Then, the Android client analyses and displays the client. The PHONE Processor bases on the ARM Cortex-
video in the SurfaceView. During the moving process of M3 core, is of good performance and low power
intelligent System, users can control its basic movement consumption[2]. The Rotation drive module is used to drive
according to the surrounding environment. Thus a mobile video the Rotation and control the movement of intelligent
monitoring system is implemented. Experimental results System. The Android client is used to issue the control
demonstrate that the system operates normally, and its instruction of intelligent System and display the video.
performance meets our design requirement. The hardware platform of this system is presented in Figure
2.
Keywords—Intelligent System; Mobile; Video Monitoring;
Android
Camera
Camera Angle
I. INTRODUCTION
Video Rotation
Angle
With the rapid development of the science and Control Information
Command
technology, the Android mobile phone is no longer a Android WiFi
STM32
single communication device. More and more people Client Module
expect to use the mobile phone to help manage their Video
Movement
Information
daily affairs. In the modern society, video monitoring Instruction Of
Intelligent Device
equipment is becoming more and more popular, making
people's life more convenient and safe[1]. However, the Drive

traditional video monitoring device is limited by the


shooting range of camera. It can only monitor a particular
Intelligent Device
place and is inconvenient to move. In the light of the
problems above, we make use of the intelligent System to Fig. 1. The block diagram of system
design a mobile video monitoring system based on
Android. In addition, we develop an Android application in III. VIDEO MONITORING
the eclipse software platform in accordance with the
specific function of this system. The video information of The part of video monitoring mainly consists of video
the environment around the intelligent System collected by collection module, video transmission module, video receiving
the camera is transmitted to the Android client in real time. module, video analysis and display module, video snapshot
Users can adjust the direction and path of intelligent module and Multi-angle video monitoring module.
System in real time on the basis of the surroundings. The
system overcomes the disadvantages of traditional video A. Video Collection Module
monitoring equipment and improves the flexibility and This module makes use of an USB camera with pan-tilt.
portability of control. The system can be used to monitor Its standard resolution is 640*480P and its pixel is 300,000.
some unknown and dangerous environment instead of The USB camera connects with the WiFi module through the
human. It can also be combined with the smart home and USB. The pan-tilt of the camera is composed of two steering
Internet of things, making people's life more comfortable, engines, which are used to control the rotation angle of camera
convenient and intelligent, is of wide application prospects. in the horizontal and vertical directions. The video resource
contains large amounts of data and transmit video resource
under a limited network bandwidth may lead to the block and
delay of network. It is difficult to meet the requirement of
real-time. Therefore, it’s necessary to compress the size of
image and ensure its quality as much as possible. In this
system, we compress the RGB image collected by the camera
into the YCrCB image and deliver the video stream whose
form is MJPEG to the WiFi module.

B. Video Transmission Module


This module uses the WiFi module whose master chip is
MTK7620N. This WiFi module supports the 802.11b/g/n
wireless standard and TCP/IP network protocol stack. The
maximum connection rate of it can reach 300Mbps. Before
using the WiFi module, brush the Openwrt operating system The Android client makes use of the decodeStream
for it. OpenWrt is a highly modular and automated embedded function of the BitmapFactory class to analyse and create the
system. It’s widely used in the industrial control, smart home, Bitmap object from the InputStream returned from the server.
wireless router, intelligent robot and other places. Users can Then, scale the Bitmap object to a new Bitmap object with the
develop various functions through its powerful network same width and height as the Surfaceview. The concrete
components[3]. In this system, according to the specific process of displaying the new Bitmap object is as follows.
functional requirements, install the USB camera driver and
Firstly, inherit the SurfaceView class and implement the
MJPEG-stream video streaming server software in the
Callback interface of it. Secondly, get the SurfaceHolder
OpenWrt system. The camera driver is used to turn on the
object by calling the getHolder function. Then, acquire the
camera and initialize the related parameters, so that the camera
Canvas object and lock it to ensure that the Canvas won’t be
can collect video information normally. The input component
changed in the process of drawing. Finally, use the Paint to
of MJPEG-stream is used to call the camera driver and get the
draw the Bitmap object on the Canvas. After each Bitmap
video stream whose form is MJPEG. The output component of
object draw completely, unlock the Canvas and submit the
MJPEG-stream is used to deliver the video stream to the
change of the Canvas’s content to the system, then the Bitmap
Android client through the HTTP and URL[4]. The multi-
object will be displayed in the SurfaceView.
thread programming is used to respond to multiple clients’
requests at the same time. The Android client obtains the Bitmap object recurrently
through a while loop. Consequently, we can get a continuous
C. Video Receiving Module and dynamic video. To make the Android client has a better
This module is mainly implemented through the HTTP and experience for users, we calculate the number of the Bitmap
URL. objects received by the Android client per second and show it
in the form of TextView.
HTTP is a hypertext transfer protocol, one of the most
widely used Internet protocols[5]. It’s a standard for the
client’s requests and server’s responses. HTTP is an E. Video Snapshot Module
application layer protocol and it uses the connection-oriented When the Android client is in the state of video monitoring,
TCP as the transport layer protocol. TCP provides a reliable if the current frame contains some information that users are
delivery service. Therefore, the video data transmitted through interested in, users are able to store the current frame in the
the TCP connection doesn’t have error, loss and repetition. specified path with specified name and format by clicking on
Besides, they can arrive in sequence. HTTP doesn’t need to the snapshot button in the video monitoring interface. This is
consider how the video data is transmitted again after being the so-called snapshot. The image saved can be viewed
discarded during the process of transmission. through the Gallery and ImageSwicher components in the
URL, the uniform resource locator, represents the interface of photo album, as shown in Figure 3. The Gallery is
specific address of a resource on the Internet[6]. We can get used to display an image list in the horizontal direction, and
a resource through its concrete address. The URL used in the image list can be moved to the left or right via sliding. The
this article is as follows. ImageSwitcher is one widget used to optimize the image's
display effect, and the image selected in the Gallery can be
In this URL, http shows that using the HTTP protocol displayed in more details in the ImageSwitcher[8].
to obtain video resource on the network. 192.168.1.1
represents the Internet Protocol address of server, namely
the WiFi module. Sometimes it can be replaced by the
domain name. 8080 declares that the server uses the port
8080 to transmit video resource. ?Action = stream shows
the specific name of video resource.
The main process of receiving the video is as follows.
First of all, the Android client creates an URL object
as mentioned above, and then create a HttpURLConnection
object by the URL object. Secondly, the Android client
establishs a TCP connection to the server and request the
resource identified by the URL by means of GET. Finally,
the server sends the resource to the Android client and the
Android client gets the InputStream returned from the server.
Fig. 3. The interface of photo album
D. Video Analysis And Display Module
This module requires the Paint, the Canvas, the F. Multi-angle Video Monitoring Module
Bitmap and the BitmapFactory class. We can analyse and
create the Bitmap object from different data sources The Multi-angle video monitoring can be achieved by
through the BitmapFactory class. adjusting the rotation angle of steering engine. The Socket
communication principle and Seekbar are used to control the
SurfaceView is a very important drawing container and rotation angle of steering engine. The length that being dragged
it can obtain the image data from the memory or other of the Seekbar is proportional to the rotation angle of steering
hardware interfaces directly[7]. Except that, SurfaceView engine, and the total length corresponds to the maximum
can call another thread to complete the drawing operation rotation angle[9]. When we stop dragging the Seekbar, the
without interfering with the main thread, which avoids the Android client will convert the angle corresponding to the
main thread blocked and the application becomes current length dragged into hexadecimal number, and send the
unresponsive on accout- of updating the frame directly in control command to the PHONE Processor according to the
the main thread. Therefore, the response speed of the format of communication protocol shown in Table I. After
application is improved. receiving the command, the PHONE Processor parses the
command and then controls the rotation angle of steering
engine by the pulse width modulation. After the steering Build the hardware platform of the system and turn on the
engine turning the corresponding angle normally, the intelligent System’s power, then the WiFi module will be
intelligent System will send a feedback message to the initialized. When the blue indicator light on the WiFi module
Android client, for example, turn left with 50 degrees. The changing from blinking to the bright state, the WiFi module
feedback message is displayed in the form of Toast. Otherwise, has been initialized successfully. Use the Android smart phone
the intelligent System will report the exceptional condition to to connect the wireless signal emitted by the WiFi module,
the Android client. and to open the Android application developed by the eclipse
software. Experimental results show that the system runs
normally. The Android client is able to control the basic
IV. CONTROL OF INTELLIGENT SYSTEM motion of intelligent System and the rotation angle of camera.
The Android client adopts the Socket communication In the client interface, we can obtain the video resource which
based on the TCP to control the basic motion state of is downloaded and played in real time. The video is clear and
intelligent System. The Internet Protocol Address of the fluent, without obvious buffering phenomenon. 11-13 frames
WiFi module used in this system is 192.168.1.1. The port can be transmitted per second. The status of video monitoring
used to control the motion of intelligent System is 2001. in this case is shown in Figure 4 and Figure 5. After
Establish a WiFi communication between the intelligent connecting the WiFi module to the router's LAN and use the
System and the Android phone by the WiFi module's Android smart phone to connect the wireless signal emitted by
Internet Protocol Address and port 2001. The format of the router, the reliability of this system is improved and the
the communication protocol used to control the the performance is more optimized. 12-15 frames can be
intelligent System’s motion is shown in Table II. Clicking transmitted per second. The status of video monitoring in this
on the control button in the client interface will trigger the case is shown in Figure 6 and Figure 7.
corresponding control instruction. The Android client
transmits the control instruction to the WiFi module by
the WIFI communication, and the WiFi module will
transmit the control instruction to the PHONE Processor
through the serial port. After receiving the control
instruction successfully, the PHONE Processor will parse it
and drive the L298N driving chip of Rotation in order to
adjust the basic motion state of intelligent System, such as
forward, backward, turn left and turn right, and so on. After
performing the corresponding action of the control button
normally, the intelligent System will send a feedback
message to the Android client, for example, forward
successfully. The feedback message is displayed in the
form of Toast. Otherwise, the intelligent System will report
the abnormal condition to the Android client. Fig. 4. The status of video monitoring in case 1

TABLE II. THE COMMUNICATION PROTOCOL USED TO CONTROL


THE MOTION OF INTELLIGENT SYSTEM

Motion state Start Data.1 Data.2 End


Stop FF 00 00 FF
Forwor FF 01 00 FF
dd
Back
backward FF 02 00 FF
Turn left FF 03 00 FF
TTurn right FF 04 00 FF

V. IMPROVEMENT OF SYSTEM FUNCTION


The mobile video monitoring system based on
Android can be realized via combining the Multi-angle Fig. 5. The status of video monitoring in case 1
video monitoring and intelligent System’s movement.
However, the coverage of wireless signal emitted by the
WiFi module is small, and sometimes the status of network
connection may be unstable, which will influence the
system’s function in a degree. In order to solve this
problem, login the management interface of the WiFi
module and connect the WiFi module to the router's LAN.
Then, the WiFi module will switch from the AP mode to
the Client mode and doesn’t emit the wireless signal
anymore[10]. In this system, the Internet Protocol address
of the WiFi module assigned by the router is
192.168.123.40. As a consequence, when we try to control
the motion of intelligent System, the Internet Protocol
address used to establish the Socket communication
Fig. 6. The status of video monitoring in case 2
should be modified to 192.168.123.40. Similarly, the URL
used to obtain the video should be changed to the following
form.
VI. TEST OF SYSTEM FUNCTION
Fig. 7. The status of video monitoring in case
2

VII. CONCLUSION
In this paper, we use the embedded system, streaming
media, serial communication, Socket communication,
Android network programming and other technologies to
realize a mobile video monitoring system with low cost and
low power consumption. Furthermore, we develop an
Android application in the eclipse software platform in
accordance with the function of this system. Experimental
results show that the system has good stability, reliability
and practicability. Its performance meets our design
requirement. This system overcomes the shortcomings of
the traditional video monitoring device. In addition, the
control of the intelligent System’s basic motion state
becomes more flexible and portable[11]. With the
development of automation technology and the popularity of
the Android smart phone, we can combine it with the smart
SECRET VIDEO home and Internet of things so that people's life will be more
comfortable and convenient. Besides, we can use it in the
RECORDER fields of family security,
fields.
II. SYSTEMintelligent
DESIGNlife and some other
As shown in Figure 1, the overall system consists of
the intelligent System and the Android client. The
Abstract—In view of the shortcoming that the traditional video
intelligent System mainly makes up of the camera
monitoring device is inconvenient to move, in this paper, we take
module, the WiFi REFERENCES module, the PHONE Processor, the
the tracked intelligent System as the research object and
design a mobile video monitoring system based on Android. The [1] S.L298N Rotation
Nishanthini, drive
M. Abinaya and module,
S. Malathi, and
“SmartsoVideo
on. Surveillance
The camera
systemmodule
and alertiswith
used to capturing
image collect using
the android smart phones,”
environment information
system collects the video information of the environment around International
the intelligent System through the camera and then transmits the around Conference on Circuit,
the intelligent System.PowerThe WiFiand Computing
module is used
Technologies, 2015, pp. 1714-1722.
video information to the Android client. The Android client to forward the control instruction sent by the Android
[2] X. L. Zhu, L. S. Guang, K. Zhang, Y. Y. Chen and Q. Q. Meng,
obtains the video information through the Hyper Text Transport client to the PHONE Processor and transmit the video
“Synchronous line-tracking robots based on PHONE,” Journal of
Protocol (HTTP) and Uniform Resource Locator (URL) from the information
Measurement collected
Science andby the camera module
Instrumentation, vol. 4, no.to1, the Android
pp. 58-62, Oct.
WiFi module. Then, the Android client analyses and displays the client.
2013. The PHONE Processor bases on the ARM Cortex-
video in the SurfaceView. During the moving process of [3] M3 core, M.
C. E. Palazzi, is Brunati
of goodand M.performance and lowsolution
Roccetti, “An OpenWRT power for
intelligent System, users can control its basic movement future wireless homes,”
consumption[2]. The Rotation drive
International module on
Conference is used to drive
Multimedia and
according to the surrounding environment. Thus a mobile video Expo,
the 2010, pp. 1701-1706.
Rotation and control the movement of intelligent
monitoring system is implemented. Experimental results [4] System.
F. Lohier The Nüesch, “Wireless
and J.Android client ismultimedia
used to device
issue with
the real time
control
demonstrate that the system operates normally, and its adjustment of packet retry function and bit rate
instruction of intelligent System and display the video. modulation,” 2013,
performance meets our design requirement. US8451910.
The hardware platform of this system is presented in Figure
[5] B. D. Veerasamy, “Creating a model http server program using java,”
2.International Journal of Computer Science & Information Security, vol.
Keywords—Intelligent System; Mobile; Video Monitoring;
7, no. 2 , pp. 248-255, Jul. 2010.
Android
[6] J. Kabachinski, “Surfing the Web: http, URLs, and HTML,” Camera Biomedical
Instrumentation & Technology, Vol. 36, no. 1, pp. 49-52,
Camera Aug. 2002.
Angle
I. INTRODUCTION
Video Rotation
With the rapid development of the science and Control Information Angle
Command
technology, the Android mobile phone is no longer a Android WiFi
STM32
single communication device. More and more people Client Module
expect to use the mobile phone to help manage their Video
Movement
Information
daily affairs. In the modern society, video monitoring Instruction Of
Intelligent Device
equipment is becoming more and more popular, making
people's life more convenient and safe[1]. However, the Drive

traditional video monitoring device is limited by the


shooting range of camera. It can only monitor a particular
Intelligent Device
place and is inconvenient to move. In the light of the
problems above, we make use of the intelligent System to Fig. 1. The block diagram of system
design a mobile video monitoring system based on
Android. In addition, we develop an Android application in III. VIDEO MONITORING
the eclipse software platform in accordance with the
specific function of this system. The video information of The part of video monitoring mainly consists of video
the environment around the intelligent System collected by collection module, video transmission module, video receiving
the camera is transmitted to the Android client in real time. module, video analysis and display module, video snapshot
Users can adjust the direction and path of intelligent module and Multi-angle video monitoring module.
System in real time on the basis of the surroundings. The
system overcomes the disadvantages of traditional video A. Video Collection Module
monitoring equipment and improves the flexibility and This module makes use of an USB camera with pan-tilt.
portability of control. The system can be used to monitor Its standard resolution is 640*480P and its pixel is 300,000.
some unknown and dangerous environment instead of The USB camera connects with the WiFi module through the
human. It can also be combined with the smart home and USB. The pan-tilt of the camera is composed of two steering
Internet of things, making people's life more comfortable, engines, which are used to control the rotation angle of camera
convenient and intelligent, is of wide application prospects. in the horizontal and vertical directions. The video resource
contains large amounts of data and transmit video resource
under a limited network bandwidth may lead to the block and
delay of network. It is difficult to meet the requirement of
real-time. Therefore, it’s necessary to compress the size of
image and ensure its quality as much as possible. In this
system, we compress the RGB image collected by the camera
into the YCrCB image and deliver the video stream whose
form is MJPEG to the WiFi module.

B. Video Transmission Module


This module uses the WiFi module whose master chip is
MTK7620N. This WiFi module supports the 802.11b/g/n
wireless standard and TCP/IP network protocol stack. The
maximum connection rate of it can reach 300Mbps. Before
[7] H. Pang, L. Jiang, L. Yang and K. Yue, “Research of android smart
phone surveillance system,” International Conference on Computer
Design and Applications, 2010, pp. 373-376.
[8] G. H. Wang and W. Li, ͆The Bible for Android Developer,͇China
Machine Press, 2012, pp. 103-105.
[9] Wen. X, Wen. M and Li. Z, “Design of the remote monitoring system
based on PHONE and WiFi communication,” Automation &
Instrumentation, vol. 7, no. 11, pp. 35-38, Jul. 2016.
[10] X. Chen, Y. Ruan, J. Yu and Q. Chen, “A surveillance system of android
smartphone with context-awareness,” Sensors & Transducers, vol.
166, no. 3, pp. 173-180, Mar. 2014.
[11] Kim, J. Bae and H. J. Kim, “Efficient region-based motion
segmentation for a video monitoring system,” Pattern Recognition
Letters. vol. 24, no. 1, pp. 113-128. Mar. 2003.

Vous aimerez peut-être aussi