The present invention relates to a body direction estimation device and a body direction estimation program capable of estimating a target direction while suppressing effects of swinging motions of arms of the target in walking.
There has been a known device configured to process a picked-up image of a target to detect a position and a direction of the target's face so that the target's direction is detected. However, it is difficult to pick up an image of the target while satisfying requirements of resolution sufficient to execute face detection and the wide angle of view. If the target's face is not directed to the camera, the image of the face cannot be picked up. Accordingly, the face direction cannot be detected.
The human body direction estimation device disclosed in Patent Literature 1 includes two distance sensors 50. One of the distance sensors 50 is disposed at the position as high as the target's chest, and the other is disposed at the position as high as the target's leg. The direction of the target is estimated in accordance with measurement results of those two distance sensors 50. Specifically, the body (target) is estimated based on distance measurement point groups measured by the distance sensors 50 to calculate the body's center of gravity. By tracking the change in the center of gravity, the moving direction of the target is calculated. The target direction is estimated as the calculated direction. Likewise, the position detector disclosed in Patent Literature 2 performs measurement of the target using a plurality of distance sensors 11 to 14. Then the cluster constituting the outline of the body (target) is detected from the resultant distance measurement point groups so that the center of gravity is calculated. By tracking the change in the center of gravity, the moving direction of the target is calculated. The target direction is estimated as the calculated direction.
Patent Literature 1: Japanese Unexamined Patent Application Publication No. 2011-081634
Patent Literature 2: Japanese Unexamined Patent Application Publication No. 2010-169521
Usually a human walks while swinging left and right arms alternately. Upon execution of the distance measurement to the target's body part except shoulders, that is, both arms and the torso, swinging motions of arms may influence calculation of the target's center of gravity. As a result, the estimated direction of the target fluctuates to be in the unstable state under the influence of the swinging motions of arms. This makes it difficult to accurately estimate the target direction. Execution of distance measurement of the shoulder of the target allows calculation of the target's center of gravity without being largely influenced by the swinging motions of arms. However, it is still difficult due to individual differences in physique and the like to execute the distance measurement to the target's shoulder part constantly at a pin point.
The present invention has been made for solving the above-described problems, and it is an object of the present invention to provide a body direction estimation device and a body direction estimation program capable of estimating a target direction while suppressing effects of swinging motions of arms of the target in walking.
For achievement of the object, a body direction estimation device according to the present invention includes an upper body distance measurement unit that performs distance measurement of an upper body of a target, a grouping unit that groups measured distance data derived from the distance measurement performed by the upper body distance measurement unit, an ellipse calculation unit that calculates an approximate ellipse for each of groups of the measured distance data generated by the grouping unit, an ellipse selection unit that selects an ellipse for estimation of a direction of the target based on a positional relationship among the plurality of approximate ellipses, if any, calculated by the ellipse calculation unit, and a body direction estimation unit that estimates a direction of the target based on the ellipse selected by the ellipse selection unit.
A body direction estimation program according to the present invention allows a computer to execute an upper body measured distance acquiring function for acquiring measured distance data derived from distance measurement of an upper body of a target, a grouping function for grouping the measured distance data acquired from the upper body measured distance acquiring function, an ellipse calculation function for calculating an approximate ellipse for each of groups of the measured distance data generated by the grouping function, an ellipse selection function for selecting an ellipse for estimating a direction of the target based on a positional relationship among the plurality of approximate ellipses, if any, calculated by the ellipse calculation function, and a body direction estimation function for estimating the direction of the target based on the ellipse selected by the ellipse selection function.
According to the body direction estimation device and the body direction estimation program, the measured distance data of the target's upper body are grouped into one or more groups. The torso and the arm connected thereto are in the same group. Meanwhile, the arm apart from the torso is in the group different from that of the torso. An approximate ellipse is calculated for each of the grouped measured distance data so that an approximate ellipse of the torso is distinguished from that of the arm apart from the torso. The ellipse based on which the target direction is estimated may be selected from a plurality of calculated approximate ellipses, if any, based on a positional relationship thereamong. Based on the selected ellipse, the target direction is estimated. The present invention provides an advantageous effect of estimating the target direction while suppressing effects of swinging motions of arms of the target in walking.
A preferred embodiment of the present invention will be described referring to the drawings. Referring to
The ranging sensor 3 irradiates laser beam omnidirectionally (360°) to measure the resultant scattered light so that the distance to the upper body of the target H is detected (distance measurement). The ranging sensor 3 transmits the distance to the upper body of the target H detected at each angle of 1° in association with the angle to the control unit 2. The ranging sensor 3 is disposed at the level lower than the eye level of the target H in the vertical direction. The ranging sensor 3 executes the distance measurement to the upper body of the target H upward obliquely. Additionally, an elevation angle formed between the ranging sensor 3 and the target H is set to the angle that allows detection of the distance to the upper body of the target H, and prevents incidence of the laser beam from the ranging sensor 3 to the target's eyes. Therefore, the ranging sensor 3 is capable of accurately detecting the distance to the target's upper body while securing safety of eyes of the target H.
The display unit 4 is a device for displaying the direction of the target H or the like, and inputting a user's instruction to the body direction estimation device 1. The display unit 4 is constituted by an LCD 10 for displaying a body angle θ and the like of the target H, and a touch panel 11 through which the user's instruction is input to the control unit 2 (see
The control unit 2 is configured to group the measured distance values (measured distance data) MP of the upper body of the target H acquired from the ranging sensor 3 into groups in accordance with a separation distance as the distance between the adjacent measured distance values, and to select the ellipse type of the approximate ellipse of the upper body in accordance with the positional relationship between the approximate ellipses calculated from the grouped measured distance values MP. The approximate ellipse of the upper body is estimated from the selected ellipse type. A body angle θ as the angle of the approximate ellipse of the upper body is determined as the direction of the target H.
An electric structure of the body direction estimation device 1 will be described referring to
The CPU 5 is an arithmetic device for controlling the respective sections mutually connected with the bus line 8. A control program 6a is stored in the HDD 6 as a non-volatile rewritable storage device for storing the program to be executed by the CPU 5 and data of fixed values. Upon execution of the control program 6a by the CPU 5, the main processing as shown in
The RAM 7 is a memory for storing various work data and flags rewritably in execution of the control program 6a by the CPU 5, and includes a separation distance memory 7a that stores the separation distance (unit: mm) used for grouping the measured distance values MP acquired from the ranging sensor 3, a group count memory 7b that stores the number of groups generated by grouping, an ellipse type memory 7c that stores the ellipse type (see
Referring to
Specifically, values of the distance between adjacent measured distance values MP (ranging interval) are all calculated with respect to all the measured distance values MP. If the ranging interval is equal to or smaller than the separation distance stored in the separation distance memory 7a, it is determined that the two corresponding measured distance values MP are in the same group. Meanwhile, if the ranging interval is longer than the separation distance, it is determined that the boundary as both arms or the torso exists between the measured distance values MP. Accordingly, the two corresponding measured distance values MP are in the different groups. The final number of the groups is stored in the group count memory 7b.
Subsequent to processing in S3, it is confirmed whether the number of groups stored in the group count memory 7b is equal to 3 or smaller (S4). In the embodiment, the above-described confirmation is made to estimate the approximate ellipse of the upper body from the positional relationship between the approximate ellipses of the arm and the torso, which are calculated from the measured distance values MP of the respective groups as described later regarding the torso ellipse type selection processing (
In processing in S4, if the number of groups is larger than 3 (S4: No), it is determined that the plurality of groups have been generated from the actually unseparable arm or the torso in processing in S3 while having the part other than both arms or the torso end serving as the boundary because of the small separation distance. In such a case, 10 mm is added to the value in the separation distance memory 7a (S6) to increase the separation distance. Then the grouping process is executed again in S3.
Meanwhile, if the number of groups is equal to or smaller than 3 (S4: Yes), it is determined that the group of both arms or the torso has been generated in processing in S3. The ellipse type selection processing is then executed (S5). It is possible to execute the ellipse type selection processing to be described later, having, at most, both arms and the torso being separately grouped. An initial value to be set in the separation distance memory 7a in processing in S2 is not limited to 50 mm, but may be either more or less than 50 mm. The value to be added to the value in the separation distance memory 7a in processing in S6 is not limited to 10 mm, but may be either more or less than 10 mm.
Referring to
As
Referring to
In processing in S20, if the number of groups is 2 (S20: “2”), it is determined that the left arm is in the group different from the group of the right arm and the torso, or the right arm is in the group different from the group of the left arm and the torso in processing in S3 of
In processing in S23 and subsequent steps, the ellipse type for the approximate ellipse of the upper body is selected from those as described above in accordance with the positional relationship between the approximate ellipses corresponding to the respective ellipse types. In processing in S20, if the number of groups is 2 (S20: “2”), it is confirmed whether the relative angle δ is equal to 60° or larger, and equal to 120° or smaller (S23). The processing to be executed in S23 will be described referring to
Referring to
In the embodiment, the ellipse E1 of both arms and torso is considered as the most approximate ellipse for estimating the upper body shape. Containing both arms and torso, the ellipse E1 becomes the approximate ellipse having shoulders positioned on both tops at the major axis side. The approximate ellipse shape becomes the most approximate to the upper body shape. Especially as the target H swings right and left arms alternately in walking, those arms periodically move forward and backward. If either the right or left arm is separated forward or backward too far, the resultant approximate ellipse of the ellipse E1 may be formed into the shape totally different from the actual upper body shape because of the right or the left arm positioned too far.
In the embodiment, it is determined whether the right arm or the left arm is positioned too far based on the positional relationship between the approximate ellipse of one of the right and left arms and the approximate ellipse of the other arm and the torso. If there is no right or left arm positioned too far, the ellipse E1 is determined as the ellipse type corresponding to the approximate ellipse of the upper body. Meanwhile, if there is the right or left arm positioned too far, the ellipse type that does not contain the right or the left arm positioned too far, but contains the torso (ellipse E5 or E3) is determined as the ellipse type corresponding to the approximate ellipse of the upper body. This makes it possible to estimate the approximate ellipse of the upper body while suppressing the effect of the right or the left arm positioned too far.
Specifically, a relative angle δ formed between the approximate ellipse of ellipse E4 and the approximate ellipse of ellipse E5 is calculated (S22). The relative angle δ is an angle formed between the straight line that connects the reference point P and the center Cab, and the straight line that connects the centers Cab and Cr. The relative angle δ is calculated by the following formula 1.
It is confirmed whether the calculated relative angle δ is equal to 60° or larger, and equal to 120° or smaller (S23).
Referring to
Meanwhile, if the relative angle δ is smaller than 60° or larger than 120° (S23: No), it is determined that the approximate ellipse of ellipse E4 and the approximate ellipse of ellipse E5 have been positioned too far. In such a case, the ellipse E5 is set in the ellipse type memory 7c (S24). As the approximate ellipse of ellipse E4 (right arm) positioned too far is excluded from the ellipse type of the approximate ellipse of the upper body. It is therefore possible to estimate the approximate ellipse of the upper body while suppressing the effect of the right arm positioned too far.
If the left arm is in the group different from the group of the right arm and the torso, the ellipse type of the approximate ellipse of the upper body may be determined in the similar way to the one as described above. The approximate ellipse estimated from the measured distance values MP corresponding to the ellipse E2 (left arm) has the center position C1 (not shown), and the approximate ellipse estimated from the measured distance values MP corresponding to the ellipse E3 (right arm and torso) has the center position Cab. The reference point P is positioned on the straight line along the minor axis direction of the approximate ellipse of the ellipse E3 while passing through the center Cab. The distance between the center Cab and the reference point P is d3. The distance between the centers Cab and Cl is d1. The distance between the centers Cab and Cl is d2.
The relative angle δ formed between the approximate ellipse of ellipse type E2 and the approximate ellipse of ellipse E3 is calculated (S22). The relative angle δ is an angle formed between the straight line that connects the reference point P and the center Cab, and the straight line that connects the centers Cab and Cl. The relative angle δ is calculated by the formula 1 as described above. It is confirmed whether the calculated relative angle δ is equal to 60° or larger, and equal to 120° or smaller (S23). If the relative angle δ is equal to 60° or larger, and equal to 120° or smaller, the ellipse E1 is set in the ellipse type memory 7c (S25). Meanwhile, if the relative angle δ is larger than 60°, or smaller than 120° (S23: No), the ellipse E3 is set in the ellipse type memory 7c (S24).
Referring to
Additionally, the group of both arms and torso, the group of right arm and torso, and the group of left arm and torso may be recognized as being the same, respectively. Therefore, the ellipses E1, E3, E5 may be selected as the respective ellipse type. In processing in S26 and subsequent steps of
In processing in S20 of
Processing in S26 to S33 will be described referring to
Likewise the case of 2 groups, in the case of 3 groups, the ellipse type of the approximate ellipse of the upper body is selected from the ellipses E1, E3, E5, and E6 based on the positional relationship between the approximate ellipse of the right arm or the left arm, and the approximate ellipse of the torso.
Referring back to
Subsequent to processing in S26, the second relative angle δR between the approximate ellipses of ellipses E4 and E6 is calculated (S27). The second relative angle δR is the angle formed between the straight line that connects the reference point P and the center Cb, and the straight line that connects the centers Cb and Cr. The second relative angle δR is calculated by the following formula 3.
In processing in S28 and subsequent steps, the ellipse type of the approximate ellipse of the upper body is selected based on the positional relationship between the ellipses E2 and E6, and the positional relationship between the ellipses E4 and E6 using the first relative angle δL and the second relative angle δR, which are calculated by the formulae 2, 3. Subsequent to processing in S26, it is confirmed whether the first relative angle δL is equal to 60° or larger, and equal to 120° or smaller, and whether the second relative angle δR is equal to 60° or larger, and 120° or smaller (S28).
Referring to
Referring back to
If the condition that the angle is equal to 60° or larger, and equal to 120° or smaller is not satisfied by the first relative angle δL and/or the second relative angle δR (S28: No), it is confirmed whether the first relative angle δL is equal to 60° or larger, and equal to 120° or smaller (S29). Although it is determined that the groups of the left arm, the torso, and the right arm are not recognized as being the same as a result of processing in S28, the group of the left or right arm, and the group of the torso may be recognized as being the same. Firstly, therefore, it is confirmed whether the first relative angle δL is equal to 60° or larger, and equal to 120° or smaller (S29).
If the first relative angle δL is equal to 60° or larger, and equal to 120° or smaller (S29: Yes), it is determined that the approximate ellipse of ellipse E2 and the approximate ellipse of ellipse E6 have been brought into close to each other. The group of the left arm, and the group of the torso may be recognized as being the same. In this case (S29: Yes), the ellipse E5 is set in the ellipse type memory 7c (S30).
In processing in S29, if the first relative angle δL is smaller than 60° or larger than 120° (S29: No), there may be the case that the group of the right arm and the group of the torso are recognized as being the same although the group of the left arm and the group of the torso are not recognized as being the same. It is further confirmed whether the second relative angle δR is equal to 60° or larger, and equal to 120° or smaller (S31). If the second relative angle δR is equal to 60° or larger, and equal to 120° or smaller (S31: Yes), it is determined that the approximate ellipse of ellipse E4 and the approximate ellipse of ellipse E6 have been brought into close to each other. The group of the right arm and the group of the torso may be recognized as being the same. In this case (S31: Yes), The ellipse E3 is set in the ellipse type memory 7c (S32).
Although the approximate ellipse of one of ellipses E2 and E4 is positioned too far from the approximate ellipse of ellipse E6 in processing in S30, S32, if the approximate ellipse of ellipse E4 or E2 corresponding to the other arm is recognized as being in the same group as that of the approximate ellipse of ellipse E6, the corresponding ellipse type is set in the ellipse type memory 7c. The approximate ellipse of the upper body is estimated from the ellipses E3, E5 corresponding to the group containing the right or the left arm, and the torso. In this case, the ellipse E1 containing the other arm separating too far is not selected. It is possible to estimate the approximate ellipse of the upper body while suppressing the effect of the arm separating too far from the torso.
In processing in S31, if the second relative angle δR is smaller than 60° or larger than 120° (S31: No), it is determined that the approximate ellipses of ellipses E2 and E4 are positioned too far from the approximate ellipse of ellipse E6. In this case, the ellipse E6 is set in the ellipse type memory 7c (S33). It is possible to estimate the approximate ellipse of the upper body while suppressing the effect of both arms.
Subsequent to processing in S21, S24, S25, S30 to S33, the ellipse type selection processing is terminated to return to the main processing as shown in
Referring back to
As described above, the body direction estimation device 1 of this embodiment is configured to group the measured distance values MP of the upper body of the target H acquired from the ranging sensor 3 into one or more groups. If the relative angle formed between the approximate ellipse of the group of either the right or left arm, and the approximate ellipse of the group of the torso is equal to 60° or larger, and equal to 120° or smaller, those groups are recognized as being the same. Otherwise, they are grouped into different groups.
The ellipse type corresponding to the group containing the torso is acquired, and stored in the ellipse type memory 7c. The measured distance value MP corresponding to the ellipse type is acquired, and the approximate ellipse of the upper body is calculated from the measured distance value MP. The direction of the target H is determined as the minor axis Sa direction of the approximate ellipse of the upper body. The arm positioned too far from the torso is distinguished from the group containing the torso. It is possible to estimate the direction of the target H (direction of the upper body) while suppressing the effect of the arm position of the target H.
Additionally, the arm positioned too far from the torso is excluded from the group containing the torso. The direction of the target H may be estimated although the measured distance value MP of the arm is acquired from the ranging sensor 3. The ranging sensor 3 does not have to be directed at a pin point to the body part such as the shoulder that allows acquisition of the upper body position without being influenced by the arm. The vertical position, and the elevation angle of the ranging sensor 3 may be easily set.
In the conventional art, the direction of the target H is estimated based on the change in the center of gravity of the target H in walking. As the estimation requires time for tracking the center of gravity, the direction of the target H cannot be estimated quickly. When the target stops walking, the change in the center of gravity cannot be observed, resulting in inaccurate estimation of the direction of the target H.
The body direction estimation device 1 of the embodiment is configured to select the ellipse type containing the torso based on the group calculated from the measured distance value MP acquired from the ranging sensor 3, calculate the approximate ellipse of the upper body based on the ellipse type, and estimate the direction of the target H based on the approximate ellipse of the upper body. As a result, the direction of the target H may be estimated in real time without requiring the time for tracking the center of gravity. The direction of the target H even in a stopped state may be estimated based on the measured distance value MP acquired from the ranging sensor 3.
In the moving body configured to move autonomously following up the target H (for example, the moving body 100 disclosed in Japanese Unexamined Patent Application Publication No. 2016-184337), the direction of the moving body is changed in accordance with the direction of the target H so that the target H and the display of the moving body face with each other. Conventionally, the image of the upper body of the target H acquired from the camera is subjected to the image analysis. Based on the analysis result, the direction of the target H is estimated. In this case, the direction of the target H derived from the image analysis may be made unstable depending on the position of swinging arms of the target H in walking. Consequently, the behavior to the direction of the moving body cannot be stabilized.
Then the body direction estimation device 1 is installed in the moving body to have its direction changed in accordance with the direction of the target H estimated by the body direction estimation device 1. As the direction of the target H is estimated while suppressing the effect of the arm position of the target H, the behavior to the direction of the moving body may be stabilized.
The present invention has been described in reference to the embodiment. However, it is to be readily understood that the present invention is not limited to the embodiment as described above, but may be variously modified within the scope of the present invention.
In the embodiment, the control program 6a is executed in the body direction estimation device 1. However, it is not limited to the one as described above. It is possible to execute the control program 6a stored in a personal computer, a smartphone, a tablet terminal and the like.
In the embodiment, the ranging sensor 3 is used for detecting the measured distance value of the upper body with laser beam. However, it is not limited to the one as described above. It is possible to use the distance image sensor for detecting the distance information or the like in the space from the acquired image so that the measured distance value of the upper body is detected.
In the embodiment, the approximate ellipses are calculated by the least square method based on the measured distance value MP. However, it is not limited to the one as described above. The approximate ellipse may be calculated by various kinds of arithmetic methods other than the least square method.
In the embodiment, the reference point P is positioned on the straight line along the minor axis Sa direction of the approximate ellipses corresponding to E3, E5, E6 while passing through the centers Cab, Cb of the approximate ellipses corresponding to the ellipses E3, E5, E6, respectively. The reference point P may be positioned on the straight line along the major axis La direction of the approximate ellipses corresponding to the ellipses E3, E5, E6 while passing through the centers Cab, Cb, respectively without being limited to the one as described above. Arbitrary point may be set as the reference point P.
In the embodiment, it is determined whether the approximate ellipse of either right or left arm, and the approximate ellipse of the torso have been brought into close to each other based on the relative angle δ, the first relative angle δL, the second relative angle δR. However, it is not limited to the one as described above. It may be determined whether the approximate ellipse of either right or left arm, and the approximate ellipse of the torso have been brought into close to each other based on the distance d2 between the centers Cab and Cr, and the distance d4 between the centers Cab and Cl instead of the relative angle δ, the first relative angle δL, and the second relative angle δR.
Number | Date | Country | Kind |
---|---|---|---|
2017-067932 | Mar 2017 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2018/010041 | 3/14/2018 | WO | 00 |