WO2018149324A1 - Detection method and terminal device - Google Patents

Detection method and terminal device Download PDF

Info

Publication number
WO2018149324A1
WO2018149324A1 PCT/CN2018/075384 CN2018075384W WO2018149324A1 WO 2018149324 A1 WO2018149324 A1 WO 2018149324A1 CN 2018075384 W CN2018075384 W CN 2018075384W WO 2018149324 A1 WO2018149324 A1 WO 2018149324A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
acceleration
magnetic field
field strength
angular velocity
Prior art date
Application number
PCT/CN2018/075384
Other languages
French (fr)
Chinese (zh)
Inventor
董振江
谢思远
韦薇
裴凌
刘东辉
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018149324A1 publication Critical patent/WO2018149324A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/04Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means
    • G01C21/08Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means involving use of the magnetic field of the earth
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

A detection method and a terminal device. The method comprises: acquiring an attitude angle of a terminal device relative to a ground coordinate system (S101); acquiring a carrying mode of the terminal device (S102); and when the carrying mode of the terminal device is a hand-shaking mode, detecting a pedestrian gait event by means of the attitude angle (S103).

Description

一种检测方法及终端设备Detection method and terminal device 技术领域Technical field
本公开涉及但不限于定位技术领域,尤其是一种检测方法及终端设备。The present disclosure relates to, but is not limited to, the field of positioning technology, and in particular, a detection method and a terminal device.
背景技术Background technique
随着定位技术的发展,人们对基于位置服务(LBS,Location Based Services)的需求与日俱增。在室外环境中,全球卫星导航系统(GNSS,Global Navigation Satellite System)的广泛应用满足了人们在室外的导航和定位需求。然而,在室内环境或者有建筑物遮挡的环境中,由于卫星信号被遮挡而产生衰减和多径效应,会造成卫星定位的精度恶化,甚至无法使用。因此,实现室内精确的定位和导航可以借助其他定位技术。而智能手机及其他移动终端不断提高的计算和传感器能力促进了新兴技术在个人LBS领域的应用推广。With the development of location technology, the demand for location based services (LBS) is increasing. In an outdoor environment, the Global Navigation Satellite System (GNSS) is widely used to meet the needs of outdoor navigation and positioning. However, in an indoor environment or in an environment where buildings are blocked, attenuation and multipath effects due to occlusion of satellite signals may cause the accuracy of satellite positioning to deteriorate or even be unusable. Therefore, accurate positioning and navigation in the room can be achieved by other positioning techniques. The ever-increasing computing and sensor capabilities of smartphones and other mobile devices have facilitated the adoption of emerging technologies in the personal LBS field.
在众多定位技术中,行人航位推算(PDR,Pedestrian Dead Reckoning)是一种常用的室内定位技术。与其他室内定位方法相比,该方法成本较低,可以不布设额外的基站设施,只是利用移动终端自包含传感器采集人体运动信息和方向信息即可实现自主定位和导航。Among many positioning technologies, Pedestrian Dead Reckoning (PDR) is a commonly used indoor positioning technology. Compared with other indoor positioning methods, the method has lower cost and can not provide additional base station facilities, but can realize autonomous positioning and navigation by using mobile terminal self-contained sensors to collect human motion information and direction information.
该方法通过自包含传感器采集加速度、角速度和磁场强度等信息,进而推算出行人的行走方向,再结合步态检测和步长估计,推算出行人的行走方向和步长,从前一位置计算出行人的当前位置。The method collects information such as acceleration, angular velocity and magnetic field strength from the self-contained sensor, and then calculates the walking direction of the pedestrian. Combined with the gait detection and the step estimation, the walking direction and the step length of the pedestrian are calculated, and the pedestrian is calculated from the previous position. The current location.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
步态检测是PDR技术的核心,因为步态事件是驱动行人位置更新和计算步长的关键。步态检测不准会导致步长估计出现误差以及PDR无法更新位置。Gait detection is at the heart of PDR technology because gait events are key to driving pedestrian position updates and calculation steps. Inadequate gait detection can result in errors in the step size estimate and the PDR cannot update the position.
步态检测常用的方法是对移动终端采集的加速度信息进行处理,如采用不同长度的滑动窗对加速度信息的幅值进行处理和检测,利用行人行走产生 加速度的规律性进行步态检测。通常情况下,该方法可以取得比较好的步态检测效果。但是由于该方法需要用户保持移动终端与用户相对静止,而如果用户在定位过程中不断改变终端位置(如拿在手里摆动手臂),此时引起状态改变的加速度信号则会影响这类步态检测算法的判断,从而产生较大误差,出现误检或漏检的情况。The commonly used method of gait detection is to process the acceleration information collected by the mobile terminal. For example, the sliding window of different lengths is used to process and detect the amplitude of the acceleration information, and the gait detection is performed by using the regularity of the pedestrian walking to generate acceleration. Usually, this method can achieve better gait detection results. However, since the method requires the user to keep the mobile terminal relatively stationary with the user, and if the user constantly changes the position of the terminal during the positioning process (such as holding the arm in the hand), the acceleration signal causing the state change at this time will affect such gait. The judgment of the detection algorithm causes a large error, and a false detection or a missed detection occurs.
本公开实施例提供一种检测方法及终端设备,能够避免步态检测方法在终端设备的位置不断改变时,误差较大甚至不能正常使用。The embodiment of the present disclosure provides a detection method and a terminal device, which can prevent the gait detection method from being greatly changed or not being used normally when the position of the terminal device is continuously changed.
本公开实施例提供一种检测方法,包括以下步骤:Embodiments of the present disclosure provide a detection method, including the following steps:
获取终端设备相对于大地坐标系的姿态角;Obtaining an attitude angle of the terminal device relative to the earth coordinate system;
获取终端设备的携带方式;Obtain the carrying mode of the terminal device;
当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件。When the carrying mode of the terminal device is the pick-up mode, the pedestrian gait event is detected by the attitude angle.
在一种示例性实施方式中,获取终端设备相对于大地坐标系的姿态角,包括:In an exemplary embodiment, acquiring an attitude angle of the terminal device relative to the earth coordinate system includes:
获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;Obtaining acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device;
根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角。Based on the acceleration, angular velocity, and earth magnetic field strength, the attitude angle of the terminal device relative to the earth coordinate system is calculated.
在一种示例性实施方式中,获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度,包括:In an exemplary embodiment, acquiring acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device includes:
通过终端设备的加速度计获取加速度,通过终端设备的陀螺仪获取角速度,通过终端设备的磁力计获取地球磁场强度;The acceleration is obtained by the accelerometer of the terminal device, the angular velocity is obtained by the gyroscope of the terminal device, and the strength of the earth magnetic field is obtained by the magnetometer of the terminal device;
当加速度、角速度和地球磁场强度的采样频率不一致时,对加速度、角速度和地球磁场强度进行预定次数样条插值;When the sampling frequencies of acceleration, angular velocity, and earth magnetic field strength are inconsistent, a predetermined number of spline interpolations are performed on acceleration, angular velocity, and earth magnetic field strength;
对加速度、角速度和地球磁场强度进行低通滤波。Low-pass filtering of acceleration, angular velocity, and Earth's magnetic field strength.
在一种示例性实施方式中,根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角,包括:In an exemplary embodiment, calculating an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength includes:
当地球磁场强度小于第一预设值时,将加速度、角速度和地球磁场强度带入姿态航向参考系统;When the earth magnetic field strength is less than the first preset value, the acceleration, the angular velocity and the earth magnetic field strength are brought into the attitude heading reference system;
当地球磁场强度大于或等于第一预设值时,将加速度、角速度带入姿态航向参考系统;When the earth magnetic field strength is greater than or equal to the first preset value, the acceleration and angular velocity are brought into the attitude heading reference system;
从姿态航向参考系统中输出姿态角。The attitude angle is output from the attitude heading reference system.
在一种示例性实施方式中,获取终端设备的携带方式,包括:In an exemplary embodiment, acquiring a carrying manner of the terminal device includes:
采集第一预设时间内终端设备的加速度和速度信息;Collecting acceleration and speed information of the terminal device in the first preset time;
从加速度信息中获取重力分量和线性加速度分量;Obtaining a gravity component and a linear acceleration component from the acceleration information;
从加速度的重力分量、线性加速度分量和速度中选取特征值;Selecting a feature value from a gravity component of the acceleration, a linear acceleration component, and a velocity;
获取终端设备的传感器信息,根据分类规则,确定携带方式的类型,其中,分类规则是根据不同携带方式下特征值的数值分布特征确定的。The sensor information of the terminal device is obtained, and the type of the carrying mode is determined according to the classification rule, wherein the classification rule is determined according to the numerical distribution feature of the feature value in different carrying modes.
在一种示例性实施方式中,通过姿态角检测行人的步态事件,包括:In an exemplary embodiment, the gait event of the pedestrian is detected by the attitude angle, including:
对获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角;Low-pass filtering the acquired attitude angle to extract a pitch angle among a plurality of posture angles stored in the second preset time;
当提取的多个俯仰角中存在极值且条件满足时,判定为步态事件,所述条件包括:所述多个俯仰角中的极小值小于第二预设值,或者,所述多个俯仰角中的极大值大于第三预设值,或者,所述多个俯仰角中的极小值小于第二预设值和所述多个俯仰角中的极大值大于第三预设值。Determining a gait event when there is an extreme value in the extracted plurality of elevation angles, and the condition includes: a minimum value of the plurality of elevation angles is less than a second preset value, or The maximum value of the pitch angles is greater than the third preset value, or the minimum of the plurality of pitch angles is smaller than the second preset value and the maximum value of the plurality of pitch angles is greater than the third pre- Set the value.
本公开实施例还提供一种终端设备,适用于上述检测方法,包括:The embodiment of the present disclosure further provides a terminal device, which is applicable to the foregoing detection method, and includes:
姿态角获取模块:设置为获取终端设备相对于大地坐标系的姿态角;An attitude angle acquisition module: configured to acquire an attitude angle of the terminal device relative to the earth coordinate system;
携带方式获取模块:设置为获取终端设备的携带方式;Carrying mode acquisition module: set to obtain the carrying mode of the terminal device;
检测模块:设置为当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件。Detection module: set to detect pedestrian gait events through the attitude angle when the carrying mode of the terminal device is the hand-held mode.
在一种示例性实施方式中,姿态角获取模块包括:In an exemplary embodiment, the attitude angle acquisition module includes:
信息获取单元:设置为获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;An information acquiring unit: configured to acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device;
姿态角计算单元:设置为根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角;An attitude angle calculation unit: configured to calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength;
其中,信息获取单元包括:The information obtaining unit includes:
第一获取子单元:设置为通过终端设备的加速度计获取加速度,通过终端设备的陀螺仪获取角速度,通过终端设备的磁力计获取地球磁场强度;a first acquiring subunit: configured to acquire an acceleration by an accelerometer of the terminal device, obtain an angular velocity by a gyroscope of the terminal device, and acquire an earth magnetic field strength by a magnetometer of the terminal device;
第一处理子单元:设置为当加速度、角速度和地球磁场强度的采样频率不一致时,对加速度、角速度和地球磁场强度进行预定次数样条插值;The first processing subunit is configured to perform a predetermined number of spline interpolation on the acceleration, the angular velocity, and the earth magnetic field strength when the sampling frequencies of the acceleration, the angular velocity, and the earth magnetic field strength are inconsistent;
第二处理子单元:设置为对加速度、角速度和地球磁场强度进行低通滤波;a second processing subunit: configured to low pass filter the acceleration, angular velocity, and earth magnetic field strength;
姿态角计算单元包括:The attitude angle calculation unit includes:
第一计算子单元:设置为当地球磁场强度小于第一预设值时,将加速度、角速度和地球磁场强度带入姿态航向参考系统;The first calculating subunit is configured to bring the acceleration, the angular velocity and the earth magnetic field strength into the attitude heading reference system when the earth magnetic field strength is less than the first preset value;
第二计算子单元:设置为当地球磁场强度大于或等于第一预设值时,将加速度、角速度带入姿态航向参考系统;The second calculating subunit is configured to bring the acceleration and the angular velocity into the attitude heading reference system when the earth magnetic field strength is greater than or equal to the first preset value;
输出子单元:设置为从姿态航向参考系统中输出姿态角。Output subunit: Set to output the attitude angle from the attitude heading reference system.
在一种示例性实施方式中,携带方式获取模块包括:In an exemplary embodiment, the carry mode acquisition module includes:
参考单元:设置为采集第一预设时间内终端设备的加速度和速度信息;Reference unit: configured to collect acceleration and speed information of the terminal device in the first preset time period;
获取单元:设置为从加速度信息中获取重力分量和线性加速度分量;Acquiring unit: configured to obtain a gravity component and a linear acceleration component from the acceleration information;
赋值单元:设置为从加速度的重力分量、线性加速度分量和速度中选取特征值;Assignment unit: set to select a feature value from the gravity component of the acceleration, the linear acceleration component, and the velocity;
确定单元:设置为获取终端设备的传感器信息,根据分类规则,确定携带方式,其中,分类规则是根据不同携带方式下特征值的数值分布特征确定的。The determining unit is configured to obtain the sensor information of the terminal device, and determine the carrying mode according to the classification rule, wherein the classification rule is determined according to the numerical distribution feature of the feature value in different carrying modes.
在一种示例性实施方式中,检测模块包括:In an exemplary embodiment, the detecting module includes:
提取单元:设置为对获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角;Extracting unit: configured to low-pass filter the acquired posture angle, and extract a pitch angle among the plurality of posture angles stored in the second preset time;
判定单元:设置为当提取的多个俯仰角存在极值且条件满足时,判定为步态事件,所述条件包括:所述多个俯仰角中的极小值小于第二预设值,或者,所述多个俯仰角中的极大值大于第三预设值,或者,所述多个俯仰角中的极小值小于第二预设值和所述多个俯仰角中的极大值大于第三预设值。a determining unit: configured to determine a gait event when the extracted plurality of pitch angles have an extreme value and the condition is satisfied, the condition comprising: a minimum value of the plurality of pitch angles is less than a second preset value, or a maximum value of the plurality of pitch angles is greater than a third preset value, or a minimum value of the plurality of pitch angles is less than a second preset value and a maximum value of the plurality of pitch angles Greater than the third preset value.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述检测方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that are implemented when the computer executable instructions are executed.
本公开实施例通过获取终端设备相对于大地坐标系的姿态角和终端设备的携带方式,当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用,操作过程简单,易于实现。The embodiment of the present disclosure obtains the attitude angle of the terminal device relative to the earth coordinate system and the carrying mode of the terminal device. When the carrying mode of the terminal device is the hand-held mode, the pedestrian gait event is detected by the attitude angle, thereby ensuring that the gait detection algorithm is In the case of pickpockets, the error is small, it can be used normally, the operation process is simple, and it is easy to implement.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为本公开第一实施例的检测方法的流程图;1 is a flow chart of a detecting method of a first embodiment of the present disclosure;
图2为本公开第二实施例的检测方法的流程图;2 is a flowchart of a detecting method according to a second embodiment of the present disclosure;
图3为本公开第三实施例的检测方法的流程图;FIG. 3 is a flowchart of a detecting method according to a third embodiment of the present disclosure; FIG.
图4为本公开第四实施例的检测方法的流程图;4 is a flowchart of a detection method according to a fourth embodiment of the present disclosure;
图5为本公开第五实施例的检测方法的流程图;FIG. 5 is a flowchart of a detecting method according to a fifth embodiment of the present disclosure; FIG.
图6为本公开第五实施例的预置坐标系中X轴的重力加速度绝对值的均值在不同携带方式下的数据图,图中的横坐标代表不同的携带方式,从0到12分别:静止、短信模式行走、电话模式行走、口袋模式行走、甩臂模式行走、短信模式跑步、电话模式跑步、口袋模式跑步、甩臂模式跑步、上楼梯、下楼梯、电梯上行和电梯下行;6 is a data diagram of the mean value of the absolute value of the gravity acceleration of the X-axis in the preset coordinate system in different carrying modes according to the fifth embodiment of the present disclosure. The abscissa in the figure represents different carrying modes, from 0 to 12: Static, SMS mode walking, phone mode walking, pocket mode walking, arm-arm mode walking, SMS mode running, phone mode running, pocket mode running, arm-arm mode running, going up the stairs, going down the stairs, lifting the elevator and descending the elevator;
图7为本公开第五实施例的预置坐标系中Y轴的重力加速度绝对值的均值在不同携带方式下的数据图;7 is a data diagram of an average value of absolute values of the gravitational acceleration of the Y-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图8为本公开第五实施例的预置坐标系中Z轴的重力加速度绝对值的均值在不同携带方式下的数据图;8 is a data diagram of an average value of absolute values of gravity acceleration of a Z-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图9为本公开第五实施例的线性加速度绝对值的均值在不同携带方式下的数据图;FIG. 9 is a data diagram of the mean value of the absolute value of the linear acceleration in different carrying modes according to the fifth embodiment of the present disclosure; FIG.
图10为本公开第五实施例的预置坐标系中X轴的角速度绝对值的均值在不同携带方式下的数据图;10 is a data diagram of an average value of an absolute value of an angular velocity of an X-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图11为本公开第五实施例的预置坐标系中Y轴的角速度绝对值的均值在不同携带方式下的数据图;11 is a data diagram of an average value of an absolute value of an angular velocity of a Y-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图12为本公开第五实施例的预置坐标系中Z轴的角速度绝对值的均值在不同携带方式下的数据图;12 is a data diagram of an average value of an absolute value of an angular velocity of a Z-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图13为本公开第五实施例的预置坐标系中Z轴的线性加速度方差在不同携带方式下的数据图;13 is a data diagram of a linear acceleration variance of a Z-axis in a different carrying mode in a preset coordinate system according to a fifth embodiment of the present disclosure;
图14为本公开第六实施例的检测方法的流程图;FIG. 14 is a flowchart of a detecting method according to a sixth embodiment of the present disclosure; FIG.
图15为本公开第六实施例的甩手模式下终端设备经过一个接近矩形的闭合路径的俯仰角曲线;15 is a pitch angle curve of a terminal device passing through a closed path close to a rectangle in a hand mode according to a sixth embodiment of the present disclosure;
图16为本公开第七实施例的终端设备的结构示意图。FIG. 16 is a schematic structural diagram of a terminal device according to a seventh embodiment of the present disclosure.
本公开的较佳实施方式Preferred embodiment of the present disclosure
下面结合附图对本公开的实施方式进行描述。Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
第一实施例First embodiment
参见图1,图中示出了一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 1, a flow chart of a detection method for detecting a pedestrian gait of a terminal device is illustrated. The detection method includes the following steps:
S101、获取终端设备相对于大地坐标系的姿态角。S101. Acquire an attitude angle of the terminal device relative to the earth coordinate system.
上述大地坐标系(Geodetic Coordinate System)是指在大地测量中,以参考椭球面为基准面建立起来的坐标系,大地坐标系三个坐标分量分别为大地经度、大地纬度和大地高。The geodetic coordinate system (Geodetic Coordinate System) refers to a coordinate system established by using a reference ellipsoid as a reference plane in geodetic survey. The three coordinate components of the geodetic coordinate system are earth longitude, earth latitude and earth height.
上述姿态角可以包括终端设备的翻滚角(roll)、俯仰角(pitch)和偏航角(yaw)中的一种或多种,其中俯仰角为绕预置坐标系Y轴旋转的角度。The above-described attitude angle may include one or more of a roll, a pitch, and a yaw of the terminal device, wherein the pitch angle is an angle of rotation about the Y-axis of the preset coordinate system.
S102、获取终端设备的携带方式。S102. Obtain a carrying manner of the terminal device.
终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。The carrying mode of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode in addition to the pick-up mode.
甩手模式是指终端设备进行摆动,例如终端设备在手中随手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化,例如随手臂的摆动而变化。The pick-up mode means that the terminal device swings. For example, the terminal device swings with the arm in the hand, and the relative position of the terminal device changes periodically (for example, relative to the human body), and the attitude angle of the terminal device also changes, for example, changes with the swing of the arm. .
本实施例中,终端设备的携带方式可以通过模式识别的相关算法实现,也可以通过基于其他比较明显的动态特征进行判断来实现,故而对携带方式的判定方式不做限定。In this embodiment, the carrying mode of the terminal device may be implemented by a related algorithm of pattern recognition, or may be implemented by performing judgment based on other relatively obvious dynamic features. Therefore, the manner of determining the carrying mode is not limited.
S103、当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件。S103. When the carrying mode of the terminal device is the handcuff mode, the pedestrian gait event is detected by the posture angle.
当终端设备的携带方式为甩手模式时,终端设备的姿态可以产生周期性的变化,理想化地近似为摆钟运动,利用这种周期性的规律,可以将终端设备的姿态角变化与实际物理运动的行走对应起来,从而实现步态检测。When the carrying mode of the terminal device is the pick-up mode, the posture of the terminal device can be periodically changed, ideally approximated as a pendulum clock motion, and the periodicity of the terminal device can be used to change the attitude angle of the terminal device with the actual physics. The walking of the movement corresponds to the gait detection.
综上所述,本实施例通过获取终端设备相对于大地坐标系的姿态角和终 端设备的携带方式,当携带方式为甩手模式时,通过姿态角检测行人的步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用。In summary, in this embodiment, by acquiring the attitude angle of the terminal device relative to the geodetic coordinate system and the carrying mode of the terminal device, when the carrying mode is the handcuff mode, the gait event of the pedestrian is detected by the posture angle, thereby ensuring the gait detection. The algorithm has less error in the case of pickpockets and can be used normally.
第二实施例Second embodiment
参见图2,图中示出了另一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 2, there is shown a flow chart of another detection method, which can be used to detect a pedestrian gait of a terminal device, and the detection method includes the following steps:
S201、获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;S201. Acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device.
本实施例,可以通过终端设备搭载的加速度计、陀螺仪和磁力计分别获取预置坐标系中的加速度、角速度和地球磁场强度,上述预置坐标系是指载体坐标系,即终端设备本身的坐标系。In this embodiment, the acceleration, angular velocity, and earth magnetic field strength in the preset coordinate system can be respectively acquired by an accelerometer, a gyroscope, and a magnetometer mounted on the terminal device, where the preset coordinate system refers to a carrier coordinate system, that is, the terminal device itself. Coordinate System.
S202、根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角。S202. Calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength.
本实施例中,利用姿态航向参考系统AHRS可以根据加速度、角速度和地球磁场强度获得终端设备相对大地坐标系的姿态角。该系统可以包括多个轴向传感器,能够终端设备提供姿态信息,例如,该姿态信息包括横滚角、俯仰角和航向角中的一种或多种。In this embodiment, the attitude heading reference system AHRS can obtain the attitude angle of the terminal device relative to the geodetic coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength. The system can include a plurality of axial sensors that can provide attitude information to the terminal device, for example, the attitude information includes one or more of a roll angle, a pitch angle, and a heading angle.
使用姿态航向参考系统获得姿态角可以是根据四元数微分方程通过梯度下降算法求解当前姿态角的最优解,四元数是由一个实数加上三个虚数组成的四维的超复数,可以表示终端设备在空间中的旋转,即在大地坐标系下的姿态。Obtaining the attitude angle using the attitude heading reference system may be an optimal solution for solving the current attitude angle by a gradient descent algorithm according to the quaternion differential equation, and the quaternion is a four-dimensional super complex number consisting of one real number plus three imaginary numbers, which can represent The rotation of the terminal device in space, ie the attitude in the earth coordinate system.
S203、获取终端设备的携带方式。S203. Obtain a carrying manner of the terminal device.
所述终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。The carrying manner of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode collective except the pick-up mode.
甩手模式是指终端设备进行摆动,例如终端设备在携带者的手中随携带者的手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化,例如随手臂的摆动而变化。The pick-up mode refers to the swinging of the terminal device. For example, the terminal device swings with the arm of the carrier in the hand of the carrier, and the relative position of the terminal device changes periodically (for example, relative to the human body), and the attitude angle of the terminal device also changes, for example, It changes with the swing of the arm.
本实施例中,终端设备的携带方式可以通过模式识别的相关算法实现,也可以通过基于其他比较明显的动态特征进行判断,故而对携带方式的判定方式不做限定。In this embodiment, the carrying mode of the terminal device may be implemented by a related algorithm of pattern recognition, or may be determined based on other relatively obvious dynamic features. Therefore, the manner of determining the carrying mode is not limited.
S204、当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态 事件。S204: When the carrying mode of the terminal device is the pick-up mode, the pedestrian gait event is detected by the attitude angle.
当终端设备的携带方式为甩手模式时,终端设备的姿态可以产生周期性的变化,理想化地近似为摆钟运动,利用这种周期性的规律,可以将终端设备的姿态角变化与实际物理运动的行走对应起来,从而实现步态检测。When the carrying mode of the terminal device is the pick-up mode, the posture of the terminal device can be periodically changed, ideally approximated as a pendulum clock motion, and the periodicity of the terminal device can be used to change the attitude angle of the terminal device with the actual physics. The walking of the movement corresponds to the gait detection.
综上所述,本实施例通过获取终端设备的加速度、角速度和地球磁场强度得到大地坐标系的姿态角,并且获取终端设备的携带方式,当携带方式为甩手模式时,通过姿态角检测行人的步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用。In summary, the embodiment obtains the attitude angle of the geodetic coordinate system by acquiring the acceleration, the angular velocity, and the earth magnetic field strength of the terminal device, and acquires the carrying mode of the terminal device. When the carrying mode is the picking mode, the pedestrian is detected by the posture angle. Gait events can ensure that the gait detection algorithm has less error in the case of pickpockets and can be used normally.
第三实施例Third embodiment
参见图3,图中示出了又一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 3, there is shown a flow chart of still another detection method, which can be used to detect a pedestrian gait of a terminal device, and the detection method includes the following steps:
S301、通过终端设备的加速度计获取加速度,通过终端设备的陀螺仪获取角速度,通过终端设备的磁力计获取地球磁场强度。S301: Acquire an acceleration by an accelerometer of the terminal device, obtain an angular velocity by a gyroscope of the terminal device, and acquire an earth magnetic field strength by using a magnetometer of the terminal device.
上述预置坐标系是指载体坐标系,即终端设备本身的坐标系。可选地,终端设备(例如移动终端)可以通过软件控制,例如通过打开软件进而通过终端设备内置的加速度计、陀螺仪和磁力计分别获取加速度、角速度和地球磁场强度。The above preset coordinate system refers to the carrier coordinate system, that is, the coordinate system of the terminal device itself. Alternatively, the terminal device (for example, the mobile terminal) can be controlled by software, for example, by opening the software and then acquiring the acceleration, the angular velocity, and the earth magnetic field strength by the accelerometer, the gyroscope, and the magnetometer built in the terminal device, respectively.
上述软件可以为可检测用户行走事件的软件,使用时,将软件打开后可以携带终端设备行走过程中手臂自然摆动,软件记录加速度、角速度和地球磁场强度数据。The above software may be software that can detect the user's walking event. When the software is opened, the arm can be naturally oscillated while the terminal device is walking, and the software records acceleration, angular velocity and earth magnetic field strength data.
可选地,通过终端设备中加速度计、陀螺仪和磁力计分别获取位于预置坐标系中对应X、Y、Z轴的加速度、角速度和地球磁场强度,即分别获得加速度、角速度和地球磁场强度相对于预置坐标系的X、Y、Z三个轴所在方向的加速度、角速度和地球磁场强度。Optionally, the accelerometer, the gyroscope, and the magnetometer in the terminal device respectively obtain acceleration, angular velocity, and earth magnetic field strength corresponding to the X, Y, and Z axes in the preset coordinate system, that is, obtain acceleration, angular velocity, and earth magnetic field strength, respectively. Acceleration, angular velocity, and earth magnetic field strength in the direction of the three axes of X, Y, and Z relative to the preset coordinate system.
S302、判断加速度、角速度和地球磁场强度的采样频率是否一致,若不一致,则进入步骤S303;若一致,则直接进入步骤S304。S302: determining whether the sampling frequencies of the acceleration, the angular velocity, and the earth magnetic field strength are consistent. If not, the process proceeds to step S303; if they are the same, the process proceeds directly to step S304.
S303、加速度、角速度和地球磁场强度进行预定次数样条插值。S303, acceleration, angular velocity, and earth magnetic field strength are subjected to a predetermined number of spline interpolations.
可以对加速度、角速度和地球磁场强度分别计算采样频率,当采样频率不一致时,对频率较低的数据采用预定次数样条插值,例如三次样条插值,以保持传感器的数据频率一致,经本步骤处理后,进入步骤S304。The sampling frequency can be calculated separately for acceleration, angular velocity and earth magnetic field strength. When the sampling frequency is inconsistent, a predetermined number of spline interpolation is performed on the lower frequency data, for example, cubic spline interpolation to keep the data frequency of the sensor consistent. After the processing, the process proceeds to step S304.
S304、对加速度、角速度和地球磁场强度进行低通滤波。S304: Perform low-pass filtering on acceleration, angular velocity, and earth magnetic field strength.
可以对处理后频率一致或是频率一致的加速度、角速度和地球磁场强度信号进行低通滤波,滤除高频率的干扰信号,得到稳定数据使用。The acceleration, angular velocity and earth magnetic field strength signals with the same frequency or uniform frequency after processing can be low-pass filtered to filter out high-frequency interference signals and obtain stable data.
上述低通滤波(Low-pass filter)方式,低频信号可以正常通过,而超过设定临界值的高频信号则可以被阻隔、减弱,也可以称作高频去除过滤(High-cut filter)。In the above low-pass filter mode, the low-frequency signal can pass normally, and the high-frequency signal exceeding the set threshold can be blocked and weakened, and can also be called a high-cut filter.
S305、根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角。S305. Calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength.
本实施例中,利用姿态航向参考系统AHRS可以根据加速度、角速度和地球磁场强度获得终端设备相对大地坐标系的姿态角。该系统可以包括多个轴向传感器,能够为终端设备提供姿态信息。In this embodiment, the attitude heading reference system AHRS can obtain the attitude angle of the terminal device relative to the geodetic coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength. The system can include a plurality of axial sensors that can provide attitude information to the terminal device.
使用姿态航向参考系统获得姿态角可以是根据四元数微分方程通过梯度下降算法求解当前姿态角的最优解,四元数是由一个实数加上三个虚数组成的四维的超复数,可以表示终端设备在空间中的旋转,即在大地坐标系下的姿态。Obtaining the attitude angle using the attitude heading reference system may be an optimal solution for solving the current attitude angle by a gradient descent algorithm according to the quaternion differential equation, and the quaternion is a four-dimensional super complex number consisting of one real number plus three imaginary numbers, which can represent The rotation of the terminal device in space, ie the attitude in the earth coordinate system.
S306、获取终端设备的携带方式。S306. Obtain a carrying manner of the terminal device.
终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。The carrying mode of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode in addition to the pick-up mode.
甩手模式是指终端设备进行摆动,例如终端设备在携带者手中随携带者手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化,例如随手臂的摆动而变化。The pick-up mode means that the terminal device swings. For example, the terminal device swings with the carrier's arm in the carrier's hand, and the relative position of the terminal device changes periodically (for example, relative to the human body), and the attitude angle of the terminal device also changes, for example, with the arm. The swing changes.
本实施例中,终端设备的携带方式可以通过模式识别的相关算法实现,也可以通过基于其他比较明显的动态特征进行判断,故而对携带方式的判定方式不做限定。In this embodiment, the carrying mode of the terminal device may be implemented by a related algorithm of pattern recognition, or may be determined based on other relatively obvious dynamic features. Therefore, the manner of determining the carrying mode is not limited.
S307、当终端设备的携带方式为甩手模式时,通过姿态角检测行人的步态事件。S307. When the carrying mode of the terminal device is the handcuff mode, the gait event of the pedestrian is detected by the posture angle.
当终端设备的携带方式为甩手模式时,终端设备的姿态会产生周期性的变化,理想化的近似为摆钟运动,利用这种周期性的规律,可以将终端设备的姿态角变化与实际物理运动的行走对应起来,从而实现步态检测。When the carrying mode of the terminal device is the pick-up mode, the posture of the terminal device will change periodically, and the idealized approximation is the pendulum clock motion. With this periodic law, the attitude angle of the terminal device can be changed with the actual physics. The walking of the movement corresponds to the gait detection.
综上所述,本实施例通过获取终端设备的加速度、角速度和地球磁场强 度,在保证采样频率一致的基础上得到大地坐标系的姿态角,并且获取终端设备的携带方式,当携带方式为甩手模式时,通过姿态角检测行人的步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用。In summary, the present embodiment obtains the attitude angle of the geodetic coordinate system on the basis of obtaining the acceleration of the terminal device, the angular velocity, and the strength of the earth magnetic field, and obtains the attitude mode of the ground coordinate system, and acquires the carrying mode of the terminal device. In the mode, the pedestrian's gait event is detected by the attitude angle, which ensures that the gait detection algorithm has less error in the case of pickpockets and can be used normally.
第四实施例Fourth embodiment
参见图4,图中示出了再一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 4, there is shown a flow chart of another detection method, which can be used to detect a pedestrian gait of a terminal device, and the detection method includes the following steps:
S401、获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度。S401. Acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device.
本实施例,可以通过终端设备搭载的加速度计、陀螺仪和磁力计分别获取预置坐标系中的加速度、角速度和地球磁场强度,上述预置坐标系是指载体坐标系,即终端设备本身的坐标系。In this embodiment, the acceleration, angular velocity, and earth magnetic field strength in the preset coordinate system can be respectively acquired by an accelerometer, a gyroscope, and a magnetometer mounted on the terminal device, where the preset coordinate system refers to a carrier coordinate system, that is, the terminal device itself. Coordinate System.
S402、判断地球磁场强度是否小于第一预设值,若小于第一预设值,则进入步骤S403;若不小于第一预设值,则进入步骤S404。S402. Determine whether the strength of the earth magnetic field is less than a first preset value. If the value is less than the first preset value, proceed to step S403; if not less than the first preset value, proceed to step S404.
本实施例中,通过判断地球磁场强度与第一预设值(即预设阈值)的关系,能够得到终端设备受到磁场的干扰的情况。In this embodiment, by determining the relationship between the strength of the earth magnetic field and the first preset value (ie, the preset threshold), it is possible to obtain a situation in which the terminal device is interfered by the magnetic field.
S403、将加速度、角速度和地球磁场强度带入姿态航向参考系统。S403. Bring acceleration, angular velocity and earth magnetic field strength into the attitude heading reference system.
使用姿态航向参考系统获得姿态角可以是根据四元数微分方程通过梯度下降算法求解当前姿态角的最优解,四元数是由一个实数加上三个虚数组成的四维的超复数,可以表示终端设备在空间中的旋转,即在大地坐标系下的姿态:Obtaining the attitude angle using the attitude heading reference system may be an optimal solution for solving the current attitude angle by a gradient descent algorithm according to the quaternion differential equation, and the quaternion is a four-dimensional super complex number consisting of one real number plus three imaginary numbers, which can represent The rotation of the terminal device in space, ie the attitude in the earth coordinate system:
q=(q 0,q 1,q 2,q 3) q=(q 0 ,q 1 ,q 2 ,q 3 )
其中,q 0表示转动的幅度,q 1,q 2,q 3表示转动的旋转轴。用四元数表示姿态的方法计算效率高,也方便插值。 Where q 0 represents the amplitude of the rotation, and q 1 , q 2 , q 3 represent the rotational axis of rotation. The method of expressing the pose by quaternion is computationally efficient and convenient for interpolation.
姿态航向参考系统可以包括两种模式:包含加速度、角速度、磁场强度的九轴模式和包含加速度、角速度的六轴模式。因为加速度、角速度和磁场强度均为三维矢量,故可以根据采用的传感器数据对模式命名。The attitude heading reference system can include two modes: a nine-axis mode including acceleration, angular velocity, and magnetic field strength, and a six-axis mode including acceleration and angular velocity. Because the acceleration, angular velocity, and magnetic field strength are all three-dimensional vectors, the mode can be named based on the sensor data used.
本步骤中,地球磁场强度可以小于预设阈值,则表明终端设备处于磁场干扰较小的地方,此时适用于采用九轴模式。这种方式使得求得的姿态角受磁场干扰较小,更为准确。In this step, the earth magnetic field strength can be less than the preset threshold, indicating that the terminal device is in a place where the magnetic field interference is small, and the nine-axis mode is applicable at this time. In this way, the obtained attitude angle is less affected by the magnetic field and is more accurate.
S404、将加速度、角速度带入姿态航向参考系统。S404. Bring acceleration and angular velocity into the attitude heading reference system.
本步骤中,地球磁场强度可以大于或等于第一预设值(预设阈值),则说明终端设备处于磁场干扰比较大的地方,真实地球磁场强度难以获取,此时适用于采用六轴模式,但可以用九轴模式确定初始姿态角。In this step, the earth magnetic field strength may be greater than or equal to the first preset value (preset threshold), indicating that the terminal device is in a place where the magnetic field interference is relatively large, and the real earth magnetic field strength is difficult to obtain, and the six-axis mode is applicable at this time. However, the initial attitude angle can be determined using a nine-axis mode.
S405、从姿态航向参考系统中获取姿态角。S405. Acquire an attitude angle from the attitude heading reference system.
本实施例中,可以通过地球磁场强度来选择使用姿态航向参考系统的六轴模式或九轴模式,确定所需的姿态角。In this embodiment, the six-axis mode or the nine-axis mode using the attitude heading reference system can be selected by the strength of the earth magnetic field to determine the required attitude angle.
S406、获取终端设备的携带方式。S406. Obtain a carrying manner of the terminal device.
终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。The carrying mode of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode in addition to the pick-up mode.
甩手模式是指终端设备在携带者手中随携带者手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化。The pick-up mode means that the terminal device swings with the carrier's arm in the carrier's hand, and the relative position of the terminal device (for example, relative to the human body) changes periodically, and the attitude angle of the terminal device also changes.
本实施例中,终端设备的携带方式可以通过模式识别的相关算法实现,也可以通过基于其他比较明显的动态特征进行判断,故而对携带方式的判定方式不做限定。In this embodiment, the carrying mode of the terminal device may be implemented by a related algorithm of pattern recognition, or may be determined based on other relatively obvious dynamic features. Therefore, the manner of determining the carrying mode is not limited.
S407、当终端设备的携带方式为甩手模式时,通过姿态角检测行人的步态事件。S407. When the carrying mode of the terminal device is the pick-up mode, the gait event of the pedestrian is detected by the posture angle.
当终端设备的携带方式为甩手模式时,终端设备的姿态可以产生周期性的变化,理想化地近似为摆钟运动,利用这种周期性的规律,可以将终端设备的姿态角变化与实际物理运动的行走对应起来,从而实现步态检测。When the carrying mode of the terminal device is the pick-up mode, the posture of the terminal device can be periodically changed, ideally approximated as a pendulum clock motion, and the periodicity of the terminal device can be used to change the attitude angle of the terminal device with the actual physics. The walking of the movement corresponds to the gait detection.
值得说明的是,本实施例所指的终端设备可以为任何具有测量加速度、角速度及地球磁场强度功能的移动设备,当然也可以为任何可以通过通信方式实时获取携带该终端设备的行人或该终端设备当前的加速度、角速度及地球磁场强度的移动设备。It should be noted that the terminal device referred to in this embodiment may be any mobile device having the functions of measuring acceleration, angular velocity and earth magnetic field strength, and of course, any pedestrian or terminal that can carry the terminal device in real time through communication. Mobile device for current acceleration, angular velocity and Earth's magnetic field strength of the device.
综上所述,本实施例获取终端设备的加速度、角速度、地球磁场强度和终端设备的携带方式,并根据磁场的干扰情况采用不同姿态航向参考系统模式计算姿态角,当携带方式为甩手模式时,通过姿态角检测行人的步态事件,能够保证步态检测算法在甩手情况时误差较小,保证算法正常使用。In summary, the embodiment obtains the acceleration, angular velocity, earth magnetic field strength and the carrying mode of the terminal device of the terminal device, and uses different attitude heading reference system modes to calculate the attitude angle according to the interference condition of the magnetic field, when the carrying mode is the picking mode. By detecting the gait event of the pedestrian through the attitude angle, it is ensured that the gait detection algorithm has less error in the case of picking up the hand, and the algorithm is guaranteed to be used normally.
第五实施例Fifth embodiment
参见图5,图中示出了又再一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 5, there is shown a flow chart of still another detection method, which can be used to detect a pedestrian gait of a terminal device, and the detection method includes the following steps:
S501、获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度。S501. Acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device.
本实施例,可以通过终端设备搭载的加速度计、陀螺仪和磁力计分别获取预置坐标系中的加速度、角速度和地球磁场强度,上述预置坐标系是指载体坐标系,即终端设备本身的坐标系。In this embodiment, the acceleration, angular velocity, and earth magnetic field strength in the preset coordinate system can be respectively acquired by an accelerometer, a gyroscope, and a magnetometer mounted on the terminal device, where the preset coordinate system refers to a carrier coordinate system, that is, the terminal device itself. Coordinate System.
S502、根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角。S502. Calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength.
本实施例中,利用姿态航向参考系统可以根据加速度、角速度和地球磁场强度获得终端设备相对大地坐标系的姿态角。该系统可以包括多个轴向传感器,能够为载体即终端设备提供姿态信息,例如可以提供横滚角、俯仰角和航向角中的一种或多种。In this embodiment, the attitude heading reference system can obtain the attitude angle of the terminal device relative to the geodetic coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength. The system can include a plurality of axial sensors that can provide attitude information to the carrier, ie, the terminal device, for example, one or more of a roll angle, a pitch angle, and a heading angle.
使用姿态航向参考系统获得姿态角可以是根据四元数微分方程通过梯度下降算法求解当前姿态角的最优解,四元数是由一个实数加上三个虚数组成的四维的超复数,可以表示终端设备在空间中的旋转。Obtaining the attitude angle using the attitude heading reference system may be an optimal solution for solving the current attitude angle by a gradient descent algorithm according to the quaternion differential equation, and the quaternion is a four-dimensional super complex number consisting of one real number plus three imaginary numbers, which can represent The rotation of the terminal device in space.
本实施例中,可以使用的是俯仰角,俯仰角为绕预置坐标系Y轴旋转的角度,使用该角度做步态检测不受行人步行方向的影响,且具有较高的稳定性。In this embodiment, the pitch angle can be used, and the pitch angle is an angle of rotation about the Y axis of the preset coordinate system. The use of the angle for gait detection is not affected by the walking direction of the pedestrian, and has high stability.
S503、获取终端设备的携带模式。S503. Acquire a carrying mode of the terminal device.
本实施例中,终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。In this embodiment, the carrying manner of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode collective except the pick-up mode.
甩手模式是指终端设备进行摆动,例如终端设备在手中随手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化,例如随手臂的摆动而变化。The pick-up mode means that the terminal device swings. For example, the terminal device swings with the arm in the hand, and the relative position of the terminal device changes periodically (for example, relative to the human body), and the attitude angle of the terminal device also changes, for example, changes with the swing of the arm. .
本实施例中,终端设备的携带方式可以通过模式识别方法实现,包括以下步骤:In this embodiment, the carrying mode of the terminal device can be implemented by using a pattern recognition method, including the following steps:
S5031、采集第一预设时间内终端设备的加速度和速度信息。S5031: Acquire acceleration and speed information of the terminal device in the first preset time.
S5032、从加速度信息中提取重力分量和线性加速度分量。S5032, extracting a gravity component and a linear acceleration component from the acceleration information.
S5033、从加速度的重力分量、线性加速度分量和速度中选取特征值。S5033: Select a feature value from a gravity component of the acceleration, a linear acceleration component, and a velocity.
可选地,选取重力分量在预置坐标系坐标轴上投影的绝对值、线性加速度在水平和垂直方向的绝对值和角速度在预置坐标系坐标轴上投影的绝对值 作为特征值。Optionally, the absolute value of the gravity component projected on the coordinate system of the preset coordinate system, the absolute value of the linear acceleration in the horizontal and vertical directions, and the absolute value of the angular velocity projected on the coordinate system of the preset coordinate system are selected as the feature values.
S5034、获取终端设备的传感器信息,根据分类规则,确定携带方式的类型,其中,分类规则是根据不同携带方式下特征值的数值分布特征确定的。S5034: Obtain sensor information of the terminal device, and determine a type of the carrying mode according to the classification rule, where the classification rule is determined according to a numerical distribution feature of the feature value in different carrying modes.
上述对于不同携带方式的识别可以是使用基于决策树的模式识别方法,参见图6~图13,图中示出了不同运动状态和携带方式下最明显的特征值具有不同的数值分布特征,图中横轴代表了13携带方式,横坐标从0到12分别为:静止、短信模式行走、电话模式行走、口袋模式行走、甩臂模式行走、短信模式跑步、电话模式跑步、口袋模式跑步、甩臂模式跑步、上楼梯、下楼梯、电梯上行和电梯下行。The above identification for different carrying modes may be a decision tree-based pattern recognition method. Referring to FIG. 6 to FIG. 13 , the most obvious feature values in different motion states and carrying modes have different numerical distribution features. The horizontal axis represents 13 carrying modes, and the abscissa from 0 to 12 are: still, SMS mode walking, phone mode walking, pocket mode walking, arm-arm mode walking, SMS mode running, phone mode running, pocket mode running, 甩The arm mode runs, goes up the stairs, goes down the stairs, the elevator goes up and the elevator goes down.
可以根据图中的统计结果中的统计特征确定携带模式的分类规则,从而利用终端设备采集到的传感器信息对携带方式进行分类判断,确定是否为甩手模式,当然,也可以通过基于其他比较明显的动态特征进行判断,本实施例对携带方式的判定方式不做限定。The classification rule of the carrying mode may be determined according to the statistical features in the statistical results in the figure, so that the sensor information collected by the terminal device is used to classify and determine the carrying mode to determine whether it is a pick-up mode, and of course, it may also be based on other obvious The dynamic feature is determined. In this embodiment, the manner of determining the carrying mode is not limited.
S504、当终端设备的携带方式为甩手模式时,通过姿态角检测行人的步态事件。S504: When the carrying mode of the terminal device is the pick-up mode, the gait event of the pedestrian is detected by the posture angle.
当终端设备的携带方式为甩手模式时,终端设备的姿态可以产生周期性的变化,理想化地近似为摆钟运动,利用这种周期性的规律,可以将终端设备的姿态角变化与实际物理运动的行走对应起来,从而实现步态检测。When the carrying mode of the terminal device is the pick-up mode, the posture of the terminal device can be periodically changed, ideally approximated as a pendulum clock motion, and the periodicity of the terminal device can be used to change the attitude angle of the terminal device with the actual physics. The walking of the movement corresponds to the gait detection.
综上所述,本实施例通过获取终端设备相对于大地坐标系的姿态角和终端设备的携带方式,并通过传感器采集到底速度信息和加速度信息判断携带模式,当携带方式为甩手模式时,通过姿态角检测行人的步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用。In summary, the embodiment obtains the attitude angle of the terminal device relative to the geodetic coordinate system and the carrying mode of the terminal device, and determines the carrying mode by collecting the speed information and the acceleration information by using the sensor, and when the carrying mode is the picking mode, The attitude angle detects pedestrian gait events, which can ensure that the gait detection algorithm has less error in the case of pickpockets and can be used normally.
第六实施例Sixth embodiment
参见图14,图中示出了还再一种检测方法的流程图,该检测方法可用于检测终端设备的行人步态,该检测方法包括以下步骤:Referring to FIG. 14, there is shown a flow chart of still another detection method, which can be used to detect a pedestrian gait of a terminal device, and the detection method includes the following steps:
S1401、获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度。S1401: Acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device.
本实施例,可以通过终端设备搭载的加速度计、陀螺仪和磁力计分别获取预置坐标系中的加速度、角速度和地球磁场强度,上述预置坐标系是指载体坐标系,即终端设备本身的坐标系。In this embodiment, the acceleration, angular velocity, and earth magnetic field strength in the preset coordinate system can be respectively acquired by an accelerometer, a gyroscope, and a magnetometer mounted on the terminal device, where the preset coordinate system refers to a carrier coordinate system, that is, the terminal device itself. Coordinate System.
S1402、根据加速度、角速度和地球磁场强度,计算终端设备相对于大地坐标系的姿态角。S1402: Calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength.
本实施例中,利用姿态航向参考系统可以根据加速度、角速度和地球磁场强度获得终端设备相对大地坐标系的姿态角。该系统可以包括多个轴向传感器,能够为载体即终端设备提供姿态信息,例如获取横滚角、俯仰角和航向角中的一种或多种。In this embodiment, the attitude heading reference system can obtain the attitude angle of the terminal device relative to the geodetic coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength. The system can include a plurality of axial sensors that can provide attitude information to the carrier, ie, the terminal device, such as one or more of a roll angle, a pitch angle, and a heading angle.
使用姿态航向参考系统获得姿态角可以是根据四元数微分方程通过梯度下降算法求解当前姿态角的最优解,四元数是由一个实数加上三个虚数组成的四维的超复数,可以表示终端设备在空间中的旋转。Obtaining the attitude angle using the attitude heading reference system may be an optimal solution for solving the current attitude angle by a gradient descent algorithm according to the quaternion differential equation, and the quaternion is a four-dimensional super complex number consisting of one real number plus three imaginary numbers, which can represent The rotation of the terminal device in space.
S1403、获取终端设备的携带方式。S1403. Obtain a carrying mode of the terminal device.
本实施例中,终端设备的携带方式可以包括甩手模式和其他模式,其他模式是指除甩手模式外的模式统称。In this embodiment, the carrying manner of the terminal device may include a pick-up mode and other modes, and other modes refer to a mode collective except the pick-up mode.
甩手模式是指终端设备进行摆动,例如终端设备在手中随手臂摆动,终端设备相对位置(例如相对于人体)发生周期性变化,终端设备的姿态角也随之变化,例如随手臂的摆动而变化。The pick-up mode means that the terminal device swings. For example, the terminal device swings with the arm in the hand, and the relative position of the terminal device changes periodically (for example, relative to the human body), and the attitude angle of the terminal device also changes, for example, changes with the swing of the arm. .
S1404、判断终端设备的携带方式是否为甩手模式,若为甩手模式,则进入步骤S1405;若不为甩手模式,则可结束流程。S1404: Determine whether the carrying mode of the terminal device is the pick-up mode. If the mode is the hand-held mode, the process proceeds to step S1405. If the hand-held mode is not, the process may be ended.
S1405、对获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角。S1405: Low-pass filtering the acquired attitude angle, and extracting a pitch angle among the plurality of posture angles stored in the second preset time.
本实施例中,可以存储一定时间(例如第二预设时间)的姿态角。In this embodiment, the attitude angle of a certain time (for example, the second preset time) may be stored.
本实施例中,可以使用的是俯仰角,俯仰角为绕预置坐标系Y轴旋转的角度,使用该角度做步态检测不受行人步行方向的影响,且具有较高的稳定性。In this embodiment, the pitch angle can be used, and the pitch angle is an angle of rotation about the Y axis of the preset coordinate system. The use of the angle for gait detection is not affected by the walking direction of the pedestrian, and has high stability.
S1406、判断多个俯仰角中是否存在极小值点,若存在极小值点,则进入步骤S1407;若不存在极小值点,则进入步骤S1408。S1406: determining whether there is a minimum value point among the plurality of elevation angles, and if there is a minimum value point, the process proceeds to step S1407; if there is no minimum value point, the process proceeds to step S1408.
S1407、判断俯仰角的极小值是否小于第二预设值,若小于第二预设值,则进入步骤S1410;若不小于第二预设值,则可结束流程。S1407. Determine whether the minimum value of the pitch angle is smaller than the second preset value. If the value is smaller than the second preset value, the process proceeds to step S1410. If the second preset value is not less than the second preset value, the process may end.
S1408、判断多个俯仰角是否存在极大值点,若存在极大值点,则进入步骤S1409;若不存在极大值点,则可结束流程。S1408. Determine whether there is a maximum value point for the plurality of elevation angles. If there is a maximum value point, proceed to step S1409; if there is no maximum value point, the flow may end.
S1409、判断俯仰角的极大值是否大于第三预设值,若大于第三预设值, 则进入步骤S1410;若不大于第三预设值,则可结束流程。S1409. Determine whether the maximum value of the pitch angle is greater than a third preset value. If the value is greater than the third preset value, the process proceeds to step S1410. If the value is not greater than the third preset value, the process may end.
S1410、输出步态事件。S1410, output gait event.
本实施例中,当俯仰角中存在极值点时,可以采用第二预设值和第三预设值,即先验阈值,对极值点进行检验,以滤除微小动作对本方法的影响,提供本方法的鲁棒性。In this embodiment, when there is an extreme point in the pitch angle, the second preset value and the third preset value, that is, the a priori threshold, may be used to check the extreme point to filter out the influence of the minute action on the method. , providing the robustness of the method.
本实施例中,最终得到图15,图中为甩手模式下携带终端设备行走一个接近矩形的闭合路径得到的俯仰角曲线,图中圆圈代表极大值和极小值,即本方法所认为的步态检测点,从图中可以看到,俯仰角曲线随手臂摆动产生近似正弦函数的周期性变化,而且受行人实际前进方向的影响较小。In this embodiment, FIG. 15 is finally obtained, which is a pitch angle curve obtained by the carrying terminal device walking in a close-to-rectangular closed path in the hand mode, wherein the circle represents a maximum value and a minimum value, that is, the method considers The gait detection point, as can be seen from the figure, the pitch angle curve produces a periodic variation of the approximate sinusoidal function with the swing of the arm, and is less affected by the actual direction of travel of the pedestrian.
综上所述,本实施例通过终端设备相对于大地坐标系的姿态角中俯仰角的极值点的判断,据此输出步态事件,能够在终端设备甩手模式下,获取行人的步态事件并统计步数,保证步态检测算法在甩手情况时误差较小,能够正常使用,能够用于室内或有建筑物遮挡的环境中进行定位。In summary, the present embodiment determines the gait event of the pedestrian in the terminal device pick-up mode by determining the extreme point of the elevation angle of the terminal device relative to the attitude coordinate angle of the geodetic coordinate system. And the number of steps is counted to ensure that the gait detection algorithm has less error in the case of pickpockets and can be used normally, and can be used for positioning indoors or in an environment where buildings are blocked.
第七实施例Seventh embodiment
参见图16,图中示出了终端设备的结构示意图,终端设备包括:姿态角获取模块1601、携带方式获取模块1602和检测模块1603。Referring to FIG. 16, a schematic structural diagram of a terminal device is shown. The terminal device includes: an attitude angle acquiring module 1601, a carrying mode acquiring module 1602, and a detecting module 1603.
其中,姿态角获取模块1601设置为获取终端设备相对于大地坐标系的姿态角;携带方式获取模块1602设置为获取终端设备的携带方式;检测模块1603设置为当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件。The posture angle acquisition module 1601 is configured to acquire the attitude angle of the terminal device relative to the earth coordinate system; the carrier mode acquisition module 1602 is configured to acquire the carrier mode of the terminal device; and the detection module 1603 is configured to be when the terminal device is in the hand-held mode. The pedestrian gait event is detected by the attitude angle.
可选地,姿态角获取模块1601包括信息获取单元16011和姿态角计算单元16012;Optionally, the attitude angle acquisition module 1601 includes an information acquisition unit 16011 and a posture angle calculation unit 16012;
信息获取单元16011设置为获取与终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;姿态角计算单元16012设置为根据加速度、角速度和地球磁场强度,计算终端设备端相对于大地坐标系的姿态角。The information acquisition unit 16011 is configured to acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device; the posture angle calculation unit 16012 is configured to calculate the terminal device end relative to the earth coordinate according to the acceleration, the angular velocity, and the earth magnetic field strength The attitude angle of the system.
可选地,信息获取单元16011包括:Optionally, the information acquiring unit 16011 includes:
第一获取子单元160111:设置为通过终端设备的加速度计获取加速度,通过终端设备的陀螺仪获取角速度,通过终端设备的磁力计获取地球磁场强度;a first obtaining subunit 160111: configured to acquire an acceleration by an accelerometer of the terminal device, acquire an angular velocity by a gyroscope of the terminal device, and acquire an earth magnetic field strength by a magnetometer of the terminal device;
第一处理子单元160112:设置为当加速度、角速度和地球磁场强度的采 样频率不一致时,对加速度、角速度和地球磁场强度进行预定次数样条插值;The first processing subunit 160112 is configured to perform a predetermined number of spline interpolation on the acceleration, the angular velocity, and the earth magnetic field strength when the sampling frequencies of the acceleration, the angular velocity, and the earth magnetic field strength are inconsistent;
第二处理子单元160113:设置为对加速度、角速度和地球磁场强度进行低通滤波。Second processing sub-unit 160113: configured to low pass filter the acceleration, angular velocity, and earth magnetic field strength.
可选地,姿态角计算单元16012包括:Optionally, the attitude angle calculation unit 16012 includes:
第一计算子单元160121:设置为当地球磁场强度小于第一预设值时,将加速度、角速度和地球磁场强度带入姿态航向参考系统;a first calculating subunit 160121: configured to bring the acceleration, the angular velocity, and the earth magnetic field strength into the attitude heading reference system when the earth magnetic field strength is less than the first predetermined value;
第二计算子单元160122:设置为当地球磁场强度大于或等于第一预设值时,将加速度、角速度带入姿态航向参考系统;The second calculating subunit 160122 is configured to bring the acceleration and the angular velocity into the attitude heading reference system when the earth magnetic field strength is greater than or equal to the first preset value;
输出子单元160123:设置为从姿态航向参考系统中输出所述姿态角。Output subunit 160123: configured to output the attitude angle from the attitude heading reference system.
可选地,携带方式获取模块1602包括:Optionally, the carrier mode obtaining module 1602 includes:
参考单元16021:设置为预先采集第一预设时间内终端设备的加速度和速度信息;The reference unit 16021 is configured to pre-acquire acceleration and speed information of the terminal device in the first preset time period;
获取单元16022:设置为从所述加速度信息中获取重力分量和线性加速度分量;An obtaining unit 16022: configured to acquire a gravity component and a linear acceleration component from the acceleration information;
赋值单元16023:设置为从加速度的重力分量、线性加速度分量和速度中选取特征值;An evaluation unit 16023: configured to select a feature value from a gravity component, a linear acceleration component, and a velocity of the acceleration;
确定单元16024:设置为获取终端设备的传感器信息,根据分类规则,确定携带方式,其中,分类规则是根据不同携带方式下特征值的数值分布特征确定的。The determining unit 16024 is configured to acquire the sensor information of the terminal device, and determine the carrying mode according to the classification rule, wherein the classification rule is determined according to the numerical distribution feature of the feature value in different carrying modes.
可选地,检测模块1603包括:Optionally, the detecting module 1603 includes:
提取单元16031:设置为对获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角;The extracting unit 16031 is configured to low-pass filter the acquired posture angle, and extract a pitch angle among the plurality of posture angles stored in the second preset time;
判定单元16032:设置为当多个俯仰角中存在极值且条件满足时,判定为步态事件,所述条件包括:所述多个俯仰角中的极小值小于第二预设值,或者,所述多个俯仰角中的极大值大于第三预设值,或者,所述多个俯仰角中的极小值小于第二预设值和所述多个俯仰角中的极大值大于第三预设值。The determining unit 16032 is configured to determine that the gait event is determined when there is an extreme value among the plurality of pitch angles, and the condition includes: the minimum value of the plurality of pitch angles is smaller than the second preset value, or a maximum value of the plurality of pitch angles is greater than a third preset value, or a minimum value of the plurality of pitch angles is less than a second preset value and a maximum value of the plurality of pitch angles Greater than the third preset value.
综上所述,本实施例中通过姿态角获取模块能够获取所需姿态角,通过携带方式获取模块确定终端设备的携带方式,通过检测模块在终端设备为甩手模式时,通过姿态角检测行人步态事件,能够实现终端设备与行人间相对运动时检测误差较小。In summary, in the embodiment, the attitude angle acquisition module can acquire the required attitude angle, and the carrying mode acquisition module determines the carrying mode of the terminal device, and the detection module detects the pedestrian step through the posture angle when the terminal device is in the pick-up mode. The state event can achieve a small detection error when the relative motion between the terminal device and the pedestrian is relatively small.
可以理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书不同地方出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It is to be understood that the phrase "one embodiment" or "an embodiment" or "an" or "an" Thus, "in one embodiment" or "in an embodiment" or "an" In addition, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
在本公开的各种实施例中,可以理解,上述不同过程的序号的大小并不意味着执行顺序的先后,不同过程的执行顺序可以以其功能和内在逻辑确定。In various embodiments of the present disclosure, it can be understood that the size of the sequence numbers of the different processes described above does not imply a sequence of execution orders, and the order of execution of the different processes may be determined by its function and internal logic.
另外,本文中术语“系统”和“网络”在本文中常可互换使用。Additionally, the terms "system" and "network" are used interchangeably herein.
在本申请所提供的几个实施例中,可以理解到,所揭露方法和装置,可以通过其他的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其他的形式。In the several embodiments provided by the present application, it can be understood that the disclosed method and apparatus can be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
另外,在本公开每个实施例中的不同功能单元可以集成在一个处理单元中,也可以是每个单元单独独立设置,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, different functional units in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may be separately provided separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开每个实施例中行人步态检测方法的部分步骤。而前述的存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The above software functional unit is stored in a storage medium and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the pedestrian gait detection method in each embodiment of the present disclosure. . The foregoing storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. The medium of the code.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述检测方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that are implemented when the computer executable instructions are executed.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组 合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、电可擦除只读存储器(EEPROM,Electrically Erasable Programmable Read-only Memory)、闪存或其他存储器技术、光盘只读存储器(CD-ROM,Compact Disc Read-Only Memory)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Electrically Erasable Programmable Read-only Memory (EEPROM). Flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
本领域的普通技术人员可以理解,可以对本公开的技术方案进行修改或者等同替换,而不脱离本公开技术方案的精神和范围,均应涵盖在本公开的权利要求范围当中。A person skilled in the art can understand that the technical solutions of the present disclosure may be modified or equivalent, without departing from the spirit and scope of the present disclosure, and should be included in the scope of the claims of the present disclosure.
工业实用性Industrial applicability
本公开实施例通过获取终端设备相对于大地坐标系的姿态角和终端设备的携带方式,当终端设备的携带方式为甩手模式时,通过姿态角检测行人步态事件,能够保证步态检测算法在甩手情况时误差较小,能够正常使用,操作过程简单,易于实现。The embodiment of the present disclosure obtains the attitude angle of the terminal device relative to the earth coordinate system and the carrying mode of the terminal device. When the carrying mode of the terminal device is the hand-held mode, the pedestrian gait event is detected by the attitude angle, thereby ensuring that the gait detection algorithm is In the case of pickpockets, the error is small, it can be used normally, the operation process is simple, and it is easy to implement.

Claims (10)

  1. 一种检测方法,所述方法包括:A detection method, the method comprising:
    获取所述终端设备相对于大地坐标系的姿态角;Obtaining an attitude angle of the terminal device relative to a geodetic coordinate system;
    获取所述终端设备的携带方式;Obtaining a carrying manner of the terminal device;
    当所述终端设备的携带方式为甩手模式时,通过所述姿态角检测行人步态事件。When the carrying mode of the terminal device is the handcuff mode, the pedestrian gait event is detected by the posture angle.
  2. 根据权利要求1所述的检测方法,其中,所述获取所述终端设备相对于大地坐标系的姿态角,包括:The detecting method according to claim 1, wherein the acquiring the attitude angle of the terminal device with respect to the earth coordinate system comprises:
    获取与所述终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;Obtaining acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device;
    根据所述加速度、角速度和地球磁场强度,计算所述终端设备相对于大地坐标系的姿态角。An attitude angle of the terminal device relative to the earth coordinate system is calculated based on the acceleration, the angular velocity, and the earth magnetic field strength.
  3. 根据权利要求2所述的检测方法,其中,所述获取与所述终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度,包括:The detecting method according to claim 2, wherein the acquiring acceleration, angular velocity and earth magnetic field strength in a preset coordinate system corresponding to the terminal device comprises:
    通过所述终端设备的加速度计获取加速度,通过所述终端设备的陀螺仪获取角速度,通过所述终端设备的磁力计获取地球磁场强度;Obtaining acceleration by an accelerometer of the terminal device, obtaining an angular velocity by a gyroscope of the terminal device, and acquiring an earth magnetic field strength by a magnetometer of the terminal device;
    当所述加速度、角速度和地球磁场强度的采样频率不一致时,对所述加速度、角速度和地球磁场强度进行预定次数样条插值;When the sampling frequencies of the acceleration, the angular velocity, and the earth magnetic field strength are inconsistent, the acceleration, the angular velocity, and the earth magnetic field strength are subjected to a predetermined number of spline interpolation;
    对所述加速度、角速度和地球磁场强度进行低通滤波。The acceleration, angular velocity, and earth magnetic field strength are low pass filtered.
  4. 根据权利要求2所述的检测方法,其中,所述根据所述加速度、角速度和地球磁场强度,计算所述终端设备相对于大地坐标系的姿态角,包括:The detecting method according to claim 2, wherein the calculating the attitude angle of the terminal device with respect to the earth coordinate system according to the acceleration, the angular velocity and the earth magnetic field strength comprises:
    当所述地球磁场强度小于第一预设值时,将所述加速度、角速度和地球磁场强度带入姿态航向参考系统;When the earth magnetic field strength is less than a first preset value, the acceleration, angular velocity, and earth magnetic field strength are brought into the attitude heading reference system;
    当所述地球磁场强度大于或等于第一预设值时,将所述加速度、角速度带入姿态航向参考系统;When the earth magnetic field strength is greater than or equal to a first preset value, the acceleration and angular velocity are brought into the attitude heading reference system;
    从所述姿态航向参考系统中输出所述姿态角。The attitude angle is output from the attitude heading reference system.
  5. 根据权利要求1所述的检测方法,其中,所述获取所述终端设备的携 带方式,包括:The detecting method according to claim 1, wherein the obtaining the carrying mode of the terminal device comprises:
    采集第一预设时间内终端设备的加速度和速度信息;Collecting acceleration and speed information of the terminal device in the first preset time;
    从所述加速度信息中获取重力分量和线性加速度分量;Obtaining a gravity component and a linear acceleration component from the acceleration information;
    从加速度的重力分量、线性加速度分量和速度中选取特征值;Selecting a feature value from a gravity component of the acceleration, a linear acceleration component, and a velocity;
    获取终端设备的传感器信息,根据分类规则,确定携带方式的类型,其中,所述分类规则是根据不同携带方式下特征值的数值分布特征确定的。The sensor information of the terminal device is obtained, and the type of the carrying mode is determined according to the classification rule, wherein the classification rule is determined according to the numerical distribution feature of the feature value in different carrying modes.
  6. 根据权利要求1所述的检测方法,其中,所述通过所述姿态角检测行人的步态事件,包括:The detecting method according to claim 1, wherein said detecting a gait event of a pedestrian by said posture angle comprises:
    对所述获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角;Performing low-pass filtering on the acquired attitude angle to extract a pitch angle among a plurality of attitude angles stored in the second preset time;
    当提取的多个俯仰角中存在极值且条件满足时,判定为步态事件,所述条件包括:所述多个俯仰角中的极小值小于第二预设值,或者,所述多个俯仰角中的极大值大于第三预设值,或者,所述多个俯仰角中的极小值小于第二预设值和所述多个俯仰角中的极大值大于第三预设值。Determining a gait event when there is an extreme value in the extracted plurality of elevation angles, and the condition includes: a minimum value of the plurality of elevation angles is less than a second preset value, or The maximum value of the pitch angles is greater than the third preset value, or the minimum of the plurality of pitch angles is smaller than the second preset value and the maximum value of the plurality of pitch angles is greater than the third pre- Set the value.
  7. 一种终端设备,所述终端设备包括:A terminal device, the terminal device comprising:
    姿态角获取模块:设置为获取所述终端设备相对于大地坐标系的姿态角;An attitude angle acquisition module: configured to acquire an attitude angle of the terminal device relative to a geodetic coordinate system;
    携带方式获取模块:设置为获取所述终端设备的携带方式;The carrying mode acquiring module is configured to acquire the carrying mode of the terminal device.
    检测模块:设置为当所述终端设备的携带方式为甩手模式时,通过所述姿态角检测行人步态事件。The detecting module is configured to detect a pedestrian gait event by using the posture angle when the carrying mode of the terminal device is the pick-up mode.
  8. 根据权利要求7所述的终端设备,其中,所述姿态角获取模块包括:The terminal device according to claim 7, wherein the attitude angle acquisition module comprises:
    信息获取单元:设置为获取与所述终端设备对应的预置坐标系中的加速度、角速度和地球磁场强度;An information acquiring unit: configured to acquire acceleration, angular velocity, and earth magnetic field strength in a preset coordinate system corresponding to the terminal device;
    姿态角计算单元:设置为根据所述加速度、角速度和地球磁场强度,计算所述终端设备相对于大地坐标系的姿态角;An attitude angle calculation unit configured to calculate an attitude angle of the terminal device relative to the earth coordinate system according to the acceleration, the angular velocity, and the earth magnetic field strength;
    其中,所述信息获取单元包括:The information acquiring unit includes:
    第一获取子单元:设置为通过终端设备的加速度计获取加速度,通过终端设备的陀螺仪获取角速度,通过终端设备的磁力计获取地球磁场强度;a first acquiring subunit: configured to acquire an acceleration by an accelerometer of the terminal device, obtain an angular velocity by a gyroscope of the terminal device, and acquire an earth magnetic field strength by a magnetometer of the terminal device;
    第一处理子单元:设置为当所述加速度、角速度和地球磁场强度的采样频率不一致时,对所述加速度、角速度和地球磁场强度进行预定次数样条插值;a first processing subunit: configured to perform a predetermined number of spline interpolation on the acceleration, the angular velocity, and the earth magnetic field strength when the sampling frequencies of the acceleration, the angular velocity, and the earth magnetic field strength are inconsistent;
    第二处理子单元:设置为对所述加速度、角速度和地球磁场强度进行低通滤波;a second processing subunit: configured to low pass filter the acceleration, angular velocity, and earth magnetic field strength;
    所述姿态角计算单元包括:The attitude angle calculation unit includes:
    第一计算子单元:设置为当所述地球磁场强度小于第一预设值时,将所述加速度、角速度和地球磁场强度带入姿态航向参考系统;a first calculating subunit: configured to bring the acceleration, angular velocity, and earth magnetic field strength into the attitude heading reference system when the earth magnetic field strength is less than a first predetermined value;
    第二计算子单元:设置为当所述地球磁场强度大于或等于第一预设值时,将所述加速度、角速度带入姿态航向参考系统;a second calculating subunit: configured to bring the acceleration and angular velocity into the attitude heading reference system when the earth magnetic field strength is greater than or equal to a first preset value;
    输出子单元:设置为从所述姿态航向参考系统中输出所述姿态角。Output subunit: configured to output the attitude angle from the attitude heading reference system.
  9. 根据权利要求7所述的终端设备,其中,所述携带方式获取模块包括:The terminal device according to claim 7, wherein the carrying mode acquisition module comprises:
    参考单元:设置为采集第一预设时间内终端设备的加速度和速度信息;Reference unit: configured to collect acceleration and speed information of the terminal device in the first preset time period;
    获取单元:设置为从所述加速度信息中获取重力分量和线性加速度分量;An acquiring unit: configured to acquire a gravity component and a linear acceleration component from the acceleration information;
    赋值单元:设置为从所述加速度的重力分量、线性加速度分量和速度中选取特征值;An evaluation unit: configured to select a feature value from a gravity component, a linear acceleration component, and a velocity of the acceleration;
    确定单元:设置为获取终端设备的传感器信息,根据分类规则,确定携带方式,其中,所述分类规则是根据不同携带方式下特征值的数值分布特征确定的。The determining unit is configured to obtain the sensor information of the terminal device, and determine the carrying mode according to the classification rule, wherein the classification rule is determined according to the numerical distribution feature of the feature value in different carrying modes.
  10. 根据权利要求7所述的终端设备,其中,所述检测模块包括:The terminal device according to claim 7, wherein the detecting module comprises:
    提取单元:设置为对所述获取的姿态角低通滤波,提取第二预设时间内存储的多个姿态角中的俯仰角;Extracting unit: configured to low-pass filter the acquired posture angle, and extract a pitch angle among a plurality of posture angles stored in the second preset time;
    判定单元:设置为当提取的多个俯仰角存在极值且条件满足时,判定为步态事件,所述条件包括:所述多个俯仰角中的极小值小于第二预设值,或者,所述多个俯仰角中的极大值大于第三预设值,或者,所述多个俯仰角中的极小值小于第二预设值和所述多个俯仰角中的极大值大于第三预设值。a determining unit: configured to determine a gait event when the extracted plurality of pitch angles have an extreme value and the condition is satisfied, the condition comprising: a minimum value of the plurality of pitch angles is less than a second preset value, or a maximum value of the plurality of pitch angles is greater than a third preset value, or a minimum value of the plurality of pitch angles is less than a second preset value and a maximum value of the plurality of pitch angles Greater than the third preset value.
PCT/CN2018/075384 2017-02-14 2018-02-06 Detection method and terminal device WO2018149324A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710078777.3 2017-02-14
CN201710078777.3A CN108426573B (en) 2017-02-14 2017-02-14 Pedestrian gait detection method of terminal equipment and terminal equipment

Publications (1)

Publication Number Publication Date
WO2018149324A1 true WO2018149324A1 (en) 2018-08-23

Family

ID=63155064

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075384 WO2018149324A1 (en) 2017-02-14 2018-02-06 Detection method and terminal device

Country Status (2)

Country Link
CN (1) CN108426573B (en)
WO (1) WO2018149324A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114526727A (en) * 2022-01-11 2022-05-24 重庆邮电大学 Decision tree-based step number distinguishing method

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685111B (en) * 2018-11-26 2023-04-07 深圳先进技术研究院 Motion recognition method, computing system, intelligent device and storage medium
CN109883431A (en) * 2019-02-21 2019-06-14 北京方位捷讯科技有限公司 One kind walking appearance judgment method and system
CN110420029A (en) * 2019-08-03 2019-11-08 苏州自如医疗器械有限公司 A kind of walking step state wireless detecting system based on Multi-sensor Fusion
CN111751573B (en) * 2019-09-10 2022-05-27 广东小天才科技有限公司 Mobile terminal and moving direction determining method thereof
CN110693501A (en) * 2019-10-12 2020-01-17 上海应用技术大学 Wireless walking gait detection system based on multi-sensor fusion
CN112237427A (en) * 2020-10-14 2021-01-19 北京爱笔科技有限公司 Method and device for detecting steps, detection equipment and computer storage medium
CN112268556B (en) * 2020-10-23 2022-02-25 重庆越致科技有限公司 Method and device for detecting state of pedestrian taking escalator
CN112304316B (en) * 2020-10-23 2021-11-26 重庆越致科技有限公司 Method and device for automatically detecting state and track of pedestrian taking elevator
CN113203416B (en) * 2021-03-19 2022-07-12 电子科技大学 Pedestrian dead reckoning method for swing arm pedestrian

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184549A (en) * 2011-04-29 2011-09-14 韩铮 Motion parameter determination method and device and motion auxiliary equipment
JP4993758B2 (en) * 2008-04-24 2012-08-08 Kddi株式会社 Portable terminal, program and method for determining direction of travel of pedestrian using acceleration sensor
CN103884337A (en) * 2012-12-19 2014-06-25 财团法人工业技术研究院 Multi-attitude step correction positioning system and method
CN105278681A (en) * 2014-07-18 2016-01-27 苹果公司 Raise gesture detection in device
CN105674984A (en) * 2016-01-18 2016-06-15 上海交通大学 Method for acquiring advancing directions of pedestrians by aid of mobile terminals without constraints

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5256846B2 (en) * 2008-05-16 2013-08-07 住友電気工業株式会社 Posture specifying device, moving direction specifying device, position specifying device, computer program, and posture specifying method
JP5463702B2 (en) * 2009-03-16 2014-04-09 セイコーエプソン株式会社 Step detection method and step detection device
CN104567931B (en) * 2015-01-14 2017-04-05 华侨大学 A kind of heading effect error cancelling method of indoor inertial navigation positioning
CN104699965B (en) * 2015-03-08 2017-06-13 西安电子科技大学 Estimation of parameters of near field sources method based on angle measuring interferometer
CN105203098B (en) * 2015-10-13 2018-10-02 上海华测导航技术股份有限公司 Agricultural machinery all-attitude angle update method based on nine axis MEMS sensors

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4993758B2 (en) * 2008-04-24 2012-08-08 Kddi株式会社 Portable terminal, program and method for determining direction of travel of pedestrian using acceleration sensor
CN102184549A (en) * 2011-04-29 2011-09-14 韩铮 Motion parameter determination method and device and motion auxiliary equipment
CN103884337A (en) * 2012-12-19 2014-06-25 财团法人工业技术研究院 Multi-attitude step correction positioning system and method
CN105278681A (en) * 2014-07-18 2016-01-27 苹果公司 Raise gesture detection in device
CN105674984A (en) * 2016-01-18 2016-06-15 上海交通大学 Method for acquiring advancing directions of pedestrians by aid of mobile terminals without constraints

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114526727A (en) * 2022-01-11 2022-05-24 重庆邮电大学 Decision tree-based step number distinguishing method
CN114526727B (en) * 2022-01-11 2023-11-21 重庆邮电大学 Decision tree-based step number judging method

Also Published As

Publication number Publication date
CN108426573B (en) 2023-04-07
CN108426573A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
WO2018149324A1 (en) Detection method and terminal device
Qian et al. An improved indoor localization method using smartphone inertial sensors
Zhou et al. Use it free: Instantly knowing your phone attitude
US11199421B2 (en) Technologies for pedestrian dead reckoning
EP3019827B1 (en) Indoor location-finding using magnetic field anomalies
US20130311134A1 (en) Method for step detection and gait direction estimation
WO2016131279A1 (en) Movement track recording method and user equipment
WO2014074837A1 (en) Unsupervised indoor localization and heading directions estimation
CN107255474B (en) PDR course angle determination method integrating electronic compass and gyroscope
CN104776846B (en) Mobile device and method for estimating motion direction of user on mobile device
WO2016198009A1 (en) Heading checking method and apparatus
US20160097788A1 (en) Pedestrian direction of motion determination system and method
CN111829516B (en) Autonomous pedestrian positioning method based on smart phone
US10533874B2 (en) Inertial positioning and navigation device featuring a novel walk detection method
CN107990901B (en) User direction positioning method based on sensor
US9605966B2 (en) Method for estimating a trajectory orientation followed by a movement sensor carrier, corresponding device and computer program
Panyov et al. Indoor positioning using Wi-Fi fingerprinting pedestrian dead reckoning and aided INS
Liu et al. A novel heading estimation algorithm for pedestrian using a smartphone without attitude constraints
US10466054B2 (en) Method and system for estimating relative angle between headings
US10551195B2 (en) Portable device with improved sensor position change detection
Qian et al. Optical flow based step length estimation for indoor pedestrian navigation on a smartphone
US10895626B2 (en) Device state estimation with body-fixed assumption
Kundra et al. The summary of indoor navigation possibilities considering mobile environment
Nabil et al. A new Kalman filter-based algorithm to improve the indoor positioning
KR20150046819A (en) Method for obtaining a location information of mobile, terminal thereof, and system thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18754384

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18754384

Country of ref document: EP

Kind code of ref document: A1