WO2025213876A1 - 地图标记方法、装置、电子设备和计算机可读存储介质 - Google Patents
地图标记方法、装置、电子设备和计算机可读存储介质Info
- Publication number
- WO2025213876A1 WO2025213876A1 PCT/CN2024/143544 CN2024143544W WO2025213876A1 WO 2025213876 A1 WO2025213876 A1 WO 2025213876A1 CN 2024143544 W CN2024143544 W CN 2024143544W WO 2025213876 A1 WO2025213876 A1 WO 2025213876A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- robot
- image
- determining
- map
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/005—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 with correlation of navigation data from several sources, e.g. map or contour matching
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/38—Electronic maps specially adapted for navigation; Updating thereof
- G01C21/3804—Creation or updating of map data
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/38—Electronic maps specially adapted for navigation; Updating thereof
- G01C21/3804—Creation or updating of map data
- G01C21/3807—Creation or updating of map data characterised by the type of data
- G01C21/3811—Point data, e.g. Point of Interest [POI]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/64—Three-dimensional [3D] objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
Definitions
- the present application belongs to the field of robotics technology, and in particular relates to a map marking method, device, electronic device and computer-readable storage medium.
- a robot is an intelligent machine that can operate semi-autonomously or fully autonomously, and can navigate autonomously to its work area to perform tasks.
- the robot's navigation process requires obstacle avoidance.
- Object recognition relies on visual sensors.
- robots use binocular or depth cameras for object detection to identify the type and location of objects in the work environment, but binocular and depth cameras are relatively expensive. Although monocular cameras are low-cost, it is difficult to calculate the exact location of objects. Therefore, a map marking method that strikes a balance between accuracy and cost is needed.
- the embodiments of the present application provide a map marking method, device, electronic device and computer-readable storage medium, which can accurately perform map marking when a robot uses a monocular camera, taking into account both accuracy and cost issues.
- a first aspect of an embodiment of the present application provides a map marking method, comprising: when a robot is located on flat ground, obtaining an image to be identified captured by a monocular camera of the robot; performing object identification on the image to be identified to obtain object type information of the object and coordinate information of the object in the image to be identified; determining object shape information of the object and position information of the object in an electronic map carried by the robot based on the object type information and the coordinate information; determining a fill area corresponding to the object on the electronic map based on the object shape information and the position information; and updating annotation information of the fill area, where the annotation information is used for navigation by the robot.
- the coordinate information includes the image coordinates of the pixel points within the identification frame of the object in the image to be identified; in the step of determining the object shape information of the object and the position information in the electronic map carried by the robot based on the object type information and the coordinate information, the step of determining the position information includes: obtaining the camera parameters of the monocular camera; determining the first reference point of the object on the identification frame based on the object type information; determining the first posture information of the object relative to the chassis of the robot based on the camera parameters and the image coordinates of the first reference point in the image to be identified; and determining the position information based on the first posture information and the second posture information of the robot in the electronic map.
- determining the first reference point of the object on the identification frame based on the object type information includes: determining the relative position between the identification frame and the boundary of the image to be identified; determining the physical width of the identification frame based on the image coordinates of the corner points of the identification frame; determining the estimated physical width of the object based on the object type information; and determining the first reference point on the identification frame based on the size relationship between the physical width of the identification frame and the estimated physical width, as well as the relative position.
- the coordinate information includes the image coordinates of the pixel points within the identification frame of the object in the image to be identified;
- the object shape information includes the target physical width and target physical thickness of the object; in the step of determining the object shape information of the object and the position information in the electronic map carried by the robot based on the object type information and the coordinate information, the step of determining the object shape information includes: determining the target physical width of the object based on the image coordinates of the corner points of the identification frame; determining the target physical thickness of the object based on the object type information.
- determining the fill area corresponding to the object on the electronic map based on the object shape information and the location information includes: determining the outer frame shape information of the outer frame of the object on the electronic map, and determining parameter information of the outer frame within the electronic map based on the outer frame shape information, the object shape information and the location information; and determining the fill area on the layer of the electronic map based on the outer frame shape information and the parameter information.
- the updating of the annotation information of the filling area includes: if the type information in the annotation information matches the object type information, or the type information in the annotation information is empty, confirming the type information in the annotation information as the object type information, and adding a first preset value to the annotation value in the annotation information, wherein the annotation value is used to characterize the accuracy of object recognition in the filling area; if the type information in the annotation information does not match the object type information, updating the type information in the annotation information to the object type information, and updating the annotation value in the annotation information to a second preset value.
- the method further includes: obtaining the attitude angle of the robot, the attitude angle including a roll angle and a pitch angle; when the roll angle and the pitch angle are respectively less than or equal to corresponding angle thresholds, confirming that the robot is located on flat ground.
- a second aspect of an embodiment of the present application provides a map marking device, comprising: an image acquisition unit, configured to acquire an image to be identified captured by a monocular camera of the robot when the robot is located on flat ground; an object recognition unit, configured to perform object recognition on the image to be identified, and obtain object type information of the object and coordinate information of the object in the image to be identified; an information determination unit, configured to determine object shape information of the object and position information of the object in an electronic map carried by the robot based on the object type information and the coordinate information; an area determination unit, configured to determine a fill area corresponding to the object on the electronic map based on the object shape information and the position information; and a map marking unit, configured to update annotation information of the fill area, wherein the annotation information is used for navigation of the robot.
- a third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned map marking method when executing the computer program.
- a fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned map marking method are implemented.
- a fifth aspect of an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the steps of the above-mentioned map marking method.
- map marking is performed when the robot is on flat ground, which can avoid the problem of deviation in the position recognition of the monocular camera due to height deviation.
- the object type information of the object and the coordinate information of the object in the image to be identified are referred to to determine the object shape information of the object and the position information in the electronic map carried by the robot.
- the object type information can be used to supplement the information that the monocular camera cannot directly obtain, so that the annotation information is updated in the corresponding filled area on the electronic map according to the object shape information and position information.
- the map marking can be accurately performed when the robot uses a monocular camera, taking into account both accuracy and cost issues, which helps to improve the accuracy of obstacle avoidance during robot navigation.
- FIG1 is a schematic diagram of an implementation flow of a map marking method provided in an embodiment of the present application.
- FIG2 is a schematic diagram of a specific implementation process of determining location information provided in an embodiment of the present application.
- FIG3 is a schematic diagram of a specific implementation flow of determining a first reference point according to an embodiment of the present application
- FIG4 is a schematic diagram of an image to be recognized provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a specific implementation process of determining object shape information provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a specific implementation process of determining a fill area according to an embodiment of the present application.
- FIG7 is a schematic structural diagram of a map marking device provided in an embodiment of the present application.
- FIG8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
- references to "one embodiment” or “some embodiments” in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application.
- phrases such as “in one embodiment,” “in some embodiments,” “in other embodiments,” and “in other embodiments” appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean “one or more but not all embodiments,” unless otherwise specifically emphasized.
- the terms “including,” “comprising,” “having,” and variations thereof all mean “including but not limited to,” unless otherwise specifically emphasized.
- Robot navigation requires obstacle avoidance. To help robots avoid obstacles, technologies are needed to identify objects in their work environment and mark them on electronic maps. Object recognition relies on visual sensors. Typically, robots use binocular or depth cameras for object detection to identify the type and location of objects in the work environment. However, binocular and depth cameras are relatively expensive. While monocular cameras are low-cost, they have difficulty calculating the exact location of objects. Therefore, a map marking method that balances accuracy and cost is needed.
- the present application proposes a map marking method that can accurately mark maps when a robot uses a monocular camera, taking into account both accuracy and cost issues.
- Figure 1 shows a schematic diagram of the implementation process of a map marking method provided by an embodiment of the present application, which can be applied to an electronic device.
- the electronic device can be a computer, mobile phone, or other intelligent device used to control or communicate with a robot, or a robot that needs navigation.
- the robot may be equipped with a monocular camera to capture images of the robot's working environment. Typically, the camera's imagery is oriented in the direction of the robot's forward motion. In addition to the monocular camera, the robot may also be equipped with other components, such as an Inertial Measurement Unit (IMU) and a voltage sensor, which are not limited in this application.
- IMU Inertial Measurement Unit
- a voltage sensor which are not limited in this application.
- the map marking method may include the following steps S101 to S105.
- Step S101 When the robot is on flat ground, an image to be recognized is obtained by taking a monocular camera of the robot.
- the robot can perform a flat ground detection after powering on. If the robot is on flat ground, that is, in a stable operating state, the object position recognition results are more accurate. In this case, the image to be recognized, captured by the robot's monocular camera, can be obtained and used for map marking.
- the robot can wait for a preset time and then re-perform flat ground detection until the robot is on flat ground, and obtain the image to be recognized captured by the robot's monocular camera.
- a monocular camera can periodically take pictures during the movement of the robot, and an image to be identified can be obtained at each shooting moment, and then the map mark can be updated in real time.
- Step S102 performing object recognition on the image to be recognized, and obtaining object type information and coordinate information of the object in the image to be recognized.
- object type information of the object and coordinate information of the object in the image to be identified can be obtained through object recognition.
- the object type information represents the type of the object, such as a trash can, a shoe, a scale, etc.
- the coordinate information of the object in the image to be identified can represent the position of the object in the image to be identified, and can be expressed as image coordinates in the image coordinate system.
- object recognition can be achieved through deep learning algorithms, contour extraction, threshold segmentation, etc., which is not limited to this application.
- Step S103 determining the object shape information and the position information of the object in the electronic map carried by the robot according to the object type information and the coordinate information.
- the electronic map carried by the robot is the map used for robot navigation and is also the map that needs to be marked.
- the electronic map can be a raster map, a vector map, or other forms of map, which is not limited in this application.
- the coordinate information can reflect the two-dimensional shape of the object within the imaging plane of the monocular camera.
- the monocular camera is difficult to provide information in the depth direction. Therefore, the present application may refer to the object type information to supplement the depth information that the monocular camera cannot directly obtain, thereby obtaining the object shape information of the object and the position information in the electronic map carried by the robot.
- the object shape information of the object may represent the three-dimensional shape of the object, and the object position information in the electronic map may represent the coordinates of the object in the map coordinate system.
- Step S104 determining the filling area corresponding to the object on the electronic map according to the shape information and position information of the object.
- the filled area represents the area occupied by the object in the electronic map. Based on the object shape information and position information, the position and size of the object in the electronic map can be determined, and then the corresponding filled area of the object on the electronic map can be determined.
- Step S105 update the annotation information of the filling area.
- annotation information in the electronic map can be used to annotate the information of objects at each location, including object type information and an annotation value.
- the annotation value can indicate the accuracy of object recognition, that is, the degree to which the actual type of the object at that location is consistent with the annotated type information. The higher the annotation value, the higher the accuracy.
- the annotation information can be used for robot navigation. More specifically, the annotation information can be used for the robot to perform obstacle avoidance operations during navigation.
- map marking is performed when the robot is on flat ground, which can avoid the problem of deviation in the position recognition of the monocular camera due to height deviation.
- the object type information of the object and the coordinate information of the object in the image to be identified are referred to to determine the object shape information of the object and the position information in the electronic map carried by the robot.
- the object type information can be used to supplement the information that the monocular camera cannot directly obtain, so that the annotation information is updated in the corresponding filled area on the electronic map according to the object shape information and position information.
- the map marking can be accurately performed when the robot uses a monocular camera, taking into account both accuracy and cost issues, which helps to improve the accuracy of obstacle avoidance during robot navigation.
- the robot's attitude angle can be obtained.
- the robot's attitude angle can be detected using an IMU (Integrated Motion Unit) onboard the robot.
- the attitude angle can include roll and pitch.
- the magnitude of the pitch angle can indicate whether the robot is tilted in the forward direction.
- the magnitude of the roll angle can indicate whether the robot is tilted in the left-right direction.
- the roll angle and pitch angle are less than or equal to their respective angle thresholds, that is, the roll angle is less than or equal to the first angle threshold (which can be set according to actual conditions, such as 3°) and the pitch angle is less than or equal to the second angle threshold (which can be set according to actual conditions, such as 3°), it indicates that the robot is not tilted or the degree of tilt is within the allowable range, and the robot can be confirmed to be on level ground.
- the first angle threshold and the second angle threshold can be the same or different.
- the roll angle is greater than the first angle threshold, or the pitch angle is greater than the second angle threshold, it indicates that the robot is significantly tilted, and it can be confirmed that the robot is not located on flat ground.
- the robot can start mapping. Otherwise, it can wait for a preset time and then re-run the flat ground detection. When the robot is on flat ground, it can obtain the image to be recognized captured by the robot's monocular camera.
- object type information of the object and coordinate information of the object in the image to be recognized can be obtained.
- the coordinate information of the object in the image to be identified may be the image coordinates of pixels within the identification frame of the object in the image to be identified.
- the identification frame may be the minimum circumscribed matrix of the object.
- the step of determining the position information may include steps S201 to S204 .
- Step S201 Obtain camera parameters of a monocular camera.
- the camera parameters may include the intrinsic and extrinsic parameters of the monocular camera.
- the camera parameters may be pre-calibrated and pre-stored in the electronic device.
- the calibration method may be the Zhang Zhengyou calibration method or other existing calibration methods, which are not limited by the present application.
- the intrinsic parameters can be used to determine the position of the monocular camera relative to the robot chassis (which can be the center of the wheel, facing forward).
- the extrinsic parameters can be used to determine the position relationship between the monocular camera and the chassis.
- Step S202 determining a first reference point of the object on the recognition frame according to the object type information.
- the electronic device in order to determine the position of an object in an electronic map, it is necessary to perform coordinate conversion based on a certain point of the object (such as the center point, centroid, etc.). Accordingly, in the image to be identified, it is also necessary to determine the point used for object coordinate conversion, which is the first reference point. The selection of the reference point affects the accuracy of the fill area to a certain extent. Considering that the object may not be fully captured in the image to be identified, the electronic device can determine the first reference point of the object on the identification frame based on the object type information.
- step S202 may include steps S301 to S304 .
- Step S301 determining the relative position between the recognition frame and the boundary of the image to be recognized.
- the boundaries of the image to be identified may refer to the left and right boundaries of the image to be identified.
- the relative position between the recognition frame and the boundaries of the image to be identified indicates the possibility that the object is not completely captured in the image to be identified.
- the position difference between the recognition frame and the left or right boundaries is 0, it means that the recognition frame is close to the left or right boundaries of the image to be identified, indicating that the object is not completely captured in the recognition frame.
- the recognition frame 41 is close to the left boundary of the image to be recognized.
- Step S302 determining the physical width of the recognition frame according to the image coordinates of the corner points of the recognition frame.
- the physical width of the recognition frame refers to the actual physical width of the recognition frame.
- the width mentioned in this application may refer to the width in a direction perpendicular to the robot's forward direction and parallel to the ground where the robot is located.
- the image coordinates of the lower-left and lower-right corners of the recognition frame can be determined. Distortion correction is performed based on intrinsic parameters. The corrected coordinates are then converted to corresponding physical coordinates using extrinsic parameters. The distances of these two corners relative to the monocular camera and the angles between the two corners and the line connecting them are then determined. Based on these distances and the angles between the two corners and the line connecting them, the physical width of the recognition frame can be calculated using the law of cosines.
- Step S303 Determine the estimated physical width of the object according to the object type information.
- the estimated physical width refers to an estimate of the actual physical width of an object.
- a mapping table between various object types and actual physical widths may be pre-calibrated.
- the estimated physical width of the object may be obtained by querying the table based on the object type information. For example, if the object is a shoe, the estimated physical width may be 15 cm.
- Step S304 determining a first reference point on the recognition frame according to the size relationship and relative position relationship between the physical width of the recognition frame and the estimated physical width.
- the first reference point can be determined on the recognition frame based on the relative position. If the recognition frame is close to the left edge of the image to be recognized, the lower left corner of the recognition frame can be used as the first reference point. If the recognition frame is close to the right edge of the image to be recognized, the lower right corner of the recognition frame can be used as the first reference point.
- the first reference point can be closer to the center of the object in the width direction, which helps to improve the accuracy of subsequent filling areas.
- Step S203 determining first posture information of the object relative to the chassis of the robot according to the camera parameters and the image coordinates of the first reference point in the image to be recognized.
- the distance Dc and angle Ac of the object relative to the center of the chassis can be calculated as the first pose information.
- Step S204 determining position information according to the first posture information and the second posture information of the robot in the electronic map.
- the robot can obtain the positioning pose Pr of the robot (specifically the chassis) on the electronic map at the time the image to be recognized is captured, thereby obtaining the second pose information.
- the robot can obtain its initial pose on the electronic map upon power-up and perform real-time positioning during movement to update the positioning pose and obtain the second pose information.
- the position Pf and angle Pf.theta of the object represented by the identification box in the map coordinate system can be calculated.
- the position Pf can be used as position information.
- the direction angle Pf.theta can represent the azimuth.
- the object shape information may include a target physical width w and a target physical thickness h.
- the target physical width may refer to the actual physical width of the object.
- the target physical thickness may refer to the actual physical thickness of the object.
- the thickness refers to the thickness in the direction of the robot's forward movement.
- the step of determining the object shape information may include steps S501 and S502 .
- Step S501 determining the target physical width of the object according to the image coordinates of the corner points of the recognition frame.
- the physical width of the recognition frame is determined according to the image coordinates of the corner points of the recognition frame, and the physical width of the recognition frame is used as the target physical width.
- steps S302 and S303 may be made to the description of steps S302 and S303 to determine the physical width of the recognition frame based on the image coordinates of the corner points of the recognition frame, and to determine the estimated physical width of the object based on the object type information.
- the physical width of the recognition frame may be used as the target physical width. If the physical width of the recognition frame is less than or equal to the estimated physical width, the estimated physical width may be used as the target physical width w.
- Step S502 determining the target physical thickness of the object according to the object type information.
- a mapping table between various object types and actual physical widths can be pre-calibrated. Based on the object type information, the estimated physical width of the object can be obtained by looking up the table. For example, if the object is a trash can, the estimated physical width can be 10 cm.
- the relationship between the physical thickness and physical width of the object can be determined based on the object type information, and then the target physical thickness of the object can be determined based on the target physical width and the relationship between the physical thickness and physical width.
- the target physical width is less than 10 cm, it means that the toe is facing forward, and the target physical thickness is 20 cm. If the target physical width is greater than 10 cm, it means that the toe is facing left or right, and the target physical thickness is 10 cm.
- the relative position between the recognition frame and the boundary of the image to be recognized can be determined, and the target physical thickness of the object can be determined by combining the relative position, the target physical width, and the relationship between the physical thickness and the physical width.
- the target physical width can be used as the target physical thickness, as the physical thickness and width of a scale are equal. If the identification frame is aligned with the left or right image boundaries, the target physical thickness can be estimated based on the object type information, for example, to 25 cm.
- the midpoint of the lower border of the recognition frame can be obtained, and the midpoint of the lower border can be used as the reference point to calculate the distance to be verified between the object and the monocular camera. If the distance to be verified is less than the first distance threshold (such as 10cm), or the distance to be verified is greater than the second distance threshold (such as 90cm), it means that the distance is too small or too large. At this time, the recognition frame can be ignored, and subsequent position calculation and map marking actions for the recognition frame will not be performed.
- the first distance threshold such as 10cm
- the second distance threshold such as 90cm
- the electronic device can obtain the object shape information (including the target physical width w and the target physical thickness h) and the position information (position pf) of the object in the electronic map carried by the robot.
- determining the filling area corresponding to the object on the electronic map based on the object shape information and location information may include steps S601 to S602 .
- Step S601 determining the outer frame shape information of the object on the electronic map, and determining parameter information of the outer frame in the electronic map based on the outer frame shape information, the object shape information and the position information.
- the outer frame may refer to the outline of an object on an electronic map.
- the outer frame shape information represents the outer frame shape, which can be selected based on the electronic map or the object.
- the outer frame's parameter information within the electronic map may include coordinates, radius, and other information, which are used to determine the position of the entire outer frame within the electronic map. This is determined based on the aforementioned target physical width w, target physical thickness h, position pf, and the outer frame shape.
- the outer frame shape information can be determined based on the object shape information of the object. If the object is a regular shape, such as a positive direction or a circle, a circle can be selected as the outer frame shape. If the object is an irregular shape, a rectangle can be selected as the outer frame shape.
- the parameter information can include the coordinates of the circle center and the circle radius.
- the maximum value can be determined from half the target physical width w, half the target physical thickness h, and a fixed value determined by the object type information (such as 10cm for shoes), and this maximum value is used as the circle radius Ro.
- the object position Pf is extended in the angular direction of the robot's positioning posture Pr (generally in the forward direction) by the length of the circle radius, and this is used as the circle center position Po.
- the parameter information may include vertex coordinates. Specifically, the vertex coordinates of the four vertices pt0, pt1, pt2, and pt3 of the rectangular outer frame are calculated as follows:
- pt0.x Pf.x + cos(Pf.theta + Pi/2) * w/2;
- pt2.y Pf.x + sin(Pf.theta + Pi/2)*w/2 + h*sin(Pf.theta);
- Pi is ⁇
- Pf.x is the x-axis coordinate of the position Pf on the electronic map.
- Step S602 Determine a fill area on the layer of the electronic map according to the outer frame shape information and parameter information.
- an electronic map can be composed of multiple superimposed layers.
- This application can establish a dedicated layer for recording object information and determine a fill area on the electronic map layer based on the outer frame shape information and parameter information.
- a circular or rectangular range can be marked within the layer as the fill area.
- the circular range can be filled by converting the object's center coordinates Po and radius Ro into map coordinates.
- the rectangular range can be filled by converting the coordinates of the rectangle's four vertices into map coordinates.
- the annotation information of the filled area can be updated.
- the grid map as an example, the grid within the filled area can be updated.
- the robot can establish the aforementioned layer after powering on.
- This layer can be referred to as an artificial intelligence (AI) object recognition layer corresponding to an electronic map, and its size is refreshed synchronously with the electronic map.
- the grids in the layer can be used to record object types and tag values.
- the tag values of all grids in the layer are reset to zero, and the object type is set to null.
- the tag value can be used to indicate the accuracy of object recognition within the filled area. The larger the tag value, the higher the accuracy.
- updating the annotation information of the filled area may include: if the type information in the annotation information matches the object type information, or if the type information in the annotation information is empty, confirming the type information in the annotation information as the object type information, and increasing the annotation value in the annotation information by a first preset value.
- the annotation value may be used to indicate the accuracy of object recognition within the filled area. In other words, if the type information already annotated in the annotation information is empty, or is consistent with the recognized object type information, the annotation value in the annotation information may be directly increased by the first preset value, for example, by incrementing the annotation value by one.
- the type information in the annotation information does not match the object type information, the type information in the annotation information is updated to the object type information, and the annotation value in the annotation information is updated to the second preset value.
- the annotation information is replaced with the recognized object type information, and the annotation value is updated to the second preset value, for example, the annotation value is updated to 1.
- the robot can be controlled to avoid obstacles based on the annotation information.
- grid cells with an annotation value greater than or equal to a preset value can be identified as impassable areas, and the robot can be controlled to avoid the area represented by the grid cells during navigation.
- the preset value can be set to 1, 2, etc.
- annotation information can also be used for display so that users can check the reliability of map markings.
- the robot creates a layer corresponding to the electronic map and refreshes the size synchronously. At the beginning, the mark values of all grids in the layer are cleared to zero.
- the image to be identified is acquired, and the robot's positioning position Pr on the electronic map at the time of the image acquisition is obtained.
- Object recognition is performed on the image to be identified. If an object is identified, an identification frame of the object is obtained.
- a threshold is set for the annotation value of the layer, such as 2. Grids greater than or equal to the threshold are considered obstacles and are bypassed or otherwise processed accordingly during navigation.
- FIG7 is a schematic structural diagram of a map marking device 700 provided in an embodiment of the present application, wherein the map marking device 700 is configured on an electronic device.
- the map marking device 700 may include:
- the image acquisition unit 701 is used to acquire an image to be recognized captured by a monocular camera of the robot when the robot is located on flat ground;
- the object recognition unit 702 is configured to perform object recognition on the image to be recognized, and obtain object type information and coordinate information of the object in the image to be recognized;
- An information determining unit 703 is configured to determine shape information of the object and position information of the object in an electronic map carried by the robot based on the object type information and the coordinate information;
- an area determination unit 704 configured to determine a filling area corresponding to the object on the electronic map according to the object shape information and the position information;
- the map marking unit 705 is used to update the marking information of the filled area, and the marking information is used for the robot to navigate.
- the coordinate information includes the image coordinates of the pixel points within the identification frame of the object in the image to be identified; the above-mentioned information determination unit 703 can be specifically used to: obtain the camera parameters of the monocular camera; determine the first reference point of the object on the identification frame according to the object type information; determine the first posture information of the object relative to the chassis of the robot according to the camera parameters and the image coordinates of the first reference point in the image to be identified; determine the position information according to the first posture information and the second posture information of the robot in the electronic map.
- the coordinate information includes the image coordinates of the pixel points within the recognition frame of the object in the image to be recognized; the above-mentioned information determination unit 703 can be specifically used to: determine the relative position between the recognition frame and the boundary of the image to be recognized; determine the physical width of the recognition frame of the recognition frame according to the image coordinates of the corner points of the recognition frame; determine the estimated physical width of the object according to the object type information; determine the first reference point on the recognition frame according to the size relationship between the physical width of the recognition frame and the estimated physical width, as well as the relative position.
- the coordinate information includes the image coordinates of the pixel points within the identification frame of the object in the image to be identified;
- the object shape information includes the target physical width and target physical thickness of the object;
- the above-mentioned information determination unit 703 can be specifically used to: determine the target physical width of the object based on the image coordinates of the corner points of the identification frame; determine the target physical thickness of the object based on the object type information.
- the above-mentioned area determination unit 704 can be specifically used to: determine the outer frame shape information of the outer frame of the object on the electronic map, and determine the parameter information of the outer frame within the electronic map based on the outer frame shape information, the object shape information and the position information; determine the fill area on the layer of the electronic map based on the outer frame shape information and the parameter information.
- the above-mentioned map marking unit 705 can be specifically used to: if the type information in the annotation information matches the object type information, or the type information in the annotation information is empty, then the type information in the annotation information is confirmed as the object type information, and a first preset value is added to the annotation value in the annotation information, and the annotation value is used to characterize the accuracy of object recognition in the filled area; if the type information in the annotation information does not match the object type information, then the type information in the annotation information is updated to the object type information, and the annotation value in the annotation information is updated to the second preset value.
- the map marking device 700 may further include a detection unit, specifically configured to: obtain the robot's attitude angles, including roll and pitch angles; and determine that the robot is located on level ground when the roll and pitch angles are less than or equal to corresponding angle thresholds.
- a detection unit specifically configured to: obtain the robot's attitude angles, including roll and pitch angles; and determine that the robot is located on level ground when the roll and pitch angles are less than or equal to corresponding angle thresholds.
- the electronic device 8 may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a map marking program.
- a map marking program such as a map marking program.
- the processor 80 executes the computer program 82, the steps in the above-mentioned map marking method embodiments are implemented, such as steps S101 to S105 shown in Figure 1.
- the processor 80 executes the computer program 82, the functions of the modules/units in the above-mentioned device embodiments are implemented, such as the functions of the image acquisition unit 701, the object recognition unit 702, the information determination unit 703, the area determination unit 704, and the map marking unit 705 shown in Figure 7.
- the computer program may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to complete the present application.
- the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
- the computer program can be divided into: an image acquisition unit, an object recognition unit, an information determination unit, an area determination unit, and a map marking unit.
- the specific functions of each unit are as follows: the image acquisition unit is used to acquire an image to be recognized captured by the robot's monocular camera when the robot is located on flat ground; the object recognition unit is used to perform object recognition on the image to be recognized and obtain object type information and coordinate information of the object in the image to be recognized; the information determination unit is used to determine the object shape information and position information of the object in the electronic map carried by the robot based on the object type information and the coordinate information; the area determination unit is used to determine the fill area corresponding to the object on the electronic map based on the object shape information and the position information; the map marking unit is used to update the annotation information of the fill area, and the annotation information is used for the robot to navigate.
- the electronic device may include, but is not limited to, a processor 80 and a memory 81.
- FIG8 is merely an example of an electronic device and does not limit the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or may combine certain components or different components.
- the electronic device may also include input and output devices, network access devices, buses, and the like.
- the processor 80 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or any conventional processor.
- the memory 81 may be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device.
- the memory 81 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.
- the memory 81 may also include both an internal storage unit of the electronic device and an external storage device.
- the memory 81 is used to store the computer program and other programs and data required by the electronic device.
- the memory 81 may also be used to temporarily store data that has been output or is to be output.
- the structure of the above electronic device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.
- the disclosed devices/electronic devices and methods can be implemented in other ways.
- the device/electronic device embodiments described above are merely schematic.
- the division of the modules or units is merely a logical function division.
- Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
- the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.
- the aforementioned integrated units may be implemented in the form of hardware or software functional units.
- the integrated module/unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the present application can implement all or part of the processes in the above-mentioned method embodiments by instructing the relevant hardware through a computer program.
- the computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments.
- the computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form.
- the computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
- Image Analysis (AREA)
Abstract
本申请适用于机器人技术领域,提供了一种地图标记方法、装置、电子设备和计算机可读存储介质。其中,所述地图标记方法包括:在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;更新所述填充区域的标注信息。本申请的实施例可以在机器人采用单目摄像头的情况下精确地进行地图标记,兼顾准确性和成本问题。
Description
本申请要求于2024年4月11日在中国专利局提交的、申请号为202410450980.9、发明名称为“地图标记方法、装置、电子设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于机器人技术领域,尤其涉及一种地图标记方法、装置、电子设备和计算机可读存储介质。
机器人是一种能够半自主或全自主工作的智能机器,可通过导航自主移动到工作区域执行任务。机器人的导航过程需要进行避障操作。为了帮助机器人进行避障,相关技术需将工作环境中的物体识别出来,并标注到电子地图中。物体的识别依赖于视觉传感器,一般地,机器人会采用双目或深度相机来进行物体检测,以便识别工作环境中物体的类型和位置,但是双目相机和深度相机成本相对较高。单目摄像头虽然成本低,但是难以计算物体的准确位置。因此,需要一种能够兼顾准确性和成本问题的地图标记方式。
本申请实施例提供一种地图标记方法、装置、电子设备和计算机可读存储介质,可以在机器人采用单目摄像头的情况下精确地进行地图标记,兼顾准确性和成本问题。
本申请实施例第一方面提供一种地图标记方法,包括:在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
在第一方面的一些实施方式中,所述坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;在所述根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息的步骤中,确定所述位置信息的步骤包括:获取所述单目摄像头的摄像头参数;根据所述物体类型信息,在所述识别框上,确定所述物体的第一基准点;根据所述摄像头参数和所述第一基准点在所述待识别图像内的图像坐标,确定所述物体相对于所述机器人的底盘的第一姿态信息;根据所述第一姿态信息和所述机器人在所述电子地图中的第二姿态信息,确定所述位置信息。
在第一方面的一些实施方式中,所述根据所述物体类型信息,在所述识别框上,确定所述物体的第一基准点,包括:确定所述识别框与所述待识别图像的边界之间的相对位置;根据所述识别框的角点的图像坐标,确定所述识别框的识别框物理宽度;根据所述物体类型信息,确定所述物体的预估物理宽度;根据所述识别框物理宽度和所述预估物理宽度之间的大小关系,以及所述相对位置,在所述识别框上确定所述第一基准点。
在第一方面的一些实施方式中,所述坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;所述物体形状信息包括所述物体的目标物理宽度和目标物理厚度;所述在所述根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息的步骤中,确定所述物体形状信息的步骤包括:根据所述识别框的角点的图像坐标,确定所述物体的目标物理宽度;根据所述物体类型信息,确定所述物体的目标物理厚度。
在第一方面的一些实施方式中,所述根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域,包括:确定所述物体在所述电子地图上的外框的外框形状信息,并根据所述外框形状信息、所述物体形状信息和所述位置信息,确定所述外框在所述电子地图内的参数信息;根据所述外框形状信息和所述参数信息,在所述电子地图的图层上确定所述填充区域。
在第一方面的一些实施方式中,所述更新所述填充区域的标注信息,包括:若所述标注信息中的类型信息与所述物体类型信息相匹配,或者所述标注信息中的类型信息为空,则将所述标注信息中的类型信息确认为所述物体类型信息,对所述标注信息中的标注值增加第一预设值,所述标注值用于表征所述填充区域内物体识别的准确度;若所述标注信息中的类型信息与所述物体类型信息不匹配,则将所述标注信息中的类型信息更新为所述物体类型信息,并将所述标注信息中的标注值更新为第二预设值。
在第一方面的一些实施方式中,所述方法还包括:获取所述机器人的姿态角,所述姿态角包括翻滚角和俯仰角;当所述翻滚角和所述俯仰角分别小于或等于对应的角度阈值,则确认所述机器人位于平地。
本申请实施例第二方面提供的一种地图标记装置,包括:图像获取单元,用于在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;物体识别单元,用于对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;信息确定单元,用于根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;区域确定单元,用于根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;地图标记单元,用于更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
本申请实施例第三方面提供一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述地图标记方法的步骤。
本申请实施例第四方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述地图标记方法的步骤。
本申请实施例第五方面提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述地图标记方法的步骤。
在本申请的实施方式中,一方面,在机器人位于平地的情况下进行地图标记,可以避免因高度偏差导致的单目摄像头位置识别出现偏差的问题,另一方面,参考物体的物体类型信息和物体在待识别图像中的坐标信息,确定物体的物体形状信息和在机器人搭载的电子地图中的位置信息,能够通过物体类型信息补充单目摄像头无法直接获得的信息,从而根据物体形状信息和位置信息,在电子地图上对应的填充区域进行标注信息的更新,可以在机器人采用单目摄像头的情况下准确地进行地图标记,兼顾准确性和成本问题,有助于提高机器人导航时避障的准确性。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种地图标记方法的实现流程示意图;
图2是本申请实施例提供的确定位置信息的具体实现流程示意图;
图3是本申请实施例提供的确定第一基准点的具体实现流程示意图;
图4是本申请实施例提供的待识别图像的示意图;
图5是本申请实施例提供的确定物体形状信息的具体实现流程示意图;
图6是本申请实施例提供的确定填充区域的具体实现流程示意图;
图7是本申请实施例提供的一种地图标记装置的结构示意图;
图8是本申请实施例提供的电子设备的结构示意图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
机器人的导航过程需要进行避障操作。为了帮助机器人进行避障,相关技术需将工作环境中的一些物体识别出来,并标注到电子地图中。物体的识别依赖于视觉传感器,一般地,机器人会采用双目或深度相机来进行物体检测,以便识别工作环境中物体的类型和位置,但是双目相机和深度相机成本相对较高。单目摄像头虽然成本低,但是难以计算物体的准确位置。因此,需要一种能够兼顾准确性和成本问题的地图标记方式。
鉴于此,本申请提出了一种地图标记方法,能够在机器人采用单目摄像头的情况下精确地进行地图标记,兼顾准确性和成本问题。
为了说明本申请的技术方案,下面通过具体实施例来进行说明。
图1示出了本申请实施例提供的一种地图标记方法的实现流程示意图,该方法可以应用于电子设备上。该电子设备可以是计算机、手机等用于对机器人进行控制或与机器人进行通信的智能设备,也可以是需要导航的机器人。
上述机器人可以搭载单目摄像头,单目摄像头可用于对机器人的工作环境进行拍摄,通常来说,单目摄像头的拍摄方向为机器人的前进方向。除了单目摄像头,机器人还可以配置有惯性测量单元(Inertial Measurement Unit,IMU)、电压传感器等其他组件,对此本申请不做限制。
具体的,上述地图标记方法可以包括以下步骤S101至步骤S105。
步骤S101,在机器人位于平地的情况下,获取机器人的单目摄像头拍摄得到的待识别图像。
在本申请的实施方式中,如果机器人处于倾斜状态,采用单目摄像头方案,物体的位置识别结果将存在较大的偏差,因此,机器人可以在上电后进行平地检测。如果机器人位于平地,即机器人处于平稳运行状态,此时物体的位置识别结果较为准确,则可以获取机器人的单目摄像头拍摄得到的待识别图像,以利用待识别图像进行地图标记。
相应的,如果机器人不位于平地,则可以等待预设时长后重新进行平地检测,直至机器人位于平地时,获取机器人的单目摄像头拍摄得到的待识别图像。
在本申请的实施方式中,单目摄像头可以在机器人运动过程中周期性地进行拍摄,每一个拍摄时刻可获得一张待识别图像,继而可以实时地更新地图标记。
步骤S102,对待识别图像进行物体识别,获得物体的物体类型信息和物体在待识别图像中的坐标信息。
在本申请的实施方式中,对于待识别图像内的各个物体,则通过物体识别可以获得物体的物体类型信息和物体在待识别图像中的坐标信息。
其中,物体类型信息表征物体的类型,例如物体为垃圾桶、鞋子、体重秤等等。物体在待识别图像中的坐标信息可表征物体在待识别图像中的位置,可以表示为图像坐标系内的图像坐标。
需要说明的是,物体识别可通过深度学习算法、轮廓提取、阈值分割等方式实现,对本申请不做限制。
步骤S103,根据物体类型信息和坐标信息,确定物体的物体形状信息和在机器人搭载的电子地图中的位置信息。
其中,机器人搭载的电子地图即用于机器人导航的地图,也是需要进行地图标记的地图。该电子地图可以是栅格地图、矢量地图或者其他形式的地图,对此本申请不做限制。
在本申请的实施方式中,坐标信息可以反映物体在单目摄像头的成像平面内的二维形状,但是,单目摄像头难以提供深度方向上的信息,因此,本申请可参考物体类型信息,补充单目摄像头无法直接获得的深度信息,由此得到物体的物体形状信息和在机器人搭载的电子地图中的位置信息。
其中,物体的物体形状信息可以表征物体的三维形状。物体在电子地图中的位置信息可以表示物体在地图坐标系中的坐标。
步骤S104,根据物体形状信息和位置信息,确定物体在电子地图上对应的填充区域。
在本申请的实施方式中,填充区域代表物体在电子地图内占据的区域。根据物体形状信息和位置信息,可以确定物体在电子地图所占据的位置和大小,继而确定出物体在电子地图上对应的填充区域。
步骤S105,更新填充区域的标注信息。
具体的,电子地图中的标注信息可用于标注每个位置上物体的信息,可以包括物体类型信息和标注值。其中,标注值可以表示物体识别的准确性,即,该位置上的物体的实际类型与所标注的类型信息一致的程度。标注值越高,则准确性越高。
在本申请的实施方式中,标注信息可用于机器人进行导航。更具体地说,标注信息可用于机器人在导航时执行避障操作。
在本申请的实施方式中,一方面,在机器人位于平地的情况下进行地图标记,可以避免因高度偏差导致的单目摄像头位置识别出现偏差的问题,另一方面,参考物体的物体类型信息和物体在待识别图像中的坐标信息,确定物体的物体形状信息和在机器人搭载的电子地图中的位置信息,能够通过物体类型信息补充单目摄像头无法直接获得的信息,从而根据物体形状信息和位置信息,在电子地图上对应的填充区域进行标注信息的更新,可以在机器人采用单目摄像头的情况下准确地进行地图标记,兼顾准确性和成本问题,有助于提高机器人导航时避障的准确性。
下面通过具体的实施例对本申请提供的地图标记方法进行说明。
为了进行平地检测,在本申请的一些实施方式中,可以获取机器人的姿态角。例如,可以通过机器人搭载的IMU检测机器人的姿态角。姿态角可以包括翻滚角(roll)和俯仰角(pitch)。俯仰角的大小可以表示机器人是否在前进方向上发生倾斜。翻滚角的大小可以表示机器人是否在左右方向上发生倾斜。
当翻滚角和俯仰角分别小于或等于对应的角度阈值,即翻滚角小于或等于第一角度阈值(可根据实际情况设置,如3°)、俯仰角小于或等于第二角度阈值(可根据实际情况设置,如3°),说明机器人未发生倾斜或机器人的倾斜程度在允许范围内,则可以确认机器人位于平地。其中,第一角度阈值和第二角度阈值可以相同或不同。
相应的,当翻滚角大于第一角度阈值,或者俯仰角大于第二角度阈值,说明机器人发生明显倾斜,则可以确认机器人不位于平地上。
如果机器人位于平地上,则可以开始进行地图标记。否则,可以等待预设时长后重新进行平地检测,直至机器人位于平地时,获取机器人的单目摄像头拍摄得到的待识别图像。
通过对待识别图像进行物体识别,可以获得物体的物体类型信息和物体在待识别图像中的坐标信息。
在一些实施方式中,物体在待识别图像中的坐标信息可以为物体的识别框内像素点在待识别图像中的图像坐标。识别框可以为物体的最小外接矩阵。
此时,如图2所示,在根据物体类型信息和坐标信息,确定物体的物体形状信息和在机器人搭载的电子地图中的位置信息的步骤中,确定位置信息的步骤可以包括步骤S201至步骤S204。
步骤S201,获取单目摄像头的摄像头参数。
在本申请的实施方式中,摄像头参数可以包括单目摄像头的内参和外参。其中,摄像头参数可以提前标定好并预存于电子设备内。标定方式可以选择张正友标定法或其他现有的标定方式,对此本申请不做限制。
其中,内参可用于确定单目摄像头相对于机器人的底盘(可指轮子中心,方向向前)的位姿。外参可用于确定单目摄像头与底盘之间的位姿关系。
步骤S202,根据物体类型信息,在识别框上,确定物体的第一基准点。
在本申请的实施方式中,为了确定物体在电子地图中的位置,需以物体的某一个点(例如中心点、质心点等)为基准进行坐标换算。相应的,在待识别图像中,也需要确定用于物体坐标换算的点,该点即为第一基准点。基准点的选择一定程度上影响了填充区域的准确性,考虑到待识别图像中可能未完整拍摄到物体,因此,电子设备可以根据物体类型信息,在识别框上,确定物体的第一基准点。
具体的,在本申请的一些实施方式中,如图3所示,步骤S202可以包括步骤S301至步骤S304。
步骤S301,确定识别框与待识别图像的边界之间的相对位置。
其中,待识别图像的边界可以指待识别图像的左侧边界和右侧边界。识别框与待识别图像的边界之间的相对位置表征物体未完整拍入待识别图像的可能性。当识别框与左侧边界或右侧边界之间的位置差为0,表示识别框靠待识别图像的左侧边界或右侧边界,说明识别框中不是完整的物体。
比如在图4中,识别框41靠待识别图像的左侧边界。
步骤S302,根据识别框的角点的图像坐标,确定识别框的识别框物理宽度。
其中,识别框物理宽度是指识别框的实际物理宽度。本申请所提到的宽度可以指与机器人前进方向垂直,且与机器人所在平地平行的方向上的宽度。
具体的,可以确定识别框左下角角点的图像坐标、右下角角点的图像坐标,根据内参进行畸变校正,对畸变校正后的坐标,根据外参转换得到对应的物理坐标,得到该两个角点相对于单目摄像头的距离,以及两个角点与单目摄像头连线的夹角角度。此时,基于该两个角点相对于单目摄像头的距离,以及两个角点与单目摄像头连线的夹角角度,可根据余弦定理计算得到识别框的识别框物理宽度。
步骤S303,根据物体类型信息,确定物体的预估物理宽度。
其中,预估物理宽度是指物体的实际物理宽度的估算值。在本申请的一些实施方式中,可以预先标定各个类型的物体与实际物理宽度之间的映射关系表,基于物体类型信息查表可得物体的预估物理宽度。比如,当物体为鞋子时,预估物理宽度可以为15cm。
步骤S304,根据识别框物理宽度和预估物理宽度之间的大小关系,以及相对位置关系,在识别框上确定第一基准点。
具体的,如果识别框物理宽度大于预估物理宽度,则可认为待识别图像内基本涵盖整个物体,此时可将识别框的下边框中点作为第一基准点。
如果识别框物理宽度小于或等于预估物理宽度,可认为待识别图像内未完整拍摄整个物体,此时可根据相对位置关系,在识别框上确定第一基准点。当识别框靠待识别图像的左侧边界时,可将识别框的左下角角点作为第一基准点。当识别框靠待识别图像的右侧边界时,将识别框的右下角角点作为第一基准点。
如此,第一基准点可以在宽度方向上更加接近物体的中心,有助于提升后续填充区域的准确性。
步骤S203,根据摄像头参数和第一基准点在待识别图像内的图像坐标,确定物体相对于机器人的底盘的第一姿态信息。
具体的,结合外参所反映的单目摄像头与底盘坐标系的位姿关系,以及第一基准点的图像坐标,可计算物体相对于底盘中心的距离Dc和角度Ac,作为第一姿态信息。
步骤S204,根据第一姿态信息和机器人在电子地图中的第二姿态信息,确定位置信息。
在本申请的实施方式中,机器人可以获取在待识别图像的拍摄时刻,机器人(可特指底盘)在电子地图上的定位位姿Pr,得到第二姿态信息。通常的,机器人可以在上电时获取到其在电子地图上的初始位姿,并在移动过程中实时定位,以更新定位位姿,得到第二姿态信息。
根据物体相对于机器人的底盘的第一姿态信息,以及机器人在电子地图中的第二姿态信息,可以计算识别框代表的物体在地图坐标系下的位置Pf和角度Pf.theta,位置Pf可作为位置信息。方向角Pf.theta可以表示方位角。
在本申请的一些实施方式中,物体形状信息可以包括目标物理宽度w和目标物理厚度h。
其中,目标物理宽度可以指物体的实际物理宽度。目标物理厚度可以指物体的实际物理厚度。其中,厚度是指在机器人前进方向上的厚度。
如图5所示,在根据物体类型信息和坐标信息,确定物体的物体形状信息和在机器人搭载的电子地图中的位置信息的步骤中,确定物体形状信息的步骤可以包括步骤S501至步骤S502。
步骤S501,根据识别框的角点的图像坐标,确定物体的目标物理宽度。
具体的,可以参考步骤S302,根据识别框的角点的图像坐标,确定识别框的识别框物理宽度,并将识别框物理宽度作为目标物理宽度。
为了使所使用的目标物理宽度更加准确,在本申请的一些实施方式中,可参考步骤S302和步骤S303的描述,根据识别框的角点的图像坐标,确定识别框的识别框物理宽度,并根据物体类型信息,确定物体的预估物理宽度。
如果识别框物理宽度大于预估物理宽度,则可以将识别框物理宽度作为目标物理宽度。如果识别框物理宽度小于或等于预估物理宽度,则可以将预估物理宽度作为目标物理宽度w。
步骤S502,根据物体类型信息,确定物体的目标物理厚度。
具体的,在本申请的一些实施方式中,可以预先标定各个类型的物体与实际物理宽度之间的映射关系表,基于物体类型信息查表可得物体的预估物理宽度。比如,当物体为垃圾桶时,预估物理宽度可以为10cm。
在本申请的另一些实施方式中,根据物体类型信息,可以确定物体的物理厚度和物理宽度之间的关系,继而根据目标物理宽度和物理厚度和物理宽度之间的关系确定物体的目标物理厚度。
例如,当物体为鞋子时,如果目标物理宽度小于10cm,说明鞋头朝前,则目标物理厚度为20cm,如果目标物理宽度大于10cm,说明鞋头朝左或朝右,则目标物理厚度为10cm。
进一步地,还可以确定识别框与待识别图像的边界之间的相对位置,结合相对位置、目标物理宽度,以及物理厚度和物理宽度之间的关系,确定物体的目标物理厚度。
例如,当物体为电子秤时,如果识别框不靠图像的左右侧图像边界时,由于电子秤物理厚度和物理宽度相等,可将目标物理宽度作为目标物理厚度。如果识别框靠图像的左右侧图像边界时,则可以根据物体类型信息,预估目标物理厚度,比如预估为25cm。
考虑到单目摄像头对过近或过远的物体识别精度不足,在本申请的一些实施方式中,可以在完成图像识别之后,获取识别框的下边框中点,以下边框中点为基准点计算物体距离单目摄像头的待校验距离。如果待校验距离小于第一距离阈值(如10cm),或者,待校验距离大于第二距离阈值(如90cm),说明距离过小或过大,此时可忽略掉该识别框,不对该识别框进行后续的位置计算、地图标记的动作。
至此,电子设备可以获取到物体的物体形状信息(包括目标物理宽度w、目标物理厚度h)和在机器人搭载的电子地图中的位置信息(位置pf)。
在本申请的一些实施方式中,如图6所示,根据物体形状信息和位置信息,确定物体在电子地图上对应的填充区域,可以包括步骤S601至步骤S602。
步骤S601,确定物体在电子地图上的外框的外框形状信息,并根据外框形状信息、物体形状信息和位置信息,确定外框在电子地图内的参数信息。
其中,外框可以指电子地图上包裹物体的轮廓框。外框形状信息表征外框形状,外框形状可根据电子地图或物体的情况选择。外框在电子地图内的参数信息可以为坐标、半径等信息,用于确定整个外框在电子地图中的位置,需根据前述目标物理宽度w、目标物理厚度h、位置pf结合外框形状确定。
具体的,可以根据物体的物体形状信息确定外框形状信息,如果物体为规则形状,如正方向、圆形,可选择圆形作为外框形状。如果物体为不规则形状,可选择矩形作为外框形状。
如果外框为圆形外框,则参数信息可以包括圆心坐标和圆形半径。具体的,可以在目标物理宽度w的一半、目标物理厚度h的一半,以及通过物体类型信息确定的固定数值(比如鞋子为10cm)中确定最大值,将该最大值作为圆形半径Ro。然后,将物体位置Pf往机器人的定位位姿Pr的角度方向(一般为前进方向)延伸圆形半径长度后的位置,作为圆心位置Po。
如果外框为矩形外框,则参数信息可以包括顶点坐标。具体的,矩形外框的四个顶点pt0、pt1、pt2、pt3的顶点坐标计算方式如下:
pt0在电子地图的x轴坐标pt0.x=Pf.x+cos(Pf.theta+Pi/2)*w/2;
pt0在电子地图的y轴坐标pt0.y=Pf.x+sin(Pf.theta+Pi/2)*w/2;
pt1在电子地图的x轴坐标pt1.x=Pf.x+cos(Pf.theta-Pi/2)*w/2;
pt1在电子地图的y轴坐标pt1.y=Pf.x+sin(Pf.theta-Pi/2)*w/2;
pt2在电子地图的x轴坐标pt2.x=Pf.x+cos(Pf.theta+Pi/2)*w/2+h*cos(Pf.theta);
pt2在电子地图的y轴坐标pt2.y=Pf.x+sin(Pf.theta+Pi/2)*w/2+h*sin(Pf.theta);
pt3在电子地图的x轴坐标pt3.x=Pf.x+cos(Pf.theta-Pi/2)*w/2+h*cos(Pf.theta);
pt3在电子地图的y轴坐标pt3.y=Pf.x+sin(Pf.theta-Pi/2)*w/2+h*sin(Pf.theta)。
其中,Pi为π,Pf.x即位置Pf的在电子地图的x轴坐标。
步骤S602,根据外框形状信息和参数信息,在电子地图的图层上确定填充区域。
在本申请的实施方式中,电子地图可由若干个图层叠加而成,本申请可专门建立一个用于记录物体信息的图层,并根据外框形状信息和参数信息,在电子地图的图层上确定填充区域。具体而言,可在图层内标记一个圆形或矩形的范围作为填充区域,圆形范围可根据物体圆心坐标Po和圆形半径Ro转换成地图坐标后进行填充,矩形范围可根据矩形的四个顶点坐标转换成地图坐标后进行填充。
此时,可以对填充区域进行标注信息的更新。以栅格地图为例,可以对填充区域内的栅格进行更新。
在本申请的实施方式中,机器人上电后可建立上述图层,该图层可称为与电子地图对应的人工智能(Artificial Intelligence,AI)识别物图层,与电子地图同步刷新大小。图层中的栅格可用于记录物体类型和标记值。初始化时,图层中所有栅格的标记值清零,物体类型为空。标注值可用于表征填充区域内物体识别的准确度。标注值越大则准确度越高。
相应的,更新填充区域的标注信息,可以包括:若标注信息中的类型信息与物体类型信息相匹配,或者标注信息中的类型信息为空,则将标注信息中的类型信息确认为物体类型信息,对标注信息中的标注值增加第一预设值。其中,标注值可用于表征所述填充区域内物体识别的准确度。也就是说,如果标注信息中已标注的类型信息为空,或者和识别得到的物体类型信息一致,则可以直接对标注信息中的标注值增加第一预设值,例如将标注值加一。
若标注信息中的类型信息与物体类型信息不匹配,则将标注信息中的类型信息更新为物体类型信息,并将标注信息中的标注值更新为第二预设值。也就是说,如果标注信息中已标注的类型信息和识别得到的物体类型信息不一致,则将标注信息替换为识别得到的物体类型信息,并将标注值更新为第二预设值,例如将标注值更新为1。
相应的,在导航时,可以根据标注信息控制机器人进行避障操作。比如,可以将标注值大于或等于预设数值的栅格确认为不可通行区域,导航时可控制机器人绕开该栅格所代表的区域。例如,预设数值可以设置为1、2等。
并且,标注信息还可用于显示,供用户查看地图标记的可靠性。
为了便于理解,下面通过S1至S12说明本申请提供的地图标记方案。
S1、机器人建立与电子地图对应的图层,同步刷新大小,开始时图层中所有栅格的标记值清零。
S2、标定机器人上摄像头的内参,并根据内参标定摄像头相对于底盘的位姿。
S3、获取机器人IMU的姿态角,当俯仰角或翻滚角大于角度阈值时,表明机器人不在平地上,延时预设时长再检测。如果机器人在平地上则进入后续步骤S4。
S4、移动过程中开始获取待识别图像,并获取该拍摄时刻机器人在电子地图上的定位位姿Pr。对待识别图像进行物体识别,如果识别到物体,得到物体的识别框。
S5、分别获取每个识别框左下角、右下角、下边框中心点的图像坐标。根据内参做畸变校正。对校正后的坐标,根据外参计算物理坐标,得到各点离摄像头的距离和角度。如果基于下边框中心点计算出来的物体离摄像头的距离小于第一距离阈值或者大于第二距离阈值,则忽略掉该识别框。
S6、根据摄像头到识别框左下角、右下角的距离和角度,根据余弦定理计算得到识别框的识别框物理宽度,同时确认目标物理宽度。
S7、根据识别框靠图像左侧边界或右侧边界、物体的物体类型信息确定第一基准点,以第一基准点为基准计算物体离摄像头的方向和距离。结合摄像头与底盘坐标系的位姿关系(已标定的外参)算出物体相对于底盘中心的距离Dc和角度Ac。
S8、根据拍摄时刻的机器人地图位姿、物体相对于底盘中心的距离Dc和角度Ac,计算识别框代表的物体在地图坐标系下的位置Pf。
S9、根据识别到物体的物体类型信息估算目标物理厚度。
S10、根据位置Pf,目标物理宽度w和目标物理厚度h,计算物体在电子地图上的外框。
S11、在图层中,标记外框的范围。对于每个栅格,如果标注的类型信息是空或者与物体类型信息相同,记录物体类型信息,标注值加一。如果标注的类型信息与物体类型信息不同,覆盖为物体类型信息,标注值为1。
S12、导航时,给图层的标注值设定阈值,比如2。大于等于该阈值的栅格认为是障碍物,导航时进行相应的绕开或其他处理。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为根据本申请,某些步骤可以采用其它顺序进行。
如图7所示为本申请实施例提供的一种地图标记装置700的结构示意图,所述地图标记装置700配置于电子设备上。
具体的,地图标记装置700可以包括:
图像获取单元701,用于在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;
物体识别单元702,用于对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;
信息确定单元703,用于根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;
区域确定单元704,用于根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;
地图标记单元705,用于更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
在本申请的一些实施方式中,坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;上述信息确定单元703可具体用于:获取所述单目摄像头的摄像头参数;根据所述物体类型信息,在所述识别框上,确定所述物体的第一基准点;根据所述摄像头参数和所述第一基准点在所述待识别图像内的图像坐标,确定所述物体相对于所述机器人的底盘的第一姿态信息;根据所述第一姿态信息和所述机器人在所述电子地图中的第二姿态信息,确定所述位置信息。
在本申请的一些实施方式中,坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;上述信息确定单元703可具体用于:确定所述识别框与所述待识别图像的边界之间的相对位置;根据所述识别框的角点的图像坐标,确定所述识别框的识别框物理宽度;根据所述物体类型信息,确定所述物体的预估物理宽度;根据所述识别框物理宽度和所述预估物理宽度之间的大小关系,以及所述相对位置,在所述识别框上确定所述第一基准点。
在本申请的一些实施方式中,坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;所述物体形状信息包括所述物体的目标物理宽度和目标物理厚度;上述信息确定单元703可具体用于:根据所述识别框的角点的图像坐标,确定所述物体的目标物理宽度;根据所述物体类型信息,确定所述物体的目标物理厚度。
在本申请的一些实施方式中,上述区域确定单元704可具体用于:确定所述物体在所述电子地图上的外框的外框形状信息,并根据所述外框形状信息、所述物体形状信息和所述位置信息,确定所述外框在所述电子地图内的参数信息;根据所述外框形状信息和所述参数信息,在所述电子地图的图层上确定所述填充区域。
在本申请的一些实施方式中,上述地图标记单元705可具体用于:若所述标注信息中的类型信息与所述物体类型信息相匹配,或者所述标注信息中的类型信息为空,则将所述标注信息中的类型信息确认为所述物体类型信息,对所述标注信息中的标注值增加第一预设值,所述标注值用于表征所述填充区域内物体识别的准确度;若所述标注信息中的类型信息与所述物体类型信息不匹配,则将所述标注信息中的类型信息更新为所述物体类型信息,并将所述标注信息中的标注值更新为第二预设值。
在本申请的一些实施方式中,上述地图标记装置700还可以包括检测单元,可具体用于:获取所述机器人的姿态角,所述姿态角包括翻滚角和俯仰角;当所述翻滚角和所述俯仰角分别小于或等于对应的角度阈值,则确认所述机器人位于平地。需要说明的是,为描述的方便和简洁,上述地图标记装置700的具体工作过程,可以参考图1至图6所述方法的对应过程,在此不再赘述。
如图8所示,为本申请实施例提供的一种电子设备的示意图。具体的,电子设备8可以包括:处理器80、存储器81以及存储在所述存储器81中并可在所述处理器80上运行的计算机程序82,例如地图标记程序。所述处理器80执行所述计算机程序82时实现上述各个地图标记方法实施例中的步骤,例如图1所示的步骤S101至S105。或者,所述处理器80执行所述计算机程序82时实现上述各装置实施例中各模块/单元的功能,例如图7所示的图像获取单元701、物体识别单元702、信息确定单元703、区域确定单元704和地图标记单元705的功能。
所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述电子设备中的执行过程。
例如,所述计算机程序可以被分割成:图像获取单元、物体识别单元、信息确定单元、区域确定单元和地图标记单元。各单元具体功能如下:图像获取单元,用于在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;物体识别单元,用于对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;信息确定单元,用于根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;区域确定单元,用于根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;地图标记单元,用于更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
所述电子设备可包括,但不仅限于,处理器80、存储器81。本领域技术人员可以理解,图8仅仅是电子设备的示例,并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器80可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器81可以是所述电子设备的内部存储单元,例如电子设备的硬盘或内存。所述存储器81也可以是所述电子设备的外部存储设备,例如所述电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器81还可以既包括所述电子设备的内部存储单元也包括外部存储设备。所述存储器81用于存储所述计算机程序以及所述电子设备所需的其他程序和数据。所述存储器81还可以用于暂时地存储已经输出或者将要输出的数据。
需要说明的是,为描述的方便和简洁,上述电子设备的结构还可以参考方法实施例中对结构的具体描述,在此不再赘述。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对各个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
Claims (10)
- 一种地图标记方法,其特征在于,包括:在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
- 如权利要求1所述的地图标记方法,其特征在于,所述坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;在所述根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息的步骤中,确定所述位置信息的步骤包括:获取所述单目摄像头的摄像头参数;根据所述物体类型信息,在所述识别框上,确定所述物体的第一基准点;根据所述摄像头参数和所述第一基准点在所述待识别图像内的图像坐标,确定所述物体相对于所述机器人的底盘的第一姿态信息;根据所述第一姿态信息和所述机器人在所述电子地图中的第二姿态信息,确定所述位置信息。
- 如权利要求2所述的地图标记方法,其特征在于,所述根据所述物体类型信息,在所述识别框上,确定所述物体的第一基准点,包括:确定所述识别框与所述待识别图像的边界之间的相对位置;根据所述识别框的角点的图像坐标,确定所述识别框的识别框物理宽度;根据所述物体类型信息,确定所述物体的预估物理宽度;根据所述识别框物理宽度和所述预估物理宽度之间的大小关系,以及所述相对位置,在所述识别框上确定所述第一基准点。
- 如权利要求1所述的地图标记方法,其特征在于,所述坐标信息包括所述物体的识别框内像素点在所述待识别图像中的图像坐标;所述物体形状信息包括所述物体的目标物理宽度和目标物理厚度;所述在所述根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息的步骤中,确定所述物体形状信息的步骤包括:根据所述识别框的角点的图像坐标,确定所述物体的目标物理宽度;根据所述物体类型信息,确定所述物体的目标物理厚度。
- 如权利要求1所述的地图标记方法,其特征在于,所述根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域,包括:确定所述物体在所述电子地图上的外框的外框形状信息,并根据所述外框形状信息、所述物体形状信息和所述位置信息,确定所述外框在所述电子地图内的参数信息;根据所述外框形状信息和所述参数信息,在所述电子地图的图层上确定所述填充区域。
- 如权利要求1所述的地图标记方法,其特征在于,所述更新所述填充区域的标注信息,包括:若所述标注信息中的类型信息与所述物体类型信息相匹配,或者所述标注信息中的类型信息为空,则将所述标注信息中的类型信息确认为所述物体类型信息,对所述标注信息中的标注值增加第一预设值,所述标注值用于表征所述填充区域内物体识别的准确度;若所述标注信息中的类型信息与所述物体类型信息不匹配,则将所述标注信息中的类型信息更新为所述物体类型信息,并将所述标注信息中的标注值更新为第二预设值。
- 如权利要求1所述的地图标记方法,其特征在于,所述方法还包括:获取所述机器人的姿态角,所述姿态角包括翻滚角和俯仰角;当所述翻滚角和所述俯仰角分别小于或等于对应的角度阈值,则确认所述机器人位于平地。
- 一种地图标记装置,其特征在于,包括:图像获取单元,用于在机器人位于平地的情况下,获取所述机器人的单目摄像头拍摄得到的待识别图像;物体识别单元,用于对所述待识别图像进行物体识别,获得物体的物体类型信息和所述物体在所述待识别图像中的坐标信息;信息确定单元,用于根据所述物体类型信息和所述坐标信息,确定所述物体的物体形状信息和在所述机器人搭载的电子地图中的位置信息;区域确定单元,用于根据所述物体形状信息和所述位置信息,确定所述物体在所述电子地图上对应的填充区域;地图标记单元,用于更新所述填充区域的标注信息,所述标注信息用于所述机器人进行导航。
- 一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述地图标记方法的步骤。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述地图标记方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410450980.9A CN118486025A (zh) | 2024-04-11 | 2024-04-11 | 地图标记方法、装置、电子设备和计算机可读存储介质 |
| CN202410450980.9 | 2024-04-11 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025213876A1 true WO2025213876A1 (zh) | 2025-10-16 |
Family
ID=92192150
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/143544 Pending WO2025213876A1 (zh) | 2024-04-11 | 2024-12-28 | 地图标记方法、装置、电子设备和计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN118486025A (zh) |
| WO (1) | WO2025213876A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118486025A (zh) * | 2024-04-11 | 2024-08-13 | 深圳市优必选科技股份有限公司 | 地图标记方法、装置、电子设备和计算机可读存储介质 |
| CN119379784A (zh) * | 2024-09-12 | 2025-01-28 | 深圳市优必选科技股份有限公司 | 障碍物的位置估计方法、装置、设备及存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190278288A1 (en) * | 2018-03-08 | 2019-09-12 | Ubtech Robotics Corp | Simultaneous localization and mapping methods of mobile robot in motion area |
| CN116051775A (zh) * | 2023-03-06 | 2023-05-02 | 超节点创新科技(深圳)有限公司 | 语义地图构建方法、移动机器人及存储介质 |
| CN117152240A (zh) * | 2022-05-19 | 2023-12-01 | 鸿富锦精密电子(烟台)有限公司 | 基于单目相机的物体检测方法、装置、设备及存储介质 |
| CN117690099A (zh) * | 2022-09-02 | 2024-03-12 | 广州视源电子科技股份有限公司 | 一种行驶区域的检测方法、装置、电子设备及存储介质 |
| CN118486025A (zh) * | 2024-04-11 | 2024-08-13 | 深圳市优必选科技股份有限公司 | 地图标记方法、装置、电子设备和计算机可读存储介质 |
-
2024
- 2024-04-11 CN CN202410450980.9A patent/CN118486025A/zh active Pending
- 2024-12-28 WO PCT/CN2024/143544 patent/WO2025213876A1/zh active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190278288A1 (en) * | 2018-03-08 | 2019-09-12 | Ubtech Robotics Corp | Simultaneous localization and mapping methods of mobile robot in motion area |
| CN117152240A (zh) * | 2022-05-19 | 2023-12-01 | 鸿富锦精密电子(烟台)有限公司 | 基于单目相机的物体检测方法、装置、设备及存储介质 |
| CN117690099A (zh) * | 2022-09-02 | 2024-03-12 | 广州视源电子科技股份有限公司 | 一种行驶区域的检测方法、装置、电子设备及存储介质 |
| CN116051775A (zh) * | 2023-03-06 | 2023-05-02 | 超节点创新科技(深圳)有限公司 | 语义地图构建方法、移动机器人及存储介质 |
| CN118486025A (zh) * | 2024-04-11 | 2024-08-13 | 深圳市优必选科技股份有限公司 | 地图标记方法、装置、电子设备和计算机可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118486025A (zh) | 2024-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11157766B2 (en) | Method, apparatus, device and medium for calibrating pose relationship between vehicle sensor and vehicle | |
| WO2025213876A1 (zh) | 地图标记方法、装置、电子设备和计算机可读存储介质 | |
| CN116912417B (zh) | 基于人脸三维重建的纹理贴图方法、装置、设备和存储介质 | |
| CN113034612B (zh) | 一种标定装置、方法及深度相机 | |
| US20210374978A1 (en) | Capturing environmental scans using anchor objects for registration | |
| CN113052907B (zh) | 一种动态环境移动机器人的定位方法 | |
| Tamas et al. | Targetless calibration of a lidar-perspective camera pair | |
| CN110197510A (zh) | 双目相机的标定方法、装置、无人机和存储介质 | |
| KR102618285B1 (ko) | 카메라 자세 결정 방법 및 시스템 | |
| CN112833890B (zh) | 地图构建方法、装置、设备、机器人及存储介质 | |
| Frohlich et al. | Absolute pose estimation of central cameras using planar regions | |
| CN110798677A (zh) | 三维场景建模方法及装置、电子装置、可读存储介质及计算机设备 | |
| CN115131273A (zh) | 信息处理方法、测距方法及装置 | |
| CN112020730B (zh) | 探测移动载体平台的摄像机彼此布置和探测摄像机相对移动载体平台外的对象的布置的方法 | |
| CN111191596A (zh) | 一种封闭区域制图方法、装置及存储介质 | |
| CN118392177A (zh) | 一种机器人定位方法、装置、设备及存储介质 | |
| CN114777768A (zh) | 一种卫星拒止环境高精度定位方法、系统及电子设备 | |
| CN115511977B (zh) | 一种基于标定模板的外参标定方法及装置 | |
| CN116152347B (zh) | 一种车载摄像头安装姿态角标定方法及系统 | |
| CN113409268B (zh) | 基于单目相机的可通行区域检测方法、装置及存储介质 | |
| CN117824621A (zh) | 停车场地图构建方法、装置、车辆及存储介质 | |
| KR102619083B1 (ko) | 인공 표식의 위치 추정 방법 및 시스템 | |
| CN116266388A (zh) | 标注信息生成方法、装置、系统、电子设备及存储介质 | |
| CN111783637A (zh) | 关键点标注方法及装置、目标物空间位姿确定方法及装置 | |
| CN116152783B (zh) | 目标元素标注数据的获取方法、计算机设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24934939 Country of ref document: EP Kind code of ref document: A1 |