A human body detection method, device and storage medium
By detecting environmental difference information and depth image collection, combined with particle filtering algorithms, the problem of low human detection accuracy in the existing technology is solved, and high-precision human detection and tracking in a large range is achieved.
Patent Information
- Application Number
- CN201810179863.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-03-05
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2038-03-05
AI Technical Summary
Existing human body detection technology is difficult to achieve precise positioning in a wide range, especially in the field of service robots. Traditional methods such as image processing and somatosensory equipment-based methods have problems such as difficulty in precise positioning and small detection range.
The difference between the reference environment information and the actual environment information is obtained through the detection device, the environment difference information is used to identify the human body position, and the depth image acquisition and particle filtering algorithm are combined for human body detection and tracking to achieve high-precision human body detection in a 360° environment.
It achieves high-precision human body detection in a wide range, can accurately identify and track human body position, and is suitable for intelligent devices such as service robots.
Smart Images

Figure CN110232301B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of human body detection, and in particular to a human body detection method, device and storage medium. Background Art
[0002] Human detection and tracking technology is a research hotspot in the field of computer vision. This technology is mainly used for indoor monitoring, assisted driving, and human-computer interaction functions of service robots. At present, there are relatively few mature products in this area, especially in the field of service robots.
[0003] In the prior art, there are several commonly used solutions for human body detection:
[0004] 1. The detection method based on image processing uses the camera as the main sensor to collect images, and then detects and locates the human body through certain feature extraction and recognition methods; however, it cannot accurately locate the position of the human body, and it is difficult to achieve accurate positioning of the human body.
[0005] 2. Detection method based on passive infrared camera: Passive infrared camera can detect heat-generating objects such as human body, which is suitable for outdoor scenes and often used for military purposes. However, it is difficult to achieve large-scale civilian use due to its high price and high requirements.
[0006] 3. The detection method based on the somatosensory device has the ability to collect depth images. Through relevant algorithms, it can achieve accurate positioning and posture confirmation of the human body, but the detection range is small, the detection distance is only 1 to 4 meters, and the detection angle is only 53°. Summary of the invention
[0007] The main technical problem solved by the embodiments of the present invention is to provide a method for detecting a human body, which can improve the accuracy of human body detection in a large range.
[0008] In order to solve the above technical problems, a technical solution adopted by an embodiment of the present invention is: to provide a human body detection method, the method comprising:
[0009] The detection device determines its current position and obtains reference environment information of the current position; wherein the reference environment information represents the environment information when the current environment is in an unmanned state;
[0010] Get the actual environment information of the current location;
[0011] Comparing the reference environment information with the actual environment information to obtain environment difference information of the current location;
[0012] The environmental difference information is used to identify the human body in the current environment.
[0013] Wherein, after identifying a human body in the current environment by using the environmental difference information, the method further includes:
[0014] Using a depth image collector to collect images of the identified human body position;
[0015] The acquired depth image is detected to further identify whether there is a human body at the human body position and / or identify the posture of the human body at the human body position.
[0016] The reference environment information and the actual environment information both include distance information between the environmental obstacles in multiple directions at the current position and the detection device.
[0017] Wherein, the obtaining of the reference environment information of the current location includes:
[0018] In the environment map, determine reference environment obstacles in multiple directions of the current position;
[0019] Using the map data of the environment map, obtaining first distances between the current position and reference environment obstacles in the multiple directions, and using the obtained multiple first distances as the reference environment information;
[0020] The obtaining of actual environment information of the current location includes:
[0021] The multiple directions corresponding to the first distance as the reference environmental information are used as multiple scanning directions, and the distance sensor is used to scan to obtain the second distances between the current position and the actual environmental obstacles in the multiple scanning directions as the actual environmental information.
[0022] The step of using the acquired multiple first distances as the reference environment information includes:
[0023] The first distance that does not meet the set distance requirement among the multiple first distances obtained is set as invalid data, and the remaining first distances are used as the reference environment information, wherein the set distance requirement is not greater than the first set distance and not less than the second set distance.
[0024] The step of comparing the reference environment information with the actual environment information to obtain environment difference information of the current location includes:
[0025] Acquire a difference between each first distance in the reference environment information and a second distance in a corresponding direction in the actual environment information, and use the acquired multiple differences as environment difference information of the current position;
[0026] The step of using the environmental difference information to identify a human body in the current environment includes:
[0027] Taking at least two consecutive difference values that meet the set difference value requirement among the multiple difference values as a difference value sequence;
[0028] The environmental position formed by the scanning direction corresponding to each difference sequence is used as a human body position in the current environment.
[0029] The step of using the environment position formed by the scanning direction corresponding to each difference sequence as a human body position in the current environment includes:
[0030] Based on a classifier trained with preset human feature information, each difference sequence is screened to obtain a difference sequence matching the human feature information;
[0031] The environmental position formed by the scanning direction corresponding to each filtered difference sequence matching the human body feature information is used as a human body position in the current environment.
[0032] Wherein, determining the current location information includes:
[0033] The sensor data detected at the current position is matched with the map data of the environment map to determine the current position of the detection device.
[0034] Before determining the current location information, the method further includes:
[0035] When the current environment is in an unmanned state, sensor data at different locations are detected and obtained, and the environment map is constructed using the sensor data at different locations detected and obtained.
[0036] The actual environment information is the distance between the detection device and the environmental obstacle; the sensing data includes at least one of the following: actual environment information, the direction angle of the detection device, and movement information of the detection device.
[0037] After the human body in the current environment is identified by using the environmental difference information, the method further includes: tracking the identified human body.
[0038] The step of tracking the identified human body includes:
[0039] Using a distance sensor to scan the direction of the identified human body at different times to obtain distance data at different times;
[0040] The distance data at different times are processed by a particle filtering algorithm to obtain the human body position information at different times.
[0041] In order to solve the above technical problems, another technical solution adopted by the embodiment of the present invention is: providing a human body detection device, comprising: a memory and a processor connected to each other;
[0042] The memory is used to store computer programs;
[0043] The processor is used to run the computer program to execute the above-mentioned human body detection method.
[0044] It also includes an environmental sensor connected to the processor, and the environmental sensor is used to scan the surrounding environment to obtain actual environmental information.
[0045] The environmental sensor is a distance sensor, which is specifically used to scan the surrounding environment to obtain the distance between the environmental obstacles and the current position.
[0046] Wherein, the distance sensor is a laser sensor.
[0047] Wherein, the detection device also includes a depth image collector connected to the processor;
[0048] The depth image collector is used to collect images of the surrounding environment to obtain a depth image.
[0049] Among them, it also includes a moving mechanism, a direction angle sensor, and a movement sensor; the moving mechanism is used to move the detection device, the direction angle sensor is used to detect the direction angle of the detection device, and the movement sensor is used to detect the movement information of the detection device.
[0050] Wherein, the detection device is a robot.
[0051] In order to solve the above technical problem, another technical solution adopted by the embodiment of the present invention is: providing a storage medium, the storage medium stores program data, and the program data can be executed to implement the above human body detection method.
[0052] The beneficial effects of the embodiments of the present invention are as follows: in the human body detection method of the embodiments of the present invention, the current position is determined by the detection device, and the reference environment information of the current position is obtained; wherein the reference environment information represents the environment information when the current environment is in an unmanned state; the actual environment information of the current position is obtained; the reference environment information is compared with the actual environment information to obtain the environment difference information of the current position; and the human body in the current environment is identified by using the environment difference information. By comparing the environment information in the unmanned state with the actual environment information, the difference between the two can be accurately obtained, and the difference is usually caused by the human body in the actual environment. Therefore, the human body in the current environment where the detection device is located can be detected, and human body detection with high accuracy in a large range can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a structural schematic diagram of an embodiment of a human body detection device of the present invention;
[0054] Figure 2 is a schematic diagram of the system structure of an embodiment in which the detection device is a robot;
[0055] Figure 3 It is a schematic diagram of the process of the first embodiment of the human body detection method of the present invention;
[0056] Figure 4 yes Figure 1 Schematic diagram of the process of steps S11, S12, and S13;
[0057] Figure 5 yes Figure 1 Schematic diagram of the process of step S14;
[0058] Figure 6 yes Figure 5 Schematic diagram of the process of step S142;
[0059] Figure 7 is a schematic flow chart of a second embodiment of the human body detection method of the present invention;
[0060] Figure 8 is a schematic flow chart of a third embodiment of the human body detection method of the present invention;
[0061] Fig. 9 yes Figure 8 Schematic diagram of the process of step S35;
[0062] Fig.10 It is a schematic structural diagram of a storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of the structure of an embodiment of a human body detection device of the present invention. Figure 1 As shown, the human body detection device 100 of this embodiment includes a memory 102 and a processor 101 that are interconnected. The memory 102 is used to store computer programs; the processor 101 is used to run the computer programs stored in the memory 102 to detect human bodies in the current environment where it is located.
[0065] For further information, see Figure 1 In this embodiment, the human body detection device 100 may also be provided with an environmental sensor 103, which is connected to the processor 101. The environmental sensor 103 can detect the environment around the detection device and obtain the actual environmental information around the detection device. In this embodiment, the environmental sensor 103 includes a distance sensor, which can specifically scan the environment around the detection device to obtain the distance and relative direction between the environmental obstacles behind the detection device and the current position of the detection device. In this embodiment, the distance sensor may be a laser distance sensor.
[0066] Further reading Figure 1 The detection device in this embodiment is also provided with a depth image collector 107 connected to the processor 101. The depth image collector 107 can collect images of the environment around the detection device to obtain a depth image. The processor 101 can restore the surrounding environment in three dimensions through the depth information contained in the depth image to more accurately identify objects in the surrounding environment.
[0067] Further reading Figure 1 The detection device of this embodiment is also provided with a moving mechanism 105, an angle sensor 106, and a moving sensor 107. The moving mechanism 105 is used to move the detection device, the angle sensor 106 is used to detect the angle of the detection device, and the moving sensor 107 is used to detect the movement information of the detection device. The detection device can locate the current position of the detection device in the current environment and control the movement of the detection device through the movement data and sensing data of the moving mechanism 105, the angle sensor 106, and the moving sensor 107. In this embodiment, the detection device can be an intelligent device such as a robot that can provide corresponding services.
[0068] See further Figure 2 , Figure 2 Taking a robot as an example, a schematic diagram of the structure of a system embodiment of a detection device is shown in FIG. Figure 2 As shown, the robot 200 includes a layered support 20. In this embodiment, the layered support 20 can be divided into four layers. From the top layer to the bottom layer, there are a depth image collector 40, an industrial computer 50, an environmental sensor 60 (a 360° scanning laser distance sensor is taken as an example in this embodiment), a controller 70 and a motor 80. The processor (not shown in the figure) is arranged in the industrial computer 50; wherein, the depth image collector 40 and the environmental sensor 60 can be directly connected to the industrial computer 50, and send the collected depth image and the detected sensor data to the industrial computer 50. A code disk (not shown in the figure) is arranged in the motor 80, and the code disk is connected to the industrial computer 50 through the controller 70. An electronic compass (not shown in the figure) is arranged in the controller 70, and the electronic compass is connected to the industrial computer 50 through the controller 70. Both the code disk and the electronic compass send the detected sensor data to the industrial computer 50 through the controller 70. Furthermore, a moving mechanism 30 is arranged below the layered bracket 20. The moving mechanism 30 and the controller 70 receive the moving instructions sent by the industrial computer 50 through the controller 70, and move according to the received moving instructions; the moving mechanism 30 includes a chassis 31 and wheels 32 arranged below the chassis 31. The chassis 31 is also provided with a power supply and / or a battery slot for placing batteries (not shown in the figure). In other embodiments, the wheels 32 can also be arranged on both sides of the chassis 31. The number of wheels 32 can be set according to actual needs, and this embodiment does not make specific limitations.
[0069] In other embodiments, the specific number of layers of the layered bracket can be increased or decreased according to actual needs, and the devices set on each layer of the layered bracket can also be adjusted according to actual needs. This embodiment does not specifically limit the order in which the devices are set. In this embodiment, the height of the robot is set between 30 cm and 50 cm, so the human body to be detected is a human leg. In other embodiments, the height of the robot can also be adjusted according to actual needs, which is not specifically limited in this embodiment.
[0070] Please read further Figure 3 , Figure 3 yes Figure 1 The flowchart of the first implementation mode of the human body detection method executed by the processor 101 in the detection device embodiment shown in FIG. Figure 3 As shown, the human body detection method of this embodiment includes the following steps:
[0071] In step S11, the detection device determines its current position and obtains reference environment information of the current position.
[0072] In this embodiment, an environmental sensor is provided on the detection device. The detection device can detect the current environment in which it is located through the provided environmental sensor to obtain corresponding sensor data, and match the obtained sensor data with the map data of the environmental map of the current environment in which it is located when no one is present, so as to determine its current position in the current environment. That is, when the detection device is operating in the current environment, based on the environmental map of the current environment in which no one is present and the sensor data detected by the environmental sensor, the detection device itself can be positioned in real time by using a relevant positioning algorithm. In this embodiment, a Monte Carlo particle filter algorithm can be used. Among them, the environmental sensor includes a distance sensor, a code disk, an electronic compass and other sensor devices. The sensor data may include one or more of the information of environmental obstacles in the current environment detected by the environmental sensor, the direction angle of the detection device, and the movement information of the detection device. The distance sensor in this embodiment may be a laser scanning distance sensor. In addition, it may also be other distance sensors such as an infrared distance sensor.
[0073] Furthermore, the detection device obtains corresponding reference environment information based on the current position obtained by positioning. In this embodiment, the reference environment information represents the environment information when the current environment where the detection device is located is in an unmanned state, wherein the reference environment information may at least include the distance information between the environmental obstacles and the detection device in multiple directions of the current position. In other words, the detection device can know the relative direction of the environmental obstacles relative to the detection device and the distance between the environmental obstacles and the detection device in each direction when the current environment is in an unmanned state through the reference environment information.
[0074] In this embodiment, the environmental map of the current environment when no one is present can be pre-stored in the detection device, or can be an environmental map constructed by the detection device using the sensor data detected by the environmental sensor when the current environment is no one; the detection device can detect at different positions when the current environment is no one to obtain sensor data at different positions, and then use the sensor data obtained at different positions to construct the environmental map of the current environment when no one is present. In this embodiment, the environmental map can be a grid map; in this embodiment, the gmapping algorithm can be used to construct the environmental map, and in other implementations, other algorithms can also be used to construct the environmental map. This embodiment does not limit the specific algorithm for constructing the environmental map. The detection device can obtain the corresponding map data through the environmental map.
[0075] In step S12, actual environment information of the current location is obtained.
[0076] The detection device uses the environmental sensor at its current position to perform a real scan of its current environment to obtain the actual environmental information of the current environment. In this embodiment, the laser distance sensor is used as the scanning sensor, and the actual environmental information obtained is the laser scanning information. In this embodiment, the actual environmental information includes the relative angle of the environmental obstacles and possible human body in the current environment relative to the detection device, as well as the distance between the environmental obstacles and possible human body and the detection device in the current environment, which is the real information of the current environment. In addition, the actual environmental information may also include the direction angle of the detection device and the movement information of the detection device.
[0077] In step S13, the reference environment information is compared with the actual environment information to obtain environment difference information of the current location.
[0078] The detection device compares the reference environment information of the current position it obtains with the actual environment information, and then obtains the environment difference information between the two. It can be understood that the reference environment information represents the environment information when the current environment where the detection device is located is in an unmanned state. If there is no human body in the current environment where the detection device is located, the detected actual environment information is basically consistent with the reference environment information. If there is a human body in the current environment where the detection device is located, there will be a difference between the detected actual environment information and the reference environment information. In other words, the environment difference information obtained at this time can be considered to be caused by the human body in the current environment where the detection device is located, and there is a corresponding relationship between the environment difference information and the existing human body. Therefore, in this embodiment, the environment difference information between the two can be used as a parameter for identifying the human body in the current environment.
[0079] In step S14, the human body in the current environment is identified using the environmental difference information.
[0080] Since the environmental difference information can be considered to be caused by the human body in the current environment where the detection device is located, the human body in the current environment where the detection device is located can be identified based on the environmental difference information obtained in step S13, and the human body in the current environment can be detected.
[0081] This embodiment compares the environmental information in an unmanned state with the actual environmental information, and can accurately derive the difference between the two. The difference is usually caused by the human body in the actual environment. Therefore, it is possible to detect the human body in the current environment where the detection device is located, thereby achieving high-precision human body detection in a large range.
[0082] Please read further Figure 4 , obtaining the reference environment information of the current location in step S11 may include the following steps:
[0083] In step S111 , reference environmental obstacles in multiple directions of the current position are determined in the environmental map.
[0084] Based on the environmental map of the current environment in which it is located, the detection device takes itself as the base point, determines multiple directions in the environmental map, and references environmental obstacles existing in the multiple directions determined in the environmental map. It can be understood that since the environmental map is a map of the current environment when no one is around, the reference environmental obstacles are environmental obstacles such as doors, tables, walls, pillars, and flower pots when no one is around. In this embodiment, the detection device determines its orientation through sensor data, and takes the orientation of the front of the detection device as the 0° direction, and sets an angle difference, so that multiple directions can be obtained. It should be noted that in this embodiment, the angle formed by the multiple directions set by the detection device is 360°.
[0085] In this embodiment, let the angle difference be D, then the multiple detection angles of the detection device can form a detection angle sequence [0, D, 2D, 3D...360]. Further, the detection device determines the reference environmental obstacles in the direction corresponding to each angle in the detection angle sequence in the environmental map based on the environment map of the current environment in which it is located.
[0086] In step S112, the map data of the environment map is used to obtain first distances between the current position and reference environment obstacles in multiple directions, and the obtained multiple first distances are used as reference environment information.
[0087] Based on the reference environment obstacles in the direction corresponding to each angle determined in step S111, the map data of the environmental map of the current environment in which the detection device is located can be used to obtain the first distance between the reference environment obstacles determined in the direction corresponding to each angle and the detection device, and the first distance between the reference environment obstacles in the direction corresponding to each angle and the detection device is used as reference environment information.
[0088] In this embodiment, based on the detection angle sequence [0, D, 2D, 3D...360] and the map data of the environmental map of the current environment in which the detection device is located, the first distance between the reference environmental obstacle and the detection device in the direction corresponding to each angle in the detection angle sequence can be obtained. The obtained multiple first distances can also be considered as a reference distance sequence [d1, d2, d3...dn].
[0089] Please read further Figure 4 , step S12 may include the following steps:
[0090] In step S121, multiple directions corresponding to the first distance as reference environmental information are used as multiple scanning directions, and the distance sensor is used to scan and obtain the second distances between the current position and the actual environmental obstacles in the multiple scanning directions as actual environmental information.
[0091] In this embodiment, the detection device is based on the detection angle sequence [0, D, 2D, 3D...360], and uses the environmental sensor to scan in the direction of the corresponding angle to obtain the actual environmental obstacles scanned in the direction corresponding to each angle in the detection angle sequence, and obtain the second distance between the actual environmental obstacles in the direction corresponding to each angle in the detection angle sequence and the detection device. The multiple second distances obtained can also be considered as an actual distance sequence [S1, S2, S3...Sn].
[0092] Since the actual distance sequence and the reference distance sequence are both based on the same detection angle sequence, the directions corresponding to the first distance and the second distance at corresponding positions in the actual distance sequence and the reference distance sequence are the same, for example, the direction of d1 is consistent with the direction of S1, the direction of d2 is consistent with the direction of S2, and so on.
[0093] Further, in other embodiments, when the multiple first distances obtained in step S112 are used as reference environment information, the first distances may be screened, and the first distances that do not meet the set distance requirement among the multiple first distances obtained may be set as invalid data, and the remaining first distances may be used as reference environment information. For example, assuming that d3 in the reference distance sequence [d1, d2, d3...dn] does not meet the set distance requirement, d3 may be set as invalid data, and the remaining first distances may constitute a new reference distance sequence [d1, d2...dn]. In this embodiment, the set distance requirement is not greater than the first set distance and not less than the second set distance, wherein the first set distance is the maximum value of the distance sensor detection distance, and the second set distance is the minimum value of the distance sensor detection distance. In other words, the first distance in the reference distance sequence that exceeds the detection range of the distance sensor is set as invalid data. It can be understood that when the actual distance sequence is obtained by scanning the distance sensor, due to the detection range of the distance sensor itself, the second distance scanned at the angle corresponding to the invalid data is also invalid data. For example, in the actual distance sequence [S1, S2...Sn], the direction of each first distance in the reference distance sequence still corresponds to the direction of each second distance in the actual distance sequence.
[0094] In another embodiment, the invalid data may not be deleted from the reference distance sequence, but the first distance is marked as invalid data in the reference distance sequence. The new reference distance sequence is [d1, d2, inf, ... dn], and the corresponding actual distance sequence is [S1, S2, inf ... Sn]. The direction of each first distance in the reference distance sequence still corresponds to the direction of each second distance in the actual distance sequence.
[0095] For further information, see Figure 4 , step S13 may include the following steps:
[0096] In step S131, the difference between each first distance in the reference environment information and the second distance in the corresponding direction in the actual environment information is obtained, and the obtained multiple differences are used as the environment difference information of the current position.
[0097] By subtracting the multiple first distances obtained as reference environment information in step S112 from the multiple second distances obtained as actual environment information in step S121, the difference between each first distance in the reference environment information and the second distance in the corresponding direction in the actual environment information can be obtained, and the difference can be used as environment difference information.
[0098] In this embodiment, each first distance in the reference distance sequence [d1, d2, d3...dn] is subtracted from the second distance of the corresponding position in the actual distance sequence [S1, S2, S3...Sn] to obtain a distance difference sequence [dS1, dS2, dS3...dSn], which represents the environmental difference between the reference environmental information and the actual environmental information.
[0099] For further information, see Figure 5 , step S14 may include the following steps:
[0100] In step S141, at least two consecutive difference values that meet the set difference value requirement among the plurality of difference values are taken as a difference value sequence.
[0101] Through step S131, a distance difference sequence [dS1, dS2, dS3...dSn] can be obtained. It can be understood that each value in the distance difference sequence represents the difference between the reference obstacle and the actual obstacle in multiple directions in the current environment. If the actual obstacle in a certain direction is a human body, the difference in the corresponding distance difference sequence must be at least greater than or equal to the width of the human body. In this embodiment, taking a human leg as an example, the difference must be at least greater than or equal to the width of a human leg. If the actual obstacle in a certain direction is a reference obstacle (i.e., there is no human body), the difference in the corresponding distance difference sequence is small, and may even be zero. Therefore, a set difference requirement is set, and a difference that meets the set difference requirement is screened out from multiple differences.
[0102] In this embodiment, the set difference requirement can be a threshold set according to the width of the human body. In this embodiment, the threshold of the set difference requirement is set to any value between 10 cm and 20 cm based on the width of the human leg. Meeting the set difference requirement means being greater than the threshold.
[0103] Furthermore, each first distance and each second distance in the reference distance sequence and the actual distance sequence is only an obstacle in a direction corresponding to a certain angle, and is actually only a point on the obstacle. The difference in the corresponding distance difference sequence is also only a point in a direction corresponding to a certain angle, and the human body usually has a certain width. Therefore, for the human body, it usually corresponds to multiple detected points. In other words, for the human body, it corresponds to multiple continuous differences; therefore, this embodiment further selects at least two continuous differences from the differences that meet the set difference requirements as a difference sequence, and the human body is characterized by the selected difference sequence.
[0104] In this embodiment, each difference in the distance difference sequence [dS1, dS2, dS3...dSn] is compared with a preset threshold value, and the difference values in the difference sequence that are greater than the threshold value are set to 1, and the difference values that are less than the threshold value are set to 0, so that a new difference sequence can be obtained, and the values in the new difference sequence are only 1 or 0. Further, the new difference sequence is multiplied by the actual distance sequence [S1, S2, S3...Sn] obtained by scanning to obtain a new actual distance sequence, and at least two consecutive non-zero difference values are extracted from the new actual distance sequence to obtain a difference sequence for characterizing the human body.
[0105] In step S142, the environment position formed by the scanning direction corresponding to each difference sequence is used as a human body position in the current environment.
[0106] The difference sequence obtained through step S141 can be considered that there is a human body at the position corresponding to each difference sequence. Furthermore, the detection device knows the second distance corresponding to each difference in the difference sequence, that is, the distance between the known existing human body and the detection device, and the detection device knows the scanning direction corresponding to each difference in the difference sequence, that is, the relative direction of the known existing human body relative to the detection device. Therefore, the detection device can use the environmental position formed by the scanning direction corresponding to the difference sequence as a human body position in the current environment.
[0107] For further information, see Figure 6 In another embodiment, step S142 may further include the following steps:
[0108] In step S1421, each difference sequence is screened based on a classifier trained based on preset human feature information to obtain a difference sequence matching the human feature information.
[0109] In this embodiment, a classifier trained based on preset human feature information is obtained, and the difference sequence obtained in step S141 is screened based on the classifier, so that a difference sequence matching the human feature information can be screened out from the difference sequence obtained in step S141.
[0110] In this embodiment, the classifier may be pre-trained and then stored in the detection device, or may be obtained by training the detection device itself, and this embodiment does not impose any specific limitation.
[0111] The human body characteristic information in this embodiment can be empirical information. For example, according to the scanning angle of the existing laser distance sensor, combined with empirical data, it can be known that in general, the human body can correspond to several scanning directions of the laser distance sensor. In other words, there are several differences in the corresponding difference sequence. In this embodiment, human legs are used as detection. In general, human legs can correspond to 5 to 10 scanning directions of the laser distance sensor. In other words, the number of differences in the difference sequence corresponding to the human legs is between 5 and 10; if the number of differences in the difference sequence is too much or too little, it can be considered that the difference sequence does not correspond to the human body, that is, the difference sequence does not match the human body characteristic information.
[0112] In this embodiment, the training algorithm of the classifier can adopt the Adaboost algorithm, which is an iterative algorithm, which trains different classifiers for the same training set to obtain weak classifiers, and then combines these weak classifiers to form a strong classifier. Other algorithms can also be used in other implementations, and this embodiment does not make specific limitations.
[0113] In step S1422, the environment position formed by the scanning direction corresponding to each screened difference sequence matching the human body feature information is used as a human body position in the current environment.
[0114] This embodiment uses the environmental position formed by the scanning direction corresponding to the difference sequence obtained after screening as a human body position in the current environment, so that the recognition accuracy of the human body can be further improved.
[0115] For further information, see Figure 7 , Figure 7 FIG. 1 is a flow chart of a second embodiment of a human body detection method executed by the processor 101. Figure 7 As shown, this embodiment may include the following steps:
[0116] In step S21, the detection device determines its current position and obtains reference environment information of the current position.
[0117] In step S22, actual environment information of the current location is obtained.
[0118] In step S23, the reference environment information is compared with the actual environment information to obtain environment difference information of the current location.
[0119] In step S24, the human body in the current environment is identified using the environmental difference information.
[0120] In this embodiment, steps S21 to S24 are respectively Figure 3 Steps S11 to S14 are the same as shown, and can be the same as in other embodiments. Figures 4 to 6 The implementation methods of steps S11 to S14 are the same and will not be described again here.
[0121] In step S25, a depth image collector is used to collect images of the identified human body position.
[0122] After the human body in the current environment is identified in step S24, a depth image collector is used to collect images of the human body position corresponding to the identified human body, so as to further confirm and process the human body in the current environment identified in step S204. In this embodiment, a body sensing camera can be used to obtain a depth image.
[0123] In step S26, the acquired depth image is detected to further identify whether there is a human body at the human body position and / or identify the posture of the human body at the human body position.
[0124] The image collected by the depth image collector is a depth image, which contains the depth information of the identified human body. The depth image can be used to restore the identified human body in three dimensions, and then the human body identified in step S24 can be further confirmed to determine whether the human body identified in step S24 is an accurate and real human body. If the human body identified in step S24 is an accurate and real human body, the human body posture recognition can be performed on the human body through the depth image. In this embodiment, through the depth information, the human body skeleton information is extracted on the basis of the depth information, the skeleton is determined, and the skeleton is tracked to confirm the human body, and the confirmed human body posture recognition is performed. This process can adopt the existing technology, and will not be repeated in this embodiment.
[0125] In this embodiment, the depth image collector collects the depth image and Figures 3 to 6 The human body detection method shown in the first embodiment is combined to achieve human body recognition in a 360° environment while further improving the accuracy of human body recognition and being able to recognize the human body posture of the recognized human body.
[0126] For further information, see Figure 8 , Figure 8 FIG. 1 is a flow chart of a third embodiment of a human body detection method executed by the processor 101. Figure 8 As shown, this embodiment may include the following steps:
[0127] In step S31, the detection device determines its current position and obtains reference environment information of the current position.
[0128] In step S32, actual environment information of the current location is obtained.
[0129] In step S33, the reference environment information is compared with the actual environment information to obtain the environment difference information of the current location.
[0130] In step S34, the human body in the current environment is identified using the environmental difference information.
[0131] In this embodiment, steps S31 to S34 are respectively Figure 3 Steps S11 to S14 are the same as shown, and can be the same as in other embodiments. Figures 4 to 6 The implementation methods of steps S11 to S14 are the same and will not be described again.
[0132] In step S35, the identified human body is tracked.
[0133] After identifying a human body in the current environment, this embodiment tracks the human body by detecting the identified human body.
[0134] For details, please refer to Fig. 9 , step S35 may include the following steps:
[0135] In step S351, a distance sensor is used to scan the direction of the identified human body at different times to obtain distance data at different times.
[0136] This embodiment uses a distance sensor to scan the direction of the identified human body in real time at different times. If the identified human body moves, the detected distance data will change accordingly. In this way, the human body can be tracked in real time through the distance data detected at different times.
[0137] In step S352, a particle filtering algorithm is used to process the distance data at different times to obtain the human body position information at different times.
[0138] In this embodiment, the distance data obtained by scanning in step S351 is processed by a particle filtering algorithm to obtain the human body position information at different times, and then the identified human body is tracked.
[0139] Since the distance sensor can realize 360° scanning in an environment, the human body can also be tracked in a 360° environment in this embodiment.
[0140] Understandably, Figure 7 The detection method shown in the second embodiment and Figures 8 to 9 The third embodiment of the detection method shown can be combined with each other to form a new embodiment. In the new embodiment, steps S25 and S26 can be executed to obtain a depth image of the identified human body, confirm the identified human body and identify the human body posture of the confirmed human body; further, step S35 is executed to track the confirmed human body.
[0141] On the other hand, see Fig.10 , Fig.10 Schematic diagram of the structure of a storage medium according to an embodiment of the present invention. Fig.10 As shown, the storage medium 300 of this embodiment stores at least one program or instruction 301, and the program or instruction is used to execute the following steps: Figures 3 to 9 The human body detection method shown is a first embodiment to a third embodiment.
[0142] In one embodiment, the storage medium 300 may be a storage chip in the processor 101 of the detection device, or a hard disk, a mobile hard disk, a USB flash drive, a CD, or other readable and writable storage tools. In addition, the storage medium may also be a server, etc.
[0143] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting a human body, characterized in that: include: The detection device determines its current position in the current environment and obtains reference environment information of the current position; wherein the reference environment information represents the environment information when the current environment is in an unmanned state, and the reference environment information includes the distance information between the environmental obstacles in multiple directions of the current position and the detection device; Obtaining actual environmental information of the current position, wherein the actual environmental information includes relative angles of environmental obstacles and possible human bodies relative to the detection device and distances between environmental obstacles and possible human bodies and the detection device; Comparing the reference environment information with the actual environment information to obtain environment difference information of the current location; The environmental difference information is used to identify the human body in the current environment.
2. The method according to claim 1, characterized in that After identifying a human body in the current environment by using the environmental difference information, the method further includes: Using a depth image collector to collect images of the identified human body position; The acquired depth image is detected to further identify whether there is a human body at the human body position and / or identify the posture of the human body at the human body position.
3. The method according to claim 1, characterized in that: The obtaining of reference environment information of the current position includes: In the environment map, determine reference environment obstacles in multiple directions of the current position; Using the map data of the environment map, obtaining first distances between the current position and reference environment obstacles in the multiple directions, and using the obtained multiple first distances as the reference environment information; The obtaining of actual environment information of the current location includes: The multiple directions corresponding to the first distance as the reference environmental information are used as multiple scanning directions, and the distance sensor is used to scan to obtain the second distances between the current position and the actual environmental obstacles in the multiple scanning directions as the actual environmental information.
4. The method according to claim 3, characterized in that The step of using the acquired multiple first distances as the reference environment information includes: The first distance that does not meet the set distance requirement among the multiple first distances obtained is set as invalid data, and the remaining first distances are used as the reference environment information, wherein the set distance requirement is not greater than the first set distance and not less than the second set distance.
5. The method according to claim 3, characterized in that: The comparing the reference environment information with the actual environment information to obtain environment difference information of the current location includes: Acquire a difference between each first distance in the reference environment information and a second distance in a corresponding direction in the actual environment information, and use the acquired multiple differences as environment difference information of the current position; The step of using the environmental difference information to identify a human body in the current environment includes: Taking at least two consecutive difference values that meet the set difference value requirement among the multiple difference values as a difference value sequence; The environmental position formed by the scanning direction corresponding to each difference sequence is used as a human body position in the current environment.
6. The method according to claim 5, characterized in that The step of using the environment position formed by the scanning direction corresponding to each difference sequence as a human body position in the current environment includes: Based on a classifier trained with preset human feature information, each difference sequence is screened to obtain a difference sequence matching the human feature information; The environmental position formed by the scanning direction corresponding to each filtered difference sequence matching the human body feature information is used as a human body position in the current environment.
7. The method according to claim 1, characterized in that Determining the current position of the user in the current environment includes: The sensor data detected at the current position is matched with the map data of the environment map to determine the current position of the detection device.
8. The method according to claim 3 or 7, characterized in that: Before determining the current position of the device in the current environment, the method further includes: When the current environment is in an unmanned state, sensor data at different locations are detected and obtained, and the environment map is constructed using the sensor data at different locations detected and obtained.
9. The method according to claim 8, characterized in that The sensing data includes at least one of the following: actual environment information, the direction angle of the detection device, and movement information of the detection device.
10. The method according to claim 1, characterized in that After the human body in the current environment is identified by using the environmental difference information, the method further includes: The identified human body is tracked.
11. The method according to claim 10, characterized in that The tracking of the identified human body includes: Using a distance sensor to scan the direction of the identified human body at different times to obtain distance data at different times; The distance data at different times are processed by using a particle filtering algorithm to obtain the human body position information at different times.
12. A human body detection device, characterized in that: including interconnected memory and processor; The memory is used to store computer programs; The processor is used to run the computer program to execute the human body detection method described in any one of claims 1-11.
13. The detection device according to claim 12, characterized in that: It also includes an environmental sensor connected to the processor, and the environmental sensor is used to scan the surrounding environment to obtain actual environmental information.
14. The detection device according to claim 13, characterized in that: The environmental sensor is a distance sensor, which is specifically used to scan the surrounding environment to obtain the distance between the environmental obstacles and the current position.
15. The detection device according to claim 14, characterized in that: The distance sensor is a laser sensor.
16. The detection device according to claim 12, characterized in that: The detection device also includes a depth image collector connected to the processor; The depth image collector is used to collect images of the surrounding environment to obtain a depth image.
17. The detection device according to claim 12, characterized in that: It also includes a moving mechanism, a direction angle sensor, and a movement sensor; the moving mechanism is used to move the detection device, the direction angle sensor is used to detect the direction angle of the detection device, and the movement sensor is used to detect the movement information of the detection device.
18. The detection device according to claim 12, characterized in that: The detection device is a robot.
19. A storage medium, characterized in that: Program data is stored, and the program data can be executed to implement the human body detection method as described in any one of claims 1-11.
