• 沒有找到結果。

1 2 3

A walking pattern:

4 6 4 6

6 4

Node ID Roll 4 <=75⁰

Node ID Roll 6 >-75⁰

Node ID Roll 6 <=-75⁰ 4

4 6

Figure 3.9: The Definition of A Pattern.

many times the pattern appears. Get count API will split the user’s history sensing data into the each window. The each window contains a number of the user’s sensing data, and Get count API will calculate how many times the pattern appears in the window, it matches the sensing data of the window by following the sequence of states. Each state must be the same sensing data more than once and then it enters the next state. The count of the pattern will add one if satisfies all states. The finally count of the pattern is calculated after all windows.

Set pattern < P attern name, #Sequence >

Add states < P attern name, Sequence, Sensor ID, Roll, P itch, Y aw >

Count = Get count < U ser ID, P attern name >

3.3 BSN Applications on Social Network Platforms

This subsection will introduce three applications by using BSN APIs, the BSN APIs usage and the flow chart of three applications. Three applications includes Posture messenger , Tai-Chi and Running game.

Posture Messenger: We can see real-time gesture and status of ours and friends in Posture messenger on Facebook. The gesture and the status is using user’s sensing data. The traditional MSN only can manually set the self status. Posture messenger can real-time show the gesture and the status in Fig. 3.11.

Posture messenger uses two BSN APIs, the first one is Status reporting API that can identity

Offline input

Online reporting

Get user’s a window of sensor data

Get count <User ID, Pattern name>

Yes

Figure 3.10: The Flow Chart of Pattern Recognition API.

how the status is. The second one is Rendering API that is using JAVA 3D to render the real-time gesture, we will introduce in the next application. When we first use Status reporting API, use Set status to set the status and details on offline input phase and then call Read status API to input the user’s Facebook ID on online reporting phase. Read status API will get the current user’s sensing data that matches with the rule of setting on offline input phase. If there have the match rule, then return the rule name. In Fig. 3.12, when Read status API gets a group of the user’s sensing data, there only have sleeping of the rule matching, then return sleeping of the rule name.

Offline input

Figure 3.12: A Example of Static Reporting API.

Tai-Chi: The user and his/her friends can play Tai-Chi quan(Chinese traditional shadow boxing) together in Tai-Chi on Facebook. Although Tai-Chi teacher is in different location, Tai-chi students can learn the real-time gesture of Tai-Chi teacher on Facebook. Tai-Chi teacher can see the real-time gesture of Tai-Chi students to redress the gesture.

Tai-Chi uses Rendering API in Fig. 3.14. First, we use 3D rendering engine to render the user’s 3D human model, then call Draw gesture API on online reporting phase, and input Euler angle of the user’s sensing data. Draw gesture API will get the original coordinate of each joint such as arm’s coordinate (10,10,10), and then it uses Rotation matrix to rotate Euler angle(-45,0,0) of the arm’s sensor. The finally coordinate of calculated Euler angle is new coordinate (10,-3,13.7), update this coordinate to arm’s 3D model.

Running Game: Runnning game provides the user and his/her friends running together on Facebook. Because the user and his/her friends maybe can not running together for the weather and the position. The user and his/her friends can real-time see the gesture and steps of each other.

Running game uses two BSN APIs that shows in Fig. 3.16 ,one of BSN APIs is Pattern recognition API, it can calculate steps of the user and his/her friends. Another one is rendering

(a) User interface on Facebook.

Tai-Chi master (Frank kuo)

Student A (Chenshao Huang)

Student B (Shelley Hsu) (b) Three users.

Figure 3.13: The User Interface of Tai-Chi.

Online reporting

Draw gesture<149816007, 0 , -45, 0, 0 >

Get original joint (10,10,10)

Use rotation matrix formula to calculate rotated coordinate (10,-3,13.7)

Draw new joint (10,-3,13.7)

Draw gesture<149816007, 0 , 0, 0, 0 >

Draw gesture<149816007, 0 , -45, 0, 0 >

(10,10,10)

(10,-3,13.7) -45

Figure 3.14: A Example of Rendering API.

API, it can render the running gesture of the user and his/her friends. First we set the running pattern on offline input phase, and we call Get count API to calculate how many times the pattern appears. Get count API should be input the user’s ID and the pattern name what needs to be calculated, and then it will match the state of the pattern and the user’s sensing data of the window. If all the states is matched, the step count will be added one. After it matches all windows, the step count is the user steps.

Figure 3.15: The User Interface of Running Game.

Offline input

Set pattern <Walking, 3>

Add states <Walking, 1, 4,

>-75,-,->

Add states <Walking, 2, 4,

<=-75,-,->

Add states <Walking, 3, 6,

>-75,-,->

Add states <Walking, 3, 6,

<=-75,-,->

Node 4,6’s history data

Online reporting

Get user’s window sensor data Get count <User ID, Pattern name>

Yes

Figure 3.16: A Example of Pattern Recognition API.

Chapter 4

相關文件