WO2019085068A1 - 人体检测装置及方法 - Google Patents

人体检测装置及方法 Download PDF

Info

Publication number
WO2019085068A1
WO2019085068A1 PCT/CN2017/112439 CN2017112439W WO2019085068A1 WO 2019085068 A1 WO2019085068 A1 WO 2019085068A1 CN 2017112439 W CN2017112439 W CN 2017112439W WO 2019085068 A1 WO2019085068 A1 WO 2019085068A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
distance
distance data
human body
data group
Prior art date
Application number
PCT/CN2017/112439
Other languages
English (en)
French (fr)
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 WO2019085068A1 publication Critical patent/WO2019085068A1/zh

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

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a human body detecting device and method.
  • Robots are emerging comprehensive disciplines developed in recent decades, focusing on the latest research results in various disciplines such as mechanical engineering, electronic engineering, information science, automatic control and artificial intelligence, representing the highest achievements of current science and engineering. It is one of the most active research fields in the development of science and technology. Among them, service robots have been widely used.
  • a signal group such as ⁇ D a , D b >, ⁇ D b , D c >, ⁇ D c , D d >, etc.; thereafter, the state of the human body is judged according to the signal group, specifically, if the previous infrared signal intensity value is greater than The latter infrared signal strength value, and the sum of the difference sums in each of the signal groups is greater than the first threshold S 1 , determining that the user leaves the sensor; if the previous infrared signal strength value is less than the latter infrared signal strength value, and each The sum of the difference sums in the signal group is greater than the second threshold S 2 to determine that the user is close to the sensor.
  • the ability of human body detection has limitations, and it can only detect the human body in a moving state, and lacks the ability to judge the human body/object in a stationary state, for example, if a sensor is placed in front of the sensor. The obstacle that the chair/stool is in a static state, the sensor will mistake the obstacle as a standing person and cannot distinguish.
  • the object of the present invention is to provide a human body detecting device and method, which can effectively solve the technical problem that the prior art cannot effectively distinguish whether the human body or the object is in a stationary state.
  • the present invention provides a human body detecting device, including:
  • At least one distance sensor for periodically collecting distance data s t from the detected object
  • a memory for storing a plurality of instructions, the instructions being adapted to be loaded and executed by the processor, wherein the plurality of instructions include:
  • the fluctuation value is greater than a preset threshold, it is determined that the detected object is a human body.
  • the invention also provides a human body detecting method, comprising:
  • the fluctuation value is greater than a preset threshold, it is determined that the detected object is a human body.
  • the beneficial effects are:
  • the pre-processing operation is performed on the distance data s t collected by the distance sensor, including debugging and smoothing processing, thereby eliminating human body detection due to data acquisition errors and environmental background noise.
  • the interference and influence brought by the human body greatly improve the sensitivity of the human detecting device to the detected object.
  • the change trend of the distance between the detected object and the distance sensor is determined according to the result of the data fitting. Further, it is simple and convenient to determine the motion state of the detected object and output it. If it is judged that the output result is that the detected object is in a stationary state, it is further determined whether the human body is in a stationary state according to the fluctuation value of the distance data, and the detection of the human body in a stationary state is realized, and the standing human body and the stationary object are distinguished, and the original human body detection is eliminated. Judgment interference caused by stationary objects.
  • the human body detecting device and method provided by the present invention analyzes the continuous data change trend and the change fluctuation in a period of time in the process of detecting the human body, instead of judging the comparative analysis of the simple distance data itself, thereby greatly improving the human body. The accuracy of the test.
  • Figure 1 is a schematic view of a human body detecting device of the present invention
  • FIG. 2 is a schematic flow chart of an embodiment of a plurality of instructions stored in a memory in the present invention
  • 100-human detection device 110-distance sensor, 120-processor, 130-memory
  • FIG. 1 is a schematic diagram of a human body detecting device provided by the present invention.
  • the human body detecting device 100 includes: at least one distance for periodically collecting distance data s t between the detected object and the detected object.
  • a sensor 110 in the detection process, a distance sensor detects a detected object
  • a processor 120 for implementing each instruction
  • a memory 130 for storing instructions suitable for loading and executing by the processor, wherein the memory and the distance
  • the sensors are each connected to a processor.
  • a plurality of instructions stored in the memory shown in Figure 2 comprising: S10 received from the data collected by the sensor distance s t; S20 for a predetermined number of distance data s t m debug and smoothing processing to obtain a first data Group W, performing error processing on the preset number m of distance data s t to obtain a second data group W'; S30 performing a fitting operation on the first data group W, and determining the detected object and the distance sensor according to the fitting result
  • the change trend of the distance the S40 determines that the detected object is in a static state when the change trend is unchanged; S50 calculates the fluctuation value of the second data set W'; S60 determines that the detected object is the human body when the fluctuation value is greater than the preset threshold .
  • the distance sensor s t (the original distance data detected by the distance sensor at time t ) is detected periodically using a distance sensor (eg, every 0.1 s, every 0.2 s, etc.) and sent to the processor immediately. Process it. After receiving the distance data s t uploaded by the distance sensor, the pre-processing operation is performed, and the pre-processed distance data is added to the corresponding first data group W and second data group W'.
  • the received distance data s t is debugged and smoothed to obtain the first distance data d t
  • the received distance data s t is debugged to obtain the second distance data d′ t
  • the first distance data d t is sequentially added to the first data group W and the second distance data d′ t is added to the second data group W′ according to the constructed sliding window.
  • the distance data s t is not greater than the preset maximum distance value, further determining the difference between the distance data s t acquired at the current time and the distance data s t-1 acquired at the previous time, if
  • the first distance data d t is sequentially added to the data group storing the processing result according to the constructed sliding window, and the second distance data d′ is t is added to the data group storing the processing result, and after accumulating a preset number of m data, the first data group W and the second data group W' are obtained, which facilitates subsequent data fitting.
  • the gap between the adjacent first data group W/second data group W' is often very small (there is only one distance data offset between adjacent data groups, the detection result is similar), and does not need to be A newly constructed first data group W/second data group W' is detected, so that each detected data group (first data group W/second data group W') is set in advance before further processing is performed. after detecting the distance between the W step, i.e.
  • step the sliding window W step (set according to actual situation, such as the set 20, 30, etc.), it represents a distance every W step data s t, the only The newly constructed first data set W/second data set W' is placed in a subsequent detection step for detection. Specifically, in the process: if the number of data in the current two data groups is less than mW step , the second distance data d′ t is added to the second data group W′, and the first distance data d t is added to the first A data group W, and jumps to step S10 to enter the step of processing the newly acquired distance data s t .
  • the second distance data d' t is further added to the second data group W', and the first distance data d t is added to the first data group W, and D t is determined from the first data a first set of data added to W / second data set W 'data added to the second distance d' t is the number of steps reaches the sliding W step, if so, the first current A data group W is sent to the next dynamic detection step; otherwise, it jumps to step S10 to enter the step of processing the newly acquired distance data s t .
  • the value of the sliding step length W step is determined according to the actual situation, and is not specifically limited herein.
  • the first data group W is then fitted to determine the change trend of the distance between the detected object and the distance sensor.
  • the change trend of the distance between the detected object and the distance sensor is determined according to the slope value a, and the state of the detected object in the current detection window is determined according to the change trend.
  • the change trend is constant (the constant here does not mean that each of the distance data d t included in the first data group W is absolutely equal
  • the fitting as long as the trend of the change is preset Within the range, that is, the fitted slope value a is within the set threshold range, it can be said to be unchanged), and it is judged that the detected object is in a stationary state in the current detection window; on the contrary, if the change trend is judged to be When it becomes larger or smaller (that is, the slope value a obtained by the fitting is larger or smaller than a preset threshold value), it is directly determined that the object to be detected is a human body (the object to be detected is in a moving state, leaving or approaching).
  • the trend of the current detection window does not accurately determine whether the detected object is really in a stationary state. Therefore, in order to improve the accuracy of the judgment, when according to the current detection window, the first The fitting result of the data group W determines that the change trend of the distance between the detected object and the distance sensor is constant, and further determines whether the fitting result of the first data group in the previous detection window is also between the detected object and the distance sensor. The change trend of the distance is unchanged; if so, it is judged that the detected object in the current detection window is in a stationary state (that is, the result obtained by fitting the first data group W twice in a continuous state is in a stationary state); otherwise, the direct determination is detected.
  • the object is the human body (that is, the result of the previous detection window fitting is in motion).
  • the rule for comprehensively determining based on the plurality of determination results may be arbitrarily set according to actual conditions.
  • the detected object after determining that the detected object is in a stationary state according to the above method, further performing a minimum distance between the currently detected object and the distance sensor and a preset minimum distance between the detected object and the distance sensor In comparison, if the distance between the currently detected object and the distance sensor is less than the minimum distance, it is determined that the detected object is a human body (normally, if it is not a human body, it will not be too close to the distance sensor for a long time); otherwise, it enters a subsequent calculation.
  • the step of detecting the fluctuation value of the second data set W' of the window In another embodiment, after determining that the detected object is in a stationary state according to the above method, further performing a minimum distance between the currently detected object and the distance sensor and a preset minimum distance between the detected object and the distance sensor.
  • the fitting results of the first data set W are divided into four types: "none”, “close”, “away”, and “stay”, and in order to improve the accuracy of the judgment result, a single detection window is The judgment result is taken as part of the overall dynamic detection judgment.
  • a minimum distance ClosestRange between the detected object and the distance sensor is preset, and if the distance between the detected object and the sensor is less than the minimum distance ClosestRange, an alarm is issued, and the distance is too close; Determining a first preset slope threshold ⁇ 1 , a second preset slope threshold ⁇ 2 , a third preset slope threshold ⁇ 3 , and a fourth preset slope threshold ⁇ 4 , and setting a size relationship: a first preset slope threshold ⁇ 1 ⁇ second preset slope threshold ⁇ 2 ⁇ third preset slope threshold ⁇ 3 ⁇ fourth preset slope threshold ⁇ 4 .
  • the slope value a is smaller than the first preset slope threshold ⁇ 1 (a ⁇ 1 ), it is determined that the result of the current detection window is close; if the slope value a is in the second Between the preset slope threshold ⁇ 2 and the third preset slope threshold ⁇ 3 ( ⁇ 2 ⁇ a ⁇ ⁇ 3 ), it is determined that the result of the current detection window is a stay; if the slope value a is greater than the fourth preset slope threshold ⁇ 4 ( a> ⁇ 4 ), it is determined that the result of the current detection window is far away; if not, the result of the current detection window is determined to be “none”.
  • the process goes to step S10 to enter the step of processing the newly collected distance data s t ; if the determination result of the current detection window is not “None”, the save is performed.
  • the values in the first data group W and the second data group W' of the detection window are cleared, and the process proceeds to step S10, where the process of processing the newly acquired distance data s t is performed, and the next judgment result is awaited.
  • the first preset slope threshold ⁇ 1 is set to -0.5
  • the second preset slope threshold ⁇ 2 is set to -0.1
  • the third preset slope threshold ⁇ 3 is set to 0.1
  • the fourth preset slope threshold is 0.7.
  • the motion state of the detected object is comprehensively determined and output in conjunction with the judgment result of the previous detection window.
  • the dynamic detection rule table shown in Table 1 if the result of the current detection window W now is staying (the change trend of the distance between the detected object and the distance sensor is constant), and the judgment result of the previous detection window W If the last is close, it is further determined whether the current first distance data d t is smaller than the preset minimum distance ClosestRange; if yes, it is determined that the human body is detected, and the distance is too close, and an alarm is issued; otherwise, it is determined that the human body in the close state is detected; The result of the detection window W now is staying, and the judgment result W last of the previous detection window is also staying, further determining whether the current first distance data d t is smaller than the preset minimum distance ClosestRange; if yes, determining that the human body is detected and the distance is If too close, an alarm
  • determining whether the object to be detected is in a stationary state (a human body or an object in the above-described stay state) according to the above rule
  • it is further determined by calculating a fluctuation value V of the second data group W' (static
  • the detection includes the following steps: calculating a fluctuation value of the second data group W′; determining that the detected object is a human body when the fluctuation value is greater than a preset threshold; otherwise determining that the object is a stationary object.
  • the preset threshold may be set according to actual conditions, for example, the preset threshold is set to 30 cm (cm), so that when the fluctuation value calculated according to the second data group W' is greater than 30 cm, it is determined that the object to be detected is a human body. ; otherwise it is determined to be a stationary object.
  • the embodiment is improved to obtain the present embodiment.
  • the fluctuation value of the second data group W' is calculated (the current detection window After the fluctuation value), the fluctuation value of the previous detection window is obtained, and the two fluctuation values are added to obtain the sum of the fluctuation values V sum ; after that, it is judged whether the sum of the fluctuation values of the two detection windows is greater than the preset fluctuation threshold ⁇ 1 If yes, it is determined that the current state is in a static state; otherwise, it is further determined whether the number of times the detected object in the stationary state is determined to be the human body in the detection window before the current detection window is greater than a preset statistical threshold; if yes, the determination is currently The human body is at rest; otherwise, it is judged as an object.
  • the current detection window and the previous detection window both include two data groups, which are a first data group and a second data group respectively; and two data groups included in each detection window are preset the number of distance data s t m different are obtained by pre-processing (i.e., two raw data sets from the same data s t).
  • pre-processing i.e., two raw data sets from the same data s t.
  • the original distance data of the pre-processing operation is different from that in the current detection window (acquired by the distance sensor at different times), that is, the obtained first data group and the second data group and the current detection.
  • the first data group W and the second data group W' in the window are different, and thus the fluctuation value calculated according to the second data group W' in the current detection window is calculated according to the second data group in the previous detection window.
  • the fluctuation values are different. For the acquisition of the fluctuation value in the previous detection window, if the fluctuation value of the second data group in the previous detection window exists (calculated and stored in the previous detection window), it can be directly read; if the previous detection window If the fluctuation value of the second data group does not exist, the fluctuation value of the second data group in the previous detection window is calculated by the same method as the fluctuation value in the current detection window.
  • the static value of the "human body” is preset to be Count human .
  • V sum V last +V now
  • V last the fluctuation value calculated by the last static detection
  • V now The current fluctuation value calculated by static detection
  • the sum of the calculated fluctuation values V sum is compared with the preset fluctuation threshold ⁇ 1 , and if V sum > ⁇ 1 , it is directly determined that the current state is “human body”; if V sum ⁇ 1 , The fluctuation of the detected object is small, and it is further determined whether the statistical value Count human is greater than the statistical threshold ⁇ 2 , and if so, it is determined that the current state is "human body", otherwise it is determined as "object”.
  • step S10 After the result is outputted by the above dynamic detection and static detection, the process returns to step S10, and the process of processing the newly acquired distance data s t is performed to obtain new distance data s t , and the detection window is reconstructed to detect the newly constructed data array. , in this loop.
  • the fluctuation threshold ⁇ 1 is set to 30 cm (cm), and the statistical threshold ⁇ 2 is set to 1 (if the calculation of the fluctuation value in the previous detection window finally determines the object to be detected in a stationary state as In the human body, the detected object in the stationary state is still determined as the human body in the current detection window.
  • the fluctuation threshold ⁇ 1 and the statistical threshold ⁇ 2 may also be set to other values, such as the fluctuation threshold.
  • ⁇ 1 is set to 20 cm, 40 cm, etc.
  • the statistical threshold ⁇ 2 is set to 2, 3, or the like.
  • the present invention further provides a human body detecting method, comprising: S10 receiving distance data collected by a distance sensor s t ; S20 performing error debugging and smoothing processing on a preset number m of distance data s t W data set, preset number m of distance data s t debug process to obtain a second data set W '; S30 for the first data set W is fit operation, the distance sensor and the object to be detected according to the result of the determination fitting The change trend of the distance between the two; S40 when the change trend is unchanged, determining that the detected object is in a stationary state; S50 calculates the fluctuation value of the second data group W'; S60, when the fluctuation value is greater than the preset threshold, determining that the detected object is human body.
  • the distance sensor s t (the original distance data detected by the distance sensor at time t ) is detected periodically using a distance sensor (eg, every 0.1 s, every 0.2 s, etc.) and sent to the processor immediately. Process it. After processing the distance data s t uploaded by the distance sensor, the pre-processing operation is performed, and the pre-processed distance data is added to the corresponding first data group W and second data group W'.
  • the received distance data s t is debugged and smoothed to obtain the first distance data d t
  • the received distance data s t is debugged to obtain the second distance data d′ t
  • the first distance data d t is sequentially added to the first data group W and the second distance data d′ t is added to the second data group W′ according to the constructed sliding window.
  • the distance data s t is not greater than the preset maximum distance value, further determining the difference between the distance data s t acquired at the current time and the distance data s t-1 acquired at the previous time, if
  • the first distance data d t is sequentially added to the data group storing the processing result according to the constructed sliding window, and the second distance data d′ is t is added to the data group storing the processing result, and after accumulating a preset number of m data, the first data group W and the second data group W' are obtained, which facilitates subsequent data fitting.
  • the gap between the adjacent first data group W/second data group W' is often very small (there is only one distance data offset between adjacent data groups, the detection result is similar), and does not need to be A newly constructed first data group W/second data group W' is detected, so that each detected data group (first data group W/second data group W') is set in advance before further processing is performed.
  • the interval between the detections W step that is, the sliding step of the sliding window, W step (set according to the actual situation, such as 10, 20, 30, etc.), means that every W step distance data s t will be
  • the newly constructed first data set W/second data set W' is placed in a subsequent detection step for detection. Specifically, in the process: if the number of data in the current two data groups is less than mW step , the second distance data d′ t is added to the second data group W′, and the first distance data d t is added to the first A data group W, and jumps to step S10 to enter the step of processing the newly acquired distance data s t .
  • the second distance data d' t is further added to the second data group W', and the first distance data d t is added to the first data group W, and D t is determined from the first data a first set of data added to W / second data set W 'data added to the second distance d' t is the number of steps reaches the sliding W step, if so, the first current A data group W is sent to the next dynamic detection step; otherwise, it jumps to step S10 to enter the step of processing the newly acquired distance data s t .
  • the value of the sliding step length W step is determined according to the actual situation, and is not specifically limited herein.
  • the first data group W is then fitted to determine the change trend of the distance between the detected object and the distance sensor.
  • the change trend of the distance between the detected object and the distance sensor is determined according to the slope value a, and the state of the detected object in the current detection window is determined according to the change trend.
  • the change trend is constant (the constant here does not mean that each of the distance data d t included in the first data group W is absolutely equal
  • the fitting as long as the trend of the change is preset Within the range, that is, the fitted slope value a is within the set threshold range, it can be said to be unchanged), and it is judged that the detected object is in a stationary state in the current detection window; on the contrary, if the change trend is judged to be When it becomes larger or smaller (that is, the slope value a obtained by the fitting is larger or smaller than a preset threshold value), it is directly determined that the object to be detected is a human body (the object to be detected is in a moving state, leaving or approaching).
  • the trend of the current detection window does not accurately determine whether the detected object is really in a stationary state. Therefore, in order to improve the accuracy of the judgment, when according to the current detection window, the first The fitting result of the data group W determines that the change trend of the distance between the detected object and the distance sensor is constant, and further determines whether the fitting result of the first data group in the previous detection window is also between the detected object and the distance sensor. The change trend of the distance is unchanged; if so, it is judged that the detected object in the current detection window is in a stationary state (that is, the result obtained by fitting the first data group W twice in a continuous state is in a stationary state); otherwise, the direct determination is detected.
  • the object is the human body (that is, the result of the previous detection window fitting is in motion).
  • the rule for comprehensively determining based on the plurality of determination results may be arbitrarily set according to actual conditions.
  • the method for determining the data group W' fluctuation value V specifically includes the following steps: calculating a fluctuation value of the second data group W'; and determining that the detected object is a human body when the fluctuation value is greater than a preset threshold ; otherwise it is determined to be a stationary object.
  • the preset threshold may be set according to actual conditions, for example, the preset threshold is set to 30 cm (cm), so that when the fluctuation value calculated according to the second data group W' is greater than 30 cm, it is determined that the object to be detected is a human body. ; otherwise it is determined to be a stationary object.
  • the embodiment is improved to obtain the present embodiment.
  • the fluctuation value of the second data group W' is calculated (the current detection window After the fluctuation value), the fluctuation value of the previous detection window is obtained, and the two fluctuation values are added to obtain the sum of the fluctuation values V sum ; after that, it is judged whether the sum of the fluctuation values of the two detection windows is greater than the preset fluctuation threshold ⁇ 1 If yes, it is determined that the current state is in a static state; otherwise, it is further determined whether the number of times the detected object in the stationary state is determined to be the human body in the detection window before the current detection window is greater than a preset statistical threshold; if yes, the determination is currently The human body is at rest; otherwise, it is judged as an object.
  • the current detection window and the previous detection window both include two data groups, which are a first data group and a second data group respectively; and two data groups included in each detection window are preset the number of distance data s t m different are obtained by pre-processing (i.e., two raw data sets from the same data s t).
  • pre-processing i.e., two raw data sets from the same data s t.
  • the original distance data of the pre-processing operation is different from that in the current detection window (acquired by the distance sensor at different times), that is, the obtained first data group and the second data group and the current detection.
  • the first data group W and the second data group W' in the window are different, and thus the fluctuation value calculated according to the second data group W' in the current detection window is calculated according to the second data group in the previous detection window.
  • the fluctuation values are different. For the acquisition of the fluctuation value in the previous detection window, if the fluctuation value of the second data group in the previous detection window exists (calculated and stored in the previous detection window), it can be directly read; if the previous detection window If the fluctuation value of the second data group does not exist, the fluctuation value of the second data group in the previous detection window is calculated by the same method as the fluctuation value in the current detection window.
  • the static value of the "human body” is preset to be Count human .
  • V sum V last +V now
  • V last the fluctuation value calculated by the last static detection
  • V now The current fluctuation value calculated by static detection
  • the sum of the calculated fluctuation values V sum is compared with the preset fluctuation threshold ⁇ 1 , and if V sum > ⁇ 1 , it is directly determined that the current state is “human body”; if V sum ⁇ 1 , The fluctuation of the detected object is small, and it is further determined whether the statistical value Count human is greater than the statistical threshold ⁇ 2 , and if so, it is determined that the current state is "human body", otherwise it is determined as "object”.
  • step S10 After the result is outputted by the above dynamic detection and static detection, the process returns to step S10, and the process of processing the newly acquired distance data s t is performed to obtain new distance data s t , and the detection window is reconstructed to detect the newly constructed data array. , in this loop.
  • the fluctuation threshold ⁇ 1 is set to 30 cm (cm), and the statistical threshold ⁇ 2 is set to 1 (if the calculation of the fluctuation value in the previous detection window finally determines the object to be detected in a stationary state as In the human body, the detected object in the stationary state is still determined as the human body in the current detection window.
  • the fluctuation threshold ⁇ 1 and the statistical threshold ⁇ 2 may also be set to other values, such as the fluctuation threshold.
  • ⁇ 1 is set to 20 cm, 40 cm, etc.
  • the statistical threshold ⁇ 2 is set to 2, 3, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (AREA)

Abstract

一种人体检测装置(100),其检测过程包括:接收距离传感器(110)采集到的距离数据s t(S10);对预设个数m的距离数据s t进行除错和平滑处理得到第一数据组W,对预设个数m的距离数据s t进行除错处理得到第二数据组W'(S20);对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器(110)之间距离的变化趋势(S30);当变化趋势为不变,判断被检测对象处于静止状态(S40);计算第二数据组W'的波动值(S50);当波动值大于预设阈值时,判定被检测对象为人体(S60)。其能够实现静止状态下人体的检测,区分站立人体和静止物体,消除了原有人体检测中静止物体带来的判断干扰。

Description

人体检测装置及方法
本申请要求2017年10月31日提交的申请号为:201711054393.4、发明名称为“人体检测装置及方法”的中国专利申请的优先权,其全部内容合并在此。
技术领域
本发明涉及电子技术领域,尤其涉及一种人体检测装置及方法。
背景技术
机器人是近几十年发展起来的新兴综合学科,集中了机械工程、电子工程、信息科学、自动控制以及人工智能等多种学科的最新研究成果,代表了当前科学与工程学的最高成就,无疑是目前科技发展最活跃的研究领域之一,其中,服务型机器人得到了广泛的应用。
目前,服务型机器人普遍存在于各行各业中,在应用中,往往都会有人体检测的需求,如,通过检测当前是否有用户存在、当前用户的动作或者运动状态等人体信息,实现自动开/关机器、自动反馈、交互等一系列人机交互操作。更具体来说,当检测到人体靠近时,主动跟用户打招呼;当检测到静止的人体发生移动时,自动开启机器或切换展示的内容;当检测到人体离开时,主动与用户说再见或关闭正在使用的机器等。
当然,现在也有能够检测人体的技术方案,如中国专利CN105445812A公开的一种人体传感器检测方法及装置,其通过人体传感器实时监测红外传感器的信号强度值之后,将连续的两个红外信号强度组成一个信号组,如,<Da,Db>、<Db,Dc>、<Dc,Dd>等;之后,根据信号组判断人体的状态,具体,如果前一个红外信号强度值大于后一个红外信号强度值,并且每一个信号组中的差值累计之和大于第一阈值S1,则确定用户离开传感器;如果前一个红外信号强度值小于后一个红外信号强度值,并且每一个信号组中的差值累计之和大于第二阈值 S2,则确定用户靠近传感器。
但是,在上述人体传感器检测方法及装置中,人体检测的能力存在局限,其只能检测到运动状态下的人体,对于静止状态下的人体/物体缺乏判断能力,如,如果在传感器前放置一把椅子/凳子等处于静止状态的障碍物,传感器会将障碍物错误的识别为站立的人,不能区分。
发明内容
本发明的目的是提供一种人体检测装置及方法,有效解决现有技术中不能有效区分处于静止状态是人体还是物体的技术问题。
为了解决上述技术问题,本发明提供了一种人体检测装置,包括:
至少一个距离传感器,用于定期采集与被检测对象之间的距离数据st
处理器,用于实现各指令;及
存储器,用于存储多条指令,指令适用于处理器加载并执行,所述多条指令中包括:
接收所述距离传感器采集到的距离数据st
对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W';
对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;
当所述变化趋势为不变,判断所述被检测对象处于静止状态;
计算第二数据组W'的波动值;
当所述波动值大于预设阈值时,判定所述被检测对象为人体。
本发明还提供了一种人体检测方法,包括:
接收所述距离传感器采集到的距离数据st
对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W';
对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;
当所述变化趋势为不变,判断所述被检测对象处于静止状态;
计算第二数据组W'的波动值;
当所述波动值大于预设阈值时,判定所述被检测对象为人体。
在本发明提供的人体检测装置及方法中,有益效果在于:
1.在本发明提供的人体检测装置及方法中,对距离传感器采集到的距离数据st进行预处理操作,包括除错和平滑处理,以此消除由于数据采集错误和环境背景噪声对人体检测带来的干扰和影响,大大提高了人体检测装置对被检测对象检测的灵敏度。
2.在本发明提供的人体检测装置及方法中,对距离传感器采集到的距离数据st进行了预处理操作之后,根据数据拟合的结果判断被检测对象与距离传感器之间距离的变化趋势,进而判定被检测对象的运动状态并输出,简单方便。若判断输出结果为被检测对象处于静止状态,则进一步根据距离数据的波动值判定是否为处于静止状态的人体,实现静止状态下人体的检测,区分站立人体和静止物体,消除了原有人体检测中静止物体带来的判断干扰。
3.本发明提供的人体检测装置和方法在检测人体的过程中,根据一段时间内连续的数据变化趋势和变化波动进行分析,而不是简单的距离数据本身的对比分析进行判断,大大提高了人体检测的准确率。
附图说明
下面将以明确易懂的方式,结合附图说明优选实施方式,对上述特性、技 术特征、优点及其实现方式予以进一步说明。
图1为本发明中人体检测装置示意图;
图2为本发明中存储器中存储的多条指令一种实施方式流程示意图;
附图标号说明:
100-人体检测装置,110-距离传感器,120-处理器,130-存储器
具体实施方式
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对照附图说明本发明的具体实施方式。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,并获得其他的实施方式。
为使图面简洁,各图中的只示意性地表示出了与本发明相关的部分,它们并不代表其作为产品的实际结构。
如图1所示为本发明提供的人体检测装置示意图,从图中可以看出,在该人体检测装置100中包括:用于定期采集与被检测对象之间的距离数据st的至少一个距离传感器110(在检测过程中,一个距离传感器检测一个被检测对象),用于实现各指令的处理器120,以及用于存储适用于处理器加载并执行的指令的存储器130,其中,存储器和距离传感器分别与处理器连接。
如图2所示,存储器中存储的多条指令中包括:S10接收距离传感器采集到的距离数据st;S20对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对预设个数m的距离数据st进行除错处理得到第二数据组W';S30对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;S40当变化趋势为不变,判断被检测对象处于静止状态;S50计算第二数据组W'的波动值;S60当波动值大于预设阈值时,判定被检测对象为人体。
在本实施方式中,在使用该人体检测装置对被检测对象进行检测之前,首先对第一数据组W和第二数据组W'进行构建,设定数据组长度m,同时设定数据波动冗余最大值△。之后,使用距离传感器定期(如,每0.1s检测一次、每0.2s检测一次等)检测距离数据st(距离传感器在t时刻检测到的原始的距离数据)并将其即时发送至处理器中进行处理。处理接收到距离传感器上传的距离数据st之后,随即对其进行预处理操作,并将预处理之后的距离数据添加入相应的第一数据组W和第二数据组W'。
在预处理操作过程中,对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt,对接收到的距离数据st进行除错处理得到第二距离数据d’t;之后根据构造的滑动窗口依次将第一距离数据dt添加入第一数据组W、将第二距离数据d’t添加入第二数据组W'。具体:
在对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt的过程中,包括以下步骤:将接收到的距离数据st与预设最大距离值(距离传感器最大探测距离,由管理人员预先设定)进行比较,若当前时刻获取的距离数据st大于预设最大距离值,判定当前获取的距离数据st出错,将其删除,并将当前时刻(t时刻)的第一距离数据dt值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定dt=st-1。若距离数据st不大于预设最大距离值,则进一步判断当前时刻获取的距离数据st与前一时刻获取的距离数据st-1的差值,若|St-St-1|<△,说明t时刻的测量值与t-1时刻的测量值之差在波动范围△之内,同样将当前时刻(t时刻)的第一距离数据dt值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定dt=st-1;否则(不是以上两种情况),将当前时刻 的第一距离数据dt值设定为当前时刻获取的距离数据,即dt=st
在对接收到的距离数据st进行除错处理得到第二距离数据d’t的过程中,包括以下步骤:将接收到的距离数据st与预设最大距离值进行比较,若当前时刻获取的距离数据st大于预设最大距离值,判定当前获取的距离数据st出错,将其删除,并将当前时刻(t时刻)的第二距离数据d’t值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定d’t=st-1。若距离数据st不大于预设最大距离值,则进一步判断当前时刻获取的距离数据st与前一时刻获取的距离数据st-1的差值,若|St-St-1|<△,将当前时刻的第二距离数据d’t值设定为当前时刻获取的距离数据st,即设定d’t=st;否则(不是以上两种情况),同样将当前时刻的第二距离数据d’t值设定为当前时刻获取的距离数据,即d’t=st
根据以上规则完成对探测到的原始距离数据st的预处理操作之后,根据构造的滑动窗口依次将第一距离数据dt添加入存储该处理结果的数据组中、将第二距离数据d’t添加入存储该处理结果的数据组中,积累了预设数量m个数据后,得到第一数据组W和第二数据组W',便于后续的数据拟合。
在另一实施方式中,由于检测到的距离数据st会持续更新添加入两个数据组中(两个数据组在时间轴上都不断向前移动,抛弃旧的距离数据),而在实际应用中,相邻第一数据组W/第二数据组W’之间的差距往往非常小(相邻数据组之间仅有一个距离数据的偏移,检测结果相似),并不需要对每一个新构造的第一数据组W/第二数据组W’进行检测,因此在进行进一步处理之前,预先设定每一个被检测数据组(第一数据组W/第二数据组W’)之间的检测间隔Wstep,即滑动窗口的滑动步长Wstep(根据实际情况设定,如设定为10、20、30 等),表示每隔Wstep个距离数据st之后,才会将新构造的第一数据组W/第二数据组W’放入后续检测步骤中进行检测。具体,在该过程中:如果当前两个数据组中数据的个数小于m-Wstep,则将第二距离数据d′t添加进第二数据组W′,将第一距离数据dt添加进第一数据组W,并跳转至步骤S10,进入处理新采集到的距离数据st的步骤。如果当前两个数据组中数据的个数不小于m-Wstep,继续将第二距离数据d’t添加进第二数据组W′,将第一距离数据dt添加进第一数据组W,并判断第一数据组W中添加的第一距离数据dt/第二数据组W′中添加的第二距离数据d’t的数量是否达到滑动步长Wstep,如果是,则将当前的第一数据组W送入下一个动态检测步骤;否则,跳转至步骤S10,进入处理新采集到的距离数据st的步骤。当然,在其他实施方式中,根据实际情况确定滑动步长Wstep的取值,这里不做具体限定。
根据以上方法得到第一数据组W和第二数据组W′之后,随即对第一数据组W进行拟合,判断被检测对象与距离传感器之间距离的变化趋势。具体,在该过程中,使用最小二乘法曲线拟合法对第一数据组W(检测窗口)中的m个第一距离数据dt进行直线拟合,得到形如y=ax+b的直线,以此根据斜率值a判断被检测对象与距离传感器之间距离的变化趋势,并根据变化趋势判断当前检测窗口中被检测物体所处的状态。具体,当变化趋势为不变(这里的不变并不是指第一数据组W中包括的每个一距离数据dt绝对的相等,在进行拟合之后,只要其变化的趋势在预先设定的范围内,即拟合得到的斜率值a在设定的阈值范围内,都可以称之为不变),判断在当前检测窗口中被检测对象处于静止状态;相反,若判断出变化趋势为变大或变小(即拟合得到的斜率值a大于或小于预先设定的阈值),则直接判定被检测对象为人体(被检测对象的处于运动状态,离开或靠近)。
在另一实施方式中,在一些情况下,通过当前检测窗口的变化趋势并不能准确判断被检测对象是否真的处于静止状态,因此,为了提高判断的精确度,当根据当前检测窗口中第一数据组W的拟合结果判断被检测对象与距离传感器之间距离的变化趋势为不变,进一步判断前一检测窗口中第一数据组的拟合结果是否也为被检测对象与距离传感器之间距离的变化趋势为不变;若是,判断当前检测窗口中被检测对象处于静止状态(即连续两次根据第一数据组W拟合得到的结果都是处于静止状态);否则,直接判定被检测对象为人体(即前一检测窗口拟合得到的结果为处于运动状态)。当然,这里只是示例性的给出被检测对象是否处于静止状态的判断方法,在其他实施方式中,可以根据实际情况任意设定根据多次判断结果进行综合判断的规则。
在另一实施方式中,根据以上方法判断出被检测对象处于静止状态之后,进一步将当前被检测对象与距离传感器之间的距离与预先设定的被检测对象与距离传感器之间的最小距离进行比较,若当前被检测对象与距离传感器之间的距离小于最小距离,判断被检测对象为人体(正常情况下,如果不是人体,不会长时间与距离传感器距离过近);否则,进入后续计算当前检测窗口第二数据组W′波动值的步骤。
在一实例中,将第一数据组W的拟合结果分为四种:“无”,“靠近”,“离开”以及“停留”,且为了提高判断结果的准确度,将单一检测窗口的判断结果作为整个动态检测判断的一部分。具体,在判断之前,预先设定表示被检测对象与距离传感器之间的最小距离ClosestRange,若被检测对象与传感器之间的距离小于此最小距离ClosestRange,发出告警,距离过近;同时,预先设定第一预设斜率阈值δ1、第二预设斜率阈值δ2、第三预设斜率阈值δ3以及第四预设斜率阈值δ4,并设定大小关系:第一预设斜率阈值δ1<第二预设斜率阈值δ2<第三预设斜率阈值δ3<第四预设斜率阈值δ4
基于以上设定,在单一检测窗口判断的过程中,若斜率值a小于第一预设 斜率阈值δ1(a<δ1),判定当前检测窗口的结果为靠近;若斜率值a在第二预设斜率阈值δ2和第三预设斜率阈值δ3之间(δ2<a<δ3),判定当前检测窗口的结果为停留;若斜率值a大于第四预设斜率阈值δ4(a>δ4),判定当前检测窗口的结果为远离;不是以上情况时,则判定当前检测窗口的结果为“无”。此外,若当前检测窗口的判断结果为“无”,则跳转至步骤S10,进入处理新采集到的距离数据st的步骤;如果当前检测窗口的判断结果不为“无”,则保存此次判断结果,清空检测窗口第一数据组W和第二数据组W′中的数值,跳转至步骤S10,进入处理新采集到的距离数据st的步骤,等待下一次判断结果。在该例中,将第一预设斜率阈值δ1设定为-0.5,将第二预设斜率阈值δ2设定为-0.1,将第三预设斜率阈值δ3设定为0.1,将第四预设斜率阈值0.7,在其他实例中,可以根据实际情况将其设定为其他值。最后要说明的是,以上仅示例性的给出了判断的过程,包括设定的4个斜率阈值,在其他实例中,还设定其他数量的斜率阈值,如,设定3/5个等,在此均不作具体限定,原则上来,只要设定的斜率阈值的数量/具体值、斜率阈值与判断结果之间的关联关系能够实现本实施方式的目的,都包括在本实施方式的内容中。
为了精确输出结果,在得到当前检测窗口的判断结果Wnow之后,结合前一次检测窗口的判断结果综合判定被检测对象的运动状态并输出。具体,如表1所示的动态检测规则表,若当前检测窗口的结果Wnow为停留(被检测对象与距离传感器之间距离的变化趋势为不变),且前一次检测窗口的判断结果Wlast为靠近,则进一步判断当前第一距离数据dt是否小于预设最小距离ClosestRange;若是,判定检测到人体,且距离过近,发出告警;否则,判定检测到处于靠近状态的人体;若当前检测窗口的结果Wnow为停留,且前一次检测窗口的判断结果Wlast也为停留,则进一步判断当前第一距离数据dt是否小于预设最小距离ClosestRange;若是,判定检测到人体,且距离过近,发出告警;否则,判定检 测到处于停留状态的人体或物体(即被检测对象处于静止状态);若当前检测窗口的结果Wnow为远离,且前一次检测窗口的判断结果Wlast为靠近,则判定检测到处于通过状态的人体;若当前检测窗口的结果Wnow为远离,且前一次检测窗口的判断结果Wlast为停留,则判定检测到处于远离状态的人体;若都不是以上情况,输出结果“无”。
表1:动态检测规则表
Figure PCTCN2017112439-appb-000001
根据以上规则判定被检测对象处于静止状态(上述停留状态的人体或物体)之后,为了进一步确定处于静止状态的是否为人体,进一步通过计算第二数据组W′波动值V的方法进行判断(静态检测),具体包括以下步骤:计算第二数据组W′的波动值;当该波动值大于预设阈值时,判定所述被检测对象为人体;否则判定为静止的物体。
第二数据组W′波动值V可以采用多种方式计算的来,如,通过计算第二数据组W′中最大值与最小值之差得到;又如,通过计算第二数据组W′中最大值 与最小值的绝对差值得到;再如,通过统计第二数据组W′中所有数值的平均值得到。在一实例中,选用
Figure PCTCN2017112439-appb-000002
的方式计算得到,其中,μ是第二数据组W′中所有距离数据值的平均值,m为滑动窗口的长度。更具体来说,当第一数据组W(动态检测)的判断结果不是“被检测对象处于静止状态”时,设定V=0(判断结果不为“静止状态”时,不对波动值V进行计算,预先将波动值V设定为0),且每计算一次波动值V,对其进行保存,Vlast=V。
预设阈值可以根据实际情况进行设定,如将预设阈值设定为30cm(厘米),以此,当根据第二数据组W′计算得到的波动值大于30cm,则判定待检测对象为人体;否则判定其为静止的物体。
对上述实施方式进行改进得到本实施方式,在本实施方式中,为了更精确的判断处于静止状态是否为人体,在判断过程中,计算得到第二数据组W′的波动值(当前检测窗口的波动值)之后,得到前一检测窗口的波动值,并将两个波动值进行相加得到波动值之和Vsum;之后,判断两次检测窗口波动值之和是否大于预设波动阈值θ1;若是,判定当前处于静止状态的是人体;否则,进一步判断在当前检测窗口之前的检测窗口中将处于静止状态的被检测对象判定为人体的次数是否大于预设统计阈值;若是,判定当前处于静止状态的是人体;否则,判定为物体。
在本实施方式中,当前检测窗口和前一检测窗口中都包括两个数据组,分别为第一数据组和第二数据组;且每个检测窗口中包括的两个数据组是由预设个数m的距离数据st进行不同的预处理操作分别得来的(即两个数据组原始距离数据st是相同的)。但是对于前一检测窗口来说,进行预处理操作的原始距离数据与当前检测窗口中的不同(由距离传感器在不同时刻采集得到),即得到的第一数据组和第二数据组与当前检测窗口中的第一数据组W和第二数据组W′不同,因而根据当前检测窗口中第二数据组W′计算得来的波动值与根据 前一检测窗口中第二数据组计算得来的波动值不同。对于前一检测窗口中波动值的获取,若前一检测窗口中第二数据组的波动值存在(在前一检测窗口中已经计算并存储),则直接读取即可;若前一检测窗口中第二数据组的波动值不存在,则采用与当前检测窗口中波动值相同的方法计算前一检测窗口中第二数据组的波动值。
另外,由于静态检测结果的输出分为“人体”和“物体”两种,为了更方便的对检测结果进行统计,预先设定静态结果为“人体”的统计值为Counthuman。当动态检测的输出结果为被检测对象处于静止状态时,为了分辨被检测物是人体还是物体,首先使用统计值Counthuman对静态结果为“人体”的次数进行统计,具体,若上一次动态检测的结果为“静止状态”且上一次静态检测的结果为“人体”,则Counthuman=Counthuman+1,否则Counthuman=0。
基于此,在判断的过程中,计算两次相邻检测窗口波动值之和Vsum(Vsum=Vlast+Vnow,其中,Vlast为上一次静态检测计算得到的波动值,Vnow为当前静态检测计算得到的波动值)。之后,将计算得到的波动值之和Vsum与预设波动阈值θ1进行比较,若Vsum1,则直接判定当前处于静止状态的为“人体”;若Vsum1,说明被检测对象的波动很小,进一步判断统计值Counthuman是否大于统计阈值θ2,若是,则判定当前处于静止状态的为“人体”,否则判定为“物体”。通过上述动态检测和静态检测之后输出结果之后,返回步骤S10,进入处理新采集到的距离数据st的步骤,获得新的距离数据st,重新构建检测窗口,对新构建的数据数组进行检测,以此循环。
在一实例中,将上述波动阈值θ1设定为30cm(厘米),统计阈值θ2设定为1(如果前一检测窗口中通过波动值的计算最终将处于静止状态的被检测对象判定为人体,则在当前检测窗口中,仍然将处于静止状态的被检测对象判定为人体),在其他实例中,还可以将波动阈值θ1和统计阈值θ2设定为其他值,如 将波动阈值θ1设定为20cm、40cm等,将统计阈值θ2设定为2、3等。
相对应地,本发明还提供了一种人体检测方法,包括:S10接收距离传感器采集到的距离数据st;S20对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对预设个数m的距离数据st进行除错处理得到第二数据组W′;S30对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;S40当变化趋势为不变,判断被检测对象处于静止状态;S50计算第二数据组W′的波动值;S60当波动值大于预设阈值时,判定被检测对象为人体。
在本实施方式中,在使用该人体检测装置对被检测对象进行检测之前,首先对第一数据组W和第二数据组W′进行构建,设定数据组长度m,同时设定数据波动冗余最大值△。之后,使用距离传感器定期(如,每0.1s检测一次、每0.2s检测一次等)检测距离数据st(距离传感器在t时刻检测到的原始的距离数据)并将其即时发送至处理器中进行处理。处理接收到距离传感器上传的距离数据st之后,随即对其进行预处理操作,并将预处理之后的距离数据添加入相应的第一数据组W和第二数据组W′。
在预处理操作过程中,对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt,对接收到的距离数据st进行除错处理得到第二距离数据d’t;之后根据构造的滑动窗口依次将第一距离数据dt添加入第一数据组W、将第二距离数据d’t添加入第二数据组W′。具体:
在对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt的过程中,包括以下步骤:将接收到的距离数据st与预设最大距离值(距离传感器最大探测距离,由管理人员预先设定)进行比较,若当前时刻获取的距离数据st大于预设最大距离值,判定当前获取的距离数据st出错,将其删除,并将当 前时刻(t时刻)的第一距离数据dt值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定dt=st-1。若距离数据st不大于预设最大距离值,则进一步判断当前时刻获取的距离数据st与前一时刻获取的距离数据st-1的差值,若|St-St-1|<△,说明t时刻的测量值与t-1时刻的测量值之差在波动范围△之内,同样将当前时刻(t时刻)的第一距离数据dt值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定dt=st-1;否则(不是以上两种情况),将当前时刻的第一距离数据dt值设定为当前时刻获取的距离数据,即dt=st
在对接收到的距离数据st进行除错处理得到第二距离数据d’t的过程中,包括以下步骤:将接收到的距离数据st与预设最大距离值进行比较,若当前时刻获取的距离数据st大于预设最大距离值,判定当前获取的距离数据st出错,将其删除,并将当前时刻(t时刻)的第二距离数据d’t值设定为前一时刻(t-1时刻)获取的距离数据st-1,即设定d’t=st-1。若距离数据st不大于预设最大距离值,则进一步判断当前时刻获取的距离数据st与前一时刻获取的距离数据st-1的差值,若|St-St-1|<△,将当前时刻的第二距离数据d’t值设定为当前时刻获取的距离数据st,即设定d’t=st;否则(不是以上两种情况),同样将当前时刻的第二距离数据d’t值设定为当前时刻获取的距离数据,即d’t=st
根据以上规则完成对探测到的原始距离数据st的预处理操作之后,根据构造的滑动窗口依次将第一距离数据dt添加入存储该处理结果的数据组中、将第二距离数据d’t添加入存储该处理结果的数据组中,积累了预设数量m个数据后,得到第一数据组W和第二数据组W′,便于后续的数据拟合。
在另一实施方式中,由于检测到的距离数据st会持续更新添加入两个数据组中(两个数据组在时间轴上都不断向前移动,抛弃旧的距离数据),而在实际应用中,相邻第一数据组W/第二数据组W′之间的差距往往非常小(相邻数据组之间仅有一个距离数据的偏移,检测结果相似),并不需要对每一个新构造的第一数据组W/第二数据组W′进行检测,因此在进行进一步处理之前,预先设定每一个被检测数据组(第一数据组W/第二数据组W′)之间的检测间隔Wstep,即滑动窗口的滑动步长Wstep(根据实际情况设定,如设定为10、20、30等),表示每隔Wstep个距离数据st之后,才会将新构造的第一数据组W/第二数据组W′放入后续检测步骤中进行检测。具体,在该过程中:如果当前两个数据组中数据的个数小于m-Wstep,则将第二距离数据d’t添加进第二数据组W′,将第一距离数据dt添加进第一数据组W,并跳转至步骤S10,进入处理新采集到的距离数据st的步骤。如果当前两个数据组中数据的个数不小于m-Wstep,继续将第二距离数据d’t添加进第二数据组W′,将第一距离数据dt添加进第一数据组W,并判断第一数据组W中添加的第一距离数据dt/第二数据组W′中添加的第二距离数据d’t的数量是否达到滑动步长Wstep,如果是,则将当前的第一数据组W送入下一个动态检测步骤;否则,跳转至步骤S10,进入处理新采集到的距离数据st的步骤。当然,在其他实施方式中,根据实际情况确定滑动步长Wstep的取值,这里不做具体限定。
根据以上方法得到第一数据组W和第二数据组W′之后,随即对第一数据组W进行拟合,判断被检测对象与距离传感器之间距离的变化趋势。具体,在该过程中,使用最小二乘法曲线拟合法对第一数据组W(检测窗口)中的m个第一距离数据dt进行直线拟合,得到形如y=ax+b的直线,以此根据斜率值a判断被检测对象与距离传感器之间距离的变化趋势,并根据变化趋势判断当前检 测窗口中被检测物体所处的状态。具体,当变化趋势为不变(这里的不变并不是指第一数据组W中包括的每个一距离数据dt绝对的相等,在进行拟合之后,只要其变化的趋势在预先设定的范围内,即拟合得到的斜率值a在设定的阈值范围内,都可以称之为不变),判断在当前检测窗口中被检测对象处于静止状态;相反,若判断出变化趋势为变大或变小(即拟合得到的斜率值a大于或小于预先设定的阈值),则直接判定被检测对象为人体(被检测对象的处于运动状态,离开或靠近)。
在另一实施方式中,在一些情况下,通过当前检测窗口的变化趋势并不能准确判断被检测对象是否真的处于静止状态,因此,为了提高判断的精确度,当根据当前检测窗口中第一数据组W的拟合结果判断被检测对象与距离传感器之间距离的变化趋势为不变,进一步判断前一检测窗口中第一数据组的拟合结果是否也为被检测对象与距离传感器之间距离的变化趋势为不变;若是,判断当前检测窗口中被检测对象处于静止状态(即连续两次根据第一数据组W拟合得到的结果都是处于静止状态);否则,直接判定被检测对象为人体(即前一检测窗口拟合得到的结果为处于运动状态)。当然,这里只是示例性的给出被检测对象是否处于静止状态的判断方法,在其他实施方式中,可以根据实际情况任意设定根据多次判断结果进行综合判断的规则。
在另一实施方式中,根据以上方法判断出被检测对象处于静止状态之后,进一步将当前被检测对象与距离传感器之间的距离与预先设定的被检测对象与距离传感器之间的最小距离进行比较,若当前被检测对象与距离传感器之间的距离小于最小距离,判断被检测对象为人体(正常情况下,如果不是人体,不会与距离传感器距离过近);否则,进入后续计算当前检测窗口第二数据组W′的第一波动值的步骤。
根据以上规则判定被检测对象处于静止状态(上述停留状态的人体或物体)之后,为了进一步确定处于静止状态的是否为人体,进一步通过计算第二 数据组W′波动值V的方法进行判断(静态检测),具体包括以下步骤:计算第二数据组W′的波动值;当该波动值大于预设阈值时,判定所述被检测对象为人体;否则判定为静止的物体。
第二数据组W′波动值V可以采用多种方式计算的来,如,通过计算第二数据组W′中最大值与最小值之差得到;又如,通过计算第二数据组W′中最大值与最小值的绝对差值得到;再如,通过统计第二数据组W′中所有数值的平均值得到。在一实例中,选用
Figure PCTCN2017112439-appb-000003
的方式计算得到,其中,μ是第二数据组W′中所有距离数据值的平均值,m为滑动窗口的长度。更具体来说,当第一数据组W(动态检测)的判断结果不是“被检测对象处于静止状态”时,设定V=0(判断结果不为“静止状态”时,不对波动值V进行计算,预先将波动值V设定为0),且每计算一次波动值V,对其进行保存,Vlast=V。
预设阈值可以根据实际情况进行设定,如将预设阈值设定为30cm(厘米),以此,当根据第二数据组W′计算得到的波动值大于30cm,则判定待检测对象为人体;否则判定其为静止的物体。
对上述实施方式进行改进得到本实施方式,在本实施方式中,为了更精确的判断处于静止状态是否为人体,在判断过程中,计算得到第二数据组W′的波动值(当前检测窗口的波动值)之后,得到前一检测窗口的波动值,并将两个波动值进行相加得到波动值之和Vsum;之后,判断两次检测窗口波动值之和是否大于预设波动阈值θ1;若是,判定当前处于静止状态的是人体;否则,进一步判断在当前检测窗口之前的检测窗口中将处于静止状态的被检测对象判定为人体的次数是否大于预设统计阈值;若是,判定当前处于静止状态的是人体;否则,判定为物体。
在本实施方式中,当前检测窗口和前一检测窗口中都包括两个数据组,分别为第一数据组和第二数据组;且每个检测窗口中包括的两个数据组是由预设 个数m的距离数据st进行不同的预处理操作分别得来的(即两个数据组原始距离数据st是相同的)。但是对于前一检测窗口来说,进行预处理操作的原始距离数据与当前检测窗口中的不同(由距离传感器在不同时刻采集得到),即得到的第一数据组和第二数据组与当前检测窗口中的第一数据组W和第二数据组W′不同,因而根据当前检测窗口中第二数据组W′计算得来的波动值与根据前一检测窗口中第二数据组计算得来的波动值不同。对于前一检测窗口中波动值的获取,若前一检测窗口中第二数据组的波动值存在(在前一检测窗口中已经计算并存储),则直接读取即可;若前一检测窗口中第二数据组的波动值不存在,则采用与当前检测窗口中波动值相同的方法计算前一检测窗口中第二数据组的波动值。
另外,由于静态检测结果的输出分为“人体”和“物体”两种,为了更方便的对检测结果进行统计,预先设定静态结果为“人体”的统计值为Counthuman。当动态检测的输出结果为被检测对象处于静止状态时,为了分辨被检测物是人体还是物体,首先使用统计值Counthuman对静态结果为“人体”的次数进行统计,具体,若上一次动态检测的结果为“静止状态”且上一次静态检测的结果为“人体”,则Counthuman=Counthuman+1,否则Counthuman=0。
基于此,在判断的过程中,计算两次相邻检测窗口波动值之和Vsum(Vsum=Vlast+Vnow,其中,Vlast为上一次静态检测计算得到的波动值,Vnow为当前静态检测计算得到的波动值)。之后,将计算得到的波动值之和Vsum与预设波动阈值θ1进行比较,若Vsum1,则直接判定当前处于静止状态的为“人体”;若Vsum1,说明被检测对象的波动很小,进一步判断统计值Counthuman是否大于统计阈值θ2,若是,则判定当前处于静止状态的为“人体”,否则判定为“物体”。通过上述动态检测和静态检测之后输出结果之后,返回步骤S10,进入处理新采集到的距离数据st的步骤,获得新的距离数据st,重新构建检测窗口,对新 构建的数据数组进行检测,以此循环。
在一实例中,将上述波动阈值θ1设定为30cm(厘米),统计阈值θ2设定为1(如果前一检测窗口中通过波动值的计算最终将处于静止状态的被检测对象判定为人体,则在当前检测窗口中,仍然将处于静止状态的被检测对象判定为人体),在其他实例中,还可以将波动阈值θ1和统计阈值θ2设定为其他值,如将波动阈值θ1设定为20cm、40cm等,将统计阈值θ2设定为2、3等。
应当说明的是,上述实施例均可根据需要自由组合。以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (10)

  1. 一种人体检测装置,其特征在于,所述人体检测装置中包括:
    至少一个距离传感器,用于定期采集与被检测对象之间的距离数据st
    处理器,用于实现各指令;及
    存储器,用于存储多条指令,指令适用于处理器加载并执行,所述多条指令中包括:
    接收所述距离传感器采集到的距离数据st
    对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W';
    对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;
    当所述变化趋势为不变,判断所述被检测对象处于静止状态;
    计算第二数据组W'的波动值;
    当所述波动值大于预设阈值时,判定所述被检测对象为人体。
  2. 如权利要求1所述的人体检测装置,其特征在于,在指令对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势中,还包括:
    当所述变化趋势为变大或变小,直接判断所述被检测对象为人体。
  3. 如权利要求1或2所述的人体检测装置,其特征在于,在指令对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W'中,包括:
    对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt,其中,t表示距离数据的采样时刻,st表示t时刻采样的距离数据;
    对接收到的距离数据st进行除错处理得到第二距离数据d't
    根据构造的滑动窗口依次将得到的第一距离数据dt添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第一数据组W;
    根据构造的滑动窗口依次将得到的第二距离数据d't添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第二数据组W'。
  4. 如权利要求3所述的人体检测装置,其特征在于,在指令对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt中,包括:
    若距离数据st>预设最大距离值,则第一距离数据dt=st-1,其中,t表示距离数据的采样时刻,st表示t时刻采样的距离数据,st-1表示t-1时刻采样的距离数据;
    若距离数据st≤预设最大距离值且|St-St-1|<△,则第一距离数据dt=st-1,否则,第一距离数据dt=st,其中,△表示预设数据波动冗余最大值;
    和/或,在指令对接收到的距离数据st进行除错处理得到第二距离数据d′t中,包括:
    若距离数据st>预设最大距离值,则第二距离数据d′t=st-1,其中,st-1表示t-1时刻采样的距离数据;
    若距离数据st≤预设最大距离值且|St-St-1|<△,则第二距离数据d′t=st,否则,第二距离数据d′t=st,其中,△表示预设数据波动冗余最大值。
  5. 如权利要求3所述的人体检测装置,其特征在于,
    在指令根据构造的滑动窗口依次将得到的第一距离数据dt添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第一数据组W中包括:
    在每次接收到距离数据st进行除错和平滑处理得到第一距离数据dt之后,判断当前用于存放处理结果的数据组中第一距离数据dt的数量是否小于m-Wstep,其中,Wstep为滑动窗口的滑动步长;若是,将第一距离数据dt添加入该数据组中;否则,
    将第一距离数据dt添加入该数据组中之后,进一步判断该数据组中添加第一距离数据dt的数量是否达到滑动步长Wstep;若是,得到第一数据组W并进入对所述第一数据组W进行拟合的操作;
    和/或,在指令根据构造的滑动窗口依次将得到的第二距离数据d't添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第二数据组W′中包括:
    在每次接收到距离数据st进行除错处理得到第二距离数据d't之后,判断当前用于存放处理结果的数据组中第二距离数据d't的数量是否小于m-Wstep,其中,Wstep为滑动窗口的滑动步长;若是,将第二距离数据d't添加入该数据组中;否则
    将第二距离数据d't添加入该数据组中之后,进一步判断该数据组中添加第二距离数据d't的数量是否达到滑动步长Wstep;若是,第二数据组W′并进入对所述第二数据组W′进行拟合的操作。
  6. 一种人体检测方法,其特征在于,所述人体检测方法中包括:
    接收所述距离传感器采集到的距离数据st
    对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W';
    对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势;
    当所述变化趋势为不变,判断所述被检测对象处于静止状态;
    计算第二数据组W'的波动值;
    当所述波动值大于预设阈值时,判定所述被检测对象为人体。
  7. 如权利要求6所述的人体检测方法,其特征在于,在步骤对第一数据组W进行拟合操作,根据拟合结果判断被检测对象与距离传感器之间距离的变化趋势中,还包括:
    当所述变化趋势为变大或变小,直接判断所述被检测对象为人体。
  8. 如权利要求6或7所述的人体检测方法,其特征在于,在步骤对预设个数m的距离数据st进行除错和平滑处理得到第一数据组W,对所述预设个数m的距离数据st进行除错处理得到第二数据组W′中,包括:
    对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt,其中,t表示距离数据的采样时刻,st表示t时刻采样的距离数据;
    对接收到的距离数据st进行除错处理得到第二距离数据d't
    根据构造的滑动窗口依次将得到的第一距离数据dt添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第一数据组W;
    根据构造的滑动窗口依次将得到的第二距离数据d't添加入用于存放处理 结果的数据组中,直到数量达到预设个数m,得到第二数据组W′。
  9. 如权利要求8所述的人体检测方法,其特征在于,在步骤对接收到的距离数据st进行除错和平滑处理得到第一距离数据dt中,包括:
    若距离数据st>预设最大距离值,则第一距离数据dt=st-1,其中,t表示距离数据的采样时刻,st表示t时刻采样的距离数据,st-1表示t-1时刻采样的距离数据;
    若距离数据st≤预设最大距离值且|St-St-1|<△,则第一距离数据dt=st-1,否则,第一距离数据dt=st,其中,△表示预设数据波动冗余最大值;
    和/或,在步骤对接收到的距离数据st进行除错处理得到第二距离数据d′t中,包括:
    若距离数据st>预设最大距离值,则第二距离数据d′t=st-1,其中,st-1表示t-1时刻采样的距离数据;
    若距离数据st≤预设最大距离值且|St-St-1|<△,则第二距离数据d′t=st,否则,第二距离数据d′t=st,其中,△表示预设数据波动冗余最大值。
  10. 如权利要求8所述的人体检测方法,其特征在于,
    在步骤根据构造的滑动窗口依次将得到的第一距离数据dt添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第一数据组W中包括:
    在每次接收到距离数据st进行除错和平滑处理得到第一距离数据dt之 后,判断当前用于存放处理结果的数据组中第一距离数据dt的数量是否小于m-Wstep,其中,Wstep为滑动窗口的滑动步长;若是,将第一距离数据dt添加入该数据组中;否则,
    将第一距离数据dt添加入该数据组中之后,进一步判断该数据组中添加第一距离数据dt的数量是否达到滑动步长Wstep;若是,得到第一数据组W并进入对所述第一数据组W进行拟合的操作;
    和/或,在步骤根据构造的滑动窗口依次将得到的第二距离数据d't添加入用于存放处理结果的数据组中,直到数量达到预设个数m,得到第二数据组W′中包括:
    在每次接收到距离数据st进行除错处理得到第二距离数据d't之后,判断当前用于存放处理结果的数据组中第二距离数据d't的数量是否小于m-Wstep,其中,Wstep为滑动窗口的滑动步长;若是,将第二距离数据d't添加入该数据组中;否则
    将第二距离数据d't添加入该数据组中之后,进一步判断该数据组中添加第二距离数据d't的数量是否达到滑动步长Wstep;若是,第二数据组W′并进入对所述第二数据组W′进行拟合的操作。
PCT/CN2017/112439 2017-10-31 2017-11-22 人体检测装置及方法 WO2019085068A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711054393.4A CN107816985B (zh) 2017-10-31 2017-10-31 人体检测装置及方法
CN201711054393.4 2017-10-31

Publications (1)

Publication Number Publication Date
WO2019085068A1 true WO2019085068A1 (zh) 2019-05-09

Family

ID=61603662

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112439 WO2019085068A1 (zh) 2017-10-31 2017-11-22 人体检测装置及方法

Country Status (2)

Country Link
CN (1) CN107816985B (zh)
WO (1) WO2019085068A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110466428B (zh) * 2018-05-11 2021-09-17 北汽福田汽车股份有限公司 检测车内活体生物的方法、装置和车辆
CN112114661B (zh) * 2020-08-03 2022-05-31 联想(北京)有限公司 一种区分对象的方法、装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006337216A (ja) * 2005-06-03 2006-12-14 Tcm Corp 移動体用人検知器
CN105091881A (zh) * 2015-09-14 2015-11-25 南京理工大学 一种带有静止状态检测的无线传感网室内定位方法
CN105445812A (zh) * 2015-11-12 2016-03-30 青岛海信电器股份有限公司 一种人体传感器检测方法及装置
CN106707348A (zh) * 2016-12-09 2017-05-24 济南赛英立德电子科技有限公司 基于时频分析的微波多普勒静态人体探测方法及探测器
CN106802404A (zh) * 2017-01-18 2017-06-06 深圳大学 一种人体室内定位自动检测方法及系统
CN106970630A (zh) * 2017-05-23 2017-07-21 上海棠棣信息科技股份有限公司 一种机器人主动提供服务的方法及装置、机器人

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3417274B2 (ja) * 1997-10-27 2003-06-16 松下電工株式会社 人体検出装置
CN201765653U (zh) * 2009-11-03 2011-03-16 深圳市同洲电子股份有限公司 检测报警装置
CN101977114B (zh) * 2010-11-18 2012-06-27 华为终端有限公司 一种电子设备、用户保护装置和方法
CN104991560B (zh) * 2015-07-12 2018-08-14 仲恺农业工程学院 自主移动式智能机器人
CN105760824B (zh) * 2016-02-02 2019-02-01 北京进化者机器人科技有限公司 一种运动人体跟踪方法和系统
CN106094884B (zh) * 2016-06-28 2023-04-07 江西省聚云科技有限公司 智能节能控制装置
JP6332510B2 (ja) * 2017-03-24 2018-05-30 株式会社豊田自動織機 無人搬送車の位置検出方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006337216A (ja) * 2005-06-03 2006-12-14 Tcm Corp 移動体用人検知器
CN105091881A (zh) * 2015-09-14 2015-11-25 南京理工大学 一种带有静止状态检测的无线传感网室内定位方法
CN105445812A (zh) * 2015-11-12 2016-03-30 青岛海信电器股份有限公司 一种人体传感器检测方法及装置
CN106707348A (zh) * 2016-12-09 2017-05-24 济南赛英立德电子科技有限公司 基于时频分析的微波多普勒静态人体探测方法及探测器
CN106802404A (zh) * 2017-01-18 2017-06-06 深圳大学 一种人体室内定位自动检测方法及系统
CN106970630A (zh) * 2017-05-23 2017-07-21 上海棠棣信息科技股份有限公司 一种机器人主动提供服务的方法及装置、机器人

Also Published As

Publication number Publication date
CN107816985A (zh) 2018-03-20
CN107816985B (zh) 2021-03-05

Similar Documents

Publication Publication Date Title
CN110420025B (zh) 表面肌电信号处理方法、装置和可穿戴设备
EP3358508A1 (en) Abnormality detection apparatus, abnormality detection method, and program
US20150272509A1 (en) Diagnostic apparatus and method
JP2019513489A5 (zh)
CN110216715B (zh) 机器人导航性能测试方法、系统、测试终端及存储介质
WO2017161963A1 (zh) 一种光纤状态的检测方法及装置
JP2017501393A5 (zh)
WO2019085068A1 (zh) 人体检测装置及方法
WO2019075914A1 (zh) 一种智能穿戴设备的佩戴状态检测方法及装置
JP5425027B2 (ja) ランダムノイズ信号の検出及びフィルタリング方法
CN111288986B (zh) 一种运动识别方法及运动识别装置
US11571169B2 (en) Probability-based detector and controller apparatus, method, computer program
US20140221911A1 (en) Clot detection based on signal-time history diagnostics
CN114492629A (zh) 异常检测方法、装置、电子设备及存储介质
EP3940426A3 (en) Methods and apparatus for detecting a potential fault in a positioning device
US5416417A (en) Method and system for investigating mastitis of a cow by measuring electrical conductivity of milk
CN110680297A (zh) 一种血压监护仪的故障检测方法、装置及设备
US11280771B2 (en) Liquid chromatograph
CN116900449A (zh) 基于信号融合的焊接质量监测方法和系统
CN101813494B (zh) 消除传感器自身和外界干扰的方法
US9329763B2 (en) Method and device for determining geometric property
CN112415141B (zh) 一种甲醛测量浓度显示值的补偿方法及补偿装置
US20160179282A1 (en) Background signal processing system and background signal processing method
CN117030987B (zh) 血液凝固分析系统、方法、设备及存储介质
CN109682858A (zh) 一种利用气体传感器实时检测气体浓度的方法

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: 17930730

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: 17930730

Country of ref document: EP

Kind code of ref document: A1