WO2017167239A1 - Mobile control method, mobile electronic apparatus and mobile control system, and storage medium - Google Patents

Mobile control method, mobile electronic apparatus and mobile control system, and storage medium Download PDF

Info

Publication number
WO2017167239A1
WO2017167239A1 PCT/CN2017/078854 CN2017078854W WO2017167239A1 WO 2017167239 A1 WO2017167239 A1 WO 2017167239A1 CN 2017078854 W CN2017078854 W CN 2017078854W WO 2017167239 A1 WO2017167239 A1 WO 2017167239A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional
target position
electronic device
camera
mobile electronic
Prior art date
Application number
PCT/CN2017/078854
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 WO2017167239A1 publication Critical patent/WO2017167239A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Definitions

  • the present invention relates to mobile control technologies, and in particular, to a mobile control method, a mobile electronic device, a mobile control system, and a storage medium.
  • Robots are divided into simple robots and intelligent robots.
  • intelligent robots are the most complex robots, and they are also the machine friends that humans are most eager to make.
  • scientistss have to pay dozens or even hundreds of years of hard work.
  • the robot can be controlled by the operator constantly adjusting the remote control joystick.
  • the simple robot Since the movement of the simple robot requires the operator to perform real-time tracking operation according to the actual motion situation, the control of the joystick also requires constant practice and exploration to accurately control, and the remote control is difficult. It can be seen that the simple robot in the related art has a technical problem that the remote control is difficult.
  • the embodiments of the present invention provide a mobile control method, a mobile electronic device, a mobile control system, and a storage medium, which are used to solve the technical problem that the remote control is difficult in the related art.
  • the embodiment of the invention provides a mobile control method, which is applied to a mobile electronic device, wherein the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the method includes:
  • the calculating, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, obtaining the motion of the two-dimensional target position coordinate relative to the mobile electronic device The center's 3D target position coordinates, including:
  • the calculating, according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point, obtaining the two-dimensional target position coordinate relative to the two-dimensional camera optical center The three-dimensional optical center position coordinates, including:
  • the three-dimensional relative position coordinate P is obtained by the following formula:
  • z denotes the depth value
  • (a, b) denotes the two-dimensional target position coordinate
  • (cx, cy) denotes the camera main point
  • f denotes the camera focal length
  • the obtaining the three-dimensional space detecting device is aligned with the two-dimensional camera Depth values, including:
  • the depth value is obtained by detecting the three-dimensional camera
  • the ordinate in the three-dimensional target position coordinate is used as the height coordinate of the motion center of the mobile electronic device, and the depth value is constrained.
  • the method further includes:
  • the mobile electronic device If there is no obstacle between the current position and the three-dimensional target position coordinate, the mobile electronic device is pulled to move from the current position to the three-dimensional target position coordinate.
  • the method when the obtaining the target two-dimensional target position coordinates on the image, the method further includes:
  • the controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate comprises:
  • the response is based on a target position input operation performed by the image captured by the two-dimensional camera, and the coordinates of the two-dimensional target position corresponding to the target position input operation on the image are obtained, including:
  • the target position input operation includes: a touch operation on the image, or a voice or text input operation for calibrating the target position on the image.
  • the embodiment of the present invention further provides a mobile electronic device, wherein the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the mobile electronic device further includes:
  • a response unit configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
  • An acquiring unit configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera
  • a calculating unit configured to calculate, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinate is obtained relative to a motion center of the mobile electronic device Three-dimensional target position coordinates;
  • control unit configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the calculating unit includes:
  • a first calculating subunit configured to calculate the two-dimensional target position coordinate according to the depth value, the two-dimensional target position coordinate, a camera focal length of the two-dimensional camera, and a camera principal point a three-dimensional relative position coordinate of the optical center of the two-dimensional camera;
  • a second calculating subunit configured to multiply a motion transformation center of the mobile electronic device with respect to the spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
  • the first calculating subunit is configured to obtain the three-dimensional relative position coordinate P by the following formula:
  • z denotes the depth value
  • (a, b) denotes the two-dimensional target position coordinate
  • (cx, cy) denotes the camera main point
  • f denotes the camera focal length
  • the obtaining unit is configured to:
  • the depth value is obtained by detecting the three-dimensional camera
  • the three-dimensional space detecting device is an inertial detecting device
  • the ordinate in the three-dimensional target position coordinate is equal to the height coordinate of the motion center of the mobile electronic device, and the constraint solves the depth value.
  • the mobile electronic device further includes:
  • a detecting unit configured to detect whether an obstacle exists in a moving direction of the mobile electronic device after controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate
  • the adjusting unit is configured to adjust a moving direction of the mobile electronic device to be when the distance between the mobile electronic device and the obstacle is less than a first threshold distance when the detection result of the detecting unit is present.
  • the detecting unit is further configured to: after moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate;
  • a traction unit configured to: when the detecting unit detects that there is no obstacle between the current position and the three-dimensional target position coordinate, to pull the mobile electronic device from the current position to the three-dimensional target position coordinate motion.
  • the mobile electronic device further includes:
  • a resetting unit configured to reset a position coordinate of the mobile electronic device when the corresponding two-dimensional target position coordinates on the image are input by the target position input operation, and obtain the location by the three-dimensional space detecting device The three-dimensional optical center position coordinate of the camera optical center of the two-dimensional camera;
  • the acquiring unit is further configured to: obtain, according to the three-dimensional optical center position coordinates, a three-dimensional current coordinate of a motion center of the mobile electronic device with respect to a position coordinate after resetting;
  • the control unit is further configured to: drag the mobile electronic device to move to the three-dimensional target position coordinate according to the three-dimensional current coordinate and the three-dimensional target position coordinate.
  • the embodiment of the invention further provides a mobile control system, comprising: a remote control device and a mobile electronic device, wherein the mobile electronic device is configured with a two-dimensional camera and a three-dimensional space detecting device;
  • the remote control device is configured to: receive an image of an environment in which the mobile electronic device is captured by the two-dimensional camera and display, obtain a target position input operation performed on the image, and input the target position Operation feedback to the mobile electronic device;
  • the mobile electronic device is configured to: receive the target position input operation fed back by the remote control device, obtain a corresponding two-dimensional target position coordinate of the target position input operation on the image; obtain the three-dimensional space detecting device and a depth value of the two-dimensional camera alignment; calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, obtaining the two-dimensional target position coordinate relative to the movement a three-dimensional target position coordinate of a motion center of the electronic device; controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the embodiment of the invention further provides a mobile electronic device, including:
  • a two-dimensional camera a three-dimensional space detecting device and a processor
  • the processor is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
  • the processor is further configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
  • the processor is further configured to calculate, according to the two-dimensional target position coordinates, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinates are obtained relative to the mobile electronic device The three-dimensional target position coordinates of the motion center;
  • the processor is further configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the embodiment of the present invention further provides a storage medium, where the executable medium is stored with an executable instruction, and the executable instruction is used to execute the mobile control method provided by the embodiment of the present invention.
  • the embodiment of the present invention configures a two-dimensional camera and a three-dimensional space detecting device for the mobile electronic device, and the mobile electronic device obtains the two-dimensional target position coordinates of the target position in the image captured by the two-dimensional camera by inputting the response target position input operation, and obtains the three-dimensional space.
  • the operation controls the mobile electronic device to move to the corresponding spatial position, and does not require the user to manipulate the direction control lever of the mobile electronic device in real time, thereby solving the technical problem that the remote control of the simple robot exists in the related art, and reducing the control difficulty of the simple robot.
  • FIG. 1 is a schematic flowchart of a mobile control method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a mobile electronic device avoiding an obstacle according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a mobile electronic device according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a mobile control system according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of hardware of a mobile electronic device according to an embodiment of the present invention.
  • the user is provided with a function of converting the coordinates of the two-dimensional target position on the image into the coordinates of the three-dimensional target position, so that the user can perform the mobile control on the mobile electronic device.
  • the image captured by the mobile electronic device performs a target position input operation to instruct the mobile electronic device to move to a corresponding spatial position, and the user does not need to perform real-time tracking operation according to the actual motion condition of the mobile electronic device, so as to solve the existence of the simple robot in the related art.
  • the technical problem of remote control is difficult, and the control difficulty of the simple robot is reduced.
  • an embodiment of the present invention provides a mobile control method, which is applied to a mobile electronic device, where a two-dimensional camera and a three-dimensional space detecting device are installed, and the method includes:
  • S101 Obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation performed based on an image captured by the two-dimensional camera;
  • S103 Calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera main point, obtaining the two-dimensional target position coordinate relative to the mobile electronic The three-dimensional target position coordinates of the motion center of the device;
  • S104 Control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the mobile electronic device provided by the embodiment of the present invention may be a mobile robot and can communicate with a remote control device.
  • the remote control device may be a dedicated remote controller that matches the mobile robot, or a common electronic device that can communicate with the mobile robot, such as a smart phone, a tablet (PAD), a smart watch, and the like.
  • the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device.
  • the two-dimensional camera may be a color mode RGB camera
  • the three-dimensional space detecting device may be a 3D camera or an inertial detection unit (IMU).
  • IMU inertial detection unit
  • the inertial detection device IMU is a device for measuring the three-axis attitude angle (or angular velocity) and acceleration of an object, and is mostly used in devices that require motion control, such as automobiles and robots.
  • the mobile electronic device captures an image of the environment in which it is located (also referred to as a view image of the mobile electronic device) through its two-dimensional camera, and the image may be a real-time image, that is, a frame image in the video stream, and the image is transmitted to the remote control through the image transmission signal.
  • the device, or display is shared with the user on the display of the mobile electronic device.
  • the mobile electronic device transmits the image captured by the two-dimensional camera to the remote control device corresponding to the mobile electronic device and displays the image through the remote control device
  • the user can perform a target position input operation on the image on the remote control device
  • the remote control device detects
  • the target position input operation of the image is obtained
  • the target position input operation is fed back to the mobile electronic device
  • the mobile electronic device receives the target position input operation fed back by the remote control device and responds to obtain the corresponding two-dimensional corresponding position input operation on the image.
  • Target position coordinates When the mobile electronic device transmits the image captured by the two-dimensional camera to the remote control device corresponding to the mobile electronic device and displays the image through the remote control device.
  • the mobile electronic device is an electric balance car and the remote control device is a smart phone
  • the electric balance car takes a photo directly in front of its current location through the two-dimensional camera and transmits it to the user's mobile phone, and the user views the mobile phone through the mobile phone. After the image, click on the "elevator port" on the image.
  • the mobile phone feeds back the operation to the electric balance car, and the electric balance car receives the feedback of the mobile phone and responds to the target position input operation to obtain the two-dimensional target position coordinates of the “elevator port” in the image, thereby “elevator port”
  • the two-dimensional target position coordinates are converted into the coordinates of the three-dimensional target position where the "elevator port" is actually located, and then run to the "elevator port”.
  • the touch display provided on the mobile electronic device can also achieve the same function as the remote control, and the user can perform the target position input operation directly on the mobile electronic device, instructing the mobile electronic device to automatically move to the target without the user's own control. Rod.
  • the mobile electronic device After the user performs a target position input operation on the image captured by the two-dimensional camera, the mobile electronic device performs S101 to respond to the target position input operation, and obtains a corresponding two-dimensional target position coordinate of the target position input operation on the image.
  • the two-dimensional target position coordinates corresponding to the target position input operation can be obtained by the following three methods:
  • the mobile electronic device obtains the coordinates of the two-dimensional touch position of the user on the touch display screen in response to the target position input operation. Then, according to the relative positional relationship between the image and the touch display screen and the obtained two-dimensional touch position coordinates, the two-dimensional target position coordinates corresponding to the target position input operation on the image are obtained.
  • the offset vector between the center point of the touch display screen and the center point of the image is (c, d)
  • the coordinates of the two-dimensional touch position obtained by the detection are (e, f)
  • the mobile electronic device obtains the voice data input by the user in response to the voice input operation, and converts the voice data into a mobile electronic device that can be recognized.
  • the character data is further searched for the target position matching the character data from the image captured by the two-dimensional camera by image recognition, and the two-dimensional target position coordinates of the target position in the image are obtained. For example: suppose the user voice inputs "pot”, then the mobile electronic device converts the voice data "pot” into the character “pot”. And through the image recognition, the "flower pot” in the image and its two-dimensional target position coordinates (a, b) in the image.
  • the mobile electronic device obtains the text data in response to the text input operation, and finds and images from the image captured by the two-dimensional camera through image recognition.
  • the text data matches the target position and obtains the coordinates of the two-dimensional target position of the target position in the image. For example: suppose the user text input target position is "flower pot", then the "flower pot” in the image searched by the image recognition and obtain the two-dimensional target position coordinates (a, b) of the "flower pot” in the image.
  • the embodiment of the present invention resets the position coordinates of the mobile electronic device when obtaining the two-dimensional target position coordinates of the target position.
  • the reset is (0, 0, 0)
  • the three-dimensional optical center position coordinates (x1, y1, z1) of the camera optical center of the two-dimensional camera of the mobile electronic device are obtained by the three-dimensional space detecting device of the mobile electronic device.
  • the three-dimensional current coordinates (x, y, z) of the motion center of the mobile electronic device with respect to the position coordinates after the reset are obtained.
  • the three-dimensional position of the mobile electronic device motion center relative to the reset position coordinate is obtained.
  • the current coordinates (x, y, z) (x1, y1, z1) * T.
  • S102 is performed to obtain a depth value z in which the three-dimensional space detecting device of the mobile electronic device is aligned with the two-dimensional camera.
  • the three-dimensional space detecting device is a three-dimensional camera, that is, a 3D camera
  • the three-dimensional space detecting device is an inertial detecting device
  • the ordinate in the three-dimensional target position coordinate is equal to the height coordinate of the moving center of the mobile electronic device, since the height coordinate of the mobile electronic device is a known number h when it leaves the factory
  • the 3D target position coordinates of the motion center of the device can be the chassis motion center of the mobile electronic device.
  • the three-dimensional relative position coordinates of the two-dimensional target position coordinates relative to the optical center of the two-dimensional camera may be calculated according to the depth value, the two-dimensional target position coordinates, the camera focal length of the two-dimensional camera, and the camera main point; Then, the three-dimensional target position coordinates are obtained by multiplying the motion center of the mobile electronic device with the spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional optical center position coordinates.
  • the two-dimensional target position coordinate of the mobile electronic device is calculated relative to the three-dimensional relative position coordinate P of the two-dimensional camera optical center by the following formula (1):
  • z is the depth value at which the three-dimensional space detecting device is aligned with the two-dimensional camera
  • (a, b) represents the two-dimensional target position coordinates
  • (cx, cy) represents the camera main point of the two-dimensional camera
  • S104 is executed to control the motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the position coordinates of the mobile electronic device are usually reset to obtain the three-dimensional current coordinates of the mobile electronic device motion center.
  • the three-dimensional target position coordinates (x t , y t , z t ) pull the mobile electronic device to move to the three-dimensional target position coordinates (x t , y t , z t ).
  • the chassis of the mobile electronic device can be controlled to operate at a three-dimensional target position coordinate by a closed loop automatic control technology, that is, PID.
  • S201 Detect whether there is an obstacle in the moving direction of the mobile electronic device. As passed The infrared scan determines whether there is an obstacle in front, or captures an image of the moving direction through the camera, and determines whether there is an obstacle in front by image recognition. If there is no obstacle in the moving direction of the mobile electronic device, the process proceeds to S202; otherwise, if there is an obstacle in the moving direction of the mobile electronic device, the process proceeds to S203.
  • S202 Continue to move along the current motion direction until reaching a three-dimensional target position coordinate or a distance from the three-dimensional target position coordinate is less than a set distance, the mobile travel end ends, and a notification message that the target position has arrived is sent to the user.
  • the set distance can be set by the user according to his actual needs, or the system default value, such as 50 cm (cm).
  • the first threshold distance may be performed according to the size of the mobile electronic device, and at least ensure that the mobile electronic device can turn or turn within a first threshold distance. For example, if the size of the mobile electronic device is 50 cm*60 cm, the first threshold The distance may be 60 cm, 100 cm, 150 cm or the like.
  • the value of the first threshold range may be determined according to the size of the mobile electronic device and the braking distance. For example, assuming that the mobile electronic device has a length of 60 cm and a braking distance of 40 to 100 cm, the first threshold distance can be set to 160 cm.
  • S204 After moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate. If there is no obstacle between the current position and the three-dimensional target position coordinate, the jump proceeds to S202. Conversely, if there is still an obstacle between the current position and the coordinates of the three-dimensional target position, the jump is performed S203-S204 until the distance to the three-dimensional target position coordinate or the distance between the three-dimensional target position coordinates is less than the set distance, the movement stroke End and send the user a notification message that the target location has arrived.
  • the mobile electronic device is an electric balance car
  • the electric balance car is equipped with a touch display screen, a red green blue (RGB, Red Green Blue) camera and a 3D camera.
  • the viewing angle of the 3D camera is similar to that of the RGB camera and substantially coincides.
  • the mobile control process is as follows:
  • Step 1 The touch screen displayed on the electric balance car displays the field of view image captured by the RGB camera.
  • Step 2 The user clicks on a target point of interest in the field of view image of the electric balance vehicle, and the electric balance vehicle obtains the RGB coordinates (a, b) of the point in the image coordinate system to start a round of movement control process.
  • Step 3 Reset the current position coordinate of the electric balance car to (0, 0, 0), open the visual mileage calculation method based on the 3D camera, calculate the three-dimensional optical center position coordinates of the RGB camera camera optical center, and according to the RGB camera camera
  • the optical center is relatively balanced with the positional relationship of the motion center of the chassis (considering the servo position of each joint of the robot), and the three-dimensional current coordinates (x, y, z) of the chassis motion center with respect to the position coordinates after the reset are obtained.
  • Step 4 The electric balance vehicle calculates the position (x t , y t , z t ) of the target point from the center of the chassis motion from (a, b), as follows:
  • Step 5 According to the current coordinate (x, y, z) of the electric balance car and the target point coordinates (x t , y t , z t ), the chassis of the robot is pulled by a proportional-integral-derivative (PID) controller. Target point movement.
  • PID proportional-integral-derivative
  • Step 6 If the obstacle-reducing sensor is on the electric balance car during the movement (3D photo Like the head, ultrasonic sensor, etc., if an obstacle appears in the direction of motion, the electric balance car starts the obstacle avoidance logic, brakes and tries to adjust the direction of motion to the direction without the obstacle until there is no obstacle in the direction of the traction to the target point.
  • Step 7 Repeat steps 5 and 6 until the distance difference between the current coordinates of the robot and the three-dimensional target position coordinates of the target point is less than the set threshold. Then the movement control is completed, the electric balance vehicle stops, and the user is notified.
  • Step 8 Give feedback to the user on the touch display interface of the electric balance vehicle, prompting to reach the target position, and allowing the user to click the target point again to start a new round of movement control.
  • the user can also click the new target point position to adjust the target position at any time.
  • the robot is equipped with an RGB camera and an IMU.
  • the robot can communicate with a remote controller and is controlled by a remote controller, which is a touch screen mobile phone or a customized remote controller with a touch screen.
  • the mobile control process is as follows:
  • Step 1 The robot captures its own field of view image through the RGB camera and transmits it to the remote controller for display by wireless transmission.
  • Step 2 The user clicks on a target point of interest in the field of view image of the robot, and the robot obtains the RGB coordinates (a, b) of the point in the image coordinate system to start a round of movement control process.
  • Step 3 Reset the current position coordinate of the robot to (0, 0, 0), open the visual mileage calculation method based on RGB camera + IMU, calculate the three-dimensional optical center position coordinates of the optical center of the RGB camera camera, and according to the RGB camera camera
  • the optical center is relatively balanced with the positional relationship of the motion center of the chassis (considering the servo position of each joint of the robot), and the three-dimensional current coordinates (x, y, z) of the chassis motion center with respect to the position coordinates after the reset are obtained.
  • Step 4 The robot calculates the position (x t , y t , z t ) of the target point from the center of the chassis motion from (a, b), as follows:
  • Step 5 According to the current coordinates (x, y, z) of the robot and the coordinates of the target point (x t , y t , z t ), the PID controller is used to pull the chassis of the robot to the target point.
  • Step 6 Optional
  • the robot During the movement, if the robot has obstacle avoidance sensors (IMU, ultrasonic sensors, etc.) and finds obstacles in the direction of motion, the robot starts the obstacle avoidance logic, brakes and tries to adjust to the direction without obstacles. The direction of motion until there is no obstacle in the direction of the traction toward the target point.
  • IMU obstacle avoidance sensors
  • ultrasonic sensors etc.
  • Step 7 Repeat steps 5 and 6 until the distance difference between the current coordinates of the robot and the three-dimensional target position coordinates of the target point is less than the set threshold. Then the movement control is completed, the robot stops, and the remote controller is notified.
  • Step 8 Give feedback to the user on the touch display interface of the remote controller, prompting to reach the target position, and allowing the user to click the target point again to start a new round of movement control.
  • the user can also click the new target point position to adjust the target position at any time.
  • the three-dimensional coordinates of the two-dimensional coordinates in the image on the mobile electronic device to the actual environment are converted by the above embodiment, so that the user can control the mobile electronic device to move to the corresponding spatial position by performing a target position input operation on the image,
  • the user needs to manipulate the direction joystick of the mobile electronic device in real time, and solves the technical problem of the remote control difficulty of the simple robot in the related art, and reduces the control difficulty of the simple robot.
  • an embodiment of the present invention is directed to a mobile control method provided by the foregoing, and further provides a mobile electronic device.
  • the mobile electronic device is equipped with a two-dimensional camera and three-dimensional space detection
  • the device further includes:
  • the response unit 301 is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
  • the obtaining unit 302 is configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
  • the calculating unit 303 is configured to calculate, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, the motion of the two-dimensional target position coordinate relative to the mobile electronic device The coordinates of the three-dimensional target position of the center;
  • the control unit 304 is configured to control the motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the calculating unit 303 includes: a first calculating subunit and a second calculating subunit.
  • the first calculating subunit is configured to calculate the two-dimensional target position coordinate relative to the two-dimensional camera light according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point The three-dimensional relative position coordinates of the heart.
  • the second computing subunit is configured to multiply a motion center of the mobile electronic device with respect to a spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
  • the acquiring unit 302 is configured to: when the three-dimensional space detecting device is a three-dimensional camera, obtain the depth value by detecting the three-dimensional camera; or when the three-dimensional space detecting device is inertial detecting The device uses the ordinate in the coordinate of the three-dimensional target position as the height coordinate of the motion center of the mobile electronic device, and the constraint solves the depth Degree value.
  • the mobile electronic device may further include: a detecting unit, an adjusting unit, and a pulling unit.
  • the detecting unit is configured to detect whether there is an obstacle in the moving direction of the mobile electronic device after controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate;
  • the adjusting unit is configured to be in the detecting unit
  • the detection result is present, when the distance between the mobile electronic device and the obstacle is less than the first threshold distance, the moving direction of the mobile electronic device is adjusted to the direction of the obstacle-free object; the detecting unit further After the second threshold distance is moved in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate;
  • the traction unit is configured to be detected by the detecting unit.
  • the mobile electronic device is pulled to move from the current position to the three-dimensional target position coordinate.
  • the mobile electronic device further includes: a reset unit.
  • the resetting unit is configured to reset the position coordinates of the mobile electronic device when the two-dimensional target position coordinates corresponding to the image input operation on the image is obtained, and obtain the location by the three-dimensional space detecting device
  • the three-dimensional optical center position coordinate of the camera optical center of the two-dimensional camera is further configured to: obtain the motion center of the mobile electronic device relative to the reset position coordinate according to the three-dimensional optical center position coordinate
  • the control unit 304 is further configured to: drag the mobile electronic device to move to the three-dimensional target position coordinate according to the three-dimensional current coordinate and the three-dimensional target position coordinate.
  • a mobile control system provided by the foregoing embodiment of the present invention further provides a mobile control system, including: a remote control device 401 and a mobile electronic device 402.
  • the mobile electronic device 402 is configured with a two-dimensional camera and a three-dimensional space detecting device;
  • the remote control device 401 is configured to receive an image of an environment in which the mobile electronic device is captured by the two-dimensional camera and display, obtain a target position input operation performed on the image, and input the target position into an operation. Feedback to the mobile electronic device 402;
  • the mobile electronic device 402 is configured to: receive the target position input operation fed back by the remote control device, obtain two-dimensional target position coordinates corresponding to the target position input operation on the image; and obtain the three-dimensional space detecting device a depth value aligned with the two-dimensional camera; calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, obtaining the two-dimensional target position coordinate relative to the The three-dimensional target position coordinates of the motion center of the mobile electronic device 402; controlling the motion center of the mobile electronic device 402 to move toward the three-dimensional target position coordinates.
  • FIG. 5 is a schematic diagram of an optional hardware structure of a mobile electronic device 500 according to an embodiment of the present invention.
  • the processor 501, the two-dimensional camera 502, the 3D camera 503, the inertial detection device 504, and the memory 505 may be connected by a bus between the components, and the component transmits data to the processor 501 via the bus and receives an instruction from the processor 501.
  • the 3D camera 503 and the inertial detection device 504 can be implemented in one or all of the mobile electronic devices.
  • the processor 501 is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera 502;
  • the processor 501 is further configured to obtain the 3D camera 503 and the two-dimensional camera a depth value of 502 alignment, or a depth value at which the inertial detection device 504 is aligned with the two-dimensional camera 502;
  • the processor 501 is further configured to calculate, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera 502, and a camera main point, the two-dimensional target position coordinate relative to the movement The three-dimensional target position coordinates of the motion center of the electronic device;
  • the processor 501 is further configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  • the embodiment of the present invention further provides a storage medium storing executable instructions for executing the foregoing mobile control method, for example, the mobile control method shown in any of FIGS. 1 to 2 .
  • the storage medium of the embodiment of the present invention may be a storage medium such as an optical disk, a hard disk, or a magnetic disk, and may be a non-transitory storage medium.
  • the embodiment of the present invention configures a two-dimensional camera and a three-dimensional space detecting device for the mobile electronic device, and the mobile electronic device obtains the two-dimensional target position coordinates of the target position in the image captured by the two-dimensional camera by inputting the response target position input operation, and obtains the three-dimensional space.
  • the operation controls the mobile electronic device to move to the corresponding spatial position, and does not require the user to manipulate the direction control lever of the mobile electronic device in real time, thereby solving the technical problem that the remote control of the simple robot exists in the related art, and reducing the control difficulty of the simple robot.
  • embodiments of the present invention can be provided as a method, system, Or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the invention discloses a mobile control method, a mobile electronic device, a mobile control system and a storage medium.
  • the mobile control method is applied to a mobile electronic device.
  • the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the method comprises: responding The target position input operation based on the image captured by the two-dimensional camera obtains the coordinate of the two-dimensional target position corresponding to the target position input operation on the image; obtains the depth value of the three-dimensional space detecting device aligned with the two-dimensional camera; according to the two-dimensional target position coordinate
  • the depth value, the camera focal length of the two-dimensional camera, and the camera main point are calculated, and the two-dimensional target position coordinates are calculated relative to the three-dimensional target position coordinates of the motion center of the mobile electronic device; and the motion center of the mobile electronic device is controlled to move to the three-dimensional target position coordinate.

Abstract

A mobile control method, a mobile electronic apparatus and a mobile control system. The mobile control method is applied to a mobile electronic apparatus, in which a two-dimensional camera and a three-dimensional space detecting device are installed. The method comprises: obtaining, in response to a target position input operation performed on the basis of an image taken by the two-dimensional camera, the corresponding two-dimensional target position coordinates of the target position input operation on the image (S101); obtaining the depth value from the three-dimensional space detecting device aligned with the two-dimensional camera (S102); according to the two-dimensional target position coordinates, the depth value, the camera focal length and principal point of the two-dimensional camera, calculating and obtaining the three-dimensional target position coordinates of the two-dimensional target position coordinates relative to the movement center of the mobile electronic apparatus (S103); and controlling the movement center of the mobile electronic apparatus to move toward the three-dimensional target position coordinates. The technical solution described solves the technical problem of the simple robot being difficult to remotely control in the prior art, reducing the difficulty of controlling the simple robot.

Description

移动控制方法、移动电子设备及移动控制系统、存储介质Mobile control method, mobile electronic device and mobile control system, storage medium
相关申请的交叉引用Cross-reference to related applications
本发明基于申请号为201610202182.X、申请日为2016年3月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的内容在此引入作为参考。The present invention is based on a Chinese patent application filed on Apr. 31, 2016, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本发明涉及移动控制技术,特别涉及一种移动控制方法、移动电子设备及移动控制系统、存储介质。The present invention relates to mobile control technologies, and in particular, to a mobile control method, a mobile electronic device, a mobile control system, and a storage medium.
背景技术Background technique
随着科学技术的不断发展,机器人得到了快速的发展。机器人分为简易机器人和智能机器人。With the continuous development of science and technology, robots have developed rapidly. Robots are divided into simple robots and intelligent robots.
其中,智能型机器人是最复杂的机器人,也是人类最渴望能够早日制造出来的机器朋友。然而要制造出一台智能机器人并不容易,仅仅是让机器模拟人类的行走动作,科学家们就要付出了数十甚至上百年的努力。对于简易机器人则可以通过操作者不断的调节遥控器摇杆,控制机器人运动。Among them, intelligent robots are the most complex robots, and they are also the machine friends that humans are most eager to make. However, it is not easy to create an intelligent robot. It is only for the machine to simulate the walking movement of human beings. Scientists have to pay dozens or even hundreds of years of hard work. For simple robots, the robot can be controlled by the operator constantly adjusting the remote control joystick.
由于简易机器人的运动需要操纵者的根据实际运动情况进行实时跟踪操作,摇杆的控制也需要不断的练习和探索才能精准控制,遥控难度较大。可见,相关技术中的简易机器人存在遥控难度大的技术问题。Since the movement of the simple robot requires the operator to perform real-time tracking operation according to the actual motion situation, the control of the joystick also requires constant practice and exploration to accurately control, and the remote control is difficult. It can be seen that the simple robot in the related art has a technical problem that the remote control is difficult.
发明内容Summary of the invention
本发明实施例提供一种移动控制方法、移动电子设备及移动控制系统、存储介质,用于解决相关技术中简易机器人存在的遥控难度大的技术问题。 The embodiments of the present invention provide a mobile control method, a mobile electronic device, a mobile control system, and a storage medium, which are used to solve the technical problem that the remote control is difficult in the related art.
本发明实施例提供一种移动控制方法,应用于移动电子设备,所述移动电子设备中安装有二维摄像头和三维空间检测装置,所述方法包括:The embodiment of the invention provides a mobile control method, which is applied to a mobile electronic device, wherein the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the method includes:
响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;And obtaining a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
获得所述三维空间检测装置与所述二维摄像头对齐的深度值;Obtaining a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;Calculating, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, obtaining a three-dimensional target position coordinate of the two-dimensional target position coordinate relative to a motion center of the mobile electronic device ;
控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。Controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
上述方案中,所述根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标,包括:In the above solution, the calculating, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, obtaining the motion of the two-dimensional target position coordinate relative to the mobile electronic device The center's 3D target position coordinates, including:
根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维相对位置坐标;Obtaining, according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point, obtaining a three-dimensional relative position coordinate of the two-dimensional target position coordinate with respect to the optical center of the two-dimensional camera;
将所述移动电子设备的运动中心相对所述二维摄像头光心的空间变换矩阵、与所述三维相对位置坐标相乘,获得所述三维目标位置坐标。And multiplying a motion center of the mobile electronic device with respect to a spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
上述方案中,所述根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维光心位置坐标,包括:In the above solution, the calculating, according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point, obtaining the two-dimensional target position coordinate relative to the two-dimensional camera optical center The three-dimensional optical center position coordinates, including:
通过如下公式计算获得所述三维相对位置坐标P:The three-dimensional relative position coordinate P is obtained by the following formula:
P=(z*(a-cx)/f,z*(b-cy)/f,z);P=(z*(a-cx)/f,z*(b-cy)/f,z);
其中,z表示所述深度值,(a,b)表示所述二维目标位置坐标,(cx,cy)表示所述相机主点,f表示所述相机焦距。Where z denotes the depth value, (a, b) denotes the two-dimensional target position coordinate, (cx, cy) denotes the camera main point, and f denotes the camera focal length.
上述方案中,所述获得所述三维空间检测装置与所述二维摄像头对齐 的深度值,包括:In the above solution, the obtaining the three-dimensional space detecting device is aligned with the two-dimensional camera Depth values, including:
当所述三维空间检测装置为三维摄像头时,通过所述三维摄像头检测获得所述深度值;或者When the three-dimensional space detecting device is a three-dimensional camera, the depth value is obtained by detecting the three-dimensional camera; or
当所述三维空间检测装置为惯性检测装置时,将所述三维目标位置坐标中的纵坐标作为所述移动电子设备的运动中心的高度坐标,约束求解出所述深度值。When the three-dimensional space detecting device is an inertial detecting device, the ordinate in the three-dimensional target position coordinate is used as the height coordinate of the motion center of the mobile electronic device, and the depth value is constrained.
上述方案中,在控制所述移动电子设备的运动中心向所述三维目标位置坐标运动之后,所述方法还包括:In the above solution, after controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate, the method further includes:
检测获得所述移动电子设备的运动方向上是否存在障碍物;Detecting whether there is an obstacle in the moving direction of the mobile electronic device;
若存在,在所述移动电子设备与所述障碍物之间的距离小于第一阈值距离时,将所述移动电子设备的运动方向调整为无障碍物的方向;If present, when the distance between the mobile electronic device and the obstacle is less than a first threshold distance, adjusting a moving direction of the mobile electronic device to a direction of the obstacle-free object;
沿调整后的方向运动第二阈值距离后,检测所述移动电子设备的当前位置与所述三维目标位置坐标之间是否存在障碍物;After moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate;
若所述当前位置与所述三维目标位置坐标之间不存在障碍物,牵引所述移动电子设备从所述当前位置向所述三维目标位置坐标运动。If there is no obstacle between the current position and the three-dimensional target position coordinate, the mobile electronic device is pulled to move from the current position to the three-dimensional target position coordinate.
上述方案中,所述获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标时,所述方法还包括:In the above solution, when the obtaining the target two-dimensional target position coordinates on the image, the method further includes:
重置所述移动电子设备的位置坐标,通过所述三维空间检测装置获得所述二维摄像头的相机光心的三维光心位置坐标;Resetting a position coordinate of the mobile electronic device, and obtaining, by the three-dimensional space detecting device, a three-dimensional optical center position coordinate of a camera optical center of the two-dimensional camera;
根据所述三维光心位置坐标,获得所述移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标;Obtaining, according to the three-dimensional optical center position coordinates, a three-dimensional current coordinate of a motion center of the mobile electronic device with respect to a position coordinate after resetting;
所述控制所述移动电子设备的运动中心向所述三维目标位置坐标运动,包括:The controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate comprises:
根据所述三维当前坐标和所述三维目标位置坐标牵引所述移动电子设备向所述三维目标位置坐标运动。 And dragging, by the three-dimensional current coordinate and the three-dimensional target position coordinate, the mobile electronic device to move to the three-dimensional target position coordinate.
上述方案中,所述响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标,包括:In the above solution, the response is based on a target position input operation performed by the image captured by the two-dimensional camera, and the coordinates of the two-dimensional target position corresponding to the target position input operation on the image are obtained, including:
将所述二维摄像头拍摄的图像发送至所述移动电子设备对应的遥控装置,通过所述遥控装置对所述图像进行显示;Sending an image captured by the two-dimensional camera to a remote control device corresponding to the mobile electronic device, and displaying the image by the remote control device;
接收所述遥控装置反馈的所述目标位置输入操作;Receiving the target position input operation fed back by the remote control device;
响应所述目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标。And in response to the target position input operation, obtaining a two-dimensional target position coordinate corresponding to the target position input operation on the image.
上述方案中,所述目标位置输入操作包括:对所述图像进行的触控操作,或者,用于在所述图像上标定所述目标位置的语音或文字输入操作。In the above solution, the target position input operation includes: a touch operation on the image, or a voice or text input operation for calibrating the target position on the image.
本发明实施例还提供一种移动电子设备,该移动电子设备中安装有二维摄像头和三维空间检测装置,所述移动电子设备还包括:The embodiment of the present invention further provides a mobile electronic device, wherein the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the mobile electronic device further includes:
响应单元,配置为响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;a response unit configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
获取单元,配置为获得所述三维空间检测装置与所述二维摄像头对齐的深度值;An acquiring unit configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
计算单元,配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;a calculating unit configured to calculate, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinate is obtained relative to a motion center of the mobile electronic device Three-dimensional target position coordinates;
控制单元,配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。And a control unit configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
上述方案中,所述计算单元包括:In the above solution, the calculating unit includes:
第一计算子单元,配置为根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标 相对所述二维摄像头光心的三维相对位置坐标;a first calculating subunit configured to calculate the two-dimensional target position coordinate according to the depth value, the two-dimensional target position coordinate, a camera focal length of the two-dimensional camera, and a camera principal point a three-dimensional relative position coordinate of the optical center of the two-dimensional camera;
第二计算子单元,配置为将所述移动电子设备的运动中心相对所述二维摄像头光心的空间变换矩阵与所述三维相对位置坐标相乘,获得所述三维目标位置坐标。And a second calculating subunit configured to multiply a motion transformation center of the mobile electronic device with respect to the spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
上述方案中,所述第一计算子单元配置为通过如下公式计算获得所述三维相对位置坐标P:In the above solution, the first calculating subunit is configured to obtain the three-dimensional relative position coordinate P by the following formula:
P=(z*(a-cx)/f,z*(b-cy)/f,z);P=(z*(a-cx)/f,z*(b-cy)/f,z);
其中,z表示所述深度值,(a,b)表示所述二维目标位置坐标,(cx,cy)表示所述相机主点,f表示所述相机焦距。Where z denotes the depth value, (a, b) denotes the two-dimensional target position coordinate, (cx, cy) denotes the camera main point, and f denotes the camera focal length.
上述方案中,所述获取单元配置为:In the above solution, the obtaining unit is configured to:
当所述三维空间检测装置为三维摄像头时,通过所述三维摄像头检测获得所述深度值;When the three-dimensional space detecting device is a three-dimensional camera, the depth value is obtained by detecting the three-dimensional camera;
当所述三维空间检测装置为惯性检测装置时,假设所述三维目标位置坐标中的纵坐标等于所述移动电子设备的运动中心的高度坐标,约束求解出所述深度值。When the three-dimensional space detecting device is an inertial detecting device, it is assumed that the ordinate in the three-dimensional target position coordinate is equal to the height coordinate of the motion center of the mobile electronic device, and the constraint solves the depth value.
上述方案中,所述移动电子设备还包括:In the above solution, the mobile electronic device further includes:
检测单元,配置为检测在控制所述移动电子设备的运动中心向所述三维目标位置坐标运动之后,获得所述移动电子设备的运动方向上是否存在障碍物;a detecting unit configured to detect whether an obstacle exists in a moving direction of the mobile electronic device after controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate;
调整单元,配置为在所述检测单元的检测结果为存在时,在所述移动电子设备与所述障碍物之间的距离小于第一阈值距离时,将所述移动电子设备的运动方向调整为无障碍物的方向;The adjusting unit is configured to adjust a moving direction of the mobile electronic device to be when the distance between the mobile electronic device and the obstacle is less than a first threshold distance when the detection result of the detecting unit is present The direction of obstacles;
所述检测单元还配置为:沿调整后的方向运动第二阈值距离后,检测所述移动电子设备的当前位置与所述三维目标位置坐标之间是否存在障碍物; The detecting unit is further configured to: after moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate;
牵引单元,配置为在所述检测单元的检测出所述当前位置与所述三维目标位置坐标之间不存在障碍物时,牵引所述移动电子设备从所述当前位置向所述三维目标位置坐标运动。a traction unit configured to: when the detecting unit detects that there is no obstacle between the current position and the three-dimensional target position coordinate, to pull the mobile electronic device from the current position to the three-dimensional target position coordinate motion.
上述方案中,所述移动电子设备还包括:In the above solution, the mobile electronic device further includes:
重置单元,配置为在所述获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标时,重置所述移动电子设备的位置坐标,通过所述三维空间检测装置获得所述二维摄像头的相机光心的三维光心位置坐标;a resetting unit configured to reset a position coordinate of the mobile electronic device when the corresponding two-dimensional target position coordinates on the image are input by the target position input operation, and obtain the location by the three-dimensional space detecting device The three-dimensional optical center position coordinate of the camera optical center of the two-dimensional camera;
所述获取单元还配置为:根据所述三维光心位置坐标,获得所述移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标;The acquiring unit is further configured to: obtain, according to the three-dimensional optical center position coordinates, a three-dimensional current coordinate of a motion center of the mobile electronic device with respect to a position coordinate after resetting;
所述控制单元还配置为:根据所述三维当前坐标和所述三维目标位置坐标牵引所述移动电子设备向所述三维目标位置坐标运动。The control unit is further configured to: drag the mobile electronic device to move to the three-dimensional target position coordinate according to the three-dimensional current coordinate and the three-dimensional target position coordinate.
本发明实施例还提供一种移动控制系统,包括:遥控装置和移动电子设备,所述移动电子设备上配置有二维摄像头和三维空间检测装置;The embodiment of the invention further provides a mobile control system, comprising: a remote control device and a mobile electronic device, wherein the mobile electronic device is configured with a two-dimensional camera and a three-dimensional space detecting device;
其中,所述遥控装置配置为:接收所述二维摄像头拍摄的所述移动电子设备所处环境的图像并显示,获得在所述图像上进行的目标位置输入操作,并将所述目标位置输入操作反馈给所述移动电子设备;The remote control device is configured to: receive an image of an environment in which the mobile electronic device is captured by the two-dimensional camera and display, obtain a target position input operation performed on the image, and input the target position Operation feedback to the mobile electronic device;
所述移动电子设备配置为:接收所述遥控装置反馈的所述目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;获得所述三维空间检测装置与所述二维摄像头对齐的深度值;根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。The mobile electronic device is configured to: receive the target position input operation fed back by the remote control device, obtain a corresponding two-dimensional target position coordinate of the target position input operation on the image; obtain the three-dimensional space detecting device and a depth value of the two-dimensional camera alignment; calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, obtaining the two-dimensional target position coordinate relative to the movement a three-dimensional target position coordinate of a motion center of the electronic device; controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
本发明实施例还提供一种移动电子设备,包括:The embodiment of the invention further provides a mobile electronic device, including:
二维摄像头、三维空间检测装置和处理器; a two-dimensional camera, a three-dimensional space detecting device and a processor;
所述处理器,配置为响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;The processor is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
所述处理器,还配置为获得所述三维空间检测装置与所述二维摄像头对齐的深度值;The processor is further configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
所述处理器,还配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;The processor is further configured to calculate, according to the two-dimensional target position coordinates, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinates are obtained relative to the mobile electronic device The three-dimensional target position coordinates of the motion center;
所述处理器,还配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。The processor is further configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
本发明实施例还提供一种存储介质,所述存储介质中存储有可执行指令,所述可执行指令用于执行本发明实施例提供的移动控制方法。The embodiment of the present invention further provides a storage medium, where the executable medium is stored with an executable instruction, and the executable instruction is used to execute the mobile control method provided by the embodiment of the present invention.
本发明实施例中的上述一个或多个技术方案,至少具有如下技术效果:The above one or more technical solutions in the embodiments of the present invention have at least the following technical effects:
本发明实施例为移动电子设备配置二维摄像头和三维空间检测装置,移动电子设备通过将响应目标位置输入操作获得目标位置在二维摄像头拍摄的图像中的二维目标位置坐标,并获得三维空间检测装置与二维摄像头对齐的深度值,以根据二维目标位置坐标、深度值、二维摄像头的相机焦距和相机主点,计算获得二维目标位置坐标相对移动电子设备的运动中心的三维目标位置坐标,从而控制移动电子设备的运动中心向三维目标位置坐标运动,实现了将移动电子设备上的图像中二维坐标到实际环境的三维坐标转换,使得用户可以通过在图像上进行目标位置输入操作来控制移动电子设备移动到对应的空间位置,不需要用户在实时操控移动电子设备的方向操纵杆,解决了相关技术中简易机器人存在的遥控难度大的技术问题,降低简易机器人的控制难度。 The embodiment of the present invention configures a two-dimensional camera and a three-dimensional space detecting device for the mobile electronic device, and the mobile electronic device obtains the two-dimensional target position coordinates of the target position in the image captured by the two-dimensional camera by inputting the response target position input operation, and obtains the three-dimensional space. Detecting a depth value of the device aligned with the two-dimensional camera to calculate a two-dimensional target position coordinate relative to a three-dimensional target of the motion center of the mobile electronic device according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point Position coordinates, thereby controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate, realizing the three-dimensional coordinate conversion of the two-dimensional coordinates in the image on the mobile electronic device to the actual environment, so that the user can perform the target position input on the image The operation controls the mobile electronic device to move to the corresponding spatial position, and does not require the user to manipulate the direction control lever of the mobile electronic device in real time, thereby solving the technical problem that the remote control of the simple robot exists in the related art, and reducing the control difficulty of the simple robot.
附图说明DRAWINGS
图1为本发明实施例提供的一种移动控制方法的流程示意图;1 is a schematic flowchart of a mobile control method according to an embodiment of the present invention;
图2为本发明实施例提供的一种移动电子设备避让障碍物的流程示意图;2 is a schematic flowchart of a mobile electronic device avoiding an obstacle according to an embodiment of the present invention;
图3为本发明实施例提供的一种移动电子设备的示意图;3 is a schematic diagram of a mobile electronic device according to an embodiment of the present invention;
图4为本发明实施例提供的一种移动控制系统的示意图;4 is a schematic diagram of a mobile control system according to an embodiment of the present invention;
图5为本发明实施例提供的一种移动电子设备的硬件结构示意图。FIG. 5 is a schematic structural diagram of hardware of a mobile electronic device according to an embodiment of the present invention.
具体实施方式detailed description
在本发明实施例提供的技术方案中,通过为用户提供一种将图像上的二维目标位置坐标转换为三维目标位置坐标的功能,使得用户在对移动电子设备进行移动控制时,可以通过对移动电子设备拍摄的图像进行目标位置输入操作,来指示移动电子设备移动到对应的空间位置,不再需要用户根据移动电子设备的实际运动情况进行实时跟踪操作,以解决相关技术中简易机器人存在的遥控难度大的技术问题,降低简易机器人的控制难度。下面结合附图对本发明实施例技术方案的主要实现原理、具体实施方式及其对应能够达到的有益效果进行详细的阐述。In the technical solution provided by the embodiment of the present invention, the user is provided with a function of converting the coordinates of the two-dimensional target position on the image into the coordinates of the three-dimensional target position, so that the user can perform the mobile control on the mobile electronic device. The image captured by the mobile electronic device performs a target position input operation to instruct the mobile electronic device to move to a corresponding spatial position, and the user does not need to perform real-time tracking operation according to the actual motion condition of the mobile electronic device, so as to solve the existence of the simple robot in the related art. The technical problem of remote control is difficult, and the control difficulty of the simple robot is reduced. The main implementation principles, specific implementation manners, and the corresponding beneficial effects that can be achieved by the technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
请参考图1,本发明实施例提供一种移动控制方法,应用于移动电子设备,该移动电子设备中安装有二维摄像头和三维空间检测装置,该方法包括:Referring to FIG. 1 , an embodiment of the present invention provides a mobile control method, which is applied to a mobile electronic device, where a two-dimensional camera and a three-dimensional space detecting device are installed, and the method includes:
S101:响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;S101: Obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation performed based on an image captured by the two-dimensional camera;
S102:获得所述三维空间检测装置与所述二维摄像头对齐的深度值;S102: Obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
S103:根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子 设备的运动中心的三维目标位置坐标;S103: Calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera main point, obtaining the two-dimensional target position coordinate relative to the mobile electronic The three-dimensional target position coordinates of the motion center of the device;
S104:控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。S104: Control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
本发明实施例提供的移动电子设备可以为移动机器人,可以与一遥控设备进行通信。该遥控设备可以是与移动机器人匹配的专用遥控器,也可以是能够与移动机器人进行通信的普通电子设备,如智能手机、平板电脑(PAD)、智能手表等。The mobile electronic device provided by the embodiment of the present invention may be a mobile robot and can communicate with a remote control device. The remote control device may be a dedicated remote controller that matches the mobile robot, or a common electronic device that can communicate with the mobile robot, such as a smart phone, a tablet (PAD), a smart watch, and the like.
移动电子设备上安装有二维摄像头和三维空间检测装置,其中,二维摄像头可以是色彩模式RGB摄像头,三维空间检测装置可以是3D摄像头也可以是惯性检测装置(Inertial measurement unit,IMU)。惯性检测装置IMU是测量物体三轴姿态角(或角速率)以及加速度的装置,大多用在需要进行运动控制的设备,如汽车和机器人上。The mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device. The two-dimensional camera may be a color mode RGB camera, and the three-dimensional space detecting device may be a 3D camera or an inertial detection unit (IMU). The inertial detection device IMU is a device for measuring the three-axis attitude angle (or angular velocity) and acceleration of an object, and is mostly used in devices that require motion control, such as automobiles and robots.
移动电子设备通过其二维摄像头拍摄自身所处环境的图像(又称移动电子设备的视野图像),该图像可以为实时图像即视频流中的帧图像,将该图像通过图传信号发送至遥控装置,或者显示在移动电子设备的显示器上与用户共享。The mobile electronic device captures an image of the environment in which it is located (also referred to as a view image of the mobile electronic device) through its two-dimensional camera, and the image may be a real-time image, that is, a frame image in the video stream, and the image is transmitted to the remote control through the image transmission signal. The device, or display, is shared with the user on the display of the mobile electronic device.
当移动电子设备将二维摄像头拍摄的图像发送至移动电子设备对应的遥控装置,并通过遥控装置对图像进行显示时,用户可以在遥控装置上对该图像进行目标位置输入操作,遥控装置在检测获得对该图像的目标位置输入操作时,将该目标位置输入操作反馈给移动电子设备,移动电子设备接收遥控装置反馈的目标位置输入操作并响应,获得目标位置输入操作在图像上对应的二维目标位置坐标。When the mobile electronic device transmits the image captured by the two-dimensional camera to the remote control device corresponding to the mobile electronic device and displays the image through the remote control device, the user can perform a target position input operation on the image on the remote control device, and the remote control device detects When the target position input operation of the image is obtained, the target position input operation is fed back to the mobile electronic device, and the mobile electronic device receives the target position input operation fed back by the remote control device and responds to obtain the corresponding two-dimensional corresponding position input operation on the image. Target position coordinates.
例如:假设移动电子设备为一电动平衡车,遥控装置为智能手机,电动平衡车通过二维摄像头拍了一种自身当前所处位置正前方的照片并传送至了用户手机,用户通过手机查看该图像后,点击该图像上的“电梯口” 进行目标位置输入操作,手机将该操作反馈给电动平衡车,电动平衡车接收手机反馈后响应该目标位置输入操作,获得图像中“电梯口”的二维目标位置坐标,从而将“电梯口”的二维目标位置坐标转换为“电梯口”实际所处的三维目标位置坐标,进而向“电梯口”运行。当然,移动电子设备上配备的触控显示器也可以实现与遥控器相同的功能,用户可以直接在移动电子设备上进行目标位置输入操作,指示移动电子设备自动向目标为运动,无需用户自己控制操纵杆。For example, if the mobile electronic device is an electric balance car and the remote control device is a smart phone, the electric balance car takes a photo directly in front of its current location through the two-dimensional camera and transmits it to the user's mobile phone, and the user views the mobile phone through the mobile phone. After the image, click on the "elevator port" on the image. Performing the target position input operation, the mobile phone feeds back the operation to the electric balance car, and the electric balance car receives the feedback of the mobile phone and responds to the target position input operation to obtain the two-dimensional target position coordinates of the “elevator port” in the image, thereby “elevator port” The two-dimensional target position coordinates are converted into the coordinates of the three-dimensional target position where the "elevator port" is actually located, and then run to the "elevator port". Of course, the touch display provided on the mobile electronic device can also achieve the same function as the remote control, and the user can perform the target position input operation directly on the mobile electronic device, instructing the mobile electronic device to automatically move to the target without the user's own control. Rod.
当用户对二维摄像头拍摄的图像进行目标位置输入操作后,移动电子设备执行S101响应该目标位置输入操作,获得目标位置输入操作在该图像上对应的二维目标位置坐标。例如,用户进行目标位置输入操作时,可以通过如下三种方式获得目标位置输入操作对应的二维目标位置坐标:After the user performs a target position input operation on the image captured by the two-dimensional camera, the mobile electronic device performs S101 to respond to the target position input operation, and obtains a corresponding two-dimensional target position coordinate of the target position input operation on the image. For example, when the user performs the target position input operation, the two-dimensional target position coordinates corresponding to the target position input operation can be obtained by the following three methods:
方式一、当用户通过对触控显示屏显示的上述图像中的目标位置进行触控操作时,移动电子设备响应该目标位置输入操作获得用户在触控显示屏上的二维触控位置坐标,进而根据该图像与触控显示屏之间的相对位置关系和获得的二维触控位置坐标,获得目标位置输入操作在该图像上对应的二维目标位置坐标。举例来说:假设移动电子设备中二维摄像头拍摄的图像在触控显示屏中显示时,触控显示屏的中心点与图像的中心点之间的偏移向量为(c,d),若检测获得的二维触控位置坐标为(e,f),那么获得二维目标位置坐标为(a,b):a=e+c,b=d+f。In the first step, when the user performs a touch operation on the target position in the image displayed on the touch display screen, the mobile electronic device obtains the coordinates of the two-dimensional touch position of the user on the touch display screen in response to the target position input operation. Then, according to the relative positional relationship between the image and the touch display screen and the obtained two-dimensional touch position coordinates, the two-dimensional target position coordinates corresponding to the target position input operation on the image are obtained. For example, if the image captured by the two-dimensional camera in the mobile electronic device is displayed in the touch display screen, the offset vector between the center point of the touch display screen and the center point of the image is (c, d), if The coordinates of the two-dimensional touch position obtained by the detection are (e, f), and then the coordinates of the two-dimensional target position are obtained as (a, b): a=e+c, b=d+f.
方式二、当用户通过对二维摄像头拍摄的图像中的目标位置进行语音输入操作时,移动电子设备响应该语音输入操作获得户输入的语音数据,并将该语音数据转换为移动电子设备可识别的字符数据,进而通过图像识别从二维摄像头拍摄的图像中查找到与该字符数据匹配的目标位置,并获得该目标位置在图像中的二维目标位置坐标。举例来说:假设用户语音输入“花盆”,那么移动电子设备将语音数据“花盆”转换为字符“花盆”, 并通过图像识别查找的图像中的“花盆”及其在图像中的二维目标位置坐标(a,b)。In the second mode, when the user performs a voice input operation on the target position in the image captured by the two-dimensional camera, the mobile electronic device obtains the voice data input by the user in response to the voice input operation, and converts the voice data into a mobile electronic device that can be recognized. The character data is further searched for the target position matching the character data from the image captured by the two-dimensional camera by image recognition, and the two-dimensional target position coordinates of the target position in the image are obtained. For example: suppose the user voice inputs "pot", then the mobile electronic device converts the voice data "pot" into the character "pot". And through the image recognition, the "flower pot" in the image and its two-dimensional target position coordinates (a, b) in the image.
方式三、当用户通过对二维摄像头拍摄的图像中的目标位置进行文字输入操作时,移动电子设备响应该文字输入操作获得文字数据,并通过图像识别从二维摄像头拍摄的图像中查找到与该文字数据匹配的目标位置,并获得该目标位置在图像中的二维目标位置坐标。举例来说:假设用户文字输入目标位置为“花盆”,那么通过图像识别查找的图像中的“花盆”并获得“花盆”在图像中的二维目标位置坐标(a,b)。In the third mode, when the user performs a text input operation on the target position in the image captured by the two-dimensional camera, the mobile electronic device obtains the text data in response to the text input operation, and finds and images from the image captured by the two-dimensional camera through image recognition. The text data matches the target position and obtains the coordinates of the two-dimensional target position of the target position in the image. For example: suppose the user text input target position is "flower pot", then the "flower pot" in the image searched by the image recognition and obtain the two-dimensional target position coordinates (a, b) of the "flower pot" in the image.
为了使移动电子设备对目标位置的定位更为准确,同时使移动电子设备的运动更为准确,本发明实施例在获得目标位置的二维目标位置坐标时,重置移动电子设备的位置坐标如重置为(0,0,0),并通过移动电子设备的三维空间检测装置获得移动电子设备的二维摄像头的相机光心的三维光心位置坐标(x1,y1,z1)。然后,根据二维摄像头的相机光心的三维光心位置坐标,获得移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标(x,y,z)。举例来说:根据二维摄像头的相机光心相对移动电子设备运动中心的位置关系T(考虑移动电子设备各个关节的伺服位置),得到移动电子设备运动中心相对于重置后的位置坐标的三维当前坐标(x,y,z)=(x1,y1,z1)*T。In order to make the positioning of the mobile electronic device more accurate and the movement of the mobile electronic device more accurate, the embodiment of the present invention resets the position coordinates of the mobile electronic device when obtaining the two-dimensional target position coordinates of the target position. The reset is (0, 0, 0), and the three-dimensional optical center position coordinates (x1, y1, z1) of the camera optical center of the two-dimensional camera of the mobile electronic device are obtained by the three-dimensional space detecting device of the mobile electronic device. Then, according to the three-dimensional optical center position coordinates of the camera optical center of the two-dimensional camera, the three-dimensional current coordinates (x, y, z) of the motion center of the mobile electronic device with respect to the position coordinates after the reset are obtained. For example, according to the positional relationship T of the camera optical center of the two-dimensional camera relative to the movement center of the mobile electronic device (considering the servo position of each joint of the mobile electronic device), the three-dimensional position of the mobile electronic device motion center relative to the reset position coordinate is obtained. The current coordinates (x, y, z) = (x1, y1, z1) * T.
在S101之后,执行S102获得移动电子设备的三维空间检测装置与二维摄像头对齐的深度值z。当三维空间检测装置为三维摄像头时即3D摄像头,可以直接通过3D摄像头检测获得该深度值z=Depth(a,b)。当三维空间检测装置为惯性检测装置时,假设三维目标位置坐标中的纵坐标等于移动电子设备的运动中心的高度坐标,由于移动电子设备的高度坐标在其出厂时即为已知数h,而三维目标位置坐标的纵坐标yt=F(z),F(z)为包含深度值z的函数,为此可将h=F(z)作为约束条件求解出深度值z,即通过约束求解 获得深度值z。After S101, S102 is performed to obtain a depth value z in which the three-dimensional space detecting device of the mobile electronic device is aligned with the two-dimensional camera. When the three-dimensional space detecting device is a three-dimensional camera, that is, a 3D camera, the depth value z=Depth(a, b) can be obtained directly by the 3D camera. When the three-dimensional space detecting device is an inertial detecting device, it is assumed that the ordinate in the three-dimensional target position coordinate is equal to the height coordinate of the moving center of the mobile electronic device, since the height coordinate of the mobile electronic device is a known number h when it leaves the factory, The ordinate of the three-dimensional target position coordinates y t =F(z), F(z) is a function containing the depth value z. For this purpose, h=F(z) can be used as a constraint to solve the depth value z, ie, solved by the constraint Get the depth value z.
获得三维空间检测装置与二维摄像头对齐的深度值z之后,继续执行S103根据二维目标位置坐标、深度值、二维摄像头的相机焦距和相机主点,计算获得二维目标位置坐标相对移动电子设备的运动中心的三维目标位置坐标。移动电子设备的运动中心可以是移动电子设备的底盘运动中心。举例来说,可以先根据深度值、二维目标位置坐标、二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维相对位置坐标;然后,将移动电子设备的运动中心相对二维摄像头光心的空间变换矩阵与三维光心位置坐标相乘即可获得三维目标位置坐标。After obtaining the depth value z aligned by the three-dimensional space detecting device and the two-dimensional camera, proceed to perform S103 to calculate the two-dimensional target position coordinate relative moving electron according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point. The 3D target position coordinates of the motion center of the device. The center of motion of the mobile electronic device can be the chassis motion center of the mobile electronic device. For example, the three-dimensional relative position coordinates of the two-dimensional target position coordinates relative to the optical center of the two-dimensional camera may be calculated according to the depth value, the two-dimensional target position coordinates, the camera focal length of the two-dimensional camera, and the camera main point; Then, the three-dimensional target position coordinates are obtained by multiplying the motion center of the mobile electronic device with the spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional optical center position coordinates.
其中,移动电子设备的二维目标位置坐标相对二维摄像头光心的三维相对位置坐标P,可以通过如下公式(一)计算获得:Wherein, the two-dimensional target position coordinate of the mobile electronic device is calculated relative to the three-dimensional relative position coordinate P of the two-dimensional camera optical center by the following formula (1):
P=(z*(a-cx)/f,z*(b-cy)/f,z);公式(一)P=(z*(a-cx)/f,z*(b-cy)/f,z);formula (a)
其中,z表示三维空间检测装置与二维摄像头对齐的深度值,(a,b)表示二维目标位置坐标,(cx,cy)表示二维摄像头的相机主点,f表示二维摄像头的相机焦距。若移动电子设备的运动中心相对二维摄像头光心的空间变换矩阵为T,那么三维目标位置坐标(xt,yt,zt)=T*P。Where z is the depth value at which the three-dimensional space detecting device is aligned with the two-dimensional camera, (a, b) represents the two-dimensional target position coordinates, (cx, cy) represents the camera main point of the two-dimensional camera, and f represents the camera of the two-dimensional camera. focal length. If the spatial transformation matrix of the motion center of the mobile electronic device relative to the optical center of the two-dimensional camera is T, then the three-dimensional target position coordinates (x t , y t , z t )=T*P.
在获得三维目标位置坐标后,执行S104控制移动电子设备的运动中心向三维目标位置坐标运动。在运动之前,通常会重置移动电子设备的位置坐标获得移动电子设备运动中心的三维当前坐标,在运动时,根据移动电子设备运动中心的三维当前坐标(x,y,z)和目标位置的三维目标位置坐标(xt,yt,zt)牵引移动电子设备向三维目标位置坐标(xt,yt,zt)运动。另外,移动电子设备在运动时,可以通过闭环自动控制技术即PID控制移动电子设备的底盘向三维目标位置坐标运行。After obtaining the three-dimensional target position coordinates, S104 is executed to control the motion center of the mobile electronic device to move to the three-dimensional target position coordinate. Before the motion, the position coordinates of the mobile electronic device are usually reset to obtain the three-dimensional current coordinates of the mobile electronic device motion center. When moving, according to the three-dimensional current coordinates (x, y, z) of the mobile electronic device motion center and the target position The three-dimensional target position coordinates (x t , y t , z t ) pull the mobile electronic device to move to the three-dimensional target position coordinates (x t , y t , z t ). In addition, when the mobile electronic device is in motion, the chassis of the mobile electronic device can be controlled to operate at a three-dimensional target position coordinate by a closed loop automatic control technology, that is, PID.
移动电子设备在运动的过程中,还可以执行如下步骤,如图2所示:During the movement of the mobile electronic device, the following steps can also be performed, as shown in FIG. 2:
S201:检测获得移动电子设备的运动方向上是否存在障碍物。如通过 红外线扫描判断前方是否有障碍物,又或者通过摄像头拍摄运动方向的图像,通过图像识别判断前方是否有障碍物。若移动电子设备的运动方向上不存在障碍物,继续执行S202;反之,若移动电子设备的运动方向上存在障碍物,跳转执行S203。S201: Detect whether there is an obstacle in the moving direction of the mobile electronic device. As passed The infrared scan determines whether there is an obstacle in front, or captures an image of the moving direction through the camera, and determines whether there is an obstacle in front by image recognition. If there is no obstacle in the moving direction of the mobile electronic device, the process proceeds to S202; otherwise, if there is an obstacle in the moving direction of the mobile electronic device, the process proceeds to S203.
S202:继续沿着当前运动方向运动,直到到达三维目标位置坐标处或者与三维目标位置坐标之间距离小于设定距离,此次移动行程结束,并向用户发送目标位置已到达的通知消息。其中,设定距离可以由用户根据自己的实际需求进行设定,也可以采用系统默认值,如50厘米(cm)。S202: Continue to move along the current motion direction until reaching a three-dimensional target position coordinate or a distance from the three-dimensional target position coordinate is less than a set distance, the mobile travel end ends, and a notification message that the target position has arrived is sent to the user. The set distance can be set by the user according to his actual needs, or the system default value, such as 50 cm (cm).
S203:在移动电子设备与障碍物之间的距离小于第一阈值距离时,将移动电子设备的运动方向调整为无障碍物的方向,沿调整后的方向继续运动。其中,第一阈值距离可以根据移动电子设备的自身尺寸进行设备,至少保证在第一阈值距离范围内移动电子设备能够掉头或者转向,例如,若移动电子设备的尺寸为50cm*60cm,第一阈值距离可以为大于等于60cm、100cm、150cm等。S203: When the distance between the mobile electronic device and the obstacle is less than the first threshold distance, adjust the moving direction of the mobile electronic device to the direction of the obstacle, and continue to move in the adjusted direction. The first threshold distance may be performed according to the size of the mobile electronic device, and at least ensure that the mobile electronic device can turn or turn within a first threshold distance. For example, if the size of the mobile electronic device is 50 cm*60 cm, the first threshold The distance may be 60 cm, 100 cm, 150 cm or the like.
在一个实施例中,考虑到移动电子设备运行时具有一定的速度,不能够瞬间定下来,需要一定的刹车距离,所以第一阈值范围的取值可以根据移动电子设备的尺寸和刹车距离来确定,例如:假设移动电子设备长度为60cm,刹车距离为40~100cm,那么第一阈值距离可以设置为160cm。In one embodiment, considering that the mobile electronic device has a certain speed during operation, it cannot be determined instantaneously, and a certain braking distance is required, so the value of the first threshold range may be determined according to the size of the mobile electronic device and the braking distance. For example, assuming that the mobile electronic device has a length of 60 cm and a braking distance of 40 to 100 cm, the first threshold distance can be set to 160 cm.
S204:沿调整后的方向运动第二阈值距离后,检测移动电子设备的当前位置与三维目标位置坐标之间是否存在障碍物。若当前位置与三维目标位置坐标之间不存在障碍物,跳转执行S202。反之,若当前位置与三维目标位置坐标之间依然存在障碍物,跳转执行S203~S204,直到到达三维目标位置坐标处或者与三维目标位置坐标之间距离小于设定距离处,此次移动行程结束,并向用户发送目标位置已到达的通知消息。S204: After moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate. If there is no obstacle between the current position and the three-dimensional target position coordinate, the jump proceeds to S202. Conversely, if there is still an obstacle between the current position and the coordinates of the three-dimensional target position, the jump is performed S203-S204 until the distance to the three-dimensional target position coordinate or the distance between the three-dimensional target position coordinates is less than the set distance, the movement stroke End and send the user a notification message that the target location has arrived.
下面通过两个具体实例,对本发明实施例提供的移动控制方法的完整 实施过程进行详细说明。The following is a complete example of the mobile control method provided by the embodiment of the present invention through two specific examples. The implementation process is described in detail.
实例1Example 1
假设移动电子设备为电动平衡车,电动平衡车上配置有触控显示屏、红绿蓝(RGB,Red Green Blue)摄像头及3D摄像头。其中,3D摄像头的视角与RGB摄像头视角相近且基本重合。移动控制过程如下:Assume that the mobile electronic device is an electric balance car, and the electric balance car is equipped with a touch display screen, a red green blue (RGB, Red Green Blue) camera and a 3D camera. Among them, the viewing angle of the 3D camera is similar to that of the RGB camera and substantially coincides. The mobile control process is as follows:
步骤1、电动平衡车上的触控显示屏上显示有RGB摄像头拍摄的视野图像。Step 1. The touch screen displayed on the electric balance car displays the field of view image captured by the RGB camera.
步骤2、用户在电动平衡车的视野图像中点击一个感兴趣的目标点,电动平衡车得到该点在图像坐标系中RGB坐标(a,b),开始一轮移动控制过程。Step 2: The user clicks on a target point of interest in the field of view image of the electric balance vehicle, and the electric balance vehicle obtains the RGB coordinates (a, b) of the point in the image coordinate system to start a round of movement control process.
步骤3、重置电动平衡车当前的位置坐标为(0,0,0),打开基于3D摄像头的视觉里程计算法,计算得到RGB摄像头相机光心的三维光心位置坐标,并根据RGB摄像头相机光心相对平衡车底盘运动中心的位置关系(考虑机器人各个关节的伺服位置),得到底盘运动中心相对于重置后的位置坐标的三维当前坐标(x,y,z)。Step 3: Reset the current position coordinate of the electric balance car to (0, 0, 0), open the visual mileage calculation method based on the 3D camera, calculate the three-dimensional optical center position coordinates of the RGB camera camera optical center, and according to the RGB camera camera The optical center is relatively balanced with the positional relationship of the motion center of the chassis (considering the servo position of each joint of the robot), and the three-dimensional current coordinates (x, y, z) of the chassis motion center with respect to the position coordinates after the reset are obtained.
步骤4、电动平衡车从(a,b)计算出目标点相对于底盘运动中心的位置(xt,yt,zt),具体方法如下:Step 4: The electric balance vehicle calculates the position (x t , y t , z t ) of the target point from the center of the chassis motion from (a, b), as follows:
通过3D摄像头,可知与RGB摄像头对齐的深度值z=Depth(a,b),RGB摄像头的相机焦距为f,RGB摄像头的相机主点为(cx,cy)。则目标点相对于RGB摄像头光心的3D位置及三维相对位置坐标为p=(z*(a-cx)/f,z*(b-cy)/f,z)。已知机器人底盘运动中心相对RGB摄像头光心的空间变换矩阵为T(考虑机器人各个关节的伺服位置),则(xt,yt,zt)=T*p。Through the 3D camera, the depth value z=Depth(a,b) aligned with the RGB camera, the camera focal length of the RGB camera is f, and the camera main point of the RGB camera is (cx, cy). Then, the 3D position and the three-dimensional relative position coordinate of the target point with respect to the RGB camera optical center are p=(z*(a-cx)/f, z*(b-cy)/f, z). It is known that the spatial transformation matrix of the motion center of the robot chassis relative to the optical center of the RGB camera is T (considering the servo position of each joint of the robot), then (x t , y t , z t )=T*p.
步骤5、根据电动平衡车当前坐标(x,y,z)和目标点坐标(xt,yt,zt),用比例-积分-微分(PID,Proportional Integral Differential)控制器牵引机器人底盘向目标点运动。Step 5. According to the current coordinate (x, y, z) of the electric balance car and the target point coordinates (x t , y t , z t ), the chassis of the robot is pulled by a proportional-integral-derivative (PID) controller. Target point movement.
步骤6、(可选)在运动过程中,如果电动平衡车上避障传感器(3D摄 像头、超声波传感器等),发现运动方向出现障碍物,则电动平衡车启动避障逻辑,刹车并尝试向没有障碍物的方向调整运动方向,直到牵引向目标点的方向上没有障碍物。Step 6. (Optional) If the obstacle-reducing sensor is on the electric balance car during the movement (3D photo Like the head, ultrasonic sensor, etc., if an obstacle appears in the direction of motion, the electric balance car starts the obstacle avoidance logic, brakes and tries to adjust the direction of motion to the direction without the obstacle until there is no obstacle in the direction of the traction to the target point.
步骤7、不断重复步骤5、6,直到机器人当前坐标与目标点的三维目标位置坐标之间的距离差值小于设定阈值,则此移动控制完成,电动平衡车停车,并通知用户。Step 7. Repeat steps 5 and 6 until the distance difference between the current coordinates of the robot and the three-dimensional target position coordinates of the target point is less than the set threshold. Then the movement control is completed, the electric balance vehicle stops, and the user is notified.
步骤8、在电动平衡车的触控显示界面给予用户反馈,提示到达目标位置,并允许用户重新点击目标点开始新的一轮移动控制。当然,在步骤5、6控制过程中,用户亦可随时点击新的目标点位置调整目标位置。Step 8. Give feedback to the user on the touch display interface of the electric balance vehicle, prompting to reach the target position, and allowing the user to click the target point again to start a new round of movement control. Of course, in the control process of steps 5 and 6, the user can also click the new target point position to adjust the target position at any time.
实例2Example 2
假设移动电子设备为机器人,机器人上配置有RGB摄像头及IMU。其中,机器人可与一遥控器进行通信并受遥控器的控制,该遥控器为触屏手机或者一带触屏的定制遥控器。移动控制过程如下:Assuming that the mobile electronic device is a robot, the robot is equipped with an RGB camera and an IMU. The robot can communicate with a remote controller and is controlled by a remote controller, which is a touch screen mobile phone or a customized remote controller with a touch screen. The mobile control process is as follows:
步骤1、机器人通过RGB摄像头拍摄自身的视野图像,并通过无线传输,发送到遥控器端显示。Step 1. The robot captures its own field of view image through the RGB camera and transmits it to the remote controller for display by wireless transmission.
步骤2、用户在机器人的视野图像中点击一个感兴趣的目标点,机器人得到该点在图像坐标系中RGB坐标(a,b),开始一轮移动控制过程。Step 2: The user clicks on a target point of interest in the field of view image of the robot, and the robot obtains the RGB coordinates (a, b) of the point in the image coordinate system to start a round of movement control process.
步骤3、重置机器人当前的位置坐标为(0,0,0),打开基于RGB摄像头+IMU的视觉里程计算法,计算得到RGB摄像头相机光心的三维光心位置坐标,并根据RGB摄像头相机光心相对平衡车底盘运动中心的位置关系(考虑机器人各个关节的伺服位置),得到底盘运动中心相对于重置后的位置坐标的三维当前坐标(x,y,z)。Step 3: Reset the current position coordinate of the robot to (0, 0, 0), open the visual mileage calculation method based on RGB camera + IMU, calculate the three-dimensional optical center position coordinates of the optical center of the RGB camera camera, and according to the RGB camera camera The optical center is relatively balanced with the positional relationship of the motion center of the chassis (considering the servo position of each joint of the robot), and the three-dimensional current coordinates (x, y, z) of the chassis motion center with respect to the position coordinates after the reset are obtained.
步骤4、机器人从(a,b)计算出目标点相对于底盘运动中心的位置(xt,yt,zt),具体方法如下:Step 4: The robot calculates the position (x t , y t , z t ) of the target point from the center of the chassis motion from (a, b), as follows:
IMU与RGB摄像头对齐的深度值Depth(a,b)未知,记为z;RGB摄像 头的相机焦距为f,RGB摄像头的相机主点为(cx,cy)。则目标点相对于RGB摄像头光心的3D位置及三维相对位置坐标为p=(z*(a-cx)/f,z*(b-cy)/f,z)。已知机器人底盘运动中心相对RGB摄像头光心的空间变换矩阵为T(考虑机器人各个关节的伺服位置),则(xt,yt,zt)=T*p。假设用户点击的点位于地面,则可认为yt=底盘运动中心高度坐标h,由此约束求解出未知的z,进而得到(xt,yt,zt)。The depth value Depth(a,b) of the IMU aligned with the RGB camera is unknown, denoted as z; the camera focal length of the RGB camera is f, and the camera main point of the RGB camera is (cx, cy). Then, the 3D position and the three-dimensional relative position coordinate of the target point with respect to the RGB camera optical center are p=(z*(a-cx)/f, z*(b-cy)/f, z). It is known that the spatial transformation matrix of the motion center of the robot chassis relative to the optical center of the RGB camera is T (considering the servo position of each joint of the robot), then (x t , y t , z t )=T*p. Assuming that the point clicked by the user is on the ground, y t = chassis motion center height coordinate h can be considered, whereby the constraint solves the unknown z, and thus (x t , y t , z t ).
步骤5、根据机器人当前坐标(x,y,z)和目标点坐标(xt,yt,zt),用PID控制器牵引机器人底盘向目标点运动。Step 5. According to the current coordinates (x, y, z) of the robot and the coordinates of the target point (x t , y t , z t ), the PID controller is used to pull the chassis of the robot to the target point.
步骤6、(可选)在运动过程中,如果机器人上避障传感器(IMU、超声波传感器等),发现运动方向出现障碍物,则机器人启动避障逻辑,刹车并尝试向没有障碍物的方向调整运动方向,直到牵引向目标点的方向上没有障碍物。Step 6. (Optional) During the movement, if the robot has obstacle avoidance sensors (IMU, ultrasonic sensors, etc.) and finds obstacles in the direction of motion, the robot starts the obstacle avoidance logic, brakes and tries to adjust to the direction without obstacles. The direction of motion until there is no obstacle in the direction of the traction toward the target point.
步骤7、不断重复步骤5、6,直到机器人当前坐标与目标点的三维目标位置坐标之间的距离差值小于设定阈值,则此移动控制完成,机器人停车,并通知遥控器。Step 7. Repeat steps 5 and 6 until the distance difference between the current coordinates of the robot and the three-dimensional target position coordinates of the target point is less than the set threshold. Then the movement control is completed, the robot stops, and the remote controller is notified.
步骤8、在遥控器的触控显示界面给予用户反馈,提示到达目标位置,并允许用户重新点击目标点开始新的一轮移动控制。当然,在步骤5、6控制过程中,用户亦可随时点击新的目标点位置调整目标位置。Step 8. Give feedback to the user on the touch display interface of the remote controller, prompting to reach the target position, and allowing the user to click the target point again to start a new round of movement control. Of course, in the control process of steps 5 and 6, the user can also click the new target point position to adjust the target position at any time.
通过上述实施例实现了将移动电子设备上的图像中二维坐标到实际环境的三维坐标转换,使得用户可以通过在图像上进行目标位置输入操作来控制移动电子设备移动到对应的空间位置,不需要用户在实时操控移动电子设备的方向操纵杆,解决了相关技术中简易机器人存在的遥控难度大的技术问题,降低简易机器人的控制难度。The three-dimensional coordinates of the two-dimensional coordinates in the image on the mobile electronic device to the actual environment are converted by the above embodiment, so that the user can control the mobile electronic device to move to the corresponding spatial position by performing a target position input operation on the image, The user needs to manipulate the direction joystick of the mobile electronic device in real time, and solves the technical problem of the remote control difficulty of the simple robot in the related art, and reduces the control difficulty of the simple robot.
请参考图3,本发明实施例针对前述提供的一种移动控制方法,还提供一种移动电子设备。该移动电子设备中配置有二维摄像头和三维空间检测 装置,所述移动电子设备还包括:Referring to FIG. 3, an embodiment of the present invention is directed to a mobile control method provided by the foregoing, and further provides a mobile electronic device. The mobile electronic device is equipped with a two-dimensional camera and three-dimensional space detection The device further includes:
响应单元301,配置为响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;The response unit 301 is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
获取单元302,配置为获得所述三维空间检测装置与所述二维摄像头对齐的深度值;The obtaining unit 302 is configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
计算单元303,配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;The calculating unit 303 is configured to calculate, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, the motion of the two-dimensional target position coordinate relative to the mobile electronic device The coordinates of the three-dimensional target position of the center;
控制单元304,配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。The control unit 304 is configured to control the motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
在具体实施过程中,所述计算单元303包括:第一计算子单元和第二计算子单元。第一计算子单元配置为根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维相对位置坐标。第二计算子单元配置为将所述移动电子设备的运动中心相对所述二维摄像头光心的空间变换矩阵与所述三维相对位置坐标相乘获得所述三维目标位置坐标。In a specific implementation process, the calculating unit 303 includes: a first calculating subunit and a second calculating subunit. The first calculating subunit is configured to calculate the two-dimensional target position coordinate relative to the two-dimensional camera light according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point The three-dimensional relative position coordinates of the heart. The second computing subunit is configured to multiply a motion center of the mobile electronic device with respect to a spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
其中,所述第一计算子单元配置为通过如下公式计算获得所述三维相对位置坐标P:P=(z*(a-cx)/f,z*(b-cy)/f,z);其中,z表示所述深度值,(a,b)表示所述二维目标位置坐标,(cx,cy)表示所述相机主点,f表示所述相机焦距。The first calculating subunit is configured to obtain the three-dimensional relative position coordinate P by the following formula: P=(z*(a-cx)/f, z*(b-cy)/f, z); Where z denotes the depth value, (a, b) denotes the two-dimensional target position coordinate, (cx, cy) denotes the camera main point, and f denotes the camera focal length.
在具体实施过程中,所述获取单元302配置为:当所述三维空间检测装置为三维摄像头时,通过所述三维摄像头检测获得所述深度值;或者,当所述三维空间检测装置为惯性检测装置,将所述三维目标位置坐标中的纵坐标作为所述移动电子设备的运动中心的高度坐标,约束求解出所述深 度值。In a specific implementation process, the acquiring unit 302 is configured to: when the three-dimensional space detecting device is a three-dimensional camera, obtain the depth value by detecting the three-dimensional camera; or when the three-dimensional space detecting device is inertial detecting The device uses the ordinate in the coordinate of the three-dimensional target position as the height coordinate of the motion center of the mobile electronic device, and the constraint solves the depth Degree value.
在一个实施例中,所述移动电子设备还可以包括:检测单元、调整单元及牵引单元。检测单元配置为检测在控制所述移动电子设备的运动中心向所述三维目标位置坐标运动之后,获得所述移动电子设备的运动方向上是否存在障碍物;调整单元配置为在所述检测单元的检测结果为存在时,在所述移动电子设备与所述障碍物之间的距离小于第一阈值距离时,将所述移动电子设备的运动方向调整为无障碍物的方向;所述检测单元还配置为:沿调整后的方向运动第二阈值距离后,检测所述移动电子设备的当前位置与所述三维目标位置坐标之间是否存在障碍物;牵引单元配置为在所述检测单元的检测出所述当前位置与所述三维目标位置坐标之间不存在障碍物时,牵引所述移动电子设备从所述当前位置向所述三维目标位置坐标运动。In an embodiment, the mobile electronic device may further include: a detecting unit, an adjusting unit, and a pulling unit. The detecting unit is configured to detect whether there is an obstacle in the moving direction of the mobile electronic device after controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate; the adjusting unit is configured to be in the detecting unit When the detection result is present, when the distance between the mobile electronic device and the obstacle is less than the first threshold distance, the moving direction of the mobile electronic device is adjusted to the direction of the obstacle-free object; the detecting unit further After the second threshold distance is moved in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate; the traction unit is configured to be detected by the detecting unit. When there is no obstacle between the current position and the three-dimensional target position coordinate, the mobile electronic device is pulled to move from the current position to the three-dimensional target position coordinate.
在一个实施例中,所述移动电子设备还包括:重置单元。该重置单元配置为在所述获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标时,重置所述移动电子设备的位置坐标,通过所述三维空间检测装置获得所述二维摄像头的相机光心的三维光心位置坐标;所述获取单元302还配置为:根据所述三维光心位置坐标,获得所述移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标;所述控制单元304还配置为:根据所述三维当前坐标和所述三维目标位置坐标牵引所述移动电子设备向所述三维目标位置坐标运动。In one embodiment, the mobile electronic device further includes: a reset unit. The resetting unit is configured to reset the position coordinates of the mobile electronic device when the two-dimensional target position coordinates corresponding to the image input operation on the image is obtained, and obtain the location by the three-dimensional space detecting device The three-dimensional optical center position coordinate of the camera optical center of the two-dimensional camera; the acquiring unit 302 is further configured to: obtain the motion center of the mobile electronic device relative to the reset position coordinate according to the three-dimensional optical center position coordinate The three-dimensional current coordinate; the control unit 304 is further configured to: drag the mobile electronic device to move to the three-dimensional target position coordinate according to the three-dimensional current coordinate and the three-dimensional target position coordinate.
关于本发明实施例前述提供的移动电子设备,其中各个单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the mobile electronic device provided by the foregoing embodiments of the present invention, the specific manner in which the operations are performed by the respective units has been described in detail in the embodiments related to the method, and will not be described in detail herein.
请参考图4,针对本发明实施例前述提供的一种移动控制方法,本发明实施例还提供一种移动控制系统,包括:遥控装置401和移动电子设备402, 所述移动电子设备402上配置有二维摄像头和三维空间检测装置;Referring to FIG. 4, a mobile control system provided by the foregoing embodiment of the present invention further provides a mobile control system, including: a remote control device 401 and a mobile electronic device 402. The mobile electronic device 402 is configured with a two-dimensional camera and a three-dimensional space detecting device;
其中,所述遥控装置401配置为接收所述二维摄像头拍摄的所述移动电子设备所处环境的图像并显示,获得在所述图像上进行的目标位置输入操作并将所述目标位置输入操作反馈给所述移动电子设备402;The remote control device 401 is configured to receive an image of an environment in which the mobile electronic device is captured by the two-dimensional camera and display, obtain a target position input operation performed on the image, and input the target position into an operation. Feedback to the mobile electronic device 402;
所述移动电子设备402配置为:接收所述遥控装置反馈的所述目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;获得所述三维空间检测装置与所述二维摄像头对齐的深度值;根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备402的运动中心的三维目标位置坐标;控制所述移动电子设备402的运动中心向所述三维目标位置坐标运动。The mobile electronic device 402 is configured to: receive the target position input operation fed back by the remote control device, obtain two-dimensional target position coordinates corresponding to the target position input operation on the image; and obtain the three-dimensional space detecting device a depth value aligned with the two-dimensional camera; calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, obtaining the two-dimensional target position coordinate relative to the The three-dimensional target position coordinates of the motion center of the mobile electronic device 402; controlling the motion center of the mobile electronic device 402 to move toward the three-dimensional target position coordinates.
关于上述实施例中的移动控制系统,其中遥控设备和移动电子设备的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the mobile control system in the above embodiment, the specific manner of the remote control device and the mobile electronic device has been described in detail in the embodiment related to the method, and will not be explained in detail herein.
请参考图5,针对本发明实施例前述提供的一种移动电子设备,本发明实施例提供一种移动电子设备500的一个可选的硬件结构示意图如图5所示,包括:Please refer to FIG. 5, which is a schematic diagram of an optional hardware structure of a mobile electronic device 500 according to an embodiment of the present invention.
处理器501、二维摄像头502、3D摄像头503、惯性检测装置504和存储器505,各组件之间可以通过总线连接,组件通过总线向处理器501发送数据并接收来自处理器501的指令。其中,3D摄像头503、惯性检测装置504在移动电子设备中可以择一或全部实施。The processor 501, the two-dimensional camera 502, the 3D camera 503, the inertial detection device 504, and the memory 505 may be connected by a bus between the components, and the component transmits data to the processor 501 via the bus and receives an instruction from the processor 501. The 3D camera 503 and the inertial detection device 504 can be implemented in one or all of the mobile electronic devices.
所述处理器501,配置为响应基于所述二维摄像头502拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;The processor 501 is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera 502;
所述处理器501,还配置为获得所述3D摄像头503与所述二维摄像头 502对齐的深度值,或惯性检测装置504与所述二维摄像头502对齐的深度值;The processor 501 is further configured to obtain the 3D camera 503 and the two-dimensional camera a depth value of 502 alignment, or a depth value at which the inertial detection device 504 is aligned with the two-dimensional camera 502;
所述处理器501,还配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头502的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;The processor 501 is further configured to calculate, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera 502, and a camera main point, the two-dimensional target position coordinate relative to the movement The three-dimensional target position coordinates of the motion center of the electronic device;
所述处理器501,还配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。The processor 501 is further configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
本发明实施例还提供一种存储介质,存储有可执行指令,可执行指令用于执行前述的移动控制方法,例如,图1至图2任一附图所示的移动控制方法。本发明实施例的存储介质可为光盘、硬盘或磁盘等存储介质,可选为非瞬间存储介质。The embodiment of the present invention further provides a storage medium storing executable instructions for executing the foregoing mobile control method, for example, the mobile control method shown in any of FIGS. 1 to 2 . The storage medium of the embodiment of the present invention may be a storage medium such as an optical disk, a hard disk, or a magnetic disk, and may be a non-transitory storage medium.
通过本发明实施例中的一个或多个技术方案,可以实现如下技术效果:The following technical effects can be achieved by using one or more technical solutions in the embodiments of the present invention:
本发明实施例为移动电子设备配置二维摄像头和三维空间检测装置,移动电子设备通过将响应目标位置输入操作获得目标位置在二维摄像头拍摄的图像中的二维目标位置坐标,并获得三维空间检测装置与二维摄像头对齐的深度值,以根据二维目标位置坐标、深度值、二维摄像头的相机焦距和相机主点,计算获得二维目标位置坐标相对移动电子设备的运动中心的三维目标位置坐标,从而控制移动电子设备的运动中心向三维目标位置坐标运动,实现了将移动电子设备上的图像中二维坐标到实际环境的三维坐标转换,使得用户可以通过在图像上进行目标位置输入操作来控制移动电子设备移动到对应的空间位置,不需要用户在实时操控移动电子设备的方向操纵杆,解决了相关技术中简易机器人存在的遥控难度大的技术问题,降低简易机器人的控制难度。The embodiment of the present invention configures a two-dimensional camera and a three-dimensional space detecting device for the mobile electronic device, and the mobile electronic device obtains the two-dimensional target position coordinates of the target position in the image captured by the two-dimensional camera by inputting the response target position input operation, and obtains the three-dimensional space. Detecting a depth value of the device aligned with the two-dimensional camera to calculate a two-dimensional target position coordinate relative to a three-dimensional target of the motion center of the mobile electronic device according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point Position coordinates, thereby controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate, realizing the three-dimensional coordinate conversion of the two-dimensional coordinates in the image on the mobile electronic device to the actual environment, so that the user can perform the target position input on the image The operation controls the mobile electronic device to move to the corresponding spatial position, and does not require the user to manipulate the direction control lever of the mobile electronic device in real time, thereby solving the technical problem that the remote control of the simple robot exists in the related art, and reducing the control difficulty of the simple robot.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、 或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, Or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和 修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all modifications and modify.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention
工业实用性Industrial applicability
本发明公开了一种移动控制方法、移动电子设备及移动控制系统、存储介质,该移动控制方法应用于移动电子设备,移动电子设备中安装有二维摄像头和三维空间检测装置,方法包括:响应基于二维摄像头拍摄的图像进行的目标位置输入操作,获得目标位置输入操作在图像上对应的二维目标位置坐标;获得三维空间检测装置与二维摄像头对齐的深度值;根据二维目标位置坐标、深度值、二维摄像头的相机焦距和相机主点,计算获得二维目标位置坐标相对移动电子设备的运动中心的三维目标位置坐标;控制移动电子设备的运动中心向三维目标位置坐标运动。通过上述技术方案,解决了相关技术中简易机器人存在的遥控难度大的技术问题,降低简易机器人的控制难度。 The invention discloses a mobile control method, a mobile electronic device, a mobile control system and a storage medium. The mobile control method is applied to a mobile electronic device. The mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the method comprises: responding The target position input operation based on the image captured by the two-dimensional camera obtains the coordinate of the two-dimensional target position corresponding to the target position input operation on the image; obtains the depth value of the three-dimensional space detecting device aligned with the two-dimensional camera; according to the two-dimensional target position coordinate The depth value, the camera focal length of the two-dimensional camera, and the camera main point are calculated, and the two-dimensional target position coordinates are calculated relative to the three-dimensional target position coordinates of the motion center of the mobile electronic device; and the motion center of the mobile electronic device is controlled to move to the three-dimensional target position coordinate. Through the above technical solution, the technical problem that the remote control of the simple robot exists in the related art is solved, and the control difficulty of the simple robot is reduced.

Claims (16)

  1. 一种移动控制方法,应用于移动电子设备,所述移动电子设备中安装有二维摄像头和三维空间检测装置,所述方法包括:A mobile control method is applied to a mobile electronic device, wherein the mobile electronic device is equipped with a two-dimensional camera and a three-dimensional space detecting device, and the method includes:
    响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;And obtaining a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
    获得所述三维空间检测装置与所述二维摄像头对齐的深度值;Obtaining a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
    根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;Calculating, according to the two-dimensional target position coordinate, the depth value, the camera focal length of the two-dimensional camera, and the camera main point, obtaining a three-dimensional target position coordinate of the two-dimensional target position coordinate relative to a motion center of the mobile electronic device ;
    控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。Controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  2. 如权利要求1所述的方法,其中,所述根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标,包括:The method of claim 1, wherein the calculating the two-dimensional target position coordinates relative to the two-dimensional target position coordinates, the depth value, the camera focal length of the two-dimensional camera, and the camera principal point The three-dimensional target position coordinates of the motion center of the mobile electronic device include:
    根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维相对位置坐标;Obtaining, according to the depth value, the two-dimensional target position coordinate, the camera focal length of the two-dimensional camera, and the camera main point, obtaining a three-dimensional relative position coordinate of the two-dimensional target position coordinate with respect to the optical center of the two-dimensional camera;
    将所述移动电子设备的运动中心相对所述二维摄像头光心的空间变换矩阵、与所述三维相对位置坐标相乘,获得所述三维目标位置坐标。And multiplying a motion center of the mobile electronic device with respect to a spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
  3. 如权利要求2所述的方法,其中,所述根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述二维摄像头光心的三维光心位置坐标,包括:The method of claim 2, wherein the calculating the two-dimensional target position coordinates relative to the depth value, the two-dimensional target position coordinates, the camera focal length of the two-dimensional camera, and the camera principal point The three-dimensional optical center position coordinates of the two-dimensional camera optical center include:
    通过如下公式计算获得所述三维相对位置坐标P:The three-dimensional relative position coordinate P is obtained by the following formula:
    P=(z*(a-cx)/f,z*(b-cy)/f,z);P=(z*(a-cx)/f,z*(b-cy)/f,z);
    其中,z表示所述深度值,(a,b)表示所述二维目标位置坐标,(cx,cy) 表示所述相机主点,f表示所述相机焦距。Where z represents the depth value, (a, b) represents the two-dimensional target position coordinate, (cx, cy) Indicates the camera's primary point, and f denotes the camera focal length.
  4. 如权利要求1所述的方法,其中,所述获得所述三维空间检测装置与所述二维摄像头对齐的深度值,包括:The method of claim 1, wherein the obtaining the depth value of the three-dimensional space detecting device aligned with the two-dimensional camera comprises:
    当所述三维空间检测装置为三维摄像头时,通过所述三维摄像头检测获得所述深度值;When the three-dimensional space detecting device is a three-dimensional camera, the depth value is obtained by detecting the three-dimensional camera;
    当所述三维空间检测装置为惯性检测装置IMU时,将所述三维目标位置坐标中的纵坐标作为所述移动电子设备的运动中心的高度坐标,约束求解出所述深度值。When the three-dimensional space detecting device is the inertial detecting device IMU, the ordinate in the three-dimensional target position coordinate is used as the height coordinate of the motion center of the mobile electronic device, and the depth value is constrained.
  5. 如权利要求1所述的方法,其中,在控制所述移动电子设备的运动中心向所述三维目标位置坐标运动之后,所述方法还包括:The method of claim 1, wherein after controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate, the method further comprises:
    检测获得所述移动电子设备的运动方向上是否存在障碍物;Detecting whether there is an obstacle in the moving direction of the mobile electronic device;
    若存在,在所述移动电子设备与所述障碍物之间的距离小于第一阈值距离时,将所述移动电子设备的运动方向调整为无障碍物的方向;If present, when the distance between the mobile electronic device and the obstacle is less than a first threshold distance, adjusting a moving direction of the mobile electronic device to a direction of the obstacle-free object;
    沿调整后的方向运动第二阈值距离后,检测所述移动电子设备的当前位置与所述三维目标位置坐标之间是否存在障碍物;After moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the three-dimensional target position coordinate;
    若所述当前位置与所述三维目标位置坐标之间不存在障碍物,牵引所述移动电子设备从所述当前位置向所述三维目标位置坐标运动。If there is no obstacle between the current position and the three-dimensional target position coordinate, the mobile electronic device is pulled to move from the current position to the three-dimensional target position coordinate.
  6. 如权利要求1所述的方法,其中,所述获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标时,所述方法还包括:The method of claim 1, wherein when the obtaining the target position input operation corresponds to the corresponding two-dimensional target position coordinates on the image, the method further comprises:
    重置所述移动电子设备的位置坐标,通过所述三维空间检测装置获得所述二维摄像头的相机光心的三维光心位置坐标;Resetting a position coordinate of the mobile electronic device, and obtaining, by the three-dimensional space detecting device, a three-dimensional optical center position coordinate of a camera optical center of the two-dimensional camera;
    根据所述三维光心位置坐标,获得所述移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标;Obtaining, according to the three-dimensional optical center position coordinates, a three-dimensional current coordinate of a motion center of the mobile electronic device with respect to a position coordinate after resetting;
    所述控制所述移动电子设备的运动中心向所述三维目标位置坐标运动,包括: The controlling the motion center of the mobile electronic device to move to the three-dimensional target position coordinate comprises:
    根据所述三维当前坐标和所述三维目标位置坐标牵引所述移动电子设备向所述三维目标位置坐标运动。And dragging, by the three-dimensional current coordinate and the three-dimensional target position coordinate, the mobile electronic device to move to the three-dimensional target position coordinate.
  7. 如权利要求1~6任一所述的方法,其中,所述响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标,包括:The method according to any one of claims 1 to 6, wherein said responding is based on a target position input operation by an image captured by said two-dimensional camera, obtaining a two-dimensional corresponding to said target position input operation on said image Target location coordinates, including:
    将所述二维摄像头拍摄的图像发送至所述移动电子设备对应的遥控装置,通过所述遥控装置对所述图像进行显示;Sending an image captured by the two-dimensional camera to a remote control device corresponding to the mobile electronic device, and displaying the image by the remote control device;
    接收所述遥控装置反馈的所述目标位置输入操作;Receiving the target position input operation fed back by the remote control device;
    响应所述目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标。And in response to the target position input operation, obtaining a two-dimensional target position coordinate corresponding to the target position input operation on the image.
  8. 一种移动电子设备,所述移动电子设备中安装有二维摄像头和三维空间检测装置,所述移动电子设备还包括:A mobile electronic device in which a two-dimensional camera and a three-dimensional space detecting device are installed, the mobile electronic device further comprising:
    响应单元,配置为响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;a response unit configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
    获取单元,配置为获得所述三维空间检测装置与所述二维摄像头对齐的深度值;An acquiring unit configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
    计算单元,配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;a calculating unit configured to calculate, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinate is obtained relative to a motion center of the mobile electronic device Three-dimensional target position coordinates;
    控制单元,配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。And a control unit configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  9. 如权利要求8所述的移动电子设备,其中,所述计算单元包括:The mobile electronic device of claim 8 wherein said computing unit comprises:
    第一计算子单元,配置为根据所述深度值、所述二维目标位置坐标、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标 相对所述二维摄像头光心的三维相对位置坐标;a first calculating subunit configured to calculate the two-dimensional target position coordinate according to the depth value, the two-dimensional target position coordinate, a camera focal length of the two-dimensional camera, and a camera principal point a three-dimensional relative position coordinate of the optical center of the two-dimensional camera;
    第二计算子单元,配置为将所述移动电子设备的运动中心相对所述二维摄像头光心的空间变换矩阵、与所述三维相对位置坐标相乘,获得所述三维目标位置坐标。And a second calculating subunit configured to multiply a motion transformation center of the mobile electronic device with respect to the spatial transformation matrix of the two-dimensional camera optical center and the three-dimensional relative position coordinates to obtain the three-dimensional target position coordinates.
  10. 如权利要求9所述的移动电子设备,其中,所述第一计算子单元配置为通过如下公式计算获得所述三维相对位置坐标P:The mobile electronic device of claim 9, wherein the first computing subunit is configured to obtain the three-dimensional relative position coordinate P by the following formula:
    P=(z*(a-cx)/f,z*(b-cy)/f,z);P=(z*(a-cx)/f,z*(b-cy)/f,z);
    其中,z表示所述深度值,(a,b)表示所述二维目标位置坐标,(cx,cy)表示所述相机主点,f表示所述相机焦距。Where z denotes the depth value, (a, b) denotes the two-dimensional target position coordinate, (cx, cy) denotes the camera main point, and f denotes the camera focal length.
  11. 如权利要求8所述的移动电子设备,其中,所述获取单元配置为:The mobile electronic device of claim 8, wherein the acquisition unit is configured to:
    当所述三维空间检测装置为三维摄像头时,通过所述三维摄像头检测获得所述深度值;When the three-dimensional space detecting device is a three-dimensional camera, the depth value is obtained by detecting the three-dimensional camera;
    当所述三维空间检测装置为惯性检测装置IMU时,将所述三维目标位置坐标中的纵坐标作为所述移动电子设备的运动中心的高度坐标,约束求解出所述深度值。When the three-dimensional space detecting device is the inertial detecting device IMU, the ordinate in the three-dimensional target position coordinate is used as the height coordinate of the motion center of the mobile electronic device, and the depth value is constrained.
  12. 如权利要求8所述的移动电子设备,其中,所述移动电子设备还包括:The mobile electronic device of claim 8, wherein the mobile electronic device further comprises:
    检测单元,配置为检测在控制所述移动电子设备的运动中心向所述三维目标位置坐标运动之后,获得所述移动电子设备的运动方向上是否存在障碍物;a detecting unit configured to detect whether an obstacle exists in a moving direction of the mobile electronic device after controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate;
    调整单元,配置为在所述检测单元的检测结果为存在时,在所述移动电子设备与所述障碍物之间的距离小于第一阈值距离时,将所述移动电子设备的运动方向调整为无障碍物的方向;The adjusting unit is configured to adjust a moving direction of the mobile electronic device to be when the distance between the mobile electronic device and the obstacle is less than a first threshold distance when the detection result of the detecting unit is present The direction of obstacles;
    所述检测单元还配置为:沿调整后的方向运动第二阈值距离后,检测所述移动电子设备的当前位置与所述三维目标位置坐标之间是否存在障碍 物;The detecting unit is further configured to: after moving the second threshold distance in the adjusted direction, detecting whether there is an obstacle between the current position of the mobile electronic device and the coordinate of the three-dimensional target position Object
    牵引单元,配置为在所述检测单元的检测出所述当前位置与所述三维目标位置坐标之间不存在障碍物时,牵引所述移动电子设备从所述当前位置向所述三维目标位置坐标运动。a traction unit configured to: when the detecting unit detects that there is no obstacle between the current position and the three-dimensional target position coordinate, to pull the mobile electronic device from the current position to the three-dimensional target position coordinate motion.
  13. 如权利要求8所述的移动电子设备,其中,所述移动电子设备还包括:The mobile electronic device of claim 8, wherein the mobile electronic device further comprises:
    重置单元,配置为在所述获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标时,重置所述移动电子设备的位置坐标,通过所述三维空间检测装置获得所述二维摄像头的相机光心的三维光心位置坐标;a resetting unit configured to reset a position coordinate of the mobile electronic device when the corresponding two-dimensional target position coordinates on the image are input by the target position input operation, and obtain the location by the three-dimensional space detecting device The three-dimensional optical center position coordinate of the camera optical center of the two-dimensional camera;
    所述获取单元还配置为:根据所述三维光心位置坐标,获得所述移动电子设备的运动中心相对于重置后的位置坐标的三维当前坐标;The acquiring unit is further configured to: obtain, according to the three-dimensional optical center position coordinates, a three-dimensional current coordinate of a motion center of the mobile electronic device with respect to a position coordinate after resetting;
    所述控制单元还配置为:根据所述三维当前坐标和所述三维目标位置坐标牵引所述移动电子设备向所述三维目标位置坐标运动。The control unit is further configured to: drag the mobile electronic device to move to the three-dimensional target position coordinate according to the three-dimensional current coordinate and the three-dimensional target position coordinate.
  14. 一种移动控制系统,包括:遥控装置和移动电子设备,所述移动电子设备上配置有二维摄像头和三维空间检测装置;A mobile control system includes: a remote control device and a mobile electronic device, wherein the mobile electronic device is configured with a two-dimensional camera and a three-dimensional space detecting device;
    其中,所述遥控装置配置为:接收所述二维摄像头拍摄的所述移动电子设备所处环境的图像并显示,获得在所述图像上进行的目标位置输入操作,并将所述目标位置输入操作反馈给所述移动电子设备;The remote control device is configured to: receive an image of an environment in which the mobile electronic device is captured by the two-dimensional camera and display, obtain a target position input operation performed on the image, and input the target position Operation feedback to the mobile electronic device;
    所述移动电子设备配置为:接收所述遥控装置反馈的所述目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;获得所述三维空间检测装置与所述二维摄像头对齐的深度值;根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。 The mobile electronic device is configured to: receive the target position input operation fed back by the remote control device, obtain a corresponding two-dimensional target position coordinate of the target position input operation on the image; obtain the three-dimensional space detecting device and a depth value of the two-dimensional camera alignment; calculating, according to the two-dimensional target position coordinate, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, obtaining the two-dimensional target position coordinate relative to the movement a three-dimensional target position coordinate of a motion center of the electronic device; controlling a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  15. 一种移动电子设备,包括:A mobile electronic device comprising:
    二维摄像头、三维空间检测装置和处理器;a two-dimensional camera, a three-dimensional space detecting device and a processor;
    所述处理器,配置为响应基于所述二维摄像头拍摄的图像进行的目标位置输入操作,获得所述目标位置输入操作在所述图像上对应的二维目标位置坐标;The processor is configured to obtain a two-dimensional target position coordinate corresponding to the target position input operation on the image in response to a target position input operation based on an image captured by the two-dimensional camera;
    所述处理器,还配置为获得所述三维空间检测装置与所述二维摄像头对齐的深度值;The processor is further configured to obtain a depth value of the three-dimensional space detecting device aligned with the two-dimensional camera;
    所述处理器,还配置为根据所述二维目标位置坐标、所述深度值、所述二维摄像头的相机焦距和相机主点,计算获得所述二维目标位置坐标相对所述移动电子设备的运动中心的三维目标位置坐标;The processor is further configured to calculate, according to the two-dimensional target position coordinates, the depth value, a camera focal length of the two-dimensional camera, and a camera principal point, the two-dimensional target position coordinates are obtained relative to the mobile electronic device The three-dimensional target position coordinates of the motion center;
    所述处理器,还配置为控制所述移动电子设备的运动中心向所述三维目标位置坐标运动。The processor is further configured to control a motion center of the mobile electronic device to move to the three-dimensional target position coordinate.
  16. 一种存储介质,所述存储介质中存储有可执行指令,所述可执行指令用于执行权利要求1至7任一项所述的移动控制方法。 A storage medium storing executable instructions for performing the movement control method according to any one of claims 1 to 7.
PCT/CN2017/078854 2016-03-31 2017-03-30 Mobile control method, mobile electronic apparatus and mobile control system, and storage medium WO2017167239A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610202182.X 2016-03-31
CN201610202182.XA CN105867433A (en) 2016-03-31 2016-03-31 Moving control method, moving electronic device and moving control system

Publications (1)

Publication Number Publication Date
WO2017167239A1 true WO2017167239A1 (en) 2017-10-05

Family

ID=56626811

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/078854 WO2017167239A1 (en) 2016-03-31 2017-03-30 Mobile control method, mobile electronic apparatus and mobile control system, and storage medium

Country Status (2)

Country Link
CN (1) CN105867433A (en)
WO (1) WO2017167239A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150527A (en) * 2020-08-31 2020-12-29 深圳市慧鲤科技有限公司 Measuring method and device, electronic device and storage medium
CN112631342A (en) * 2020-12-22 2021-04-09 博迈科海洋工程股份有限公司 Large ocean module sliding shipment cooperative operation method
CN114610022A (en) * 2022-02-09 2022-06-10 北京三快在线科技有限公司 Connection positioning method and distribution system
CN112150527B (en) * 2020-08-31 2024-05-17 深圳市慧鲤科技有限公司 Measurement method and device, electronic equipment and storage medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867433A (en) * 2016-03-31 2016-08-17 纳恩博(北京)科技有限公司 Moving control method, moving electronic device and moving control system
CN106657781B (en) * 2016-12-19 2019-11-15 北京小米移动软件有限公司 The image pickup method and device of target object
CN108242007B (en) * 2016-12-26 2022-01-25 纳恩博(北京)科技有限公司 Service providing method and device
CN109895105A (en) * 2017-12-11 2019-06-18 拉扎斯网络科技(上海)有限公司 A kind of intelligent apparatus
CN108180909B (en) * 2017-12-22 2018-12-25 北京三快在线科技有限公司 Relative position determines method, apparatus and electronic equipment
CN108762509B (en) * 2018-06-06 2021-04-16 上海瀚创机器人技术有限公司 Method for operating remote control object and operating system
CN111198566B (en) * 2020-01-09 2023-05-30 浙江吉利控股集团有限公司 Balance car control method and device and balance car
CN112000123B (en) * 2020-07-20 2023-03-14 南京信息工程大学 Obstacle avoidance control system and control method for rotor unmanned aerial vehicle
CN113906358B (en) * 2020-08-28 2023-03-28 深圳市大疆创新科技有限公司 Control method, device and system for movable platform
CN114670194B (en) * 2022-03-22 2023-06-27 荣耀终端有限公司 Positioning method and device for manipulator system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037163A1 (en) * 2000-05-01 2001-11-01 Irobot Corporation Method and system for remote control of mobile robot
CN1628274A (en) * 2002-05-31 2005-06-15 富士通株式会社 Remotely-operated robot, and robot self position identifying method
CN101154110A (en) * 2006-09-29 2008-04-02 三星电子株式会社 Method, apparatus, and medium for controlling mobile device based on image of real space including the mobile device
CN105407774A (en) * 2013-07-29 2016-03-16 三星电子株式会社 Auto-cleaning system, cleaning robot and method of controlling the cleaning robot
CN105867433A (en) * 2016-03-31 2016-08-17 纳恩博(北京)科技有限公司 Moving control method, moving electronic device and moving control system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101043450B1 (en) * 2009-07-31 2011-06-21 삼성전기주식회사 Location and distance mesuring appratus its method usnig camera
CN104864863B (en) * 2014-02-21 2019-08-27 联想(北京)有限公司 A kind of routing resource and electronic equipment
CN104680528A (en) * 2015-02-11 2015-06-03 广州霞光技研有限公司 Space positioning method of explosive-handling robot based on binocular stereo vision
CN104932502B (en) * 2015-06-04 2018-08-10 福建天晴数码有限公司 Short distance barrier-avoiding method based on three dimensional depth video camera and short distance obstacle avoidance system
CN105319991B (en) * 2015-11-25 2018-08-28 哈尔滨工业大学 A kind of robot environment's identification and job control method based on Kinect visual informations

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037163A1 (en) * 2000-05-01 2001-11-01 Irobot Corporation Method and system for remote control of mobile robot
CN1628274A (en) * 2002-05-31 2005-06-15 富士通株式会社 Remotely-operated robot, and robot self position identifying method
CN101154110A (en) * 2006-09-29 2008-04-02 三星电子株式会社 Method, apparatus, and medium for controlling mobile device based on image of real space including the mobile device
CN105407774A (en) * 2013-07-29 2016-03-16 三星电子株式会社 Auto-cleaning system, cleaning robot and method of controlling the cleaning robot
CN105867433A (en) * 2016-03-31 2016-08-17 纳恩博(北京)科技有限公司 Moving control method, moving electronic device and moving control system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150527A (en) * 2020-08-31 2020-12-29 深圳市慧鲤科技有限公司 Measuring method and device, electronic device and storage medium
CN112150527B (en) * 2020-08-31 2024-05-17 深圳市慧鲤科技有限公司 Measurement method and device, electronic equipment and storage medium
CN112631342A (en) * 2020-12-22 2021-04-09 博迈科海洋工程股份有限公司 Large ocean module sliding shipment cooperative operation method
CN112631342B (en) * 2020-12-22 2022-07-12 博迈科海洋工程股份有限公司 Large ocean module sliding shipment cooperative operation method
CN114610022A (en) * 2022-02-09 2022-06-10 北京三快在线科技有限公司 Connection positioning method and distribution system

Also Published As

Publication number Publication date
CN105867433A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
WO2017167239A1 (en) Mobile control method, mobile electronic apparatus and mobile control system, and storage medium
WO2017167280A1 (en) Path control method, path planning method, first device and second device, and computer storage medium
US11803185B2 (en) Systems and methods for initializing a robot to autonomously travel a trained route
EP3377948B1 (en) Facilitating robot positioning
US10384348B2 (en) Robot apparatus, method for controlling the same, and computer program
US20210205986A1 (en) Teleoperating Of Robots With Tasks By Mapping To Human Operator Pose
US9300852B2 (en) Controlling robotic motion of camera
JP2018126857A5 (en) Control methods, robot systems, article manufacturing methods, programs and recording media
CA3042532A1 (en) Systems and methods for dynamic route planning in autonomous navigation
CN112634318B (en) Teleoperation system and method for underwater maintenance robot
Frank et al. Toward mobile mixed-reality interaction with multi-robot systems
JP2017054475A (en) Teleoperation device, method and program
TW201622916A (en) Robot and control method thereof
US9008442B2 (en) Information processing apparatus, information processing method, and computer program
JP2013031896A5 (en)
WO2017166767A1 (en) Information processing method, mobile device, and computer storage medium
JP7428436B2 (en) Proxy controller suit with arbitrary dual range kinematics
Quesada et al. Holo-SpoK: Affordance-aware augmented reality control of legged manipulators
JP2020142323A (en) Robot control device, robot control method and robot control program
Yu et al. Efficiency and learnability comparison of the gesture-based and the mouse-based telerobotic systems
Wang et al. Drone were me: Flying drone as avatar by aligned stereo view and head pose
JP2017107374A (en) Remote control system and device
WO2018006361A1 (en) Control method and system for virtual robot
Palla et al. Object detection and spatial coordinates extraction using a monocular camera for a wheelchair mounted robotic arm
CN115668293A (en) Carpet detection method, motion control method and mobile machine using the methods

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17773269

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17773269

Country of ref document: EP

Kind code of ref document: A1