WO2019196313A1 - Robot walking obstacle detection method and apparatus, computer device, and storage medium - Google Patents

Robot walking obstacle detection method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2019196313A1
WO2019196313A1 PCT/CN2018/102854 CN2018102854W WO2019196313A1 WO 2019196313 A1 WO2019196313 A1 WO 2019196313A1 CN 2018102854 W CN2018102854 W CN 2018102854W WO 2019196313 A1 WO2019196313 A1 WO 2019196313A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
coordinate system
human body
coordinates
camera
Prior art date
Application number
PCT/CN2018/102854
Other languages
French (fr)
Chinese (zh)
Inventor
曾伟
周宝
王健宗
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019196313A1 publication Critical patent/WO2019196313A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0246Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
    • G05D1/0248Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means in combination with a laser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition

Definitions

  • the present application relates to the field of robot obstacle avoidance technology, and in particular, to a robot walking obstacle detection method and apparatus, and a computer device and a storage medium storing computer readable instructions.
  • the obstacle detection of the robot is the key factor for the successful navigation movement of the robot.
  • the pedestrian in the movement adds many difficulties to the obstacle avoidance of the robot.
  • the inventor realized that in the current robot obstacle detection method, there are many problems, such as limited range of ultrasonic detection, and it is difficult to comprehensively cover the three-dimensional space even if a large number is loaded; although the laser detection has high precision, the same problem exists.
  • the coverage is detected by the depth camera, but due to the huge data processing and visual depth of field limitation, there is also a problem that the obstacle detection accuracy is not high.
  • these methods are mainly for stationary objects, but the pedestrians are equated with other obstacle detection, which is more passive when formulating strategies to avoid pedestrians, reducing the efficiency of effective obstacle avoidance.
  • the purpose of the present application is to solve at least one of the above technical drawbacks, in particular, technical defects that are difficult to avoid obstacles.
  • the present application provides a robot walking obstacle detecting method, the robot having a camera, a laser emitter, and a laser receiver, the method comprising the following steps: Step S10: acquiring an image through a camera, applying an image human body detection algorithm to obtain a human joint point Human body image coordinates (u, v) in the image coordinate system; step S20: converting human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system; step S30 : determining, according to x, y, the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ of the laser emitter irradiating the key joint points of the human body, starting the laser emitter to emit laser light to measure the distance Z′ of the human body to the robot; step S40: according to x, y, Z 'calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system; step S50: according to the coordinates (X 1 , Y
  • the present application also provides a robot walking obstacle detecting device, the robot having a camera, a laser emitter, and a laser receiver, the device comprising: an image coordinate acquiring module, configured to acquire an image through a camera, and apply an image human body detecting algorithm to obtain a human body The human body image coordinates (u, v) of the off node in the image coordinate system; the physical coordinate acquisition module is used to convert the human body image coordinates (u, v) in the image coordinate system into the image physical coordinates in the image physical coordinate system ( x, y); human body distance acquisition module for determining the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ of the laser emitter to illuminate the key joint points of the human body according to x, y, and starting the laser emitter to emit laser light to measure the distance from the human body to the robot Z a camera coordinate acquisition module for calculating coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z'; a crowd spacing acquisition module
  • the application also provides a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform a robot walking
  • the obstacle detecting method includes the following steps: Step S10: acquiring an image by a camera, and applying an image human body detecting algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system; Step S20: Converting the human body image coordinates (u, v) in the image coordinate system to the image physical coordinates (x, y) in the image physical coordinate system; Step S30: determining the vertical deflection of the laser emitter illuminating the key human joint points according to x, y The angle ⁇ and the horizontal deflection angle ⁇ start the laser emitter to emit laser light to measure the distance Z′ of the human body to the robot; step S40: calculate the coordinates of the human joint point in the camera coordinate system according to x, y, Z′ (X, Y, Z); Step
  • the present application also provides a non-volatile storage medium storing computer readable instructions that, when executed by one or more processors, cause one or more processors to perform a robotic walking obstacle detection
  • the method for detecting a walking obstacle of a robot includes the following steps: Step S10: acquiring an image by a camera, applying an image human body detection algorithm to obtain body image coordinates (u, v) of a human joint point in an image coordinate system; and step S20: placing the image The human body image coordinates (u, v) in the coordinate system are converted into image physical coordinates (x, y) in the image physical coordinate system; step S30: determining the vertical deflection angle ⁇ of the laser emitter irradiating the key human joint points according to x, y And the horizontal deflection angle ⁇ , the laser emitter is activated to emit laser light to measure the distance Z' of the human body to the robot; step S40: calculating the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to
  • the above-mentioned robot walking obstacle detecting method, device, computer equipment and storage medium by combining image recognition and laser ranging to determine the actual coordinates of the human body (in the coordinate of the camera coordinate system), the real-time position of the human body can be accurately obtained, thereby determining any two people.
  • the distance between the two is used to judge the walking path in real time, and accurate pedestrian obstacle detection is realized.
  • FIG. 1 is a schematic diagram showing the internal structure of a computer device in an embodiment
  • FIG. 2 is a schematic flow chart of a method for detecting a walking obstacle of a robot according to an embodiment
  • FIG. 3 is a schematic diagram of a human body detection process of an embodiment
  • FIG. 4 is a diagram showing an example of human body detection of an embodiment
  • FIG. 5 is a schematic diagram of a module of a robot walking obstacle detecting device according to an embodiment.
  • FIG. 1 is a schematic diagram showing the internal structure of a computer device in an embodiment.
  • the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer readable instructions.
  • the database may store a sequence of control information.
  • the processor may implement a processor.
  • a robot walking obstacle detection method The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device.
  • Computer readable instructions may be stored in the memory of the computer device, the computer readable instructions being executable by the processor to cause the processor to perform a robotic walking obstacle detection method.
  • the network interface of the computer device is used to communicate with the terminal connection. It will be understood by those skilled in the art that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the robot walking obstacle detecting method described below can be applied to an intelligent robot such as a customer service robot, a sweeping robot, and the like.
  • FIG. 2 is a schematic flow chart of a method for detecting a walking obstacle of a robot according to an embodiment.
  • a robot walking obstacle detecting method the robot having a camera, a laser emitter, and a laser receiver, the method comprising the following steps:
  • Step S10 acquiring an image by using a camera, and applying an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system.
  • the image human body detection algorithm refers to a technique for recognizing a human body through image recognition technology.
  • This type of method is currently the more mainstream human detection method. It mainly uses various static features of images such as edge features, shape features, statistical features or transform features to describe the human body. Representative features include Haar wavelet features, HOG features, and Edgelet. Features, Shapelet features, and outline template features.
  • Papageorgiou and Poggio first proposed the concept of Harr wavelet, Viola et al. introduced the concept of integral graph, accelerated the extraction speed of Harr features, and applied the method to human detection, combined with human motion and appearance mode to construct human detection system. The better detection effect lays the foundation for the development of human detection technology.
  • HOG Histogram of Oriented Gradients
  • the "Edgelet” feature which is a short line or curve segment, is applied to human detection of a single image of a complex scene, yielding a detection rate of approximately 92% on the CAVIAR database.
  • Shapelet features can be automatically obtained using machine learning methods, namely Shapelet features.
  • the algorithm first extracts the gradient information of different directions from the training samples, and then uses the AdaBoost algorithm to train, thus obtaining the Shapelet feature.
  • the method refers to constructing a template by using information such as edge contour, texture and gray scale of the target object in the image, and detecting the target by template matching.
  • the basic idea of this kind of method is to divide the human body into several components, and then separately test each part of the image, and finally integrate the detection results according to a certain constraint relationship, and finally determine whether there is a human body.
  • This type of method refers to image acquisition by two or more cameras, and then analyzing the three-dimensional information of the target in the image to identify the human body.
  • the image human body detection algorithm is not specifically limited as long as the human body and its joint points can be identified.
  • Human joint points refer to key nodes of the human body such as the head, neck, shoulders, upper arms, elbows, wrists, waist, chest, thighs, knees, calves, ankles, etc. There are multiple.
  • human body detection can be performed using a method based on a human body part.
  • OpenPose is an open source library written in C++ using OpenCV and Caffe for real-time detection of multi-threaded multi-person key points.
  • the main detection of human body detection consists of two parts: human joint point detection and joint point correlation detection.
  • the joint point detection uses a Convolutional Pose Machine.
  • the attitude machine can infer the position of the key points of the human body by adding the convolutional neural network, using the texture information of the image, the spatial structure information and the center map. Simultaneously, a convolutional neural network is used in parallel to detect the correlation between joint points, ie which joint points should be connected together.
  • Fig. a is a complete input image
  • Fig. b is a confidence feature map of joint points
  • Fig. c is a joint point correlation feature map
  • Fig. d is a series of candidate joint point matching after sparse method
  • figure, figure e is the figure after finally completing the combined connection of the joint points of the human body.
  • an image is acquired by the camera, and an image human body detection algorithm is applied to obtain a series of human body image coordinates ⁇ (u k1 , v k1 ), ..., (u ki , v ki ),...,(u kn ,v kn ) ⁇ , where k represents the kth person and i represents the i-th body joint point.
  • k represents the kth person
  • i represents the i-th body joint point.
  • the image coordinate system is a two-dimensional coordinate system in the imaging plane of the camera.
  • the origin is usually located at the upper left corner of the screen.
  • the width (transverse) of the screen is the x-axis
  • the height (longitudinal) of the image is the y-axis, in units of pixels.
  • Step S20 Convert the human body image coordinates (u, v) in the image coordinate system to the image physical coordinates (x, y) in the image physical coordinate system. Since the image coordinate system is based on the number of pixels, which is not conducive to calculation, it is necessary to convert the human body image coordinates (u, v) in the image coordinate system into the physical coordinates (x, y) of the image in the image physical coordinate system. Easy to calculate.
  • the image physical coordinate system is an image coordinate system expressed in physical units (for example, meters), which can be understood as a translation coordinate system of an image coordinate system, and is also a two-dimensional coordinate system.
  • step S20 includes:
  • the human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
  • the above formula is a matrix operation formula
  • (u, v) is the human body image coordinate in the image coordinate system
  • (x, y) is the human body image coordinate in the image physical coordinate system
  • u 0 and v 0 are the camera optical axis.
  • the coordinate values in the image coordinate system, dx and dy are the physical size values of the x-axis and y-axis of each pixel.
  • Step S30 Determine, according to x, y, the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ of the laser emitter to illuminate the key joint points of the human body, and activate the laser emitter to emit laser light to measure the distance Z' of the human body to the robot.
  • the key human joint point here is at least one of the above-mentioned human joint points, for example, all joint points in the above-mentioned human joint points, or several important joint points, such as a head, a shoulder, an elbow, a wrist, Knees and ankles. In some embodiments, for convenience, only one of the important joint points may be selected as a key human joint point, such as a head.
  • the distance from the key human joint point to the robot is obtained, which is equivalent to the distance from the human body to the robot.
  • step S30 includes:
  • d u is the offset of the camera coordinate system relative to the image physical coordinate system
  • d v is the offset of the laser coordinate system relative to the image physical coordinate system
  • d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  • the camera coordinate system is a three-dimensional coordinate system whose origin is the optical center of the camera.
  • the X and Y axes are parallel to the x and y axes of the image coordinate system.
  • the z axis is the optical axis of the camera, and the z axis is perpendicular to the imaging plane of the camera.
  • the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ are relative to the camera coordinate system.
  • the laser emitter After calculating the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ , the laser emitter adjusts to the corresponding position according to the current posture and ⁇ , ⁇ to align the key human body.
  • the node is turned off and then a laser is emitted to measure the distance Z' of the human body to the robot.
  • each human joint point can be obtained, so that the specific position (X, Y, Z) of the joint point of the human body can be determined through subsequent steps, and the spacing between any two persons can be determined.
  • Step S40 Calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, and Z'.
  • the position of the imaging plane of the camera coordinate system and the coordinate origin of the laser coordinate system differ only by one d in the z-axis direction, ignoring the slight deviation of the position between the laser emitter and the camera (usually the laser emitter and the camera are not far apart in space)
  • the laser measurement value is the true value of the corresponding world coordinate system in the camera coordinate system. We can find the distance between two people in the real world coordinate system according to the proportional relationship between the camera coordinate value and the real world coordinate value.
  • step S40 includes:
  • the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z).
  • the distance L where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
  • Step S50 Calculate between the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons.
  • the distance L The distance L between two people in the real world coordinate system can be obtained from the proportional relationship between the camera coordinate value and the real world coordinate value.
  • Step S60 determining the walking direction according to the distance L between the respective human joint points of any two persons.
  • the robot can determine the walking strategy at this time.
  • at least one factor analysis such as the distance between the human body and the robot, the walking speed of the human body, and the walking speed of the robot may be combined.
  • the body image coordinates of the human joint point are ⁇ (x k1 , y k1 ),...,(x ki ,y ki ),...,(x kn ,y kn ) ⁇ , and calculate the spacing of any two of them. Finally, select the best separation distance to pass.
  • FIG. 5 is a schematic diagram of a module of a robot walking obstacle detecting device according to an embodiment.
  • the present application further provides a robot walking obstacle detecting device, the robot having a camera, a laser emitter, and a laser receiver, the device comprising: an image coordinate acquiring module 100 and a physical coordinate acquiring module 200.
  • the image coordinate acquiring module 100 is configured to acquire an image by using a camera, and apply an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system; the physical coordinate acquiring module is configured to use the human body image in the image coordinate system.
  • the coordinates (u, v) are converted into image physical coordinates (x, y) in the physical coordinate system of the image; the human body distance acquisition module is configured to determine the vertical deflection angle ⁇ and the horizontal deflection of the laser emitter to illuminate the key joint points of the human body according to x and y.
  • the camera coordinate acquisition module is used to calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z'
  • the crowd spacing acquisition module is configured to calculate the corresponding human body of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons.
  • the distance L between the nodes is closed; the walking direction determining module is configured to determine the walking direction according to the distance L between the respective human joint points of any two persons.
  • the image coordinate acquisition module 100 acquires an image through a camera, and applies an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system.
  • the image human body detection algorithm refers to a technique for recognizing a human body through image recognition technology.
  • This type of method is currently the more mainstream human detection method. It mainly uses various static features of images such as edge features, shape features, statistical features or transform features to describe the human body. Representative features include Haar wavelet features, HOG features, and Edgelet. Features, Shapelet features, and outline template features.
  • Papageorgiou and Poggio first proposed the concept of Harr wavelet, Viola et al. introduced the concept of integral graph, accelerated the extraction speed of Harr features, and applied the method to human detection, combined with human motion and appearance mode to construct human detection system. The better detection effect lays the foundation for the development of human detection technology.
  • HOG Histogram of Oriented Gradients
  • the "Edgelet” feature which is a short line or curve segment, is applied to human detection of a single image of a complex scene, yielding a detection rate of approximately 92% on the CAVIAR database.
  • Shapelet features can be automatically obtained using machine learning methods, namely Shapelet features.
  • the algorithm first extracts the gradient information of different directions from the training samples, and then uses the AdaBoost algorithm to train, thus obtaining the Shapelet feature.
  • the method refers to constructing a template by using information such as edge contour, texture and gray level of the target object in the image, and detecting the target by template matching method.
  • the basic idea of this kind of method is to divide the human body into several components, and then separately test each part of the image, and finally integrate the detection results according to a certain constraint relationship, and finally determine whether there is a human body.
  • This type of method refers to image acquisition by two or more cameras, and then analyzing the three-dimensional information of the target in the image to identify the human body.
  • the image human body detection algorithm is not specifically limited as long as the human body and its joint points can be identified.
  • Human joint points refer to key nodes of the human body such as the head, neck, shoulders, upper arms, elbows, wrists, waist, chest, thighs, knees, calves, ankles, etc. There are multiple.
  • human body detection can be performed using a method based on a human body part.
  • OpenPose is an open source library written in C++ using OpenCV and Caffe for real-time detection of multi-threaded multi-person key points.
  • the main detection of human body detection consists of two parts: human joint point detection and joint point correlation detection.
  • the joint point detection uses a Convolutional Pose Machine.
  • the attitude machine can infer the position of the key points of the human body by adding the convolutional neural network, using the texture information of the image, the spatial structure information and the center map. Simultaneously, a convolutional neural network is used in parallel to detect the correlation between joint points, ie which joint points should be connected together.
  • Fig. a is a complete input image
  • Fig. b is a confidence feature map of joint points
  • Fig. c is a joint point correlation feature map
  • Fig. d is a series of candidate joint point matching after sparse method
  • figure, figure e is the figure after finally completing the combined connection of the joint points of the human body.
  • an image is acquired by the camera, and an image human body detection algorithm is applied to obtain a series of human body image coordinates ⁇ (u k1 , v k1 ), ..., (u ki , v ki ),...,(u kn ,v kn ) ⁇ , where k represents the kth person and i represents the i-th body joint point.
  • k represents the kth person
  • i represents the i-th body joint point.
  • the image coordinate system is a two-dimensional coordinate system in the imaging plane of the camera.
  • the origin is usually located at the upper left corner of the screen.
  • the width (transverse) of the screen is the x-axis
  • the height (longitudinal) of the image is the y-axis, in units of pixels.
  • the physical coordinate acquisition module 200 converts the human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system. Since the image coordinate system is based on the number of pixels, which is not conducive to calculation, it is necessary to convert the human body image coordinates (u, v) in the image coordinate system into the physical coordinates (x, y) of the image in the image physical coordinate system. Easy to calculate.
  • the image physical coordinate system is an image coordinate system expressed in physical units (for example, meters), which can be understood as a translation coordinate system of an image coordinate system, and is also a two-dimensional coordinate system.
  • the physical coordinate acquisition module 200 is specifically configured to:
  • the human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
  • the above formula is a matrix operation formula
  • (u, v) is the human body image coordinate in the image coordinate system
  • (x, y) is the human body image coordinate in the image physical coordinate system
  • u 0 and v 0 are the camera optical axis.
  • the coordinate values in the image coordinate system, dx and dy are the physical size values of the x-axis and y-axis of each pixel.
  • the human body distance acquisition module 300 determines the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ of the laser emitter to illuminate the key human joint points according to x, y, and activates the laser emitter to emit laser light to measure the distance Z' of the human body to the robot.
  • the key human joint point here is at least one of the above-mentioned human joint points, for example, all joint points in the above-mentioned human joint points, or several important joint points, such as a head, a shoulder, an elbow, a wrist, Knees and ankles. In some embodiments, for convenience, only one of the important joint points may be selected as a key human joint point, such as a head.
  • the distance from the key human joint point to the robot is obtained, which is equivalent to the distance from the human body to the robot.
  • the human body distance acquisition module 300 is specifically configured to:
  • d u is the offset of the camera coordinate system relative to the image physical coordinate system
  • d v is the offset of the laser coordinate system relative to the image physical coordinate system
  • d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  • the camera coordinate system is a three-dimensional coordinate system whose origin is the optical center of the camera.
  • the X and Y axes are parallel to the x and y axes of the image coordinate system.
  • the z axis is the optical axis of the camera, and the z axis is perpendicular to the imaging plane of the camera.
  • the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ are relative to the camera coordinate system.
  • the laser emitter After calculating the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ , the laser emitter adjusts to the corresponding position according to the current posture and ⁇ , ⁇ to align the key human body.
  • the node is turned off and then a laser is emitted to measure the distance Z' of the human body to the robot.
  • the camera coordinate acquisition module 400 calculates the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, and Z'.
  • the position of the imaging plane of the camera coordinate system and the coordinate origin of the laser coordinate system differ only by one d in the z-axis direction, ignoring the slight deviation of the position between the laser emitter and the camera (usually the laser emitter and the camera are not far apart in space)
  • the laser measurement value is the true value of the corresponding world coordinate system in the camera coordinate system. We can find the distance between two people in the real world coordinate system according to the proportional relationship between the camera coordinate value and the real world coordinate value.
  • the camera coordinate acquisition module 400 is specifically configured to:
  • the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z).
  • the distance L where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
  • the crowd spacing acquisition module 500 calculates the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons.
  • the distance between L The distance L between two people in the real world coordinate system can be obtained from the proportional relationship between the camera coordinate value and the real world coordinate value.
  • the walking direction determining module 600 determines the walking direction based on the distance L between the respective human joint points of any two persons. When the position of each person is determined, thereby determining the distance L between any two people, the robot can determine the walking strategy at this time. When determining the walking strategy, at least one factor analysis such as the distance between the human body and the robot, the walking speed of the human body, and the walking speed of the robot may be combined.
  • the body image coordinates of the human joint point are ⁇ (x k1 , y k1 ),...,(x ki ,y ki ),...,(x kn ,y kn ) ⁇ , and calculate the spacing of any two of them. Finally, select the best separation distance to pass.
  • the walking direction determining module 600 uses the quick sorting algorithm to quickly find the nearest or intersecting points between the two discrete point groups, so that the distance between the camera coordinates and the real world coordinate values can be calculated between the points.
  • the distance and the distance between each two are constantly detected, and the best passing distance can be found in real time.
  • the application also provides a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform any of the above The steps of the robot walking obstacle detecting method according to the embodiment.
  • the present application also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause one or more processors to perform the robotic walking described in any of the above embodiments The steps of the obstacle detection method.
  • the above-mentioned robot walking obstacle detection method, device, computer equipment and storage medium acquire images through a camera, and apply image human body detection algorithm to obtain human body image coordinates (u, v) of human joint points in an image coordinate system;
  • the human body image coordinates (u, v) are converted into image physical coordinates (x, y) in the image physical coordinate system;
  • the vertical deflection angle ⁇ and the horizontal deflection angle ⁇ of the laser emitter irradiating the key human joint points are determined according to x, y, Starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot; calculating the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z'; according to the corresponding human joint of any two people Point the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system to calculate the distance L between the corresponding human joint points of
  • the real-time position of the human body can be accurately obtained, thereby determining the spacing L between any two people, and then determining the walking path in real time through L, realizing Accurate pedestrian obstacle detection.
  • the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

A robot walking obstacle detection method and apparatus. The method comprises: acquiring an image by means of a camera, and using an image human body detection algorithm to obtain human body image coordinates (u, v) of a human body joint point under an image coordinate system (S10); converting the human body image coordinates (u, v) under the image coordinate system into image physical coordinates (x, y) under an image physical coordinate system (S20); determining a vertical deflection angle α and a horizontal deflection angle β of a laser emitter irradiating the key human body joint point according to x and y, and starting the laser emitter to emit laser to measure a distance Z' from the human body to the robot (S30); calculating coordinates (X, Y, Z) of the human body joint point in the coordinate system of the camera according to the x, y and Z' (S40); calculating, according to the coordinates (X1, Y1, Z1) and (X2, Y2, Z2) of the corresponding human body joint points of any two persons in the coordinate system of the camera, a distance L between the corresponding human body joint points of the any two persons (S50); and determining a walking direction according to the distance L between the corresponding human body joint points of the any two persons (S60). Accurate pedestrian obstacle avoidance can be achieved. Also disclosed are a computer device and a storage medium.

Description

机器人行走障碍检测方法、装置、计算机设备和存储介质Robot walking obstacle detection method, device, computer equipment and storage medium
本申请要求于2018年4月10日提交中国专利局、申请号为201810314149.5,发明名称为“机器人行走障碍检测方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Robot Walking Obstacle Detection Method, Apparatus, Computer Equipment and Storage Medium" submitted by the Chinese Patent Office on April 10, 2018, application number 201810314149.5, the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及机器人避障技术领域,具体而言,本申请涉及一种机器人行走障碍检测方法和装置,以及一种计算机设备和存储有计算机可读指令的存储介质。The present application relates to the field of robot obstacle avoidance technology, and in particular, to a robot walking obstacle detection method and apparatus, and a computer device and a storage medium storing computer readable instructions.
背景技术Background technique
在机器人的导航过程中,机器人的障碍检测是机器人成功导航运动的关键因素,相对于静止物体,移动中的行人更是给机器人的避障增加了诸多难点。发明人意识到在目前的机器人障碍检测方法中,存在诸多难题,如超声波检测范围有限,即使装载较多的数量,也难以全面地覆盖三维空间;激光检测虽然精度较高,也存在同样的问题;通过深度摄像机检测覆盖范围较大,但是由于庞大的数据处理和视觉景深限制,也存在障碍物检测精度不高的问题。并且这些方法主要是针对静止的物体,但是把行人等同于其他障碍物检测,在制定策略避让行人时显得比较被动,降低了有效避障的效率。In the navigation process of the robot, the obstacle detection of the robot is the key factor for the successful navigation movement of the robot. Compared with the stationary object, the pedestrian in the movement adds many difficulties to the obstacle avoidance of the robot. The inventor realized that in the current robot obstacle detection method, there are many problems, such as limited range of ultrasonic detection, and it is difficult to comprehensively cover the three-dimensional space even if a large number is loaded; although the laser detection has high precision, the same problem exists. The coverage is detected by the depth camera, but due to the huge data processing and visual depth of field limitation, there is also a problem that the obstacle detection accuracy is not high. And these methods are mainly for stationary objects, but the pedestrians are equated with other obstacle detection, which is more passive when formulating strategies to avoid pedestrians, reducing the efficiency of effective obstacle avoidance.
发明内容Summary of the invention
本申请的目的旨在至少能解决上述的技术缺陷之一,特别是难以避障行人的技术缺陷。The purpose of the present application is to solve at least one of the above technical drawbacks, in particular, technical defects that are difficult to avoid obstacles.
本申请提供一种机器人行走障碍检测方法,所述机器人具有摄像机、激光发射器、激光接收器,所述方法包括如下步骤:步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。 The present application provides a robot walking obstacle detecting method, the robot having a camera, a laser emitter, and a laser receiver, the method comprising the following steps: Step S10: acquiring an image through a camera, applying an image human body detection algorithm to obtain a human joint point Human body image coordinates (u, v) in the image coordinate system; step S20: converting human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system; step S30 : determining, according to x, y, the vertical deflection angle α and the horizontal deflection angle β of the laser emitter irradiating the key joint points of the human body, starting the laser emitter to emit laser light to measure the distance Z′ of the human body to the robot; step S40: according to x, y, Z 'calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system; step S50: according to the coordinates (X 1 , Y 1 , Z 1 ) of the camera coordinate system of the corresponding human joint points of any two people and ( X 2 , Y 2 , Z 2 ) Calculate the distance L between the respective human joint points of any two persons; Step S60: Determine the walking direction according to the distance L between the respective human joint points of any two persons.
本申请还提供一种机器人行走障碍检测装置,所述机器人具有摄像机、激光发射器、激光接收器,所述装置包括:图像坐标获取模块,用于通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);物理坐标获取模块,用于将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);人体距离获取模块,用于根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测 量人体到机器人的距离Z′;摄像机坐标获取模块,用于根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);人群间距获取模块,用于根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;行走方向确定模块,用于根据任意两人的相应人体关节点之间的距离L确定行走方向。 The present application also provides a robot walking obstacle detecting device, the robot having a camera, a laser emitter, and a laser receiver, the device comprising: an image coordinate acquiring module, configured to acquire an image through a camera, and apply an image human body detecting algorithm to obtain a human body The human body image coordinates (u, v) of the off node in the image coordinate system; the physical coordinate acquisition module is used to convert the human body image coordinates (u, v) in the image coordinate system into the image physical coordinates in the image physical coordinate system ( x, y); human body distance acquisition module for determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body according to x, y, and starting the laser emitter to emit laser light to measure the distance from the human body to the robot Z a camera coordinate acquisition module for calculating coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z'; a crowd spacing acquisition module for corresponding human joints according to any two people coordinates in the camera coordinate system (X 1, Y 1, Z 1) and (X 2, Y 2, Z 2) calculate the distance L between any two respective joints of the human body; row Direction determining means for determining the traveling direction L the distance between the respective points of any two human joints.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种机器人行走障碍检测方法,所述机器人行走障碍检测方法包括以下步骤:步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。 The application also provides a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform a robot walking The obstacle detecting method includes the following steps: Step S10: acquiring an image by a camera, and applying an image human body detecting algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system; Step S20: Converting the human body image coordinates (u, v) in the image coordinate system to the image physical coordinates (x, y) in the image physical coordinate system; Step S30: determining the vertical deflection of the laser emitter illuminating the key human joint points according to x, y The angle α and the horizontal deflection angle β start the laser emitter to emit laser light to measure the distance Z′ of the human body to the robot; step S40: calculate the coordinates of the human joint point in the camera coordinate system according to x, y, Z′ (X, Y, Z); Step S50: Calculate any two coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system according to the corresponding human joint points of any two persons The distance L between the corresponding human joint points of the person; Step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons.
本申请还提供一种存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种机器人行走障碍检测方法,所述机器人行走障碍检测方法包括以下步骤:步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。 The present application also provides a non-volatile storage medium storing computer readable instructions that, when executed by one or more processors, cause one or more processors to perform a robotic walking obstacle detection The method for detecting a walking obstacle of a robot includes the following steps: Step S10: acquiring an image by a camera, applying an image human body detection algorithm to obtain body image coordinates (u, v) of a human joint point in an image coordinate system; and step S20: placing the image The human body image coordinates (u, v) in the coordinate system are converted into image physical coordinates (x, y) in the image physical coordinate system; step S30: determining the vertical deflection angle α of the laser emitter irradiating the key human joint points according to x, y And the horizontal deflection angle β, the laser emitter is activated to emit laser light to measure the distance Z' of the human body to the robot; step S40: calculating the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z' Step S50: Calculate the corresponding human body of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. The distance L between the nodes; step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons.
上述的机器人行走障碍检测方法、装置、计算机设备和存储介质,通过结合图像识别和激光测距确定人体实际坐标(在摄像机坐标系的坐标),可以精确得到人体的实时位置,从而确定任意两人之间的间距,再实时判断行走路径,实现了精确的行人避障检测。The above-mentioned robot walking obstacle detecting method, device, computer equipment and storage medium, by combining image recognition and laser ranging to determine the actual coordinates of the human body (in the coordinate of the camera coordinate system), the real-time position of the human body can be accurately obtained, thereby determining any two people. The distance between the two is used to judge the walking path in real time, and accurate pedestrian obstacle detection is realized.
附图说明DRAWINGS
图1为一个实施例中计算机设备的内部结构示意图;1 is a schematic diagram showing the internal structure of a computer device in an embodiment;
图2为一个实施例的机器人行走障碍检测方法流程示意图;2 is a schematic flow chart of a method for detecting a walking obstacle of a robot according to an embodiment;
图3为一个实施例的人体检测流程示意图;3 is a schematic diagram of a human body detection process of an embodiment;
图4为一个实施例的人体检测示例图;4 is a diagram showing an example of human body detection of an embodiment;
图5为一个实施例的机器人行走障碍检测装置模块示意图。FIG. 5 is a schematic diagram of a module of a robot walking obstacle detecting device according to an embodiment.
具体实施方式detailed description
图1为一个实施例中计算机设备的内部结构示意图。如图1所示,该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中, 该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种机器人行走障碍检测方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种机器人行走障碍检测方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。FIG. 1 is a schematic diagram showing the internal structure of a computer device in an embodiment. As shown in FIG. 1, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer readable instructions. The database may store a sequence of control information. When the computer readable instructions are executed by the processor, the processor may implement a processor. A robot walking obstacle detection method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. Computer readable instructions may be stored in the memory of the computer device, the computer readable instructions being executable by the processor to cause the processor to perform a robotic walking obstacle detection method. The network interface of the computer device is used to communicate with the terminal connection. It will be understood by those skilled in the art that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied. The specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
以下描述的机器人行走障碍检测方法,可以应用于智能机器人,例如客服机器人、扫地机器人等等。The robot walking obstacle detecting method described below can be applied to an intelligent robot such as a customer service robot, a sweeping robot, and the like.
图2为一个实施例的机器人行走障碍检测方法流程示意图。FIG. 2 is a schematic flow chart of a method for detecting a walking obstacle of a robot according to an embodiment.
一种机器人行走障碍检测方法,该机器人具有摄像机、激光发射器、激光接收器,该方法包括如下步骤:A robot walking obstacle detecting method, the robot having a camera, a laser emitter, and a laser receiver, the method comprising the following steps:
步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v)。Step S10: acquiring an image by using a camera, and applying an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system.
图像人体检测算法,是指通过图像识别技术识别出人体的技术。图像人体检测方法有三种,分别为基于全局特征的方法、基于人体部位的方法、基于立体视觉的方法。The image human body detection algorithm refers to a technique for recognizing a human body through image recognition technology. There are three methods for image human body detection, which are global feature based methods, human body part based methods, and stereo vision based methods.
基于全局特征的方法Global feature based approach
该类方法是目前较为主流的人体检测方法,主要采用边缘特征、形状特征、统计特征或者变换特征等图像的各类静态特征来描述人体,其中代表性的特征包括Haar小波特征、HOG特征、Edgelet特征、Shapelet特征和轮廓模板特征等。This type of method is currently the more mainstream human detection method. It mainly uses various static features of images such as edge features, shape features, statistical features or transform features to describe the human body. Representative features include Haar wavelet features, HOG features, and Edgelet. Features, Shapelet features, and outline template features.
(1)基于Haar小波特征的方法(1) Method based on Haar wavelet feature
Papageorgiou和Poggio最早提出Harr小波的概念,Viola等引进了积分图的概念,加快了Harr特征的提取速度,并将该方法应用于人体检测,结合人体的运动和外观模式构建人体检测系统,取得了较好的检测效果,为人体检测技术的发展奠定了基础。Papageorgiou and Poggio first proposed the concept of Harr wavelet, Viola et al. introduced the concept of integral graph, accelerated the extraction speed of Harr features, and applied the method to human detection, combined with human motion and appearance mode to construct human detection system. The better detection effect lays the foundation for the development of human detection technology.
(2)基于HOG特征的方法(2) HOG-based method
将梯度方向直方图(Histogram of Oriented Gradients,HOG)的概念应用于用于人体检测,在MIT人体数据库上获得近乎100%的检测成功率;在包含视角、光照和背景等变化的INRIA人体数据库上,也取得了大约90%的检测成功率。Applying the concept of Histogram of Oriented Gradients (HOG) to human detection, achieving nearly 100% detection success rate on the MIT human body database; on the INRIA human body database containing changes in perspective, illumination and background , also achieved a test success rate of about 90%.
(3)基于edgelet特征的方法(3) Method based on edgelet feature
“小边”(Edgelet)特征,即一些短的直线或者曲线片段,并将其应用于复杂场景的单幅图像的人体检测,在CAVIAR数据库上取得了大约92%的检测率。The "Edgelet" feature, which is a short line or curve segment, is applied to human detection of a single image of a complex scene, yielding a detection rate of approximately 92% on the CAVIAR database.
(4)基于Shapelet特征的方法(4) Method based on Shapelet feature
可以利用机器学习的方法自动得到特征,即Shapelet特征。该算法首先从训练样本提取图片不同方向的梯度信息,然后利用AdaBoost算法进行训练,从而得到Shapelet特征。Features can be automatically obtained using machine learning methods, namely Shapelet features. The algorithm first extracts the gradient information of different directions from the training samples, and then uses the AdaBoost algorithm to train, thus obtaining the Shapelet feature.
(5)基于轮廓模板的方法(5) Method based on contour template
该方法是指利用图像中目标物体的边缘轮廓、纹理和灰度等信息构建模板,通 过模板匹配的方法检测目标。The method refers to constructing a template by using information such as edge contour, texture and gray scale of the target object in the image, and detecting the target by template matching.
基于人体部位的方法Method based on human body parts
该类方法的基本思想是把人体分成几个组成部分,然后对图像中每部分分别检测,最后将检测结果按照一定的约束关系进行整合,最终判断是否存在人体。The basic idea of this kind of method is to divide the human body into several components, and then separately test each part of the image, and finally integrate the detection results according to a certain constraint relationship, and finally determine whether there is a human body.
基于立体视觉的方法Stereo vision based method
该类方法是指通过2个或2个以上的摄像机进行图像采集,然后分析图像中目标的三维信息以识别出人体。This type of method refers to image acquisition by two or more cameras, and then analyzing the three-dimensional information of the target in the image to identify the human body.
在本实施例中,并不对图像人体检测算法进行具体限定,只要能够识别出人体及其关节点即可。人体关节点,是指例如头部、颈部、肩部、上臂、手肘、手腕、腰部、胸口、大腿、膝盖、小腿、脚踝等等人体关键部位的关键节点,每一个人的人体关节点具有多个。In this embodiment, the image human body detection algorithm is not specifically limited as long as the human body and its joint points can be identified. Human joint points refer to key nodes of the human body such as the head, neck, shoulders, upper arms, elbows, wrists, waist, chest, thighs, knees, calves, ankles, etc. There are multiple.
在本实施例中,可以采用基于人体部位的方法来进行人体检测。OpenPose是一个利用OpenCV和Caffe并以C++写成的开源库,用来实现多线程的多人关键点实时检测。人体检测主要检测包含两个部分:人体关节点检测和关节点的相关性检测。其中关节点检测使用了卷积的姿态机(Convolutional Pose Machine)。姿态机通过加入卷积神经网络(convolution neural network),利用图像的纹理信息,空间结构信息和中心特征图(center map),通过有监督地学习,可以推断出人体关键点的位置。同时并行地使用一个卷积神经网络检测关节点之间的相关性,即哪些关节点应该连接到一起。In the present embodiment, human body detection can be performed using a method based on a human body part. OpenPose is an open source library written in C++ using OpenCV and Caffe for real-time detection of multi-threaded multi-person key points. The main detection of human body detection consists of two parts: human joint point detection and joint point correlation detection. Among them, the joint point detection uses a Convolutional Pose Machine. The attitude machine can infer the position of the key points of the human body by adding the convolutional neural network, using the texture information of the image, the spatial structure information and the center map. Simultaneously, a convolutional neural network is used in parallel to detect the correlation between joint points, ie which joint points should be connected together.
如图3所示,当采集到包含人体的图像时,我们使用整张图像作为检测网络的输入,并且同时将图像输入到两个并行的二分网络,同时检测关节点的置信度和关节点的相关度。同时将关节点置信度特征图和关节点相关度特征图和输入图像组合到一起,作为下一阶段的输入,实际的检测过程中,级联了6个这样的检测网络。As shown in Figure 3, when an image containing a human body is acquired, we use the entire image as an input to the detection network, and simultaneously input the image into two parallel binary networks, while detecting the confidence of the joint point and the joint point. relativity. At the same time, the joint point confidence map and the joint point correlation map and the input image are combined together as the input of the next stage. In the actual detection process, six such detection networks are cascaded.
如图4所示,图a为完整的输入图像,图b为关节点的置信特征图,图c为关节点相关性特征图,图d为通过稀疏的方法实现一系列的候选关节点匹配后的图,图e为最终完成人体各个关节点的组合连接后的图。As shown in Fig. 4, Fig. a is a complete input image, Fig. b is a confidence feature map of joint points, Fig. c is a joint point correlation feature map, and Fig. d is a series of candidate joint point matching after sparse method The figure, figure e is the figure after finally completing the combined connection of the joint points of the human body.
图像中可能会识别到多个人,因此在本实施例中,通过摄像机获取图像,应用图像人体检测算法得到一系列的人体图像坐标{(u k1,v k1),...,(u ki,v ki),...,(u kn,v kn)},其中k代表第k个人,i代表第i个人体关节点。为了便于理解,以下的某些计算过程只以一个关节点为例。 A plurality of people may be recognized in the image. Therefore, in the embodiment, an image is acquired by the camera, and an image human body detection algorithm is applied to obtain a series of human body image coordinates {(u k1 , v k1 ), ..., (u ki , v ki ),...,(u kn ,v kn )}, where k represents the kth person and i represents the i-th body joint point. For ease of understanding, some of the following calculations take only one joint point as an example.
图像坐标系是摄像机成像平面中的二维坐标系,原点通常位于画面的左上角,画面的宽(横向)为x轴,画面的高(纵向)为y轴,以像素点个数为单位。通过识别人体在画面中的位置,得到人体各节点在图像坐标系下的人体图像坐标(u,v),u表示x轴第u个像素点,v表示y轴第v个像素点。The image coordinate system is a two-dimensional coordinate system in the imaging plane of the camera. The origin is usually located at the upper left corner of the screen. The width (transverse) of the screen is the x-axis, and the height (longitudinal) of the image is the y-axis, in units of pixels. By recognizing the position of the human body in the picture, the human body image coordinates (u, v) of the human body nodes in the image coordinate system are obtained, u represents the u-th pixel point of the x-axis, and v represents the v-th pixel point of the y-axis.
步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y)。由于图像坐标系以像素点个数为单位,不利于计算,因此需要将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y),以方便计算。图像物理坐标系为以物理单位(例如米)表示的图像坐标系,可以理解是图像坐标系的平移坐标系,也是二维坐标系。Step S20: Convert the human body image coordinates (u, v) in the image coordinate system to the image physical coordinates (x, y) in the image physical coordinate system. Since the image coordinate system is based on the number of pixels, which is not conducive to calculation, it is necessary to convert the human body image coordinates (u, v) in the image coordinate system into the physical coordinates (x, y) of the image in the image physical coordinate system. Easy to calculate. The image physical coordinate system is an image coordinate system expressed in physical units (for example, meters), which can be understood as a translation coordinate system of an image coordinate system, and is also a two-dimensional coordinate system.
在其中一个实施例中,步骤S20具体过程包括:In one embodiment, the specific process of step S20 includes:
将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转 换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
Figure PCTCN2018102854-appb-000001
Figure PCTCN2018102854-appb-000001
其中上述公式为矩阵运算公式,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 The above formula is a matrix operation formula, (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the camera optical axis. The coordinate values in the image coordinate system, dx and dy are the physical size values of the x-axis and y-axis of each pixel.
步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′。Step S30: Determine, according to x, y, the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and activate the laser emitter to emit laser light to measure the distance Z' of the human body to the robot.
此处的关键人体关节点为上述人体关节点中的至少一个,例如可以是上述人体关节点中的全部关节点,或者几个重要的关节点,例如头部、肩部、手肘、手腕、膝盖、脚踝。在一些实施例中,为了方便,可以只选取其中一个重要的关节点作为关键人体关节点,例如头部。获取了关键人体关节点到机器人的距离,即相当于获取了人体到机器人的距离。The key human joint point here is at least one of the above-mentioned human joint points, for example, all joint points in the above-mentioned human joint points, or several important joint points, such as a head, a shoulder, an elbow, a wrist, Knees and ankles. In some embodiments, for convenience, only one of the important joint points may be selected as a key human joint point, such as a head. The distance from the key human joint point to the robot is obtained, which is equivalent to the distance from the human body to the robot.
在其中一个实施例中,步骤S30具体过程包括:In one embodiment, the specific process of step S30 includes:
确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
Figure PCTCN2018102854-appb-000002
Figure PCTCN2018102854-appb-000002
Figure PCTCN2018102854-appb-000003
Figure PCTCN2018102854-appb-000003
d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。摄像机坐标系是三维坐标系,其原点为摄像机的光心,其X轴、Y轴与图像坐标系的x、y轴平行,z轴为摄像机的光轴,z轴与摄像机成像平面垂直。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera. The camera coordinate system is a three-dimensional coordinate system whose origin is the optical center of the camera. The X and Y axes are parallel to the x and y axes of the image coordinate system. The z axis is the optical axis of the camera, and the z axis is perpendicular to the imaging plane of the camera.
垂直偏转角度α和水平偏转角度β是相对于摄像机坐标系而言的,计算垂直偏转角度α和水平偏转角度β后,激光发射器根据当前姿势以及α、β调整到相应位置以对准关键人体关节点,然后发射激光以测量人体到机器人的距离Z′。The vertical deflection angle α and the horizontal deflection angle β are relative to the camera coordinate system. After calculating the vertical deflection angle α and the horizontal deflection angle β, the laser emitter adjusts to the corresponding position according to the current posture and α, β to align the key human body. The node is turned off and then a laser is emitted to measure the distance Z' of the human body to the robot.
通过上述步骤,可以获取到各个人体关节点的x、y、Z′,从而可以通过后续步骤确定人体关节点的具体位置(X,Y,Z),并确定任意两人之间的间距。Through the above steps, x, y, and Z' of each human joint point can be obtained, so that the specific position (X, Y, Z) of the joint point of the human body can be determined through subsequent steps, and the spacing between any two persons can be determined.
步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z)。Step S40: Calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, and Z'.
摄像机坐标系的成像平面的位置和激光坐标系的坐标原点在z轴方向的距离只相差一个d,忽略激光发射器和摄像机在位置微小偏差(通常激光发射器和摄像机在空间上距离不远),激光测量值则为摄像机坐标系中对应的世界坐标系的真实值,我们可以根据摄像机坐标值和真实的世界坐标值的比例关系求出真实的世界坐标系中两人的间距。The position of the imaging plane of the camera coordinate system and the coordinate origin of the laser coordinate system differ only by one d in the z-axis direction, ignoring the slight deviation of the position between the laser emitter and the camera (usually the laser emitter and the camera are not far apart in space) The laser measurement value is the true value of the corresponding world coordinate system in the camera coordinate system. We can find the distance between two people in the real world coordinate system according to the proportional relationship between the camera coordinate value and the real world coordinate value.
在其中一个实施例中,步骤S40具体过程包括:In one embodiment, the specific process of step S40 includes:
根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
Figure PCTCN2018102854-appb-000004
Figure PCTCN2018102854-appb-000004
f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L。可以根据摄像机坐标值和真实的世界坐标值的比例关系求出真实的世界坐标系中两人的间距L。 Step S50: Calculate between the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. The distance L. The distance L between two people in the real world coordinate system can be obtained from the proportional relationship between the camera coordinate value and the real world coordinate value.
步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。当确定了各人位置后,从而确定了任意两人之间的距离L,机器人此时便可以确定行走策略。在确定行走策略时,可以结合人体与机器人之间的距离、人体行走速度、机器人行走速度等至少一个因素分析。Step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons. When the position of each person is determined, thereby determining the distance L between any two people, the robot can determine the walking strategy at this time. When determining the walking strategy, at least one factor analysis such as the distance between the human body and the robot, the walking speed of the human body, and the walking speed of the robot may be combined.
假设人体关节点人体图像坐标为{(x k1,y k1),...,(x ki,y ki),...,(x kn,y kn)},分别计算其中任意两人的间距,最后选取其中最佳的间隔距离通过。 Suppose the body image coordinates of the human joint point are {(x k1 , y k1 ),...,(x ki ,y ki ),...,(x kn ,y kn )}, and calculate the spacing of any two of them. Finally, select the best separation distance to pass.
假设计算P 1P 2两人之间的间隔,其中: Suppose we calculate the interval between two people, P 1 P 2 , where:
P 1={(x 11,y 11),...,(x 1i,y 1i),...,(x 1n,y 1n)} P 1 ={(x 11 ,y 11 ),...,(x 1i ,y 1i ),...,(x 1n ,y 1n )}
P 2={(x 21,y 21),…,(x 2i,y 2i),…,(x 2n,y 2n)} P 2 ={(x 21 ,y 21 ),...,(x 2i ,y 2i ),...,(x 2n ,y 2n )}
由于两人之间的距离和X轴方向的距离成正比,因此可以只关注X轴坐标,所以可以将两人的所有检测到的点组成一个队列:Since the distance between the two is proportional to the distance in the X-axis direction, you can focus on only the X-axis coordinates, so you can group all the detected points of the two into one queue:
P={x 11,x 21,…,x 1i,x 2i,…,x 1n,x 2n} P={x 11 ,x 21 ,...,x 1i ,x 2i ,...,x 1n ,x 2n }
运用快速排序算法,可以快速找到两个离散点群之间最近或者交叉的点,这样就可以根据前面所述摄像机坐标值和真实的世界坐标值的比例关系算出这些点之间的距离,并且不停的检测每两人之间的距离,就能实时的找出最佳的通过距离。Using the quick sort algorithm, you can quickly find the nearest or intersecting points between two discrete point groups, so that the distance between these points can be calculated according to the proportional relationship between the camera coordinate values and the real world coordinate values described above, and Stop detecting the distance between each two people and find the best passing distance in real time.
图5为一个实施例的机器人行走障碍检测装置模块示意图。对应上述的机器人行走障碍检测方法,本申请还提供一种机器人行走障碍检测装置,所述机器人具有摄像机、激光发射器、激光接收器,所述装置包括:图像坐标获取模块100、物理坐标获取模块200、人体距离获取模块300、摄像机坐标获取模块400、人群间距获取模块500、行走方向确定模块600。FIG. 5 is a schematic diagram of a module of a robot walking obstacle detecting device according to an embodiment. Corresponding to the above-mentioned robot walking obstacle detecting method, the present application further provides a robot walking obstacle detecting device, the robot having a camera, a laser emitter, and a laser receiver, the device comprising: an image coordinate acquiring module 100 and a physical coordinate acquiring module 200. The human body distance acquiring module 300, the camera coordinate acquiring module 400, the crowd spacing acquiring module 500, and the walking direction determining module 600.
图像坐标获取模块100用于通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);物理坐标获取模块用于将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);人体距离获取模块用于根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;摄像机坐标获取模块用于根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);人群间距获取模块用于根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;行走方向确定模块用于根据任意两人的相应人体关节点之间的距离L确定行走方向。 The image coordinate acquiring module 100 is configured to acquire an image by using a camera, and apply an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system; the physical coordinate acquiring module is configured to use the human body image in the image coordinate system. The coordinates (u, v) are converted into image physical coordinates (x, y) in the physical coordinate system of the image; the human body distance acquisition module is configured to determine the vertical deflection angle α and the horizontal deflection of the laser emitter to illuminate the key joint points of the human body according to x and y. Angle β, start the laser emitter to emit laser to measure the distance Z' of the human body to the robot; the camera coordinate acquisition module is used to calculate the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z' The crowd spacing acquisition module is configured to calculate the corresponding human body of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. The distance L between the nodes is closed; the walking direction determining module is configured to determine the walking direction according to the distance L between the respective human joint points of any two persons.
图像坐标获取模块100通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v)。The image coordinate acquisition module 100 acquires an image through a camera, and applies an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system.
图像人体检测算法,是指通过图像识别技术识别出人体的技术。图像人体检测方法有三种,分别为基于全局特征的方法、基于人体部位的方法、基于立体视觉的方法。The image human body detection algorithm refers to a technique for recognizing a human body through image recognition technology. There are three methods for image human body detection, which are global feature based methods, human body part based methods, and stereo vision based methods.
基于全局特征的方法Global feature based approach
该类方法是目前较为主流的人体检测方法,主要采用边缘特征、形状特征、统计特征或者变换特征等图像的各类静态特征来描述人体,其中代表性的特征包括Haar小波特征、HOG特征、Edgelet特征、Shapelet特征和轮廓模板特征等。This type of method is currently the more mainstream human detection method. It mainly uses various static features of images such as edge features, shape features, statistical features or transform features to describe the human body. Representative features include Haar wavelet features, HOG features, and Edgelet. Features, Shapelet features, and outline template features.
(1)基于Haar小波特征的方法(1) Method based on Haar wavelet feature
Papageorgiou和Poggio最早提出Harr小波的概念,Viola等引进了积分图的概念,加快了Harr特征的提取速度,并将该方法应用于人体检测,结合人体的运动和外观模式构建人体检测系统,取得了较好的检测效果,为人体检测技术的发展奠定了基础。Papageorgiou and Poggio first proposed the concept of Harr wavelet, Viola et al. introduced the concept of integral graph, accelerated the extraction speed of Harr features, and applied the method to human detection, combined with human motion and appearance mode to construct human detection system. The better detection effect lays the foundation for the development of human detection technology.
(2)基于HOG特征的方法(2) HOG-based method
将梯度方向直方图(Histogram of Oriented Gradients,HOG)的概念应用于用于人体检测,在MIT人体数据库上获得近乎100%的检测成功率;在包含视角、光照和背景等变化的INRIA人体数据库上,也取得了大约90%的检测成功率。Applying the concept of Histogram of Oriented Gradients (HOG) to human detection, achieving nearly 100% detection success rate on the MIT human body database; on the INRIA human body database containing changes in perspective, illumination and background , also achieved a test success rate of about 90%.
(3)基于edgelet特征的方法(3) Method based on edgelet feature
“小边”(Edgelet)特征,即一些短的直线或者曲线片段,并将其应用于复杂场景的单幅图像的人体检测,在CAVIAR数据库上取得了大约92%的检测率。The "Edgelet" feature, which is a short line or curve segment, is applied to human detection of a single image of a complex scene, yielding a detection rate of approximately 92% on the CAVIAR database.
(4)基于Shapelet特征的方法(4) Method based on Shapelet feature
可以利用机器学习的方法自动得到特征,即Shapelet特征。该算法首先从训练样本提取图片不同方向的梯度信息,然后利用AdaBoost算法进行训练,从而得到Shapelet特征。Features can be automatically obtained using machine learning methods, namely Shapelet features. The algorithm first extracts the gradient information of different directions from the training samples, and then uses the AdaBoost algorithm to train, thus obtaining the Shapelet feature.
(5)基于轮廓模板的方法(5) Method based on contour template
该方法是指利用图像中目标物体的边缘轮廓、纹理和灰度等信息构建模板,通过模板匹配的方法检测目标。The method refers to constructing a template by using information such as edge contour, texture and gray level of the target object in the image, and detecting the target by template matching method.
基于人体部位的方法Method based on human body parts
该类方法的基本思想是把人体分成几个组成部分,然后对图像中每部分分别检测,最后将检测结果按照一定的约束关系进行整合,最终判断是否存在人体。The basic idea of this kind of method is to divide the human body into several components, and then separately test each part of the image, and finally integrate the detection results according to a certain constraint relationship, and finally determine whether there is a human body.
基于立体视觉的方法Stereo vision based method
该类方法是指通过2个或2个以上的摄像机进行图像采集,然后分析图像中目标的三维信息以识别出人体。This type of method refers to image acquisition by two or more cameras, and then analyzing the three-dimensional information of the target in the image to identify the human body.
在本实施例中,并不对图像人体检测算法进行具体限定,只要能够识别出人体及其关节点即可。人体关节点,是指例如头部、颈部、肩部、上臂、手肘、手腕、腰部、胸口、大腿、膝盖、小腿、脚踝等等人体关键部位的关键节点,每一个人的人体关节点具有多个。In this embodiment, the image human body detection algorithm is not specifically limited as long as the human body and its joint points can be identified. Human joint points refer to key nodes of the human body such as the head, neck, shoulders, upper arms, elbows, wrists, waist, chest, thighs, knees, calves, ankles, etc. There are multiple.
在本实施例中,可以采用基于人体部位的方法来进行人体检测。OpenPose是一个利用OpenCV和Caffe并以C++写成的开源库,用来实现多线程的多人关键点实时检测。人体检测主要检测包含两个部分:人体关节点检测和关节点的相关性检测。其中关节点检测使用了卷积的姿态机(Convolutional Pose Machine)。姿态机通过加入卷积神经网络(convolution neural network),利用图像的纹理信息,空间结构信息和中心特征图(center map),通过有监督地学习,可以推断出人体关键点的位置。同时并行地使用一个卷积神经网络检测关节点之间的相关性,即哪些关节点应该连接到一起。In the present embodiment, human body detection can be performed using a method based on a human body part. OpenPose is an open source library written in C++ using OpenCV and Caffe for real-time detection of multi-threaded multi-person key points. The main detection of human body detection consists of two parts: human joint point detection and joint point correlation detection. Among them, the joint point detection uses a Convolutional Pose Machine. The attitude machine can infer the position of the key points of the human body by adding the convolutional neural network, using the texture information of the image, the spatial structure information and the center map. Simultaneously, a convolutional neural network is used in parallel to detect the correlation between joint points, ie which joint points should be connected together.
如图3所示,当采集到包含人体的图像时,我们使用整张图像作为检测网络的输入,并且同时将图像输入到两个并行的二分网络,同时检测关节点的置信度和关节点的相关度。同时将关节点置信度特征图和关节点相关度特征图和输入图像组合到一起,作为下一阶段的输入,实际的检测过程中,级联了6个这样的检测网络。As shown in Figure 3, when an image containing a human body is acquired, we use the entire image as an input to the detection network, and simultaneously input the image into two parallel binary networks, while detecting the confidence of the joint point and the joint point. relativity. At the same time, the joint point confidence map and the joint point correlation map and the input image are combined together as the input of the next stage. In the actual detection process, six such detection networks are cascaded.
如图4所示,图a为完整的输入图像,图b为关节点的置信特征图,图c为关节点相关性特征图,图d为通过稀疏的方法实现一系列的候选关节点匹配后的图,图e为最终完成人体各个关节点的组合连接后的图。As shown in Fig. 4, Fig. a is a complete input image, Fig. b is a confidence feature map of joint points, Fig. c is a joint point correlation feature map, and Fig. d is a series of candidate joint point matching after sparse method The figure, figure e is the figure after finally completing the combined connection of the joint points of the human body.
图像中可能会识别到多个人,因此在本实施例中,通过摄像机获取图像,应用图像人体检测算法得到一系列的人体图像坐标{(u k1,v k1),...,(u ki,v ki),...,(u kn,v kn)},其中k代表第k个人,i代表第i个人体关节点。为了便于理解,以下的某些计算过程只以一个关节点为例。 A plurality of people may be recognized in the image. Therefore, in the embodiment, an image is acquired by the camera, and an image human body detection algorithm is applied to obtain a series of human body image coordinates {(u k1 , v k1 ), ..., (u ki , v ki ),...,(u kn ,v kn )}, where k represents the kth person and i represents the i-th body joint point. For ease of understanding, some of the following calculations take only one joint point as an example.
图像坐标系是摄像机成像平面中的二维坐标系,原点通常位于画面的左上角,画面的宽(横向)为x轴,画面的高(纵向)为y轴,以像素点个数为单位。通过识别人体在画面中的位置,得到人体各节点在图像坐标系下的人体图像坐标(u,v),u表示x轴第u个像素点,v表示y轴第v个像素点。The image coordinate system is a two-dimensional coordinate system in the imaging plane of the camera. The origin is usually located at the upper left corner of the screen. The width (transverse) of the screen is the x-axis, and the height (longitudinal) of the image is the y-axis, in units of pixels. By recognizing the position of the human body in the picture, the human body image coordinates (u, v) of the human body nodes in the image coordinate system are obtained, u represents the u-th pixel point of the x-axis, and v represents the v-th pixel point of the y-axis.
物理坐标获取模块200将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y)。由于图像坐标系以像素点个数为单位,不利于计算,因此需要将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y),以方便计算。图像物理坐标系为以物理单位(例如米)表示的图像坐标系,可以理解是图像坐标系的平移坐标系,也是二维坐标系。The physical coordinate acquisition module 200 converts the human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system. Since the image coordinate system is based on the number of pixels, which is not conducive to calculation, it is necessary to convert the human body image coordinates (u, v) in the image coordinate system into the physical coordinates (x, y) of the image in the image physical coordinate system. Easy to calculate. The image physical coordinate system is an image coordinate system expressed in physical units (for example, meters), which can be understood as a translation coordinate system of an image coordinate system, and is also a two-dimensional coordinate system.
在其中一个实施例中,物理坐标获取模块200具体用于:In one embodiment, the physical coordinate acquisition module 200 is specifically configured to:
将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
Figure PCTCN2018102854-appb-000005
Figure PCTCN2018102854-appb-000005
其中上述公式为矩阵运算公式,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 The above formula is a matrix operation formula, (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the camera optical axis. The coordinate values in the image coordinate system, dx and dy are the physical size values of the x-axis and y-axis of each pixel.
人体距离获取模300块根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′。The human body distance acquisition module 300 determines the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key human joint points according to x, y, and activates the laser emitter to emit laser light to measure the distance Z' of the human body to the robot.
此处的关键人体关节点为上述人体关节点中的至少一个,例如可以是上述人体关节点中的全部关节点,或者几个重要的关节点,例如头部、肩部、手肘、手腕、膝盖、脚踝。在一些实施例中,为了方便,可以只选取其中一个重要的关节点作为关键人体关节点,例如头部。获取了关键人体关节点到机器人的距离,即相当于获取了人体到机器人的距离。The key human joint point here is at least one of the above-mentioned human joint points, for example, all joint points in the above-mentioned human joint points, or several important joint points, such as a head, a shoulder, an elbow, a wrist, Knees and ankles. In some embodiments, for convenience, only one of the important joint points may be selected as a key human joint point, such as a head. The distance from the key human joint point to the robot is obtained, which is equivalent to the distance from the human body to the robot.
在其中一个实施例中,人体距离获取模块300具体用于:In one embodiment, the human body distance acquisition module 300 is specifically configured to:
确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
Figure PCTCN2018102854-appb-000006
Figure PCTCN2018102854-appb-000006
Figure PCTCN2018102854-appb-000007
Figure PCTCN2018102854-appb-000007
d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。摄像机坐标系是三维坐标系,其原点为摄像机的光心,其X轴、Y轴与图像坐标系的x、y轴平行,z轴为摄像机的光轴,z轴与摄像机成像平面垂直。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera. The camera coordinate system is a three-dimensional coordinate system whose origin is the optical center of the camera. The X and Y axes are parallel to the x and y axes of the image coordinate system. The z axis is the optical axis of the camera, and the z axis is perpendicular to the imaging plane of the camera.
垂直偏转角度α和水平偏转角度β是相对于摄像机坐标系而言的,计算垂直偏转角度α和水平偏转角度β后,激光发射器根据当前姿势以及α、β调整到相应位置以对准关键人体关节点,然后发射激光以测量人体到机器人的距离Z′。The vertical deflection angle α and the horizontal deflection angle β are relative to the camera coordinate system. After calculating the vertical deflection angle α and the horizontal deflection angle β, the laser emitter adjusts to the corresponding position according to the current posture and α, β to align the key human body. The node is turned off and then a laser is emitted to measure the distance Z' of the human body to the robot.
摄像机坐标获取模块400根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z)。The camera coordinate acquisition module 400 calculates the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, and Z'.
摄像机坐标系的成像平面的位置和激光坐标系的坐标原点在z轴方向的距离只相差一个d,忽略激光发射器和摄像机在位置微小偏差(通常激光发射器和摄像机在空间上距离不远),激光测量值则为摄像机坐标系中对应的世界坐标系的真实值,我们可以根据摄像机坐标值和真实的世界坐标值的比例关系求出真实的世界坐标系中两人的间距。The position of the imaging plane of the camera coordinate system and the coordinate origin of the laser coordinate system differ only by one d in the z-axis direction, ignoring the slight deviation of the position between the laser emitter and the camera (usually the laser emitter and the camera are not far apart in space) The laser measurement value is the true value of the corresponding world coordinate system in the camera coordinate system. We can find the distance between two people in the real world coordinate system according to the proportional relationship between the camera coordinate value and the real world coordinate value.
在其中一个实施例中,摄像机坐标获取模块400具体用于:In one embodiment, the camera coordinate acquisition module 400 is specifically configured to:
根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
Figure PCTCN2018102854-appb-000008
Figure PCTCN2018102854-appb-000008
f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
人群间距获取模块500根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L。可以根据摄像机坐标值和真实的世界坐标值的比例关系求出真实的世界坐标系中两人的间距L。 The crowd spacing acquisition module 500 calculates the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. The distance between L. The distance L between two people in the real world coordinate system can be obtained from the proportional relationship between the camera coordinate value and the real world coordinate value.
行走方向确定模块600根据任意两人的相应人体关节点之间的距离L确定行走方向。当确定了各人位置后,从而确定了任意两人之间的距离L,机器人此时便可以确定行走策略。在确定行走策略时,可以结合人体与机器人之间的距离、人体行走速度、机器人行走速度等至少一个因素分析。The walking direction determining module 600 determines the walking direction based on the distance L between the respective human joint points of any two persons. When the position of each person is determined, thereby determining the distance L between any two people, the robot can determine the walking strategy at this time. When determining the walking strategy, at least one factor analysis such as the distance between the human body and the robot, the walking speed of the human body, and the walking speed of the robot may be combined.
假设人体关节点人体图像坐标为{(x k1,y k1),...,(x ki,y ki),...,(x kn,y kn)},分别计算其中任意两人的间距,最后选取其中最佳的间隔距离通过。 Suppose the body image coordinates of the human joint point are {(x k1 , y k1 ),...,(x ki ,y ki ),...,(x kn ,y kn )}, and calculate the spacing of any two of them. Finally, select the best separation distance to pass.
假设计算P 1P 2两人之间的间隔,其中: Suppose we calculate the interval between two people, P 1 P 2 , where:
P 1={(x 11,y 11),...,(x 1i,y 1i),...,(x 1n,y 1n)} P 1 ={(x 11 ,y 11 ),...,(x 1i ,y 1i ),...,(x 1n ,y 1n )}
P 2={(x 21,y 21),…,(x 2i,y 2i),…,(x 2n,y 2n)} P 2 ={(x 21 ,y 21 ),...,(x 2i ,y 2i ),...,(x 2n ,y 2n )}
由于两人之间的距离和X轴方向的距离成正比,因此可以只关注X轴坐标,所以可以将两人的所有检测到的点组成一个队列:Since the distance between the two is proportional to the distance in the X-axis direction, you can focus on only the X-axis coordinates, so you can group all the detected points of the two into one queue:
P={x 11,x 21,…,x 1i,x 2i,…,x 1n,x 2n} P={x 11 ,x 21 ,...,x 1i ,x 2i ,...,x 1n ,x 2n }
行走方向确定模块600运用快速排序算法,可以快速找到两个离散点群之间最 近或者交叉的点,这样就可以根据前面所述摄像机坐标值和真实的世界坐标值的比例关系算出这些点之间的距离,并且不停的检测每两人之间的距离,就能实时的找出最佳的通过距离。The walking direction determining module 600 uses the quick sorting algorithm to quickly find the nearest or intersecting points between the two discrete point groups, so that the distance between the camera coordinates and the real world coordinate values can be calculated between the points. The distance and the distance between each two are constantly detected, and the best passing distance can be found in real time.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述任一项实施例所述机器人行走障碍检测方法的步骤。The application also provides a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform any of the above The steps of the robot walking obstacle detecting method according to the embodiment.
本申请还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一项实施例所述机器人行走障碍检测方法的步骤。The present application also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause one or more processors to perform the robotic walking described in any of the above embodiments The steps of the obstacle detection method.
上述的机器人行走障碍检测方法、装置、计算机设备和存储介质,通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L;根据任意两人的相应人体关节点之间的距离L确定行走方向。通过结合图像识别和激光测距确定人体实际坐标(在摄像机坐标系的坐标),可以精确得到人体的实时位置,从而确定任意两人之间的间距L,再通过L来实时判断行走路径,实现了精确的行人避障检测。 The above-mentioned robot walking obstacle detection method, device, computer equipment and storage medium acquire images through a camera, and apply image human body detection algorithm to obtain human body image coordinates (u, v) of human joint points in an image coordinate system; The human body image coordinates (u, v) are converted into image physical coordinates (x, y) in the image physical coordinate system; the vertical deflection angle α and the horizontal deflection angle β of the laser emitter irradiating the key human joint points are determined according to x, y, Starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot; calculating the coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, Z'; according to the corresponding human joint of any two people Point the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system to calculate the distance L between the corresponding human joint points of any two persons; according to the corresponding human body of any two persons The distance L between the off nodes determines the direction of travel. By combining image recognition and laser ranging to determine the actual coordinates of the human body (in the coordinates of the camera coordinate system), the real-time position of the human body can be accurately obtained, thereby determining the spacing L between any two people, and then determining the walking path in real time through L, realizing Accurate pedestrian obstacle detection.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the computer program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Claims (16)

  1. 一种机器人行走障碍检测方法,所述机器人具有摄像机、激光发射器、激光接收器,所述方法包括如下步骤:A robot walking obstacle detecting method, the robot having a camera, a laser emitter, and a laser receiver, the method comprising the following steps:
    步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);Step S10: acquiring an image by using a camera, and applying an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system;
    步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);Step S20: converting human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system;
    步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;Step S30: determining, according to x, y, the vertical deflection angle α and the horizontal deflection angle β of the laser emitter irradiating the key joint points of the human body, and starting the laser emitter to emit the laser to measure the distance Z' of the human body to the robot;
    步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);Step S40: calculating coordinates (X, Y, Z) of the joint point of the human body in the camera coordinate system according to x, y, and Z';
    步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L; Step S50: Calculate between the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. Distance L;
    步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。Step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons.
  2. 根据权利要求1所述的机器人行走障碍检测方法,所述步骤S20包括:The method for detecting a walking obstacle of a robot according to claim 1, wherein the step S20 comprises:
    将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
    Figure PCTCN2018102854-appb-100001
    Figure PCTCN2018102854-appb-100001
    其中,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 Where (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the coordinates of the camera optical axis in the image coordinate system. The values, dx and dy are the physical size values for each pixel on the x and y axes.
  3. 根据权利要求2所述的机器人行走障碍检测方法,所述步骤S30包括:The method for detecting a walking obstacle of a robot according to claim 2, wherein the step S30 comprises:
    确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
    Figure PCTCN2018102854-appb-100002
    Figure PCTCN2018102854-appb-100002
    Figure PCTCN2018102854-appb-100003
    Figure PCTCN2018102854-appb-100003
    d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  4. 根据权利要求3所述的机器人行走障碍检测方法,所述步骤S40包括:The method for detecting a walking obstacle of a robot according to claim 3, wherein the step S40 comprises:
    根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
    Figure PCTCN2018102854-appb-100004
    Figure PCTCN2018102854-appb-100004
    f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
  5. 一种机器人行走障碍检测装置,所述机器人具有摄像机、激光发射器、激光接收器,所述装置包括:A robot walking obstacle detecting device, the robot having a camera, a laser emitter, and a laser receiver, the device comprising:
    图像坐标获取模块,用于通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);An image coordinate acquisition module, configured to acquire an image by using a camera, and apply an image human body detection algorithm to obtain human body image coordinates (u, v) of a human joint point in an image coordinate system;
    物理坐标获取模块,用于将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);a physical coordinate acquisition module, configured to convert human body image coordinates (u, v) in an image coordinate system into image physical coordinates (x, y) in an image physical coordinate system;
    人体距离获取模块,用于根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;a human body distance acquisition module, configured to determine, according to x, y, a vertical deflection angle α and a horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and activate the laser emitter to emit laser light to measure the distance Z' of the human body to the robot;
    摄像机坐标获取模块,用于根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);a camera coordinate acquisition module, configured to calculate coordinates (X, Y, Z) of the human joint point in the camera coordinate system according to x, y, and Z';
    人群间距获取模块,用于根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L; The crowd spacing acquisition module is configured to calculate the corresponding human body of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons The distance L between the nodes;
    行走方向确定模块,用于根据任意两人的相应人体关节点之间的距离L确定行走方向。The walking direction determining module is configured to determine a walking direction according to a distance L between respective human joint points of any two persons.
  6. 根据权利要求5所述的机器人行走障碍检测装置,所述物理坐标获取模块用于:The robot walking obstacle detecting device according to claim 5, wherein the physical coordinate acquiring module is configured to:
    将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
    Figure PCTCN2018102854-appb-100005
    Figure PCTCN2018102854-appb-100005
    其中,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 Where (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the coordinates of the camera optical axis in the image coordinate system. The values, dx and dy are the physical size values for each pixel on the x and y axes.
  7. 根据权利要求6所述的机器人行走障碍检测装置,所述人体距离获取模块用于:The robot walking obstacle detecting device according to claim 6, wherein the human body distance acquiring module is configured to:
    确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
    Figure PCTCN2018102854-appb-100006
    Figure PCTCN2018102854-appb-100006
    Figure PCTCN2018102854-appb-100007
    Figure PCTCN2018102854-appb-100007
    d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  8. 根据权利要求7所述的机器人行走障碍检测装置,所述摄像机坐标获取模块用于:The robot walking obstacle detecting device according to claim 7, wherein the camera coordinate acquiring module is configured to:
    根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
    Figure PCTCN2018102854-appb-100008
    Figure PCTCN2018102854-appb-100008
    f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种机器人行走障碍检测方法,所述机器人行走障碍检测方法包括以下步骤:A computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform a robot walking obstacle detection method, The robot walking obstacle detection method includes the following steps:
    步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);Step S10: acquiring an image by using a camera, and applying an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system;
    步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);Step S20: converting human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system;
    步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;Step S30: determining, according to x, y, the vertical deflection angle α and the horizontal deflection angle β of the laser emitter irradiating the key joint points of the human body, and starting the laser emitter to emit the laser to measure the distance Z' of the human body to the robot;
    步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);Step S40: calculating coordinates (X, Y, Z) of the joint point of the human body in the camera coordinate system according to x, y, and Z';
    步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L; Step S50: Calculate between the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. Distance L;
    步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。Step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons.
  10. 根据权利要求9所述的计算机设备,所述步骤S20包括:The computer device of claim 9, the step S20 comprising:
    将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
    Figure PCTCN2018102854-appb-100009
    Figure PCTCN2018102854-appb-100009
    其中,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 Where (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the coordinates of the camera optical axis in the image coordinate system. The values, dx and dy are the physical size values for each pixel on the x and y axes.
  11. 根据权利要求10所述的计算机设备,所述步骤S30包括:The computer device of claim 10, the step S30 comprising:
    确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
    Figure PCTCN2018102854-appb-100010
    Figure PCTCN2018102854-appb-100010
    Figure PCTCN2018102854-appb-100011
    Figure PCTCN2018102854-appb-100011
    d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  12. 根据权利要求11所述的计算机设备,所述步骤S40包括:The computer device of claim 11, the step S40 comprising:
    根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
    Figure PCTCN2018102854-appb-100012
    Figure PCTCN2018102854-appb-100012
    f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
  13. 一种存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种机器人行走障碍检测方法,所述机器人行走障碍检测方法包括以下步骤:A non-volatile storage medium storing computer readable instructions, when executed by one or more processors, causing one or more processors to perform a robotic walking obstacle detection method, The robot walking obstacle detection method includes the following steps:
    步骤S10:通过摄像机获取图像,应用图像人体检测算法得到人体关节点在图像坐标系下的人体图像坐标(u,v);Step S10: acquiring an image by using a camera, and applying an image human body detection algorithm to obtain human body image coordinates (u, v) of the human joint point in the image coordinate system;
    步骤S20:将图像坐标系下的人体图像坐标(u,v)转换为图像物理坐标系下的图像物理坐标(x,y);Step S20: converting human body image coordinates (u, v) in the image coordinate system into image physical coordinates (x, y) in the image physical coordinate system;
    步骤S30:根据x、y确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′;Step S30: determining, according to x, y, the vertical deflection angle α and the horizontal deflection angle β of the laser emitter irradiating the key joint points of the human body, and starting the laser emitter to emit the laser to measure the distance Z' of the human body to the robot;
    步骤S40:根据x、y、Z′计算得到人体关节点在摄像机坐标系的坐标(X,Y,Z);Step S40: calculating coordinates (X, Y, Z) of the joint point of the human body in the camera coordinate system according to x, y, and Z';
    步骤S50:根据任意两人的相应人体关节点在摄像机坐标系的坐标(X 1,Y 1,Z 1)和(X 2,Y 2,Z 2)计算任意两人的相应人体关节点之间的距离L; Step S50: Calculate between the corresponding human joint points of any two persons according to the coordinates (X 1 , Y 1 , Z 1 ) and (X 2 , Y 2 , Z 2 ) of the camera coordinate system of the corresponding human joint points of any two persons. Distance L;
    步骤S60:根据任意两人的相应人体关节点之间的距离L确定行走方向。Step S60: determining the walking direction according to the distance L between the respective human joint points of any two persons.
  14. 根据权利要求13所述的非易失性存储介质,所述步骤S20包括:The nonvolatile storage medium of claim 13, wherein the step S20 comprises:
    将图像坐标系下的人体图像坐标转换为图像物理坐标系下的图像物理坐标,转换关系为:The human body image coordinates in the image coordinate system are converted into image physical coordinates in the image physical coordinate system, and the conversion relationship is:
    Figure PCTCN2018102854-appb-100013
    Figure PCTCN2018102854-appb-100013
    其中,(u,v)为图像坐标系下的人体图像坐标,(x,y)为在图像物理坐标系下的人体图像坐标,u 0和v 0为摄像机光轴在图像坐标系下的坐标值,dx和dy为每个像素在x轴和y轴的物理尺寸值。 Where (u, v) is the human body image coordinate in the image coordinate system, (x, y) is the human body image coordinate in the image physical coordinate system, and u 0 and v 0 are the coordinates of the camera optical axis in the image coordinate system. The values, dx and dy are the physical size values for each pixel on the x and y axes.
  15. 根据权利要求14所述的非易失性存储介质,所述步骤S30包括:The nonvolatile storage medium of claim 14, the step S30 comprising:
    确定激光发射器照射关键人体关节点的垂直偏转角度α和水平偏转角度β,启动激光发射器发射激光以测量人体到机器人的距离Z′,其中:Determining the vertical deflection angle α and the horizontal deflection angle β of the laser emitter to illuminate the key joint points of the human body, and starting the laser emitter to emit laser light to measure the distance Z' of the human body to the robot, wherein:
    Figure PCTCN2018102854-appb-100014
    Figure PCTCN2018102854-appb-100014
    Figure PCTCN2018102854-appb-100015
    Figure PCTCN2018102854-appb-100015
    d u是摄像机坐标系相对于图像物理坐标系的偏移量,d v是激光坐标系相对于图像物理坐标系的偏移量,d为激光发射器到摄像机成像平面的水平距离。 d u is the offset of the camera coordinate system relative to the image physical coordinate system, d v is the offset of the laser coordinate system relative to the image physical coordinate system, and d is the horizontal distance of the laser emitter to the imaging plane of the camera.
  16. 根据权利要求15所述的非易失性存储介质,所述步骤S40包括:The nonvolatile storage medium according to claim 15, wherein the step S40 comprises:
    根据x、y、d、Z′计算得到各个人体关节点在摄像机坐标系的坐标(X,Y,Z),根据(X,Y,Z)计算得到任意两人的相应人体关节点之间的距离L,其中摄像机坐标系的坐标(X,Y,Z)与图像物理坐标系的坐标(x,y)之间的关系为:According to x, y, d, Z', the coordinates (X, Y, Z) of each human joint point in the camera coordinate system are calculated, and the corresponding human joint points between any two people are calculated according to (X, Y, Z). The distance L, where the coordinates of the camera coordinate system (X, Y, Z) and the coordinates (x, y) of the image physical coordinate system are:
    Figure PCTCN2018102854-appb-100016
    Figure PCTCN2018102854-appb-100016
    f为摄像机焦距,Z=Z′+d。f is the focal length of the camera, Z=Z'+d.
PCT/CN2018/102854 2018-04-10 2018-08-29 Robot walking obstacle detection method and apparatus, computer device, and storage medium WO2019196313A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810314149.5 2018-04-10
CN201810314149.5A CN108628306B (en) 2018-04-10 2018-04-10 Robot walking obstacle detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019196313A1 true WO2019196313A1 (en) 2019-10-17

Family

ID=63704999

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102854 WO2019196313A1 (en) 2018-04-10 2018-08-29 Robot walking obstacle detection method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN108628306B (en)
WO (1) WO2019196313A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116529A (en) * 2020-09-23 2020-12-22 浙江浩腾电子科技股份有限公司 PTZ camera-based conversion method for GPS coordinates and pixel coordinates
CN112230652A (en) * 2020-09-04 2021-01-15 安克创新科技股份有限公司 Walking robot, method of controlling movement of walking robot, and computer storage medium
CN113506340A (en) * 2021-06-15 2021-10-15 浙江大华技术股份有限公司 Method and equipment for predicting cloud deck pose and computer readable storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508688B (en) * 2018-11-26 2023-10-13 平安科技(深圳)有限公司 Skeleton-based behavior detection method, terminal equipment and computer storage medium
CN110119682A (en) * 2019-04-04 2019-08-13 北京理工雷科电子信息技术有限公司 A kind of infrared remote sensing Image Fire point recognition methods
WO2021217311A1 (en) * 2020-04-26 2021-11-04 深圳市大疆创新科技有限公司 Movable platform and control method therefor, and storage medium
CN113268063A (en) * 2021-06-03 2021-08-17 北京京东乾石科技有限公司 Control method and device for robot and non-volatile computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6250911A (en) * 1985-08-30 1987-03-05 Kajima Corp Self-traveling type robot
CN104375505A (en) * 2014-10-08 2015-02-25 北京联合大学 Robot automatic road finding method based on laser ranging
CN105550667A (en) * 2016-01-25 2016-05-04 同济大学 Stereo camera based framework information action feature extraction method
CN105676845A (en) * 2016-01-19 2016-06-15 中国人民解放军国防科学技术大学 Security service robot and intelligent obstacle avoidance method of robot in complex environment
CN106020207A (en) * 2016-07-26 2016-10-12 广东宝乐机器人股份有限公司 Self-moving robot walking method and device
CN106291535A (en) * 2016-07-21 2017-01-04 触景无限科技(北京)有限公司 A kind of obstacle detector, robot and obstacle avoidance system
CN106313046A (en) * 2016-09-27 2017-01-11 成都普诺思博科技有限公司 Multi-level obstacle avoidance system of mobile robot
CN207182092U (en) * 2017-05-09 2018-04-03 叶仕通 A kind of drive device for mobile robot

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102499692B (en) * 2011-11-30 2014-04-30 沈阳工业大学 Ultrasonic gait detection method
KR101913332B1 (en) * 2011-12-23 2018-10-31 삼성전자주식회사 Mobile apparatus and localization method of mobile apparatus
JP6027703B1 (en) * 2016-09-12 2016-11-16 シャープ株式会社 Information processing apparatus and control program
CN206224246U (en) * 2016-10-19 2017-06-06 九阳股份有限公司 A kind of robot for realizing target positioning and tracking
CN107423729B (en) * 2017-09-20 2023-12-19 湖南师范大学 Remote brain-like three-dimensional gait recognition system oriented to complex visual scene and implementation method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6250911A (en) * 1985-08-30 1987-03-05 Kajima Corp Self-traveling type robot
CN104375505A (en) * 2014-10-08 2015-02-25 北京联合大学 Robot automatic road finding method based on laser ranging
CN105676845A (en) * 2016-01-19 2016-06-15 中国人民解放军国防科学技术大学 Security service robot and intelligent obstacle avoidance method of robot in complex environment
CN105550667A (en) * 2016-01-25 2016-05-04 同济大学 Stereo camera based framework information action feature extraction method
CN106291535A (en) * 2016-07-21 2017-01-04 触景无限科技(北京)有限公司 A kind of obstacle detector, robot and obstacle avoidance system
CN106020207A (en) * 2016-07-26 2016-10-12 广东宝乐机器人股份有限公司 Self-moving robot walking method and device
CN106313046A (en) * 2016-09-27 2017-01-11 成都普诺思博科技有限公司 Multi-level obstacle avoidance system of mobile robot
CN207182092U (en) * 2017-05-09 2018-04-03 叶仕通 A kind of drive device for mobile robot

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112230652A (en) * 2020-09-04 2021-01-15 安克创新科技股份有限公司 Walking robot, method of controlling movement of walking robot, and computer storage medium
CN112116529A (en) * 2020-09-23 2020-12-22 浙江浩腾电子科技股份有限公司 PTZ camera-based conversion method for GPS coordinates and pixel coordinates
CN113506340A (en) * 2021-06-15 2021-10-15 浙江大华技术股份有限公司 Method and equipment for predicting cloud deck pose and computer readable storage medium

Also Published As

Publication number Publication date
CN108628306A (en) 2018-10-09
CN108628306B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
WO2019196313A1 (en) Robot walking obstacle detection method and apparatus, computer device, and storage medium
Jörgensen et al. Monocular 3d object detection and box fitting trained end-to-end using intersection-over-union loss
Zou et al. Coslam: Collaborative visual slam in dynamic environments
Guo et al. An integrated framework for 3-D modeling, object detection, and pose estimation from point-clouds
WO2017133009A1 (en) Method for positioning human joint using depth image of convolutional neural network
JP7292492B2 (en) Object tracking method and device, storage medium and computer program
CN111652047B (en) Human body gesture recognition method based on color image and depth image and storage medium
Marcu et al. A multi-stage multi-task neural network for aerial scene interpretation and geolocalization
Hu et al. Mobile panoramic vision for assisting the blind via indexing and localization
Tanke et al. Iterative greedy matching for 3d human pose tracking from multiple views
Gouidis et al. Accurate hand keypoint localization on mobile devices
Lu et al. 2-D/3-D fusion-based robust pose normalisation of 3-D livestock from multiple RGB-D cameras
Nguyen et al. Combined YOLOv5 and HRNet for high accuracy 2D keypoint and human pose estimation
Lu et al. Automatic teat detection for rotary milking system based on deep learning algorithms
CN114663917A (en) Multi-view-angle-based multi-person three-dimensional human body pose estimation method and device
Wang et al. Im2fit: Fast 3d model fitting and anthropometrics using single consumer depth camera and synthetic data
Deng et al. Biological Eagle-eye Inspired Target Detection for Unmanned Aerial Vehicles Equipped with a Manipulator
Alhwarin Fast and robust image feature matching methods for computer vision applications
Le 3-D human pose estimation in traditional martial art videos
Velesaca et al. Deep Learning-based Human Height Estimation from a Stereo Vision System
Sarsenov et al. Detection of Objects and Trajectories in Real-time using Deep Learning by a Controlled Robot.
Korovin et al. Human pose estimation applying ANN while RGB-D cameras video handling
Wang et al. Semantic Mapping Based on Visual SLAM with Object Model Replacement Visualization for Cleaning Robot
Chen et al. A real-time photogrammetric system for acquisition and monitoring of three-dimensional human body kinematics
CN109934045A (en) Pedestrian detection method and device

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

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

Country of ref document: EP

Kind code of ref document: A1