Mapping method and device of mobile robot and mobile robot

Through the mobile robot actively approaching and observing the target object at the optimal observation position, the recognition accuracy of the target object is improved, the problem of poor accuracy of scene semantic information in the exploration map in the existing technology is solved, and higher accuracy of the exploration map information is achieved. sex.

CN118628993APending Publication Date: 2024-09-10HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410654450.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

During the exploration process, existing mobile robots have low accuracy in identifying target objects in randomly captured images, resulting in poor accuracy of scene semantic information in the exploration map.

Method used

By detecting the preset type of target object in the scene image, the mobile robot is controlled to actively approach and observe the target object at the optimal observation position, and the positional relationship of the target object is determined using the image collected by the image acquisition device at the optimal observation position, and then updated Exploring scene semantic information in maps.

Benefits of technology

It improves the accuracy of target object recognition results and positional relationships, and improves the accuracy of scene semantic information in the exploration map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628993A
    Figure CN118628993A
Patent Text Reader

Abstract

The embodiment of the invention provides a mapping method and device of a mobile robot and the mobile robot. The method comprises the following steps: acquiring a scene image acquired by image acquisition equipment; determining an initial position relationship between a target object included in the scene image and the mobile robot; controlling the mobile robot to move towards the target object based on the initial position relation; determining a target position relationship between the target object and the mobile robot based on an image currently acquired by the image acquisition equipment; based on the range of each sub-region in the exploration map, each target position relationship and the position of the mobile robot corresponding to each target position relationship, determining the position information of each target object in the corresponding sub-region; and on the basis of the position information, the type of each target object and a corresponding relationship between a preset type and scene semantic information, determining scene semantic information of each sub-region, and obtaining an exploration map comprising the scene semantic information. In this way, the accuracy of the scene semantic information included in the established exploration map can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a mapping method and device for a mobile robot and a mobile robot. Background Art

[0002] With the continuous development of artificial intelligence technology, mobile robots are widely used in various scenarios. For example, in factories, inspection robots are used for inspection; in homes, sweeping robots are used to clean the floor, etc. When entering a work area for the first time, the mobile robot explores the work area and establishes a SLAM (Simultaneous Localization And Mapping) map of the work area, that is, an exploration map. In addition, in order to facilitate scene mode decisions based on the established exploration map, the mobile robot can establish an exploration map of the work area that includes scene semantic information.

[0003] In the related technology, in the process of controlling a mobile robot to explore a working area, the image acquisition device of the mobile robot can be used to take images of various positions in real time, and based on the above images, the scene semantic information of the current location of the mobile robot can be determined. The scene semantic information is then added to the exploration map to obtain an exploration map of the working area that includes the scene semantic information.

[0004] In the above-mentioned mapping method, the scene classification of the captured images is performed using a pre-trained deep learning model, or the scene corresponding to the target object type is determined based on the object type of the target object identified in the image. The target object is determined based on the images randomly taken by the mobile robot during the exploration process, and then the scene semantic information is determined. However, since the accuracy of the target object recognition result of the randomly taken images is low, the accuracy of the scene semantic information included in the exploration map is poor. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a mobile robot mapping method, device and mobile robot to improve the accuracy of scene semantic information included in the exploration map. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present application provides a mapping method for a mobile robot, the method comprising:

[0007] In the process of the mobile robot moving along the exploration path, a scene image captured by an image acquisition device of the mobile robot is acquired, and an exploration map is updated based on the exploration result of the mobile robot, wherein the exploration result includes the scene image;

[0008] In a case where it is detected that the scene image includes a target object of a preset type, determining an initial positional relationship between the target object and the mobile robot based on the scene image;

[0009] Based on the initial position relationship and the device parameters of the image acquisition device, controlling the mobile robot to move toward the target object;

[0010] When the mobile robot moves to the optimal observation position, determining a target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device;

[0011] When the mobile robot completes the exploration of the area to be explored, based on the range of each sub-area included in the exploration map, each target position relationship, and the mobile robot position corresponding to each target position relationship, determine the position information of each target object in the corresponding sub-area;

[0012] Based on the location information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined, and an exploration map including the scene semantic information corresponding to the area to be explored is obtained.

[0013] Optionally, the initial position relationship includes an initial angle and an initial distance; the initial angle is an angle between a direction of a line between the target object and the mobile robot and a current forward direction of the mobile robot;

[0014] The step of controlling the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device includes:

[0015] Controlling the mobile robot to rotate the initial angle so that the current forward direction of the mobile robot coincides with the direction of the initial connection line;

[0016] Based on the initial distance and the device parameters of the image acquisition device, the moving distance of the mobile robot is calculated, and after the mobile robot is controlled to move the moving distance in the current forward direction, it is determined that the mobile robot has reached the optimal observation position.

[0017] Optionally, before calculating the moving distance of the mobile robot based on the initial distance and the device parameters of the preset image acquisition device, the method further includes:

[0018] After the mobile robot rotates by the initial angle, the initial distance between the target object and the mobile robot is updated based on the image of the target object currently captured by the image capture device.

[0019] Optionally, the image acquisition device is a monocular camera;

[0020] The step of determining the initial positional relationship between the target object and the mobile robot based on the scene image comprises:

[0021] Based on the scene image and a predetermined mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device, an initial positional relationship between the target object and the mobile robot is determined.

[0022] Optionally, the mapping relationship is established by:

[0023] Acquire device parameters of the image acquisition device and a sample image of the sample object acquired by the image acquisition device;

[0024] For each pixel point, based on the device parameters, calculate the corresponding coordinates of the pixel point in the coordinate system of the mobile robot, and based on the corresponding coordinates, calculate the horizontal distance between the sample object corresponding to the pixel point and the mobile robot;

[0025] For each pixel point, based on the device parameters and the coordinates of the center point of the sample image, calculate the angle between a first connecting line and a second connecting line, wherein the first connecting line is a connecting line between the pixel point and the midpoint of the lower edge of the sample image, and the second connecting line is a connecting line between the center point of the sample image and the midpoint of the lower edge of the sample image;

[0026] The horizontal distance and angle corresponding to each pixel point are recorded to obtain the mapping relationship.

[0027] Optionally, the calculating, for each pixel point, corresponding coordinates of the pixel point in the coordinate system of the mobile robot based on the device parameters includes:

[0028] For each pixel point, the corresponding coordinates of the pixel point in the coordinate system of the mobile robot are calculated according to the following formula:

[0029]

[0030] Where s is the scale factor, R wcis the external parameter in the device parameters, K is the internal parameter in the device parameters, (u, v) is the pixel coordinate of the pixel point, (x, y) is the corresponding coordinate of the pixel point in the coordinate system of the mobile robot, and h is the height of the image that can be captured by the image acquisition device in the coordinate system of the mobile robot;

[0031] The step of calculating the angle between the first connecting line and the second connecting line for each pixel point based on the device parameters and the coordinates of the center point of the sample image comprises:

[0032] For each pixel coordinate, the angle between the first connecting line and the second connecting line is calculated according to the following formula:

[0033]

[0034] Wherein, θ is the angle between the first connecting line and the second connecting line; (u1, v1) is the coordinate of the center point of the sample image.

[0035] Optionally, before recording the horizontal distance and angle corresponding to each pixel point to obtain the mapping relationship, the method further includes:

[0036] When the horizontal distance is greater than a preset threshold, the horizontal distance is updated to a target value, wherein the target value is greater than the preset threshold.

[0037] Optionally, the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device includes:

[0038] In the mapping relationship, the horizontal distance and angle corresponding to the center point of the lower edge of the detection frame of the target object in the image currently captured by the image acquisition device are found as the target position relationship between the target object and the mobile robot;

[0039] Before determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information, the method further includes:

[0040] Verifying the position information of each target object in the corresponding sub-region based on the boundary conditions of each sub-region, the target position relationship between the target object and the mobile robot, and the position of the mobile robot corresponding to the target position relationship;

[0041] For the position information that fails to pass the verification, based on the sub-region where the mobile robot position corresponding to the position information is located, the sub-region where the target object is located and the position information in the sub-region are updated.

[0042] Optionally, there is a sub-area boundary between the position information that has not passed the verification and the corresponding mobile robot position;

[0043] The updating of the sub-region where the target object is located and the position information in the sub-region based on the sub-region where the mobile robot position corresponding to the position information is located comprises:

[0044] The sub-region where the mobile robot position corresponding to the position information is located is updated to the sub-region where the target object is located;

[0045] The intersection of the line between the target object and the mobile robot and the target boundary is determined as the position information of the target object in the sub-area, wherein the target boundary is the boundary of the sub-area between the target object and the corresponding mobile robot position.

[0046] Optionally, the step of determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information includes:

[0047] Determine the number of target objects of each type included in each sub-area based on the location information of each target object and the type of each target object;

[0048] For each sub-region, based on the quantity and the correspondence between the preset types and the scene semantic information, the scene semantic information corresponding to the type with the largest quantity is used as the scene semantic information of the sub-region.

[0049] Optionally, before determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device, the method further includes:

[0050] During the process of the mobile robot moving toward the optimal observation position, determining whether a duration for which the target object cannot be identified does not exceed a first threshold;

[0051] In the case that the duration of the inability to identify the target object does not exceed the first threshold, and after the mobile robot moves to the optimal observation position, determining whether the duration of the identification of the target object reaches a second threshold;

[0052] If the duration of identifying the target object reaches a second threshold, the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device is performed.

[0053] In a second aspect, an embodiment of the present application provides a mapping device for a mobile robot, the device comprising:

[0054] An image acquisition module, used to acquire a scene image acquired by an image acquisition device of the mobile robot while the mobile robot moves along an exploration path, and update an exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image;

[0055] an initial relationship determination module, configured to determine an initial position relationship between the target object and the mobile robot based on the scene image when a target object of a preset type is detected in the scene image;

[0056] A control movement module, used for controlling the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device;

[0057] a target relationship determination module, configured to determine a target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device when the mobile robot moves to the optimal observation position;

[0058] a position information determination module, configured to determine, when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area based on the range of each sub-area included in the exploration map, each target position relationship, and the mobile robot position corresponding to each target position relationship;

[0059] The semantic information determination module is used to determine the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, and obtain an exploration map including the scene semantic information corresponding to the area to be explored.

[0060] In a third aspect, an embodiment of the present application provides a mobile robot, the mobile robot comprising an image acquisition device and a processor;

[0061] The image acquisition device is used to acquire images;

[0062] The processor is used to execute the method steps described in the first aspect above.

[0063] In a fourth aspect, 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 method steps described in the first aspect are implemented.

[0064] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method steps described in the first aspect above.

[0065] Beneficial effects of the embodiments of the present application:

[0066] In the solution provided by the embodiment of the present application, the electronic device can obtain the scene image captured by the image acquisition device of the mobile robot during the movement of the mobile robot along the exploration path, and update the exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; when it is detected that the scene image includes a target object of a preset type, the initial position relationship between the target object and the mobile robot is determined based on the scene image; based on the initial position relationship and the device parameters of the image acquisition device, the mobile robot is controlled to move toward the target object; when the mobile robot moves to the optimal observation position, the target position relationship between the target object and the mobile robot is determined based on the image of the target object currently captured by the image acquisition device; when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area is determined based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship; and then based on the position information corresponding to each target object, the type of each target object and the corresponding relationship between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined to obtain the exploration map including the scene semantic information corresponding to the area to be explored.

[0067] In the process of constructing an exploration map by a mobile robot, when the scene image captured by the image acquisition device of the mobile robot includes a target object of a preset type, the target position relationship between the target object and the mobile robot is determined by controlling the mobile robot to actively approach the target object and according to the image of the target object captured by the image acquisition device at the optimal observation position. Then, according to the range of each sub-area included in the exploration map, each target position relationship, and the position of the mobile robot corresponding to each target position relationship, the scene semantic information of each sub-area can be determined. Since the mobile robot actively approaches the target object during the exploration map, it can reach the optimal observation position for the target object, and the recognition result and target position relationship of the target object are determined based on the image captured by the image acquisition device at the optimal observation position, the recognition result and target position relationship of the target object are highly accurate, and then, the scene semantic information of the exploration map determined based on the target position relationship is highly accurate.

[0068] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0070] Figure 1 A flowchart of a mapping method for a mobile robot provided in an embodiment of the present application;

[0071] Figure 2 Based on Figure 1 A schematic diagram of the position of the mobile robot and the target object of the illustrated embodiment;

[0072] Figure 3 A flowchart of a specific implementation method of step S103 is shown;

[0073] Figure 4 A schematic diagram of recognition points of an image recognition frame provided in an embodiment of the present application;

[0074] Figure 5 A flowchart of a method for establishing a mapping relationship provided in an embodiment of the present application;

[0075] Figure 6 A schematic diagram of the angle between the mobile robot and the sample object provided in the embodiment of the present application;

[0076] Figure 7 Based on Figure 1 A schematic diagram of an example of location information verification of the illustrated embodiment;

[0077] Figure 8 A flowchart of a map construction example provided in an embodiment of the present application;

[0078] Figure 9(a) is based on Figure 8 A schematic diagram of a scene image of the mapping example shown;

[0079] Figure 9(b) is based on Figure 8 A schematic diagram of another scene image of the mapping example shown;

[0080] Figure 9(c) is based on Figure 8 A schematic diagram of another scene image of the mapping example shown;

[0081] Fig.10 Based on Figure 8 A schematic diagram of the process of a mobile robot approaching an observed target object in the mapping example shown;

[0082] Fig.11A schematic diagram of the structure of a mapping device for a mobile robot provided in an embodiment of the present application;

[0083] Fig.12 A schematic diagram of the structure of a mobile robot provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0085] In order to improve the accuracy of scene semantic information included in the exploration map, an embodiment of the present application provides a mobile robot mapping method, device, mobile robot, computer-readable storage medium and computer program product. The following first introduces a mobile robot mapping method provided in an embodiment of the present application.

[0086] The mapping method of a mobile robot provided in the embodiment of the present application can be applied to various scenarios of autonomous mapping of mobile robots. For example, a cleaning robot autonomously maps the area to be cleaned; an inspection robot autonomously maps the area to be inspected, etc. The application scenarios of the method are not specifically limited here.

[0087] The mapping method for a mobile robot provided in the embodiment of the present application can be applied to any electronic device that can control the movement of the mobile robot and has an image processing function, for example, a processor or controller mounted on the mobile robot that can communicate with the mobile robot and has an image processing function; a server that can communicate with the mobile robot and has an image processing function, etc., which are not specifically limited here. For the sake of clarity, they are referred to as electronic devices in the following.

[0088] The mobile robot can be equipped with an image acquisition device for capturing scene images during the mobile robot's autonomous exploration process. The image acquisition device carried by the mobile robot can be various types of image acquisition devices, such as a monocular camera, a binocular camera, a depth camera, etc., which are not specifically limited here.

[0089] like Figure 1 As shown, a mapping method for a mobile robot, the method comprising:

[0090] S101: When a mobile robot moves along an exploration path, a scene image captured by an image acquisition device of the mobile robot is acquired, and an exploration map is updated based on the exploration result of the mobile robot.

[0091] Wherein, the exploration result includes the scene image.

[0092] S102: When it is detected that the scene image includes a target object of a preset type, determining an initial position relationship between the target object and the mobile robot based on the scene image.

[0093] S103: Based on the initial position relationship and the device parameters of the image acquisition device, control the mobile robot to move toward the target object.

[0094] S104: When the mobile robot moves to the optimal observation position, determine the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device.

[0095] S105: When the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area is determined based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship.

[0096] S106: Based on the position information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined to obtain an exploration map including the scene semantic information corresponding to the area to be explored.

[0097] In the solution provided by the embodiment of the present application, the electronic device can obtain the scene image captured by the image acquisition device of the mobile robot during the movement of the mobile robot along the exploration path, and update the exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; when it is detected that the scene image includes a target object of a preset type, the initial position relationship between the target object and the mobile robot is determined based on the scene image; based on the initial position relationship and the device parameters of the image acquisition device, the mobile robot is controlled to move toward the target object; when the mobile robot moves to the optimal observation position, the target position relationship between the target object and the mobile robot is determined based on the image of the target object currently captured by the image acquisition device; when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area is determined based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship; and then based on the position information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined to obtain the exploration map including the scene semantic information corresponding to the area to be explored.

[0098] In the process of constructing an exploration map by a mobile robot, when the scene image captured by the image acquisition device of the mobile robot includes a target object of a preset type, the target position relationship between the target object and the mobile robot is determined by controlling the mobile robot to actively approach the target object and according to the image of the target object captured by the image acquisition device at the optimal observation position. Then, according to the range of each sub-area included in the exploration map, each target position relationship, and the position of the mobile robot corresponding to each target position relationship, the scene semantic information of each sub-area can be determined. Since the mobile robot actively approaches the target object during the exploration map, it can reach the optimal observation position for the target object, and the recognition result and target position relationship of the target object are determined based on the image captured by the image acquisition device at the optimal observation position, the recognition result and target position relationship of the target object are highly accurate, and then, the scene semantic information of the exploration map determined based on the target position relationship is highly accurate.

[0099] In scenarios where it is necessary to map the area to be explored, for example, when a cleaning robot maps a home environment after being turned on, the electronic device can plan an exploration path for the mobile robot based on the current position of the mobile robot and the target point in the area to be explored, and control the mobile robot to move toward the target point along the exploration path. The exploration path starts from the current position of the mobile robot and ends at the target point.

[0100] As an implementation method, the mobile robot has an image acquisition device and a sensor, and the sensor may be a radar, a laser sensor, etc. When the mobile robot starts to map the area to be explored, the electronic device may control the mobile robot to explore the surrounding area at the current position and obtain the exploration result, wherein the exploration result may include the scene map acquired by the image acquisition device and the detection result of the sensor. Based on the exploration result, the electronic device may determine the target point to which the mobile robot is expected to move, and based on the current position of the mobile robot and the target point, plan an exploration path for the mobile robot, and then control the mobile robot to move along the exploration path.

[0101] For example, the electronic device can obtain the scanning results obtained by the mobile robot's radar scanning the area to be detected, and determine the boundary of the area scanned by the radar based on the scanning results, and determine a target point on the boundary. Then, based on the current position of the mobile robot and the target point, an exploration path is planned for the mobile robot, and the mobile robot is controlled to move along the exploration path. After the mobile robot moves to the target point along the exploration path, the next target point can be determined based on the scanning results of the mobile robot's radar during the movement and the scanning results at the target point.

[0102] As an implementation method, when the mobile robot starts to map the area to be explored, the electronic device can use a point in a preset direction and at a preset distance from the mobile robot as a target point, and plan an exploration path for the mobile robot based on the current position of the mobile robot and the target point, and then control the mobile robot to move along the exploration path. The preset direction and preset distance can be set according to actual needs. For example, the preset direction can be the current forward direction of the mobile robot, and the preset distance can be 5 meters, etc., which are not specifically limited here.

[0103] In order to facilitate the mobile robot to make scene mode decisions based on the established exploration map of the area to be explored, it is hoped that the established exploration map includes scene semantic information.

[0104] Furthermore, in the above step S101, the electronic device can obtain the scene image captured by the image acquisition device of the mobile robot while the mobile robot moves along the exploration path, and update the exploration map based on the exploration results of the mobile robot, wherein the exploration results include the scene image.

[0105] When the mobile robot moves along the exploration path, the electronic device can obtain the exploration results obtained by the mobile robot in exploring the area to be explored during the movement, and then update the exploration map of the area to be explored based on the exploration results of the mobile robot. The exploration results may include scene images captured by the image acquisition device. When the mobile robot also includes other detection modules, the exploration results may also include the detection results obtained by the other detection modules of the mobile robot in exploring the area corresponding to the exploration path, such as radar scanning results, obstacle detection results, etc.

[0106] The exploration map records the boundary information of each boundary in the area to be explored, and the mobile robot posture corresponding to each scene image. The mobile robot posture corresponding to each scene image is obtained by performing SLAM on the scene image collected by the image acquisition device of the mobile robot, and the mobile robot posture corresponding to each scene image includes the position and posture of the mobile robot when the scene image is collected.

[0107] In order to determine the regional scenes corresponding to each sub-area in the area to be explored, the electronic device may analyze each scene image captured by the image acquisition device of the mobile robot.

[0108] Since the area to be explored may include various types of objects, only some types of objects can be used for regional scene recognition. For example, the area to be explored may include sofas, televisions, children's toy cars, floor lamps, mirrors and other objects. Since sofas and televisions are likely to appear in the living room, it can be recognized that the area belongs to the living room based on the sofa and TV. Children's toy cars, floor lamps, mirrors, etc. may appear in multiple areas of the home scene, for example, in the living room, bedroom, storage room, etc., and the scene corresponding to the area cannot be recognized based on such items.

[0109] Based on this, in order to accurately perform regional scene recognition, the object types that can be used for regional scene recognition can be pre-determined as preset types. Among them, the preset types can include range hoods, stoves, sofas, televisions, beds, dining tables and chairs, wardrobes, toilets, bookcases, etc. After acquiring the scene image, the electronic device can detect whether the scene image includes a target object of the preset type based on the preset type.

[0110] As an implementation mode, when a scene image is acquired, the electronic device may perform a dedistortion process on the scene image and detect whether the dedistorted scene image includes a preset type of target object to obtain a more accurate target object recognition result.

[0111] As an implementation mode, after acquiring a scene image acquired by an image acquisition device of a mobile robot, the electronic device may input the scene image into a preset object type recognition model and acquire an object recognition result output by the object type recognition model, wherein the object type recognition model is used to recognize objects of a preset type and the object type recognition model may be an Hrnet recognition model.

[0112] Furthermore, in the above step S102, when it is detected that the scene image includes a target object of a preset type, the electronic device can determine the initial position relationship between the target object and the mobile robot based on the scene image.

[0113] The initial position relationship may include an initial distance between the target object and the mobile robot; or an initial angle and an initial distance between the target object and the mobile robot, which are not specifically limited herein. The initial angle between the target object and the mobile robot may be an angle between a line direction between the target object and the mobile robot and a current forward direction of the mobile robot.

[0114] As an implementation method, the initial position relationship is the initial distance between the target object and the mobile robot. When the image acquisition device is a monocular camera, the electronic device can calculate the initial distance between the target object and the mobile robot based on the scene image and the device parameters of the image acquisition device; when the image acquisition device is a binocular camera or a depth camera, the electronic device can read the initial distance between the target object and the mobile robot in the scene image.

[0115] As an implementation manner, the initial position relationship is an initial angle and an initial distance between the target object and the mobile robot. The electronic device can calculate the initial angle and the initial distance between the target object and the mobile robot based on the scene image and device parameters of the image acquisition device.

[0116] When the image acquisition device is a monocular camera, the mapping relationship between the pixel coordinates and the position relationship in the image acquired by the image acquisition device can be predetermined. In this way, when a target object of a preset type is detected in the scene image, the electronic device can determine the initial position relationship between the target object and the mobile robot based on the scene image and the predetermined mapping relationship.

[0117] As an implementation mode, the initial position relationship is the initial angle and initial distance between the target object and the mobile robot. When the image acquisition device is a depth camera, the mapping relationship between the pixel coordinates and the initial angle in the image acquired by the image acquisition device can be predetermined. In this way, when a target object of a preset type is detected in the scene image, the electronic device can read the initial distance between the target object and the mobile robot in the scene image, and determine the initial angle between the target object and the mobile robot based on the scene image and the predetermined mapping relationship.

[0118] When the mobile robot is in different positions, the scene images captured by the image acquisition device of the mobile robot may include the same object, for example Figure 2 As shown, when the mobile robot is located at position A and the current forward direction is direction a, the scene image captured by the image acquisition device of the mobile robot includes the target object; when the mobile robot is located at position B and the forward direction is direction b, the scene image captured by the image acquisition device of the mobile robot also includes the target object. In this case, if a preset type of target object is detected in the scene image, the mobile robot is controlled to observe the target object, and the same target object will be observed repeatedly, which reduces the efficiency of mapping.

[0119] Based on this, as an implementation method, in order to avoid repeated observation of the same target object, during the movement of the mobile robot along the exploration path, the electronic device can generate an observation map based on the mobile robot's observation results of each object and the detection map. The observation map indicates the areas and target objects that the mobile robot has observed.

[0120] In this way, when a target object of a preset type is detected in a scene image, the electronic device can first determine whether the mobile robot has observed the target object based on the position of the mobile robot corresponding to the scene image and the observation map. If the mobile robot has not observed the target object, step S102 is executed, that is, the initial position relationship between the target object and the mobile robot is determined based on the scene image; if the mobile robot has observed the target object, there is no need to observe the target object again, that is, there is no need to determine the initial position relationship between the target object and the mobile robot, and the electronic device can control the mobile robot to continue moving along the exploration path.

[0121] Under the influence of imaging factors such as angle and distance, the imaging effect of the object in the scene image captured by the image acquisition device may be poor, which in turn leads to low accuracy of the object recognition result of the target object. In order to improve the accuracy of the object recognition result of the target object and improve the accuracy of the scene semantic information of each sub-area in the exploration map, the mobile robot can be controlled to actively approach the target object, and after actively approaching the target object, observe the target object again.

[0122] In the above step S103, the electronic device may control the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device. After determining the initial position relationship between the target object and the mobile robot, the electronic device may control the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device, so that the mobile robot moves to the optimal observation position, and observes the target object again after moving to the optimal observation position.

[0123] Among them, the optimal observation distances corresponding to different image acquisition devices may be different. For the image acquisition device of the mobile robot, the optimal observation distance of the image acquisition device can be determined according to the device parameters of the image acquisition device.

[0124] As an implementation mode, when the initial position relationship includes an initial angle and an initial distance, the electronic device may first control the mobile robot to rotate the initial angle in the direction of the line between the target object and the mobile robot, in the direction where the target object is located. Thereafter, based on the initial distance and the device parameters of the image acquisition device, the moving distance is calculated, and the mobile robot is controlled to move forward by the moving distance, so that the mobile robot reaches the optimal observation position.

[0125] As an implementation mode, when the initial position relationship includes an initial distance, the electronic device can calculate the moving distance based on the initial distance and the device parameters of the image acquisition device, and control the mobile robot to move forward the moving distance so that the mobile robot reaches the optimal observation position.

[0126] In the above step S104, the electronic device may determine the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device when the mobile robot moves to the optimal observation position.

[0127] After the mobile robot moves to the optimal observation position, the image acquisition device of the mobile robot can acquire an image including the target object at the optimal observation position. The electronic device can obtain the image of the target object currently acquired by the image acquisition device, and determine the target position relationship between the target object and the mobile robot based on the image. Since the optimal observation position is determined based on the device parameters of the image acquisition device, the image of the target object currently acquired by the image acquisition device has a better imaging effect, the object recognition result determined using the image has a higher accuracy, and the target position relationship between the target object and the mobile robot has a higher accuracy.

[0128] Among them, the target position relationship can be set according to actual needs, which can be the current distance between the target object and the mobile robot; it can also be the current angle and the current distance, where the current angle is the angle between the connection direction between the target object and the mobile robot and the current forward direction of the mobile robot, etc.; these are all reasonable and are not limited here.

[0129] As an implementation method, the target position relationship is the current distance between the target object and the mobile robot. When the image acquisition device is a monocular camera, the electronic device can calculate the target distance between the target object and the mobile robot based on the image of the target object currently acquired by the image acquisition device and the device parameters of the image acquisition device; when the image acquisition device is a binocular camera or a depth camera, the electronic device can read the target distance between the target object and the mobile robot from the image of the target object currently acquired by the image acquisition device.

[0130] As an implementation method, the target position relationship is the current angle and current distance between the target object and the mobile robot. The electronic device can calculate the current angle and current distance between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device and the device parameters of the image acquisition device.

[0131] When the image acquisition device is a monocular camera, the mapping relationship between the pixel coordinates and the position relationship in the image acquired by the image acquisition device can be predetermined. In this way, the electronic device can determine the target position relationship between the target object and the mobile robot based on the image of the target object currently acquired by the image acquisition device and the predetermined mapping relationship.

[0132] As an implementation mode, the target position relationship is the current angle and the current distance between the target object and the mobile robot. When the image acquisition device is a depth camera, the mapping relationship between the pixel coordinates in the image acquired by the image acquisition device and the current angle can be predetermined. The electronic device can read the current distance between the target object and the mobile robot in the image of the target object currently acquired by the image acquisition device, and determine the current angle between the target object and the mobile robot based on the image of the target object currently acquired by the image acquisition device and the predetermined mapping relationship.

[0133] In the above step S105, when the mobile robot completes the exploration of the area to be explored, the electronic device can determine the position information of each target object in the corresponding sub-area based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship.

[0134] During the process of the mobile robot moving along the exploration path, the electronic device can continuously obtain scene images captured by the image acquisition device of the mobile robot, calculate the initial position relationship between the mobile robot and the preset type of target objects identified in each scene image, and based on the initial position relationship and the device parameters of the image acquisition device, control the mobile robot to actively approach the target object and observe the target object at the optimal observation position.

[0135] During the process of the mobile robot exploring the area to be explored, the electronic device can record the target position relationship corresponding to each target object and the mobile robot position corresponding to each target position relationship. In addition, during the process of the mobile robot exploring the area to be explored, the electronic device can continuously update the exploration map of the area to be explored according to the exploration results of the mobile robot, wherein the exploration map includes the range of each sub-area.

[0136] In this way, when the mobile robot completes the exploration of the area to be explored, the electronic device can determine the sub-area corresponding to each target object and determine the position information of each target object in the corresponding sub-area based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship.

[0137] For each target object, the electronic device can determine the position of the target object according to the target position relationship between the target object and the mobile robot, and the position of the mobile robot corresponding to the target position relationship. Then, the electronic device can determine the corresponding sub-area of ​​the target object and the position information of the target object in the corresponding sub-area in the exploration map according to the target object position and the range of each sub-area included in the exploration map.

[0138] In the above step S106, the electronic device can determine the scene semantic information of each sub-area based on the location information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, and obtain an exploration map including the scene semantic information corresponding to the area to be explored.

[0139] After determining the location information corresponding to each target object, the electronic device can determine the type of each target object included in each sub-area according to the location information corresponding to each target object and the type of each target object. According to the correspondence between the preset type and the scene semantic information, the scene semantic information of each sub-area can be determined, thereby obtaining an exploration map including the scene semantic information corresponding to the area to be explored.

[0140] As an implementation method, various preset types can correspond to various types of area scenes respectively. For each sub-area, the electronic device can, based on the number of target objects of various types included in the sub-area, and then, based on the number and the correspondence between the preset types and the scene semantic information, use the scene semantic information corresponding to the type with the largest number as the scene semantic information of the sub-area.

[0141] As an implementation method, the regional scene has a corresponding relationship with a specific type. For each sub-region, when the electronic device detects that the region includes a target object of a specific type, it can use the scene semantic information corresponding to the specific type as the scene semantic information of the sub-region based on the corresponding relationship between the preset type and the scene semantic information. For example, when the sub-region includes a range hood, the kitchen corresponding to the range hood is used as the scene semantic information of the sub-region; when the sub-region includes a toilet, the bathroom corresponding to the toilet is used as the scene semantic information of the sub-region, etc.

[0142] As an implementation method, for each sub-area, the electronic device can determine the scene semantic information corresponding to each target object based on the type of target object included in the sub-area and the correspondence between the preset type and the scene semantic information, and use the scene semantic information that appears the most times as the scene semantic information of the sub-area. For example, the sub-area includes a sofa, a bookcase, a washing machine, and a TV. Among them, the sofa corresponds to the living room, the bookcase corresponds to the study, the washing machine corresponds to the bathroom, and the TV corresponds to the living room. The living room that appears the most times is used as the scene semantic information of the sub-area.

[0143] After determining the scene semantic information of each sub-area, the electronic device may record the scene semantic information of each sub-area in the exploration map, thereby obtaining an exploration map including the scene semantic information corresponding to the area to be explored.

[0144] As an implementation method, when the execution subject of the embodiment of the present application is not a mobile robot, the electronic device can send the exploration map including scene semantic information corresponding to the area to be explored to the mobile robot, so that the mobile robot stores the exploration map including scene semantic information corresponding to the area to be explored. In this way, when performing various tasks in the area to be explored later, the mobile robot can autonomously determine the task execution mode of each sub-area based on the exploration map including scene semantic information corresponding to the area to be explored.

[0145] As an implementation mode, when the execution subject of the embodiment of the present application is a mobile robot, the mobile robot can store the established exploration map corresponding to the area to be explored including scene semantic information.

[0146] As an implementation method of an embodiment of the present application, the initial position relationship includes an initial angle and an initial distance; the initial angle is an angle between a direction of a line between the target object and the mobile robot and a current forward direction of the mobile robot;

[0147] like Figure 3 As shown, the above step S103, the step of controlling the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device, may include:

[0148] S301: Control the mobile robot to rotate the initial angle so that the current forward direction of the mobile robot coincides with the direction of the initial connection line;

[0149] S302: Based on the initial distance and the device parameters of the image acquisition device, the moving distance of the mobile robot is calculated, and after the mobile robot is controlled to move the moving distance in the current forward direction, it is determined that the mobile robot reaches the optimal observation position.

[0150] The initial position relationship between the target object and the mobile robot may include an initial angle and an initial distance. After determining the initial position relationship between the target object and the mobile robot, the electronic device may control the mobile robot to rotate by the initial angle. Thus, after the mobile robot completes the rotation, the current forward direction of the mobile robot coincides with the initial connection direction, and the target object is located at the center of the image captured by the image acquisition device.

[0151] Then, in order to observe the target object at the optimal observation position, the electronic device can calculate the moving distance of the mobile robot based on the initial distance and the optimal observation distance in the device parameters of the image acquisition device, and control the mobile robot to move the moving distance in the current forward direction. In this way, when the mobile robot reaches the optimal observation position, the distance between the mobile robot and the target object is the optimal observation distance.

[0152] For example, when the initial angle is 30 degrees clockwise, the initial distance is 3 meters, and the optimal observation distance of the mobile robot's image acquisition device is 0.5 meters, the electronic device can control the mobile robot to rotate 30 degrees clockwise, and calculate the moving distance to be 2.5 meters based on the initial distance and the optimal observation distance, and then control the mobile robot to move 2.5 meters in the current forward direction so that the mobile robot reaches the optimal observation position.

[0153] It can be seen that in this embodiment, when the initial position relationship includes an initial angle and an initial distance, the electronic device can first control the mobile robot to rotate the initial angle in the direction of the target object, and then control the mobile robot to move forward to the optimal observation position. In this way, by actively approaching the target object, the mobile robot can observe the target object at the optimal observation position, thereby improving the accuracy of the recognition result of the target object, and improving the accuracy of the determined target position relationship between the target object and the mobile robot.

[0154] After the mobile robot is controlled to rotate the initial angle, the initial distance between the mobile robot and the target object may change accordingly. If the mobile robot is controlled to move according to the initial distance, the mobile robot may not be able to reach the optimal observation position. Based on this, in order to improve the observation accuracy, the initial distance between the mobile robot and the target object can be updated after the mobile robot rotates the initial angle.

[0155] As an implementation of an embodiment of the present application, before the above step S302, i.e., calculating the moving distance of the mobile robot based on the initial distance and the device parameters of the preset image acquisition device, the method may further include:

[0156] After the mobile robot rotates by the initial angle, the initial distance between the target object and the mobile robot is updated based on the image of the target object currently captured by the image capture device.

[0157] After the mobile robot rotates the initial angle, the electronic device can obtain the image of the target object currently captured by the image acquisition device of the mobile robot. Afterwards, based on the image of the target object currently captured by the image acquisition device, the distance between the target object and the mobile robot is calculated, and the initial distance between the target object and the mobile robot is updated using the distance. Then, the electronic device can calculate the moving distance of the mobile robot using the updated initial distance, and control the mobile robot to move the above moving distance so that the mobile robot reaches the optimal observation position.

[0158] It can be seen that in this embodiment, after the mobile robot rotates an initial angle, the electronic device can use the image of the target object currently captured by the image acquisition device to update the initial distance between the target object and the mobile robot. In this way, the movement of the mobile robot can be controlled by using the updated initial distance, so that the mobile robot can be controlled to accurately reach the optimal observation position.

[0159] As an implementation of an embodiment of the present application, the image acquisition device is a monocular camera; the above step S102, i.e., the step of determining the initial position relationship between the target object and the mobile robot based on the scene image, may include:

[0160] Based on the scene image and a predetermined mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device, an initial positional relationship between the target object and the mobile robot is determined.

[0161] When the initial position relationship between the target object and the mobile robot cannot be intuitively displayed in the image captured by the image acquisition device, for example, when the image acquisition device of the mobile robot is a monocular camera, the electronic device needs to calculate the initial position relationship between the target object and the mobile robot based on the scene image captured by the image acquisition device and the device parameters of the image acquisition device.

[0162] In order to improve the calculation efficiency of the initial position relationship between the target object and the mobile robot, the mapping relationship between the pixel coordinates and the position relationship in the image captured by the image acquisition device can be predetermined. In this way, after acquiring a scene image including the target object, the electronic device can determine the initial position relationship between the target object and the mobile robot based on the scene image and the predetermined mapping relationship.

[0163] As an implementation method, when the acquired scene image includes an image recognition frame, the electronic device can determine the pixel coordinates corresponding to the recognition point in the image recognition frame of the target object, and then find the position relationship corresponding to the pixel coordinates in the predetermined mapping relationship between the pixel coordinates and the position relationship in the image captured by the image acquisition device as the initial position relationship between the target object and the mobile robot. The recognition point of the image recognition frame can be set according to actual needs, for example, it can be the center point of the image recognition frame, or it can be Figure 4 The midpoint A of the lower edge of the image recognition frame shown is not specifically limited here.

[0164] It can be seen that in this embodiment, a mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device can be established in advance, so that the electronic device can use the mapping relationship to quickly find the positional relationship between the target object and the mobile robot, thereby improving the calculation efficiency of the positional relationship.

[0165] As an implementation method of the present application, Figure 5 As shown, the manner of establishing the mapping relationship may include:

[0166] S501: Acquire device parameters of the image acquisition device and a sample image of a sample object acquired by the image acquisition device;

[0167] S502: For each pixel point, based on the device parameters, calculating the corresponding coordinates of the pixel point in the coordinate system of the mobile robot, and based on the corresponding coordinates, calculating the horizontal distance between the sample object corresponding to the pixel point and the mobile robot;

[0168] S503: For each pixel point, based on the device parameters and the coordinates of the center point of the sample image, calculate the angle between the first connecting line and the second connecting line, wherein the first connecting line is the connecting line between the pixel point and the midpoint of the lower edge of the sample image, and the second connecting line is the connecting line between the center point of the sample image and the midpoint of the lower edge of the sample image;

[0169] S504: Record the horizontal distance and angle corresponding to each pixel point to obtain the mapping relationship.

[0170] Taking a cleaning robot as an example, the establishment method of the mapping relationship between pixel coordinates and positional relationship in an image captured by an image acquisition device is explained. Among them, the chassis of the cleaning robot is relatively low, and the image acquisition device is a monocular camera, which is located at the center point of the front end of the cleaning robot.

[0171] In order to establish a mapping relationship between pixel coordinates and positional relationships in an image captured by an image acquisition device of a cleaning robot, device parameters of the image acquisition device of the cleaning robot may be first acquired, and a sample image of a sample object captured by the image acquisition device may be acquired.

[0172] Next, for each pixel point, the electronic device can calculate the corresponding coordinates of the pixel point in the coordinate system of the cleaning robot based on the device parameters of the image acquisition device, and then calculate the horizontal distance between the sample object corresponding to the pixel point and the cleaning robot.

[0173] Since the chassis of the cleaning robot is relatively low, the midpoint of the lower edge of the sample image can be used as the location of the image acquisition device, that is, the midpoint of the lower edge of the sample image can be used as the location of the cleaning robot. For each pixel point, the line connecting the pixel point and the midpoint of the lower edge of the sample image can be used as the first line; the line connecting the center point of the sample image and the midpoint of the lower edge of the sample image can be used as the second line. The electronic device can calculate the angle between the first line and the second line based on the device parameters of the image acquisition device and the coordinates of the center point of the sample image, and use the angle as the angle between the cleaning robot and the sample object. Figure 6 As shown, the angle between the first line L1 connecting pixel point A and the midpoint B of the lower edge of the sample image and the second line L2 connecting the center point C of the sample image and the midpoint B of the lower edge of the sample image is the angle between the cleaning robot and the sample object.

[0174] After calculating the horizontal distance and angle corresponding to each pixel point in the sample image, the electronic device can record the horizontal distance and angle corresponding to each pixel point, thereby obtaining a mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device.

[0175] When the mobile robot is other types of robots, and / or the image acquisition device of the mobile robot is other types of image acquisition devices that require establishing a mapping relationship between pixel coordinates and position relationships, the mapping relationship between the pixel coordinates and position relationships of the image acquisition device of the mobile robot can be constructed based on the construction idea of ​​the above-mentioned mapping relationship, which will not be repeated here.

[0176] It can be seen that in this embodiment, the mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device can be determined in advance based on the device parameters of the image acquisition device of the mobile robot and the sample image of the sample object captured by the image acquisition device. This mapping relationship can be used later to calculate the positional relationship between the mobile robot and the target object, thereby improving the calculation efficiency.

[0177] As an implementation of an embodiment of the present application, the above step S502, that is, calculating the corresponding coordinates of each pixel point in the coordinate system of the mobile robot based on the device parameters, may include:

[0178] For each pixel point, the corresponding coordinates of the pixel point in the coordinate system of the mobile robot are calculated according to the following formula:

[0179]

[0180] Where s is the scale factor, R wc is the external parameter in the device parameters, K is the internal parameter in the device parameters, (u, v) is the pixel coordinate of the pixel point, (x, y) is the corresponding coordinate of the pixel point in the coordinate system of the mobile robot, and h is the height of the image that can be captured by the image acquisition device in the coordinate system of the mobile robot;

[0181] The above step S503, i.e., the step of calculating the angle between the first connecting line and the second connecting line for each pixel point based on the device parameters and the coordinates of the center point of the sample image, may include:

[0182] For each pixel coordinate, the angle between the first connecting line and the second connecting line is calculated according to the following formula:

[0183]

[0184] Wherein, θ is the angle between the first connecting line and the second connecting line; (u1, v1) is the coordinate of the center point of the sample image.

[0185] Since the target objects are all located on the ground, when the device parameters of the image acquisition device are known, the height of the image that can be captured by the image acquisition device in the coordinate system of the mobile robot is also known, that is, the height h.

[0186] For each pixel point, the electronic device can calculate the corresponding coordinates (x, y) of the pixel point in the coordinate system of the mobile robot according to the following formula 1, and then calculate the horizontal distance between the mobile robot and the sample object based on the corresponding coordinates.

[0187] Among them, formula 1 is:

[0188]

[0189] The position coordinates of the mobile robot in the coordinate system of the mobile robot are (0, 0), then the horizontal distance between the mobile robot and the sample object is

[0190] For each pixel point, the electronic device can calculate the angle θ between the first connecting line and the second connecting line using Formula 2 based on the device parameters of the image acquisition device and the coordinates of the center point of the sample image.

[0191] Among them, formula 2 is:

[0192]

[0193] The angle between the first connecting line and the second connecting line may be calculated according to the coordinates of the center point of the sample image.

[0194] It can be seen that in this embodiment, the corresponding coordinates and angles corresponding to each pixel point can be calculated using a preset formula, thereby improving the calculation speed and further improving the efficiency of the mapping relationship calculation.

[0195] As an implementation of the embodiment of the present application, in step S504, that is, recording the horizontal distance and angle corresponding to each pixel point, before obtaining the mapping relationship, the method may further include:

[0196] When the horizontal distance is greater than a preset threshold, the horizontal distance is updated to a target value, wherein the target value is greater than the preset threshold.

[0197] When establishing a mapping relationship, the farther the distance between the sample object and the mobile robot is, the greater the possible distance measurement error is. Based on this, a preset threshold can be set, wherein the preset threshold can be set according to the actual situation, for example, it can be 1m or 1.2m, which is not limited here.

[0198] In this way, for each pixel point, it can be determined whether the horizontal distance corresponding to the pixel point is greater than the preset threshold. If the horizontal distance corresponding to the pixel point is greater than the preset threshold, the horizontal distance can be updated to a target value, wherein the target value is greater than the preset threshold. In other words, each calculated horizontal distance greater than the preset threshold can be updated to the target value.

[0199] For example, the preset threshold is 1m, the horizontal distance is 1.2m, and the target value is 1.5m. Since the horizontal distance is greater than the preset threshold, the horizontal distance can be updated to 1.5 meters.

[0200] It can be seen that in this embodiment, in order to avoid that the distance error corresponding to the calculated pixel point is too large, resulting in the inability to accurately approach the observed object, the horizontal distance greater than the preset threshold can be set as the target value.

[0201] As an implementation method of an embodiment of the present application, the above-mentioned step S104, that is, the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device, may include: in the mapping relationship, searching for the horizontal distance and angle corresponding to the center point of the lower edge of the detection box of the target object in the image currently captured by the image acquisition device as the target position relationship between the target object and the mobile robot.

[0202] When the electronic device obtains the image currently captured by the image acquisition device, it can search in the mapping relationship for the horizontal distance and angle corresponding to the center point of the lower edge of the detection box of the target object in the image currently captured by the image acquisition device as the target position relationship between the target object and the mobile robot.

[0203] Before the above step S106, i.e., determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information, the method may further include:

[0204] Based on the boundary conditions of each sub-area, the target position relationship between the target object and the mobile robot, and the mobile robot position corresponding to the target position relationship, the position information of each target object in the corresponding sub-area is verified; for the position information that fails the verification, based on the sub-area where the mobile robot position corresponding to the position information is located, the sub-area where the target object is located and the position information in the sub-area are updated.

[0205] Since when constructing the above mapping relationship, for each pixel point, if the horizontal distance corresponding to the pixel point is greater than the preset threshold, the horizontal distance corresponding to the pixel point is updated to the target value, however, the horizontal distance actually corresponding to the pixel point is not necessarily the target value, resulting in a large error in the target position relationship determined based on the mapping relationship, which in turn results in poor accuracy of the position information of each target object in the corresponding sub-area determined based on the target position relationship. In order to improve the accuracy of the position information of each target object in the corresponding sub-area determined based on the target position relationship, the electronic device can verify the position information of each target object in the corresponding sub-area after determining the position information of each target object in the corresponding sub-area by using the boundary conditions of each sub-area included in the exploration map, the target position relationship between the target object and the mobile robot, and the position of the mobile robot corresponding to the target position relationship.

[0206] Among them, the electronic device can calculate the sub-area corresponding to the target object and the position information in the corresponding sub-area based on the target position relationship between the target object and the mobile robot and the mobile robot position corresponding to the target position relationship, and then calculate whether there is a sub-area boundary between the position information of the target object and the mobile robot position corresponding to the target position relationship.

[0207] If there is no sub-region boundary between the position information of the target object and the position of the mobile robot corresponding to the target position relationship, then the position information is verified, and the scene semantic information of each sub-region can be further determined based on the position information.

[0208] If there is a sub-area boundary between the position information of the target object and the position of the mobile robot corresponding to the target position relationship, then the position information fails to pass the verification, and the sub-area corresponding to the target object and the position information of the target object in the corresponding sub-area can be updated.

[0209] Specifically, for each position information that fails to pass the verification, since there is a sub-region boundary between the position information and the mobile robot position corresponding to the position information, and the image acquisition device of the mobile robot cannot acquire the image of the target object outside the boundary of the sub-region where the mobile robot position is located, then the target object should be located in the sub-region where the mobile robot position is located. Based on this, the sub-region where the target object is located and the position information in the sub-region can be updated based on the mobile robot position corresponding to the position information.

[0210] For example, Figure 7 As shown in the figure, the dotted line represents the current forward direction of the mobile robot, and the solid line represents the target position relationship between the target object and the mobile robot.

[0211] The mobile robot is located at position A in room R. Due to the large error in the determined target position relationship, the target object is located in another room S. The position information of the target object is verified using boundary conditions. If a wall 701 is detected between the position information of the target object and the position of the mobile robot, it is determined that the position information verification has failed. The electronic device can determine the room R where the mobile robot is located as the room corresponding to the target object, and determine the position information of the target object in the room by ray growth based on the position of the mobile robot and the target position relationship.

[0212] The mobile robot is located at position B in room S, and the target object is located in room T. The position information of the target object is verified using boundary conditions. If a door 702 is detected between the position information of the target object and the position of the mobile robot, the position information verification is successful, and the electronic device can record the position information of the target object.

[0213] It can be seen that in this embodiment, the electronic device can use the boundary conditions of each sub-area to verify the position information, and when the position information fails to pass the verification, the boundary conditions can be used to re-determine the position information of each target object, which can improve the accuracy of the position information of each target object, and then improve the accuracy of the sub-area scene semantic information determined based on the position information of each target object.

[0214] As an implementation method of the embodiment of the present application, there is a sub-area boundary between the position information that has not passed the verification and the corresponding mobile robot position;

[0215] The updating of the sub-region where the target object is located and the position information in the sub-region based on the sub-region where the mobile robot position corresponding to the position information is located may include:

[0216] The sub-region where the mobile robot position corresponding to the position information is located is updated to the sub-region where the target object is located; the intersection of the line between the target object and the mobile robot and the target boundary is determined as the position information of the target object in the sub-region, wherein the target boundary is the boundary of the sub-region between the target object and the corresponding mobile robot position.

[0217] For the position information that fails to pass the verification, there is a sub-region boundary between the position information and the corresponding mobile robot position. Since the image acquisition device of the mobile robot cannot acquire an image of a target object outside the boundary of the sub-region where the mobile robot position is located, the target object should be located in the sub-region where the mobile robot position is located, and the electronic device can update the sub-region where the mobile robot position corresponding to the position information is located to the sub-region where the target object is located.

[0218] The electronic device can then determine the target boundary of the sub-region between the target object and the corresponding mobile robot position, and determine the intersection of the line between the target object and the mobile robot and the target boundary as the position information of the target object in the sub-region. Figure 7 As shown, when the robot is located at position A, the intersection H of the solid line between the target object and the mobile robot and the wall 701 can be determined as the position information of the target object in room R.

[0219] It can be seen that in this embodiment, for location information that has not passed verification, the electronic device can update the sub-area where the target object is located and the location information in the sub-area based on the mobile robot position corresponding to the location information, thereby improving the accuracy of the location information of each target object.

[0220] As an implementation of an embodiment of the present application, the above step S106, i.e., the step of determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information, may include:

[0221] Based on the location information of each target object and the type of each target object, the number of target objects of each type included in each sub-area is determined; for each sub-area, based on the correspondence between the number and the preset type and the scene semantic information, the scene semantic information corresponding to the type with the largest number is used as the scene semantic information of the sub-area.

[0222] After determining the location information corresponding to each target object, the electronic device can determine the number of target objects of each type included in each sub-area based on the location information of each target object and the type of each target object. Afterwards, for each sub-area, the electronic device can use the scene semantic information corresponding to the type with the largest number as the scene semantic information of the sub-area based on the correspondence between the number and the preset type and the scene semantic information.

[0223] For example, the sub-area includes two sofas, a TV and a refrigerator. Since the sofas are the largest in number, the living room corresponding to the sofas can be used as the scene semantic information of the sub-area based on the correspondence between the preset types and the scene semantic information.

[0224] It can be seen that in this embodiment, based on the number of target objects of each type included in the sub-area and the correspondence between the type and the scene semantic information, the scene semantic information corresponding to the type with the largest number of target objects can be used as the scene semantic information of the sub-area.

[0225] As an implementation of an embodiment of the present application, before the above step S104, i.e., determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device, the method may further include:

[0226] During the process of the mobile robot moving toward the optimal observation position, determining whether a duration for which the target object cannot be identified does not exceed a first threshold;

[0227] In the case that the duration of the inability to identify the target object does not exceed the first threshold, and after the mobile robot moves to the optimal observation position, determining whether the duration of the identification of the target object reaches a second threshold;

[0228] If the duration of identifying the target object reaches a second threshold, the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device is performed.

[0229] Since there are situations where the position of various target objects may move, such as the target object being moved away from the area to be explored, or the target object being a mobile object, etc., the scene semantic information of the detection map is determined based on the target object whose position may move in the area to be explored, which will affect the accuracy of the scene semantic information included in the detection map. Based on this, in order to exclude the possibility that the position of the target object has been moved, that is, in order to exclude the possibility that the target object is a mobile object, the electronic device can determine whether the duration of the inability to identify the target object does not exceed the first threshold during the process of the mobile robot moving to the optimal observation position. Among them, the first threshold can be set according to actual needs, which can be 0.5 seconds, 1 second, etc., and is not limited here.

[0230] If it is determined that the duration for which the target object cannot be identified exceeds the first threshold, it is determined that the target object has moved or has been moved, and there is no need to observe the target object any further.

[0231] If it is determined that the duration of the inability to identify the target object does not exceed the first threshold, the electronic device can determine whether the duration of identifying the target object reaches a second threshold after the mobile robot moves to the optimal observation position, wherein the second threshold can be set according to actual needs and can be 0.5 seconds, 1 second, etc., and is not limited here.

[0232] If the duration of identifying the target object reaches a second threshold, the electronic device may determine the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image capture device.

[0233] It can be seen that in this embodiment, the electronic device can judge whether the target object is a moving object based on the duration during which the target object cannot be identified in the process of the mobile robot moving to the optimal observation position, and the duration during which the target object is identified after the mobile robot moves to the optimal observation position, and determine the target position relationship between the target object and the mobile robot when the target object is not a moving object, thereby eliminating the interference of mobile objects in the area to be explored on the exploration map and improving the accuracy of the exploration map.

[0234] The mapping method of the mobile robot is described below by way of example. In this example, the mapping method is performed by a mobile robot, and the mobile robot includes an image acquisition device, an AI (Artificial Intelligence) module, and a SLAM module.

[0235] like Figure 8 As shown, at the beginning of the exploration task, the mobile robot can determine the target point and perform path planning to determine the exploration path with the current position as the starting point and the target point as the end point. The mobile robot then moves along the above exploration path. During the movement, the image acquisition device of the mobile robot can acquire scene images and send the acquired images to the AI ​​module. The AI ​​module can dedistort the scene image based on the device parameters of the image acquisition device, and then obtain the dedistorted scene image as shown in Figure 9 (a). In the scene image, the target object is represented by an image detection frame 901. The dedistorted scene image is image recognized to obtain a recognition result of the scene image. It is determined whether the recognition result includes a preset type of target object, and when the recognition result includes a preset type of target object, the mobile robot can actively approach the target object and observe the target object. After observing the target object, after observing the target object, the mobile robot can determine whether the next target point is searched. If the next target point is not found, the exploration is completed. Based on the location information of each target object, the scene semantic information of each sub-area can be determined to obtain an exploration map including the scene semantic information. If the next target point is found, path planning continues, and exploration continues along the planned exploration path.

[0236] like Fig.10 As shown, after receiving the recognition result, the mobile robot can determine whether the target object is recognized. If the target object is not recognized, the mobile robot is controlled to move.

[0237] If the target object is identified, it is further determined whether the target object has been observed. If the target object has not been observed, the angle is calculated, that is, the angle between the line connecting the target object and the mobile robot and the current moving direction of the mobile robot is calculated. After that, the mobile robot rotates the above angle. After the rotation, the image of the target object captured by the image acquisition device is shown in Figure 9(b). In the scene image, the target object is represented by an image detection frame 902. Next, the AI ​​module calculates the distance, that is, calculates the moving distance of the mobile robot. The mobile robot goes straight for the moving distance. After the movement is completed, the image of the target object captured by the image acquisition device is shown in Figure 9(c). In the scene image, the target object is represented by an image detection frame 903. The mobile robot can calculate the position information of the target object based on the image and store the position information. After observing the target object, the mobile robot can determine whether the next target point has been searched. If the next target point is not found, the exploration is completed. Based on the location information of each target object, the scene semantic information of each sub-area can be determined to obtain an exploration map including the scene semantic information. If the next target point is found, path planning continues, and exploration continues along the planned exploration path.

[0238] Corresponding to the above-mentioned mobile robot mapping method, an embodiment of the present application further provides a mobile robot mapping device. The following introduces a mobile robot mapping device provided in an embodiment of the present application.

[0239] like Fig.11 As shown, a mapping device for a mobile robot includes:

[0240] An image acquisition module 1101 is used to acquire a scene image acquired by an image acquisition device of the mobile robot while the mobile robot moves along an exploration path, and to update an exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image;

[0241] An initial relationship determination module 1102 is used to determine an initial position relationship between the target object and the mobile robot based on the scene image when it is detected that the scene image includes a target object of a preset type;

[0242] A control movement module 1103 is used to control the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device;

[0243] A target relationship determination module 1104 is used to determine a target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device when the mobile robot moves to the optimal observation position;

[0244] A position information determination module 1105 is used to determine the position information of each target object in the corresponding sub-area based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship when the mobile robot completes the exploration of the area to be explored;

[0245] The semantic information determination module 1106 is used to determine the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, and obtain an exploration map including the scene semantic information corresponding to the area to be explored.

[0246] In the solution provided by the embodiment of the present application, the electronic device can obtain the scene image captured by the image acquisition device of the mobile robot during the movement of the mobile robot along the exploration path, and update the exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; when it is detected that the scene image includes a target object of a preset type, the initial position relationship between the target object and the mobile robot is determined based on the scene image; based on the initial position relationship and the device parameters of the image acquisition device, the mobile robot is controlled to move toward the target object; when the mobile robot moves to the optimal observation position, the target position relationship between the target object and the mobile robot is determined based on the image of the target object currently captured by the image acquisition device; when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area is determined based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship; and then based on the position information corresponding to each target object, the type of each target object and the corresponding relationship between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined to obtain the exploration map including the scene semantic information corresponding to the area to be explored.

[0247] In the process of constructing an exploration map by a mobile robot, when the scene image captured by the image acquisition device of the mobile robot includes a target object of a preset type, the target position relationship between the target object and the mobile robot is determined by controlling the mobile robot to actively approach the target object and according to the image of the target object captured by the image acquisition device at the optimal observation position. Then, according to the range of each sub-area included in the exploration map, each target position relationship, and the position of the mobile robot corresponding to each target position relationship, the scene semantic information of each sub-area can be determined. Since the mobile robot actively approaches the target object during the exploration map, it can reach the optimal observation position for the target object, and the recognition result and target position relationship of the target object are determined based on the image captured by the image acquisition device at the optimal observation position, the recognition result and target position relationship of the target object are highly accurate, and then, the scene semantic information of the exploration map determined based on the target position relationship is highly accurate.

[0248] As an implementation method of an embodiment of the present application, the initial position relationship includes an initial angle and an initial distance; the initial angle is an angle between a direction of a line between the target object and the mobile robot and a current forward direction of the mobile robot;

[0249] The control movement module 1103 includes:

[0250] A control rotation unit, used for controlling the mobile robot to rotate the initial angle so that the current forward direction of the mobile robot coincides with the initial connection direction;

[0251] The control forward unit is used to calculate the moving distance of the mobile robot based on the initial distance and the device parameters of the image acquisition device, and control the mobile robot to move the moving distance in the current forward direction, and then determine that the mobile robot reaches the optimal observation position.

[0252] As an implementation of the embodiment of the present application, the device further includes:

[0253] An initial distance updating module is used to update the initial distance between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device after the mobile robot rotates to the initial angle and before calculating the moving distance of the mobile robot based on the initial distance and the device parameters of the preset image acquisition device.

[0254] As an implementation method of the embodiment of the present application, the image acquisition device is a monocular camera;

[0255] The initial relationship determination module 1102 includes:

[0256] An initial relationship determination unit is used to determine the initial position relationship between the target object and the mobile robot based on the scene image and a predetermined mapping relationship between pixel coordinates and position relationships in the image captured by the image acquisition device.

[0257] As an implementation of the embodiment of the present application, the device further includes a mapping relationship establishment module, including:

[0258] An image acquisition unit, used to acquire device parameters of the image acquisition device and a sample image of the sample object acquired by the image acquisition device;

[0259] A horizontal distance calculation unit, configured to calculate, for each pixel point, a corresponding coordinate of the pixel point in the coordinate system of the mobile robot based on the device parameters, and calculate, based on the corresponding coordinates, a horizontal distance between the sample object corresponding to the pixel point and the mobile robot;

[0260] an angle calculation unit, configured to calculate, for each pixel point, an angle between a first connecting line and a second connecting line based on the device parameters and the coordinates of the center point of the sample image, wherein the first connecting line is a connecting line between the pixel point and the midpoint of the lower edge of the sample image, and the second connecting line is a connecting line between the center point of the sample image and the midpoint of the lower edge of the sample image;

[0261] The recording unit is used to record the horizontal distance and angle corresponding to each pixel point to obtain the mapping relationship.

[0262] As an implementation of an embodiment of the present application, the horizontal distance calculation unit includes:

[0263] The horizontal distance calculation subunit is used to calculate the corresponding coordinates of each pixel point in the coordinate system of the mobile robot according to the following formula:

[0264]

[0265] Where s is the scale factor, R wc is the external parameter in the device parameters, K is the internal parameter in the device parameters, (u, v) is the pixel coordinate of the pixel point, (x, y) is the corresponding coordinate of the pixel point in the coordinate system of the mobile robot, and h is the height of the image that can be captured by the image acquisition device in the coordinate system of the mobile robot;

[0266] The angle calculation unit comprises:

[0267] The angle calculation subunit is used to calculate the angle between the first connecting line and the second connecting line according to the following formula for each pixel coordinate:

[0268]

[0269] Wherein, θ is the angle between the first connecting line and the second connecting line; (u1, v1) is the coordinate of the center point of the sample image.

[0270] As an implementation of the embodiment of the present application, the device further includes:

[0271] The horizontal distance updating unit is used to update the horizontal distance to a target value when the horizontal distance is greater than a preset threshold before recording the horizontal distance and angle corresponding to each pixel point to obtain the mapping relationship, wherein the target value is greater than the preset threshold.

[0272] As an implementation of the embodiment of the present application, the target relationship determination module 1104 includes:

[0273] A searching unit, used to search, in the mapping relationship, a horizontal distance and an angle corresponding to a center point of a lower edge of a detection frame of the target object in the image currently captured by the image acquisition device as a target position relationship between the target object and the mobile robot;

[0274] The device also includes:

[0275] A verification module, for verifying the position information of each target object in the corresponding sub-area based on the boundary conditions of each sub-area, the target position relationship between the target object and the mobile robot, and the position of the mobile robot corresponding to the target position relationship, before determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information;

[0276] The position information updating module is used to update the sub-area where the target object is located and the position information in the sub-area based on the sub-area where the mobile robot position corresponding to the position information is located for the position information that has not passed the verification.

[0277] As an implementation method of the embodiment of the present application, there is a sub-area boundary between the position information that has not passed the verification and the corresponding mobile robot position;

[0278] The location information updating module comprises:

[0279] An updating unit, used for updating the sub-region where the mobile robot position corresponding to the position information is located to the sub-region where the target object is located;

[0280] A position information determination unit is used to determine the intersection of the line between the target object and the mobile robot and the target boundary as the position information of the target object in the sub-area, wherein the target boundary is the boundary of the sub-area between the target object and the corresponding mobile robot position.

[0281] As an implementation of the embodiment of the present application, the semantic information determination module 1106 includes:

[0282] a quantity determination unit, configured to determine the quantity of target objects of each type included in each sub-region based on the location information of each target object and the type of each target object;

[0283] The semantic information determination unit is used to, for each sub-region, based on the quantity and the correspondence between the preset types and the scene semantic information, use the scene semantic information corresponding to the type with the largest number as the scene semantic information of the sub-region.

[0284] As an implementation of the embodiment of the present application, the device further includes:

[0285] A first determination module is used to determine whether a duration for which the target object cannot be identified does not exceed a first threshold value during a process in which the mobile robot moves to an optimal observation position, before determining a target position relationship between the target object and the mobile robot based on the image of the target object currently acquired by the image acquisition device;

[0286] A second determination module is used to determine whether the duration of identifying the target object reaches a second threshold when the duration of not being able to identify the target object does not exceed the first threshold and after the mobile robot moves to the optimal observation position;

[0287] An execution module is used to execute the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device if the duration of identifying the target object reaches a second threshold.

[0288] Corresponding to the above-mentioned mobile robot mapping method, an embodiment of the present application further provides a mobile robot. The following is an introduction to a mobile robot provided by an embodiment of the present application.

[0289] like Fig.12 As shown, a mobile robot includes an image acquisition device 1201 and a processor 1202.

[0290] The image acquisition device 1201 is used to acquire images;

[0291] The processor 1202 is used to execute the steps of any mobile robot mapping method provided in the embodiments of the present application.

[0292] In the solution provided by the embodiment of the present application, the electronic device can obtain the scene image captured by the image acquisition device of the mobile robot during the movement of the mobile robot along the exploration path, and update the exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; when it is detected that the scene image includes a target object of a preset type, the initial position relationship between the target object and the mobile robot is determined based on the scene image; based on the initial position relationship and the device parameters of the image acquisition device, the mobile robot is controlled to move toward the target object; when the mobile robot moves to the optimal observation position, the target position relationship between the target object and the mobile robot is determined based on the image of the target object currently captured by the image acquisition device; when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area is determined based on the range of each sub-area included in the exploration map, each target position relationship and the mobile robot position corresponding to each target position relationship; and then based on the position information corresponding to each target object, the type of each target object and the corresponding relationship between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined to obtain the exploration map including the scene semantic information corresponding to the area to be explored.

[0293] In the process of constructing an exploration map by a mobile robot, when the scene image captured by the image acquisition device of the mobile robot includes a target object of a preset type, the target position relationship between the target object and the mobile robot is determined by controlling the mobile robot to actively approach the target object and according to the image of the target object captured by the image acquisition device at the optimal observation position. Then, according to the range of each sub-area included in the exploration map, each target position relationship, and the position of the mobile robot corresponding to each target position relationship, the scene semantic information of each sub-area can be determined. Since the mobile robot actively approaches the target object during the exploration map, it can reach the optimal observation position for the target object, and the recognition result and target position relationship of the target object are determined based on the image captured by the image acquisition device at the optimal observation position, the recognition result and target position relationship of the target object are highly accurate, and then, the scene semantic information of the exploration map determined based on the target position relationship is highly accurate.

[0294] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0295] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned mobile robot mapping methods are implemented.

[0296] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the mobile robot mapping methods in the above embodiments.

[0297] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0298] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0299] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, mobile robot, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0300] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A mapping method for a mobile robot, It is characterized in that The method comprises: In the process of the mobile robot moving along the exploration path, a scene image captured by an image acquisition device of the mobile robot is acquired, and an exploration map is updated based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; In a case where it is detected that the scene image includes a target object of a preset type, determining an initial positional relationship between the target object and the mobile robot based on the scene image; Based on the initial position relationship and the device parameters of the image acquisition device, controlling the mobile robot to move toward the target object; When the mobile robot moves to the optimal observation position, determining a target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device; When the mobile robot completes the exploration of the area to be explored, based on the range of each sub-area included in the exploration map, each target position relationship, and the mobile robot position corresponding to each target position relationship, determine the position information of each target object in the corresponding sub-area; Based on the location information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, the scene semantic information of each sub-area is determined, and an exploration map including the scene semantic information corresponding to the area to be explored is obtained.

2. The method according to claim 1, It is characterized in that The initial position relationship includes an initial angle and an initial distance; the initial angle is the angle between the direction of the line between the target object and the mobile robot and the current forward direction of the mobile robot; The step of controlling the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device includes: Controlling the mobile robot to rotate the initial angle so that the current forward direction of the mobile robot coincides with the direction of the initial connection line; Based on the initial distance and the device parameters of the image acquisition device, the moving distance of the mobile robot is calculated, and after the mobile robot is controlled to move the moving distance in the current forward direction, it is determined that the mobile robot has reached the optimal observation position.

3. The method according to claim 2, It is characterized in that Before calculating the moving distance of the mobile robot based on the initial distance and the device parameters of the preset image acquisition device, the method further includes: After the mobile robot rotates by the initial angle, the initial distance between the target object and the mobile robot is updated based on the image of the target object currently captured by the image capture device.

4. The method according to claim 1, It is characterized in that The image acquisition device is a monocular camera; The step of determining the initial positional relationship between the target object and the mobile robot based on the scene image comprises: Based on the scene image and a predetermined mapping relationship between pixel coordinates and positional relationships in the image captured by the image acquisition device, an initial positional relationship between the target object and the mobile robot is determined.

5. The method according to claim 4, It is characterized in that The mapping relationship is established in a manner including: Acquire device parameters of the image acquisition device and a sample image of the sample object acquired by the image acquisition device; For each pixel point, based on the device parameters, calculate the corresponding coordinates of the pixel point in the coordinate system of the mobile robot, and based on the corresponding coordinates, calculate the horizontal distance between the sample object corresponding to the pixel point and the mobile robot; For each pixel point, based on the device parameters and the coordinates of the center point of the sample image, calculate the angle between a first connecting line and a second connecting line, wherein the first connecting line is a connecting line between the pixel point and the midpoint of the lower edge of the sample image, and the second connecting line is a connecting line between the center point of the sample image and the midpoint of the lower edge of the sample image; The horizontal distance and angle corresponding to each pixel point are recorded to obtain the mapping relationship.

6. The method according to claim 5, It is characterized in that The step of calculating, for each pixel point, the corresponding coordinates of the pixel point in the coordinate system of the mobile robot based on the device parameters includes: For each pixel point, the corresponding coordinates of the pixel point in the coordinate system of the mobile robot are calculated according to the following formula: Where s is the scale factor, R wc is the external parameter in the device parameters, K is the internal parameter in the device parameters, (u, v) is the pixel coordinate of the pixel point, (x, y) is the corresponding coordinate of the pixel point in the coordinate system of the mobile robot, and h is the height of the image that can be captured by the image acquisition device in the coordinate system of the mobile robot; The step of calculating the angle between the first connecting line and the second connecting line for each pixel point based on the device parameters and the coordinates of the center point of the sample image comprises: For each pixel coordinate, the angle between the first connecting line and the second connecting line is calculated according to the following formula: Wherein, θ is the angle between the first connecting line and the second connecting line; (u 1 , v 1 ) are the center point coordinates of the sample image.

7. The method according to claim 5, It is characterized in that Before recording the horizontal distance and angle corresponding to each pixel point to obtain the mapping relationship, the method further includes: When the horizontal distance is greater than a preset threshold, the horizontal distance is updated to a target value, wherein the target value is greater than the preset threshold.

8. The method according to claim 7, It is characterized in that The step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device comprises: In the mapping relationship, the horizontal distance and angle corresponding to the center point of the lower edge of the detection frame of the target object in the image currently captured by the image acquisition device are found as the target position relationship between the target object and the mobile robot; Before determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information, the method further includes: Verifying the position information of each target object in the corresponding sub-region based on the boundary conditions of each sub-region, the target position relationship between the target object and the mobile robot, and the position of the mobile robot corresponding to the target position relationship; For the position information that fails to pass the verification, based on the sub-region where the mobile robot position corresponding to the position information is located, the sub-region where the target object is located and the position information in the sub-region are updated.

9. The method according to claim 8, It is characterized in that There is a sub-area boundary between the position information that has not passed the verification and the corresponding mobile robot position; The updating of the sub-region where the target object is located and the position information in the sub-region based on the sub-region where the mobile robot position corresponding to the position information is located comprises: The sub-region where the mobile robot position corresponding to the position information is located is updated to the sub-region where the target object is located; The intersection of the line between the target object and the mobile robot and the target boundary is determined as the position information of the target object in the sub-area, wherein the target boundary is the boundary of the sub-area between the target object and the corresponding mobile robot position.

10. The method according to any one of claims 1 to 9, It is characterized in that The step of determining the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object, and the correspondence between the preset type and the scene semantic information includes: Determine the number of target objects of each type included in each sub-area based on the location information of each target object and the type of each target object; For each sub-region, based on the quantity and the correspondence between the preset types and the scene semantic information, the scene semantic information corresponding to the type with the largest quantity is used as the scene semantic information of the sub-region.

11. The method according to any one of claims 1 to 9, It is characterized in that Before determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device, the method further includes: During the process of the mobile robot moving toward the optimal observation position, determining whether a duration for which the target object cannot be identified does not exceed a first threshold; In the case that the duration of the inability to identify the target object does not exceed the first threshold, and after the mobile robot moves to the optimal observation position, determining whether the duration of the identification of the target object reaches a second threshold; If the duration of identifying the target object reaches a second threshold, the step of determining the target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device is performed.

12. A mapping device for a mobile robot, It is characterized in that The device comprises: An image acquisition module, used to acquire a scene image acquired by an image acquisition device of the mobile robot while the mobile robot moves along an exploration path, and update an exploration map based on the exploration result of the mobile robot, wherein the exploration result includes the scene image; an initial relationship determination module, configured to determine an initial position relationship between the target object and the mobile robot based on the scene image when a target object of a preset type is detected in the scene image; A control movement module, used for controlling the mobile robot to move toward the target object based on the initial position relationship and the device parameters of the image acquisition device; a target relationship determination module, configured to determine a target position relationship between the target object and the mobile robot based on the image of the target object currently captured by the image acquisition device when the mobile robot moves to the optimal observation position; a position information determination module, configured to determine, when the mobile robot completes the exploration of the area to be explored, the position information of each target object in the corresponding sub-area based on the range of each sub-area included in the exploration map, each target position relationship, and the mobile robot position corresponding to each target position relationship; The semantic information determination module is used to determine the scene semantic information of each sub-area based on the position information corresponding to each target object, the type of each target object and the correspondence between the preset type and the scene semantic information, and obtain an exploration map including the scene semantic information corresponding to the area to be explored.

13. A mobile robot, It is characterized in that The mobile robot includes an image acquisition device and a processor; The image acquisition device is used to acquire images; The processor is used to execute the method according to any one of claims 1-11.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Autonomous exploration type semantic map construction method and system

    CN114839975A

  • Task object processing method and system, camera equipment and mobile robot

    CN116277072A