Design and Implementation of Smart Home Cloud System Based on Kinect

. Most smart home products on the market today only stay at the level of multi-channel control of home appliances and have a single product function. For those parts that are not involved, this article describes a smart home cloud system based on Kinect. The system uses the STM32 as the control core and utilizes Kinect depth sensors to establish an identity and posture recognition sys-tem based on human skeletons, combined with support vector machine (SVM) and Internet of Things technology to realize smart home control systems. What is more, intelligent alarm system and child anti-drop window control system truly realize home Intelligence. After verification, the system can greatly improve the current level of intelligent home security capabilities, make up for the vacancy of the existing identity system, real intelligence for the home rather than intelligent control of home appliances is finally achieved.


Introduction
Home security is always a focused topic for people. In this field, fast and effective automatic identity verification plays an important role in security entrance control applications. Fingerprint recognition will reduce accuracy due to finger cuts. Exquisite makeup techniques and headscarf cover will cause misjudgment of face recognition. However, the bone information of the human body belongs to the physical properties of the creature, it's unable to fake and its stability is extremely high [1]. In order to improve the smart home intelligence and security level and achieve autonomous control, this article designs a smart home automatic control system based on IOT technology [2] which is relied on wifi data transmission with STM32 as the control core. Smart door used in the system introduces Kinect somatosensory equipment [3], its 3D infrared camera is used to obtain human skeleton information and adopts a new identification method based on human skeleton information so as to control the switch of the door through judging the legitimacy of the visitor. it successfully achieves a higher skeletal motion information recognition rate. At the same time, the data model is established for different home-customized posture control methods. The use of somatosensory interaction technology to achieve intelligent home control. Its Ingenious use of infrared sensors to complete the anti-drop wear design of infants and young children is cost-effective, with market value. This article focuses on the composition of the system, Kinect somatosensory technology applications, data collection and classification identification, as well as other hardware and software design.

2
Overall structure of the system The smart home cloud system designed in this paper is mainly composed of three parts: control terminal, link end, and client. The control terminal mainly uses the STM32 as the processing center to collect various types of sensor data, perform data processing and analysis according to different pre-set conditions, issue control instructions, and upload the processing results to the client through the link end, which can achieve Realtime feedback to users via mobile app and receive data instructions from the client to achieve home control. The link end mainly uses the wifi module and cloud server platform for data transmission and exchange so that to realize real-time human-computer interaction between the control end and the client. The client is used to receive and display the system data sent by the control terminal, and the status of the home system is intuitively displayed in the form of a graphical interface. The user can remotely control the home through the interactive interface.

Skeletal structure recognition principle
In Kinect, a skeleton is represented by 25 joint points, as shown in Figure 1. When a person walks into the field of vision of Kinect, Kinect automatically finds the position of the 25 joints of the individual (stationary) [4], and expresses it by three-dimensional coordinates (x, y, z). What we ultimately need in this system is the three-dimensional coordinates of the individual's 25 joint points. The selection and optimization of bone features

Dataset construction and feature selection
In this paper, several bone data of different heights and genders were collected. In this experiment, 300 human bone data were randomly selected as samples. Due to the instability of Kinect, the identification of some joint points will have a large error, making the distance between the corresponding joint points unstable, such as the distance between the ankle and the sole of the foot [5]. Then, we selected 30 relatively stable bone fragments as features. The coordinates of the skeletal joint point are the coordinates relative to the three-dimensional coordinate system of Kinect [6]. As shown in Figure 2.

Fig. 2. Kinect three-dimensional coordinate system
According to the coordinates of the extracted 25 individual bone skeleton joints, each joint point is connected to form a bone fragment, and different bone feature quantities are obtained by calculating different bone fragment distances. Dist i represents the distance between skull joint points and zygomatic joint, which is one of the skeletal features we selected. Assuming that the coordinates of the two joint points a and b are known to be   , , x y z and   , , x y z respectively, the distance between these two joint points is calculated as: (1) We arrange and combine 25 joint points and calculate the distance between different joint points to obtain various feature quantities. The skeleton eigenvector we finally get can be expressed as: 1 2 ( is , is , ..., is ) (2) Where Dist n represents the distance of a segment of a bone [7].

SVM parameter optimization and feature screening
In this paper, SVM (support vector machine) is used as the classification algorithm, and Gaussian radial basis function (RBF) is chosen as the kernel function [8]. In order to make the classification better, we used the 10-fold cross-validation to combine different features freely and found the feature combinations with the highest recognition rate by changing the number of samples, the number of kernel functions, the number of feature points, and the variable parameters c and g. The recognition rate reaches 97.059% under the optimal parameters. At this time, the first 50% feature combinations are selected as the optimal features. Finally, we will use the optimal characteristics of the sample as input to obtain the optimal SVM model. The specific process is shown in Figure 3. System implementation For ease of development and research, the smart home system adopts the C/S architecture, uses wifi networking, and establishes real-time data exchange links between the control terminal and the client through the home gateway to realize information collection and control of various homes. Make sure the system is stable and reliable. The system structure is shown in Figure 4.

Kinect online real-time character recognition system
We use the C# language to develop a Kinect real-time character recognition system based on WPF. The system includes six modules: bone data entry, training model, adjustment parameters, person recognition, gesture recognition, and real-time character image display. Figure 5 is the system character recognition interface diagram. The dots in the figure are the 25 skeleton joints identified by the system.

Based on Kinect gesture recognition control home
By the way of using Kinect's 3D somatosensory technology, people's movements and gestures are recognized. We formulate different home control systems according to different users' living habits and action behaviors. Different home appliances have different gestures, which are simple and easy to distinguish. In order to reduce the probability of system misoperation, each action must be maintained for more than 3s, otherwise it is regarded as an invalid instruction. In general, in order to reduce the energy consumption and ensure the service life of the smart home system, the system uses an infrared human body sensor to sense the human body position. When a person stands above Kinect for more than 5s, the system Starts Kinect; when Kinect does not detect a matching custom operation command for more than 5s, the system turns on the selfprotection mode and enters the standby state. The system custom operation instructions designed in this paper are shown in Table 1

Analysis of results
In order to verifying the reliability and stability of the system's posture recognition, each instruction was measured 100 times under the same conditions. Table 2 shows the correct number of times for each instruction and its accuracy. Experiments show that the gesture recognition scheme designed in this paper can effectively control the smart home system and has a very high reliability and stability.  For the purpose of facilitating maintenance and function expansion, this system designed a mobile client based on Android operating system and JAVA language. The mobile client control interface is shown in Figure 6.

Conclusions
The system is based on the Internet of Things smart home, it has successfully introduced Kinect somatosensory sensor into the smart home system for gesture control command information and face information, and used SVM as a classification recognition algorithm, then performs information matching verification with pre-customized posture to obtain control instructions to achieve home Intelligent control. The experimental result shows that with the successful introduction of Kinect, only one gesture can be used to control indoor facilities, which can effectively improve the smart home's level of intelligence and security and get rid of the dependence on the mobile Internet.
In the next step, we can further utilize the advantages of Kinect somatosensory recognition technology to combine smart homes with smart medical care to improve people's smart living standards.