Map generation method, device, storage medium and electronic device
By identifying the scene type and adjusting the sensor parameters, the problem of inaccurate map generation in special scenarios is solved, achieving more accurate map generation and better visual experience.
Patent Information
- Application Number
- CN202210528909.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-05-16
AI Technical Summary
The maps generated by existing laser SLAM technology in special scenarios are invalid or have too large errors, and cannot effectively adapt to changes in different scenarios, resulting in inaccurate map generation.
By acquiring the target image and multiple sensor parameters, scene recognition is performed to determine the scene type, and sensor parameters are adjusted according to the identified scene type, adapting to map generation strategy, and generating a more accurate map.
Improve the accuracy of map generation, adapt to changes in different scenarios, and provide a better visual experience.
Smart Images

Figure CN115127537B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot vision, and in particular relates to a map generation method, device, storage medium and electronic device. Background Art
[0002] Simultaneous Localization And Mapping (SLAM) technology refers to the technology that generates positioning and scene map information of a robot or other carrier by collecting and calculating various sensor data.
[0003] The common laser SLAM technology builds a map by matching the current frame point cloud collected by the sensor with the previous frame point cloud or a reference map, which can be applied in different scenarios. Summary of the invention
[0004] The present application provides a map generation method, device, storage medium and electronic device, and the technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a map generation method, comprising:
[0006] Acquire a target image and at least two sensor parameters; wherein the at least two sensor parameters include any at least two parameters of a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0007] Perform scene recognition on the target image to obtain the scene type corresponding to the target image;
[0008] A target map is generated based on at least two sensor parameters and a scene type.
[0009] In an optional solution of the first aspect, after acquiring the target image and at least two sensor parameters, performing scene recognition on the target image and before obtaining the scene type corresponding to the target image, the method further includes:
[0010] Preprocess the target image;
[0011] Perform scene recognition on the target image to obtain the scene type corresponding to the target image, including:
[0012] Perform scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image.
[0013] In another optional solution of the first aspect, preprocessing the target image includes:
[0014] Performing distortion correction on the target image according to the camera intrinsic parameters; and / or
[0015] Scaling the target image according to a preset image size; and / or
[0016] Correct the target image according to a preset image color ratio; and / or
[0017] Correct the target image according to the preset image brightness ratio.
[0018] In another optional solution of the first aspect, performing scene recognition on the preprocessed target image to obtain a scene type corresponding to the target image includes:
[0019] The preprocessed target image is input into the trained scene recognition model to obtain scene parameters; each scene parameter corresponds to a different scene type;
[0020] The scene type corresponding to the target image is determined according to the scene parameters; the scene recognition model is trained by multiple sample images containing known scene types.
[0021] In another optional solution of the first aspect, generating a target map based on at least two sensor parameters and a scene type includes:
[0022] Determine whether the scene type is a special scene;
[0023] When the scene type is a special scene, adjusting at least two sensor parameters according to the special scene;
[0024] A target map is generated based on the adjusted at least two sensor parameters.
[0025] In yet another optional solution of the first aspect, the special scene includes a long corridor scene, and the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0026] When the scene type is a special scene, at least two sensor parameters are adjusted according to the special scene, including:
[0027] When the scene type is a long corridor scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased according to the preset parameter strategy corresponding to the long corridor scene, and the weights corresponding to the laser sensor parameters are reduced.
[0028] In yet another optional solution of the first aspect, the special scene includes a carpet scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0029] When the scene type is a special scene, at least two sensor parameters are adjusted according to the special scene, including:
[0030] When the scene type is a carpet scene, obtaining a tilt correction parameter corresponding to the carpet scene based on an inertial sensor;
[0031] According to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0032] In another optional solution of the first aspect, the special scene includes a glass mirror scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0033] When the scene type is a special scene, at least two sensor parameters are adjusted according to the special scene, including:
[0034] When the scene type is a glass mirror scene, determining the position of the glass mirror scene in the target image;
[0035] According to the position of the glass mirror scene in the target image, the laser point cloud data collected by the laser sensor and having the same mirror direction as the glass mirror scene are deleted;
[0036] According to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weights corresponding to the laser sensor parameters are reduced.
[0037] In yet another optional solution of the first aspect, the special scenario includes a threshold scenario; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0038] When the scene type is a special scene, at least two sensor parameters are adjusted according to the special scene, including:
[0039] When the scene type is a threshold scene, obtaining a tilt correction parameter corresponding to the threshold scene based on an inertial sensor;
[0040] According to the preset parameter strategy corresponding to the threshold scenario, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the inclination correction parameters are increased.
[0041] In yet another optional solution of the first aspect, after determining whether the scene type is a special scene, the method further includes:
[0042] When the scene type is not a special scene, configuring weights corresponding to the at least two sensor parameters respectively according to a default parameter strategy corresponding to the at least two sensor parameters;
[0043] A target map is generated based on the adjusted at least two sensor parameters.
[0044] In a second aspect, an embodiment of the present application provides a map generation device, including:
[0045] An acquisition module, used for acquiring a target image and at least two sensor parameters; wherein the at least two sensor parameters include any at least two parameters of a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0046] A recognition module is used to perform scene recognition on the target image to obtain the scene type corresponding to the target image;
[0047] A generation module is used to generate a target map based on at least two sensor parameters and a scene type.
[0048] In an optional solution of the second aspect, the device further includes:
[0049] A processing module, configured to perform scene recognition on the target image after acquiring the target image and at least two sensor parameters, and pre-process the target image before obtaining the scene type corresponding to the target image;
[0050] The recognition module is specifically used to perform scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image.
[0051] In yet another optional solution of the second aspect, the processing module is specifically configured to:
[0052] Performing distortion correction on the target image according to the camera intrinsic parameters; and / or
[0053] Scaling the target image according to a preset image size; and / or
[0054] Correct the target image according to a preset image color ratio; and / or
[0055] Correct the target image according to the preset image brightness ratio.
[0056] In yet another optional solution of the second aspect, the identification module includes:
[0057] The recognition unit is used to input the preprocessed target image into the trained scene recognition model to obtain scene parameters; each scene parameter corresponds to a different scene type;
[0058] The first determination unit is used to determine the scene type corresponding to the target image according to the scene parameters; the scene recognition model is trained by a plurality of sample images containing known scene types.
[0059] In yet another optional solution of the second aspect, the generating module includes:
[0060] A judging unit, used to judge whether the scene type is a special scene;
[0061] a second determining unit, configured to adjust at least two sensor parameters according to the special scene when the scene type is a special scene;
[0062] The first generating unit is configured to generate a target map based on the adjusted at least two sensor parameters.
[0063] In yet another optional solution of the second aspect, the special scene includes a long corridor scene, and the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0064] The second determination unit is used to increase the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters respectively, and reduce the weights corresponding to the laser sensor parameters according to the preset parameter strategy corresponding to the long corridor scene when the scene type is a long corridor scene.
[0065] In yet another optional solution of the second aspect, the special scene includes a carpet scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0066] A second determining unit, configured to obtain a tilt correction parameter corresponding to the carpet scene based on an inertial sensor when the scene type is a carpet scene;
[0067] According to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0068] In another optional solution of the second aspect, the special scene includes a glass mirror scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0069] A second determining unit, used for determining the position of the glass mirror scene in the target image when the scene type is a glass mirror scene;
[0070] According to the position of the glass mirror scene in the target image, the laser point cloud data collected by the laser sensor and having the same mirror direction as the glass mirror scene are deleted;
[0071] According to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weights corresponding to the laser sensor parameters are reduced.
[0072] In yet another optional solution of the second aspect, the special scenario includes a threshold scenario; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0073] a second determining unit, configured to obtain a tilt correction parameter corresponding to the threshold scene based on an inertial sensor when the scene type is a threshold scene;
[0074] According to the preset parameter strategy corresponding to the threshold scenario, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the inclination correction parameters are increased.
[0075] In yet another optional solution of the second aspect, the generating module includes:
[0076] A third determining unit is configured to, after determining whether the scene type is a special scene, configure weights corresponding to the at least two sensor parameters according to a default parameter strategy corresponding to the at least two sensor parameters when the scene type is not a special scene;
[0077] The second generating unit is configured to generate a target map based on the adjusted at least two sensor parameters.
[0078] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
[0079] The processor is connected to the memory;
[0080] A memory for storing executable program codes;
[0081] The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the map generation method provided by the first aspect of the embodiment of the present application or any one of the implementations of the first aspect.
[0082] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the map generation method provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.
[0083] In the embodiment of the present application, a target image and at least two sensor parameters may be obtained first, and a scene type corresponding to the target image may be obtained by performing scene recognition on the target image, and a target map may be generated based on the at least two sensor parameters and the scene type. By identifying the scene before generating the map, the corresponding map generation parameters may be adapted according to the identified scene type, thereby making the generated map more accurate and providing the user with a better visual experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0085] Figure 1 A schematic diagram of the architecture of a map generation system provided in an embodiment of the present application;
[0086] Figure 2 A flowchart of a map generation method provided in an embodiment of the present application;
[0087] Figure 3 A scene type correspondence table provided in an embodiment of the present application;
[0088] Figure 4 A flowchart of another map generation method provided in an embodiment of the present application;
[0089] Figure 5 A flowchart of another map generation method provided in an embodiment of the present application;
[0090] Figure 6 A flowchart of another map generation method provided in an embodiment of the present application;
[0091] Figure 7 A schematic diagram of a target image including a glass mirror scene provided in an embodiment of the present application;
[0092] Figure 8 A flowchart of another map generation method provided in an embodiment of the present application;
[0093] Fig. 9 A schematic diagram of the structure of a map generating device provided in an embodiment of the present application;
[0094] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0095] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0096] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0097] See also Figure 1 , Figure 1 A schematic diagram of the architecture of a map generation system provided in an embodiment of the present application is shown.
[0098] like Figure 1 As shown, the map generation system 100 may include at least a first acquisition module 101, a second acquisition module 102 and a processor 103, wherein:
[0099] The map generation system 100 can be applied to devices for constructing high-precision maps, such as but not limited to robots, cars, or electronic devices, and the map types can include 2D grid maps or 3D maps. It is understood that the electronic devices mentioned in this application can be smart phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), handheld computers, PC devices, personal digital assistants (Personal Digital Assistant, PDA), routing devices, virtual reality devices, etc.
[0100] The first acquisition module 101 can be used to acquire a target image, wherein the target image can be one or more images including surrounding scenes acquired according to the current position. Possibly, when the target image corresponds to one image, the image can include surrounding scenes taken from any angle at the current position, such as but not limited to including surrounding scenes taken from any angle such as the front, left front, right front, left rear, right rear or rear, and preferably, the target image can include surrounding scenes taken from the front. Possibly, when the target image corresponds to multiple images, each image can include surrounding scenes taken from any angle at the current position, such as but not limited to when the target image corresponds to three images, the three images can respectively include surrounding angles taken from the front, right front and left front at the current position.
[0101] It is understandable that the target image in the present application can be acquired in real time by a shooting device, for example, by selecting a shooting application through user operation or by starting a device that can be used to shoot images according to an automated program instruction. Here, a robot that can execute automated program instructions is taken as an example. The robot can control the camera to turn on and shoot the surrounding scene in real time according to the automated program instruction, and the camera can be, but is not limited to, a monocular camera or a binocular camera. Of course, the target image in the present application can also be a pre-stored image, and the stored image can include one or more images of the surrounding scene corresponding to the current position, but is not limited to this.
[0102] The second acquisition module 102 can be used to obtain at least two sensor parameters, wherein the sensor type can be but is not limited to a wheel speed meter sensor, an inertial sensor or a laser sensor, the parameters corresponding to the wheel speed meter sensor may include a wheel speed meter translation parameter and a wheel speed meter rotation parameter, the parameters corresponding to the inertial sensor may include an inertial translation parameter and an inertial rotation parameter, and the parameters corresponding to the laser sensor may include a laser point cloud matching translation parameter and a laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the wheel speed meter sensor and the laser sensor, that is, wheel speed meter translation parameter, wheel speed meter rotation parameter, laser point cloud matching translation parameter and laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the inertial sensor and the laser sensor, that is, inertial translation parameter, inertial rotation parameter, laser point cloud matching translation parameter and laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the wheel speed meter sensor, the inertial sensor and the laser sensor, namely, wheel speed meter translation parameters, wheel speed meter rotation parameters, inertial translation parameters, inertial rotation parameters, laser point cloud matching translation parameters and laser point cloud matching rotation parameters.
[0103] The processor 103 can be used to receive the target image acquired by the first acquisition module 101, and perform scene recognition on the target image to obtain the scene type corresponding to the target image. Possibly, the scene recognition method of the target image can be manual recognition, that is, after acquiring the target image, the tester can perform scene recognition on the target image in combination with the scene features, and manually determine the scene type corresponding to the scene features in the target image. Possibly, the scene recognition method of the target image can also be automatic recognition by a neural network, that is, after acquiring the target image, the target image can be input into a trained neural network to obtain a character string for characterizing the scene type, where different character strings can each correspond to a scene type.
[0104] It is understandable that when the target image is a plurality of images, the processor 103 may also extract the scenes captured from different angles contained in each of the plurality of images into the same image for quick identification, but the present application is not limited thereto.
[0105] Further, after the processor 103 identifies the scene type corresponding to the target image, at least two sensor parameters obtained by the second acquisition module 102 may be obtained, and a target map may be generated based on the at least two sensor parameters and the scene type. After obtaining the scene type, the processor 103 may determine the corresponding sensor parameter weights according to the scene type. The sensor type mentioned here may correspond to the at least two sensor types mentioned above, and corresponding weights may be determined for the parameters of each sensor type. Here, the at least two sensor parameters may be represented as A1, A2, B1, and B2 (A1 and A2 may correspond to different types of parameters of the same sensor type, and B1 and B2 may correspond to different types of parameters of the same sensor type), and the corresponding sensor parameter weights are a1, a2, b1, and b2. For example, the adjusted at least two sensor parameters may be represented as A1×a1, A2×a2, B1×b1, and B2×b2.
[0106] It should be noted that the order of acquiring at least two sensor parameters acquired by the second acquisition module 102 after the processor 103 identifies the scene type corresponding to the target image is not limited here. For example, the scene type corresponding to the target image may be identified after acquiring at least two sensor parameters acquired by the second acquisition module 102, or the scene type corresponding to the target image may be identified while acquiring at least two sensor parameters acquired by the second acquisition module 102.
[0107] After the processor 103 adjusts the weights corresponding to the at least two sensor parameters, the adjusted sensor parameters can be introduced into the trained map generation neural network to output the target map. It should be noted that the construction of the map according to the at least two sensor parameters can be achieved by common technical means, and this application will not elaborate on it.
[0108] Next, the present application will explain the map generation method by multiple embodiments.
[0109] See also Figure 2 A flowchart of a map generation method provided in an embodiment of the present application is shown.
[0110] like Figure 2 As shown, the map generation method may at least include the following steps:
[0111] Step 202: Acquire a target image and at least two sensor parameters.
[0112] Specifically, one or more images containing the surrounding scene can be first acquired according to the current position. Possibly, when the target image corresponds to one image, the image can contain the surrounding scene shot from any angle at the current position, such as but not limited to the surrounding scene shot from any angle such as the front, left front, right front, left rear, right rear or rear, and preferably, the target image can contain the surrounding scene shot from the front. Possibly, when the target image corresponds to multiple images, each image can contain the surrounding scene shot from any angle at the current position, such as but not limited to when the target image corresponds to three images, the three images can respectively contain the surrounding angles shot from the front, right front and left front at the current position.
[0113] It is understandable that the target image in the present application can be acquired in real time by a shooting device, for example, by selecting a shooting application through user operation or by starting a device that can be used to shoot images according to an automated program instruction. Here, a robot that can execute automated program instructions is taken as an example. The robot can control the camera to turn on and shoot the surrounding scene in real time according to the automated program instruction, and the camera can be, but is not limited to, a monocular camera or a binocular camera. Of course, the target image in the present application can also be a pre-stored image, and the stored image can include one or more images of the surrounding scene corresponding to the current position, but is not limited to this.
[0114] Further, at least two sensor parameters may be obtained according to the current position, wherein the sensor type may be, but is not limited to, a wheel speed meter sensor, an inertial sensor or a laser sensor, and the parameters corresponding to the wheel speed meter sensor may include a wheel speed meter translation parameter and a wheel speed meter rotation parameter, and the parameters corresponding to the inertial sensor may include an inertial translation parameter and an inertial rotation parameter, and the parameters corresponding to the laser sensor may include a laser point cloud matching translation parameter and a laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the wheel speed meter sensor and the laser sensor, that is, wheel speed meter translation parameter, wheel speed meter rotation parameter, laser point cloud matching translation parameter and laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the inertial sensor and the laser sensor, that is, inertial translation parameter, inertial rotation parameter, laser point cloud matching translation parameter and laser point cloud matching rotation parameter. Possibly, the at least two sensor parameters may include parameters corresponding to the wheel speed meter sensor, the inertial sensor and the laser sensor, namely, wheel speed meter translation parameters, wheel speed meter rotation parameters, inertial translation parameters, inertial rotation parameters, laser point cloud matching translation parameters and laser point cloud matching rotation parameters.
[0115] It is understandable that the present application may be but is not limited to the order of first acquiring the target image and then acquiring at least two sensor parameters. For example, at least two sensor parameters may be acquired first and then the target image, or the target image and at least two sensor parameters may be acquired simultaneously.
[0116] Step 204: Perform scene recognition on the target image to obtain the scene type corresponding to the target image.
[0117] Specifically, after acquiring the target image, the target image may be subjected to scene recognition, wherein the scene recognition method may include but is not limited to manual recognition or automatic recognition by a neural network. Possibly, the tester may perform scene recognition on the target image in combination with scene features, and manually determine the scene type corresponding to the scene features in the target image.
[0118] Possibly, the target image can also be automatically recognized by the neural network, and the target image can be input into the trained neural network to obtain a string used to characterize the scene type, where different strings can each correspond to a scene type. It should be noted that if the target image is a single image, multiple sample images consistent with the scene shooting angle contained in the image can be first obtained, and then the multiple sample images can be input into the neural network for training until the neural network training is completed. If the target image is multiple images, multiple sample images consistent with the scene shooting angle contained in each image can be first obtained, and then the multiple sample images can be respectively input into the corresponding neural network for training until each neural network training is completed, where multiple images can be respectively input into the corresponding neural network according to the scene shooting angle, and when the results output by each neural network are consistent, the scene type corresponding to the result can be used as the scene type of the target image. It should also be noted that the present application can also obtain multiple sample images consistent with the scene shooting angle contained in each image when the target image is multiple images, and then the multiple sample images can be grouped according to multiple images and sequentially input into the neural network for training until the neural network training is completed.
[0119] Step 206: Generate a target map based on at least two sensor parameters and a scene type.
[0120] Specifically, after obtaining the scene type corresponding to the target image, the target map can be generated by combining at least two sensor parameters and the scene type. After obtaining the scene type, the corresponding sensor parameter weights can be determined according to the scene type. The sensor type mentioned here can correspond to the at least two sensor types mentioned above, and corresponding weights can be determined for the parameters of each sensor type. Here, the at least two sensor parameters can be expressed as A1, A2, B1 and B2 (A1 and A2 can correspond to different types of parameters of the same sensor type, and B1 and B2 can correspond to different types of parameters of the same sensor type), and the corresponding sensor parameter weights are a1, a2, b1 and b2. For example, the adjusted at least two sensor parameters can be expressed as A1×a1, A2×a2, B1×b1 and B2×b2.
[0121] After determining the adjusted at least two sensor parameters, the adjusted at least two sensor parameters can be, but are not limited to, introduced into the trained map generation neural network to output the target map. It should be noted that the construction of the map according to the at least two sensor parameters can be achieved by common technical means, and this application will not elaborate on them.
[0122] Compared with the prior art that generates maps through fixed sensor parameters, which makes the maps generated in some special scenes invalid or with too large errors, in the embodiments of the present application, the scene can be identified before generating the map, and the corresponding map generation parameters can be adapted according to the identified scene type, so that the generated map can be more accurate and bring a better visual experience to the user.
[0123] As an option of this embodiment, after acquiring the target image and at least two sensor parameters, performing scene recognition on the target image and before obtaining the scene type corresponding to the target image may further include:
[0124] Preprocess the target image;
[0125] Perform scene recognition on the target image to obtain the scene type corresponding to the target image, including:
[0126] Perform scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image.
[0127] Since there are many ways to obtain a target image, in order to ensure the consistency of the target image and the accuracy of scene recognition, specifically, the target image can be pre-processed after it is obtained, for example but not limited to processing the target image according to a preset image format, so that the format of the target image after processing is the same as the preset image format. After the target image is pre-processed, the processed target image can be subjected to scene recognition to ensure the recognition efficiency and accuracy of the scene type.
[0128] As another option of this embodiment, preprocessing the target image includes:
[0129] Performing distortion correction on the target image according to the camera intrinsic parameters; and / or
[0130] Scaling the target image according to a preset image size; and / or
[0131] Correct the target image according to a preset image color ratio; and / or
[0132] Correct the target image according to the preset image brightness ratio.
[0133] Specifically, when the target image is preprocessed, the target image can be processed by a variety of processing methods to further ensure the consistency of the target image and the accuracy of scene type recognition. Possibly, after the target image is acquired, the target image can be scaled or cropped according to the preset image size so that the size of the target image is consistent with the preset image size. For example, when the aspect ratio of the preset image is consistent with the aspect ratio of the target image, the length and width of the target image can be reduced or enlarged according to the length or width of the preset image. When the aspect ratio of the preset image is inconsistent with the aspect ratio of the target image, the length of the target image can be reduced or enlarged according to the length of the preset image, and when the length of the target image is consistent with the length of the preset image, the length of the target image can be cropped according to the width of the preset image until the length and width of the preset image are respectively consistent with the length and width of the target image. It should be noted that when the target image is scaled or cropped, the scene image in the target image is not affected, that is, the integrity of the scene image in the target image is guaranteed.
[0134] Possibly, after acquiring the target image, the color ratio of the target image may be corrected and adjusted according to the color ratio of the preset image, so that the color of the target image is consistent with the color of the preset image. For example, but not limited to, when the color ratio of the preset image is A:B:C and the color ratio of the target image is A:b:c, the color corresponding to b in the preset image may be adjusted according to the ratio of A:B until A:b in the target image is consistent with A:B in the preset image. Then, the color corresponding to c in the preset image may be adjusted according to the ratio of A:C until A:c in the target image is consistent with A:C in the preset image.
[0135] Possibly, after acquiring the target image, the brightness ratio of the target image may be corrected and adjusted according to the brightness ratio of the preset image, so that the brightness of the target image is consistent with the brightness of the preset image.
[0136] Possibly, after acquiring the target image, the target image may be automatically subjected to distortion correction processing according to the built-in parameters of the camera. Here, the camera may be a device for photographing the target image, such as but not limited to a monocular camera or a binocular camera. After photographing the target image, it may be determined whether the target image is distorted. If so, the target image may be restored to normal through distortion correction processing.
[0137] It can be understood that the method of preprocessing the target image in the present embodiment may be but is not limited to scaling the target image according to a preset image size, or correcting the target image according to a preset image color ratio, or correcting the target image according to a preset image brightness ratio, or scaling the target image according to a preset image size and correcting the target image according to a preset image color ratio, or scaling the target image according to a preset image size and correcting the target image according to a preset image brightness ratio, or correcting the target image according to a preset image color ratio and correcting the target image according to a preset image brightness ratio, or scaling the target image according to a preset image size, correcting the target image according to a preset image color ratio and correcting the target image according to a preset image brightness ratio.
[0138] As another option of this embodiment, performing scene recognition on the preprocessed target image to obtain a scene type corresponding to the target image includes:
[0139] Input the preprocessed target image into the trained scene recognition model to obtain scene parameters;
[0140] The scene type corresponding to the target image is determined according to the scene parameters.
[0141] Specifically, after preprocessing the acquired target image, the target image can be input into a trained scene recognition model to obtain corresponding scene parameters, wherein the scene recognition model can be, but is not limited to, any deep learning neural network, and during the training process of the scene recognition model, sample images of different scenes with the same shooting angle as the scene in the target image can be input into the scene recognition model, and each sample image corresponds to a scene of a known scene type. It is understandable that the scene parameters output by the trained scene recognition model can correspond to different scene types.
[0142] See here Figure 3 The following is a table showing a scene type correspondence provided by an embodiment of the present application. Figure 3 As shown, the scene type corresponding table may include four scene parameter types and their corresponding scene types, wherein scene parameter A may correspond to a long corridor scene, scene parameter B may correspond to a carpet scene, scene parameter C may correspond to a glass mirror scene, and scene parameter D may correspond to a threshold scene. When the target image is input into a trained scene recognition model and scene parameter A is output, it can be determined that the scene type of the target image is a long corridor scene. When the target image is input into a trained scene recognition model and scene parameter B is output, it can be determined that the scene type of the target image is a carpet scene. When the target image is input into a trained scene recognition model and scene parameter C is output, it can be determined that the scene type of the target image is a glass mirror scene. When the target image is input into a trained scene recognition model and scene parameter D is output, it can be determined that the scene type of the target image is a threshold scene.
[0143] See also Figure 4 , Figure 4 A flowchart of another map generation method provided in an embodiment of the present application is shown.
[0144] like Figure 4 As shown, the map generation method may at least include the following steps:
[0145] Step 402: Acquire a target image and at least two sensor parameters.
[0146] Specifically, step 402 may refer to step 202, wherein the at least two sensor parameters may include wheel speed meter sensor parameters, inertial sensor parameters and laser sensor parameters, which will not be described in detail here.
[0147] Step 404: Perform scene recognition on the target image to obtain the scene type corresponding to the target image.
[0148] Specifically, step 404 is consistent with step 204 and will not be described in detail here.
[0149] Step 406: Determine whether the scene type is a long corridor scene.
[0150] Specifically, after obtaining the corresponding scene type according to the target image, it can be determined whether the scene type is a special scene, wherein the special scene can include but is not limited to any at least one of a long corridor scene, a carpet scene, a glass mirror scene, or a threshold scene. It can be understood that for different scene types, in order to ensure the accuracy of the generated map, different preset parameter strategies can be corresponding to each other, and then the sensor parameters can be adjusted according to the preset parameter strategy to obtain target maps corresponding to different scene types.
[0151] When it is determined that the scene type belongs to a special scene, it can be further determined whether the scene type is a long corridor scene. It should be noted that if the scene type identified according to the target image can be directly identified by name or the like, it can be directly determined here whether the scene type is a long corridor scene. The present application is not limited to this.
[0152] Step 408: When the scene type is a long corridor scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased according to the preset parameter strategy corresponding to the long corridor scene, and the weights corresponding to the laser sensor parameters are decreased.
[0153] Specifically, when the scene type of the target image is determined to be a long corridor scene, the parameters measured by the laser sensor hardly change when translating forward and backward along the long corridor in the long corridor scene, which results in the laser sensor parameters being unable to reflect the translation state. To ensure the accuracy of the generated map, the weight corresponding to the current laser sensor parameter can be reduced according to the preset parameter weight corresponding to the long corridor scene until it is consistent with the preset parameter weight corresponding to the laser sensor parameter in the long corridor scene, and the weight corresponding to the current wheel speed meter sensor parameter can be increased until it is consistent with the preset parameter weight corresponding to the wheel speed meter sensor parameter in the long corridor scene, and the weight corresponding to the current inertial sensor parameter can also be increased until it is consistent with the preset parameter weight corresponding to the inertial sensor in the long corridor scene.
[0154] It can be understood that the accuracy impact of the generated map caused by laser sensor degradation is avoided or reduced by reducing the weight of laser sensor parameters, wherein the laser sensor parameters may include but are not limited to laser sensor translation parameters and laser sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the laser sensor translation parameter weights and laser sensor rotation parameter weights. Wherein, the wheel speed meter sensor parameters may include but are not limited to wheel speed meter sensor translation parameters and wheel speed meter sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the wheel speed meter sensor translation parameter weights and wheel speed meter sensor rotation parameter weights. Wherein, the inertial sensor parameters may include but are not limited to inertial sensor translation parameters and inertial sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the inertial sensor translation parameter weights and inertial sensor rotation parameter weights.
[0155] Of course, the present application may also reduce the weight corresponding to the current laser sensor parameter until it is consistent with the preset parameter weight corresponding to the laser sensor parameter in the long corridor scene, and only increase the weight corresponding to the current wheel speed meter sensor parameter until it is consistent with the preset parameter weight corresponding to the wheel speed meter sensor parameter in the long corridor scene, or only increase the weight corresponding to the current inertial sensor parameter until it is consistent with the preset parameter weight corresponding to the inertial sensor in the long corridor scene, but is not limited to this.
[0156] Step 410: Generate a target map based on the adjusted at least two sensor parameters.
[0157] Specifically, after determining the adjusted at least two sensor parameters, the adjusted at least two sensor parameters can be, but are not limited to, introduced into the trained map generation neural network to output the target map. It should be noted that the construction of the map according to the at least two sensor parameters can be achieved by common technical means, and this application will not elaborate on them.
[0158] See also Figure 5 , Figure 5 A flowchart of another map generation method provided in an embodiment of the present application is shown.
[0159] like Figure 5 As shown, the map generation method may at least include the following steps:
[0160] Step 502: Acquire a target image and at least two sensor parameters.
[0161] Specifically, step 502 may refer to step 202, wherein the at least two sensor parameters may include wheel speed meter sensor parameters, inertial sensor parameters and laser sensor parameters, which will not be described in detail here.
[0162] Step 504: Perform scene recognition on the target image to obtain the scene type corresponding to the target image.
[0163] Specifically, step 504 is consistent with step 204 and will not be described in detail here.
[0164] Step 506: Determine whether the scene type is a carpet scene.
[0165] Specifically, after obtaining the corresponding scene type according to the target image, it can be determined whether the scene type is a special scene, wherein the special scene can include but is not limited to any at least one of a long corridor scene, a carpet scene, a glass mirror scene, or a threshold scene. It can be understood that for different scene types, in order to ensure the accuracy of the generated map, different preset parameter strategies can be corresponding to each other, and then the sensor parameters can be adjusted according to the preset parameter strategy to obtain target maps corresponding to different scene types.
[0166] When it is determined that the scene type belongs to a special scene, it can be further determined whether the scene type is a carpet scene. It should be noted that if the scene type identified according to the target image can be directly identified by name or the like, it can be directly determined here whether the scene type is a carpet scene. The present application is not limited to this.
[0167] Step 508: When the scene type is a carpet scene, obtain a tilt correction parameter corresponding to the carpet scene based on an inertial sensor.
[0168] Specifically, when the scene type of the target image is determined to be a carpet scene, due to the obvious bumps on the contact surface, the laser point emitted by the laser sensor may not be accurately hit on the ground due to the inclination angle between the contact surface and the ground during the movement of generating the map, thereby causing inaccurate laser sensor parameters. In order to avoid large errors in laser sensor parameters, when the scene type is a carpet scene, the inclination angle between the laser point emitted by the laser sensor and the ground can be obtained through an inertial sensor, and the inclination correction parameter for projecting the laser point onto the ground for inclination correction can be determined based on the inclination angle. It can be understood that the inclination correction parameter can be applied to the inclination correction of the laser point of the laser sensor, that is, the inclination correction parameter can also be used as one of the laser sensor parameters. For example, but not limited to, the types of laser sensor parameters may include laser sensor translation parameters, laser sensor rotation parameters, and inclination correction parameters.
[0169] Step 510: according to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0170] Specifically, since the contact surface of the carpet in the carpet scene is uneven, it is easy to bump or slip during the movement of generating the map, which leads to large errors in the wheel speed sensor parameters and the inertial sensor parameters, reducing the accuracy of the map generation. In order to ensure the accuracy of the generated map, the weight corresponding to the current wheel speed sensor parameter can be reduced according to the preset parameter weight corresponding to the carpet scene until it is consistent with the preset parameter weight corresponding to the wheel speed sensor parameter in the carpet scene. At the same time, the weight corresponding to the current inertial sensor parameter can also be reduced until it is consistent with the preset parameter weight corresponding to the inertial sensor in the carpet scene. At the same time, the weight corresponding to the current laser sensor parameter can be increased until it is consistent with the preset parameter weight corresponding to the laser sensor parameter in the carpet scene, and the weight corresponding to the tilt correction parameter can also be increased until it is consistent with the preset parameter weight corresponding to the tilt correction parameter in the carpet scene. It should be noted that the preset parameter weight corresponding to the tilt correction parameter in the carpet scene can be, but is not limited to, between 0.8 and 1.
[0171] It can be understood that here, the influence of the large errors of the wheel speed meter sensor and the inertial sensor on the accuracy of the generated map is avoided or reduced by reducing the weight of the wheel speed meter sensor parameters and the weight of the inertial sensor, wherein the laser sensor parameters may include but are not limited to the laser sensor translation parameters and the laser sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the laser sensor translation parameter weights and the laser sensor rotation parameter weights. Among them, the wheel speed meter sensor parameters may include but are not limited to the wheel speed meter sensor translation parameters and the wheel speed meter sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the wheel speed meter sensor translation parameter weights and the wheel speed meter sensor rotation parameter weights. Among them, the inertial sensor parameters may include but are not limited to the inertial sensor translation parameters and the inertial sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the inertial sensor translation parameter weights and the inertial sensor rotation parameter weights.
[0172] Step 512: Generate a target map based on at least the adjusted sensor parameters.
[0173] Specifically, after determining the adjusted at least two sensor parameters, the adjusted at least two sensor parameters can be, but are not limited to, introduced into the trained map generation neural network to output the target map. It should be noted that the construction of the map according to the at least two sensor parameters can be achieved by common technical means, and this application will not elaborate on them.
[0174] See also Figure 6 A flowchart of another map generation method provided in an embodiment of the present application is shown.
[0175] like Figure 6As shown, the map generation method may at least include the following steps:
[0176] Step 602: Acquire a target image and at least two sensor parameters.
[0177] Specifically, step 602 may refer to step 202, wherein the at least two sensor parameters may include wheel speed meter sensor parameters, inertial sensor parameters and laser sensor parameters, which will not be described in detail here.
[0178] Step 604: Perform scene recognition on the target image to obtain the scene type corresponding to the target image.
[0179] Specifically, step 604 is consistent with step 204 and will not be described in detail here.
[0180] Step 606: Determine whether the scene type is a glass mirror scene.
[0181] Specifically, after obtaining the corresponding scene type according to the target image, it can be determined whether the scene type is a special scene, wherein the special scene can include but is not limited to any at least one of a long corridor scene, a carpet scene, a glass mirror scene, or a threshold scene. It can be understood that for different scene types, in order to ensure the accuracy of the generated map, different preset parameter strategies can be corresponding to each other, and then the sensor parameters can be adjusted according to the preset parameter strategy to obtain target maps corresponding to different scene types.
[0182] When it is determined that the scene type belongs to a special scene, it can be further determined whether the scene type is a glass mirror scene. It should be noted that if the scene type identified according to the target image can be directly identified by name or the like, it can be directly determined here whether the scene type is a glass mirror scene. The present application is not limited to this.
[0183] Step 608: When the scene type is a glass mirror scene, determine the position of the glass mirror scene in the target image.
[0184] Specifically, when it is determined that the scene type of the target image is a glass mirror scene, the position of the glass mirror scene can be determined in the target image. Here, the position of the glass mirror can be determined according to, but not limited to, the scene recognition model mentioned above. For example, when training the scene recognition model mentioned above, multiple sample images of known scene types and scene positions can be input into the scene recognition model, and the output results may include a character string for characterizing the scene type and a sample image marked with the scene position. It can be understood that the method of determining the position of the glass mirror through the scene recognition model can also be applied to other special scenes, and the present application is not limited thereto.
[0185] Step 610: Delete the laser point cloud data that is consistent with the mirror direction of the glass mirror scene from the laser point cloud data collected by the laser sensor according to the position of the glass mirror scene in the target image.
[0186] Specifically, when the laser point of the laser sensor hits the glass mirror scene, it may not return or have multiple echoes, which may cause large errors in some laser sensor parameters, thus affecting the accuracy of the map. To avoid large errors in some laser sensor parameters, after determining the position of the glass mirror scene in the target image, some parameters of the laser sensor parameters obtained at that position can be filtered out according to the position, and the remaining laser sensor parameters are used as the laser sensor parameters in the glass mirror scene.
[0187] See here Figure 7 FIG. 1 is a schematic diagram of a target image including a glass mirror scene provided by an embodiment of the present application. Figure 7 As shown, the target image may include three areas, namely 7A, 7B and 7C, where area 7B is marked as the location of the glass mirror scene. When all the laser points of the laser sensor hit the target image, the laser sensor parameters in areas 7A and 7C can be directly selected as the laser sensor parameters of the target image in the glass mirror scene. It is understandable that the laser sensor parameters with obvious errors in the laser sensor parameters can also be used as the laser sensor parameters in the glass mirror scene and deleted, and the present application is not limited to this.
[0188] Step 612: according to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weights corresponding to the laser sensor parameters are decreased.
[0189] Specifically, since some laser sensor parameters need to be screened out in the glass mirror scene, which leads to a decrease in the accuracy of the remaining laser sensor parameters, in order to avoid affecting the accuracy of the generated map, the weights corresponding to the current wheel speedometer sensor parameters can be increased according to the preset parameter weights corresponding to the glass mirror scene until they are consistent with the preset parameter weights corresponding to the wheel speedometer sensor parameters in the glass mirror scene. At the same time, the weights corresponding to the current inertial sensor parameters can also be provided until they are consistent with the preset parameter weights corresponding to the inertial sensor in the glass mirror scene. At the same time, the weights corresponding to the current remaining laser sensor parameters can also be reduced until they are consistent with the preset parameter weights corresponding to the laser sensor parameters in the glass mirror scene.
[0190] It can be understood that the accuracy of map generation is ensured here by providing weights of wheel speed meter sensor parameters and weights of inertial sensors, wherein laser sensor parameters may include but are not limited to laser sensor translation parameters and laser sensor rotation parameters, and the preset parameter weights mentioned above may correspond to laser sensor translation parameter weights and laser sensor rotation parameter weights. Wherein, wheel speed meter sensor parameters may include but are not limited to wheel speed meter sensor translation parameters and wheel speed meter sensor rotation parameters, and the preset parameter weights mentioned above may correspond to wheel speed meter sensor translation parameter weights and wheel speed meter sensor rotation parameter weights. Wherein, inertial sensor parameters may include but are not limited to inertial sensor translation parameters and inertial sensor rotation parameters, and the preset parameter weights mentioned above may correspond to inertial sensor translation parameter weights and inertial sensor rotation parameter weights.
[0191] Step 614: Generate a target map based on the adjusted at least two sensor parameters.
[0192] Specifically, step 614 may refer to step 410, which will not be described in detail here.
[0193] See also Figure 8 , Figure 8 A flowchart of another map generation method provided in an embodiment of the present application is shown.
[0194] like Figure 8 As shown, the map generation method may at least include the following steps:
[0195] Step 802: Acquire a target image and at least two sensor parameters.
[0196] Specifically, step 802 may refer to step 202, wherein the at least two sensor parameters may include wheel speed meter sensor parameters, inertial sensor parameters and laser sensor parameters, which will not be described in detail here.
[0197] Step 804: Perform scene recognition on the target image to obtain the scene type corresponding to the target image.
[0198] Specifically, step 804 is consistent with step 204 and will not be described in detail here.
[0199] Step 806: Determine whether the scene type is a threshold scene.
[0200] Specifically, after obtaining the corresponding scene type according to the target image, it can be determined whether the scene type is a special scene, wherein the special scene can include but is not limited to any at least one of a long corridor scene, a carpet scene, a glass mirror scene, or a threshold scene. It can be understood that for different scene types, in order to ensure the accuracy of the generated map, different preset parameter strategies can be corresponding to each other, and then the sensor parameters can be adjusted according to the preset parameter strategy to obtain target maps corresponding to different scene types.
[0201] When it is determined that the scene type belongs to a special scene, it can be further determined whether the scene type is a threshold scene. It should be noted that if the scene type identified according to the target image can be directly identified by name or the like, it can be directly determined here whether the scene type is a threshold scene. The present application is not limited to this.
[0202] Step 808: When the scene type is a threshold scene, obtain a tilt correction parameter corresponding to the threshold scene based on an inertial sensor.
[0203] Specifically, when the scene type of the target image is determined to be a threshold scene, due to obvious impact or vibration on the contact surface, the laser point emitted by the laser sensor may not be accurately hit on the ground due to the inclination angle between the contact surface and the ground during the movement process of generating the map, thereby causing inaccurate laser sensor parameters. In order to avoid large errors in laser sensor parameters, when the scene type is a threshold scene, the inclination angle between the laser point emitted by the laser sensor and the ground can be obtained through an inertial sensor, and the inclination correction parameter for projecting the laser point onto the ground for inclination correction can be determined based on the inclination angle. It can be understood that the inclination correction parameter can be applied to the inclination correction of the laser point of the laser sensor, that is, the inclination correction parameter can also be used as one of the laser sensor parameters. For example, but not limited to, the types of laser sensor parameters may include laser sensor translation parameters, laser sensor rotation parameters, and inclination correction parameters.
[0204] Step 810: according to a preset parameter strategy corresponding to the threshold scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0205] Specifically, since the threshold is prone to collision or vibration when passing through it, the errors of the wheel speed meter sensor parameters and the inertial sensor parameters are large, which reduces the accuracy of map generation. In order to ensure the accuracy of map generation, the weight corresponding to the current wheel speed meter sensor parameter can be reduced according to the preset parameter weight corresponding to the threshold scene until it is consistent with the preset parameter weight corresponding to the wheel speed meter sensor parameter in the threshold scene. At the same time, the weight corresponding to the current inertial sensor parameter can be reduced until it is consistent with the preset parameter weight corresponding to the inertial sensor in the threshold scene. At the same time, the weight corresponding to the current laser sensor parameter can be increased until it is consistent with the preset parameter weight corresponding to the laser sensor parameter in the threshold scene, and the weight corresponding to the inclination correction parameter can be increased until it is consistent with the preset parameter weight corresponding to the threshold scene. It should be noted that the preset parameter weight corresponding to the inclination correction parameter in the carpet scene can be, but is not limited to, between 0.8 and 1.
[0206] It can be understood that here, the influence of the large errors of the wheel speed meter sensor and the inertial sensor on the accuracy of the generated map is avoided or reduced by reducing the weight of the wheel speed meter sensor parameters and the weight of the inertial sensor, wherein the laser sensor parameters may include but are not limited to the laser sensor translation parameters and the laser sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the laser sensor translation parameter weights and the laser sensor rotation parameter weights. Among them, the wheel speed meter sensor parameters may include but are not limited to the wheel speed meter sensor translation parameters and the wheel speed meter sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the wheel speed meter sensor translation parameter weights and the wheel speed meter sensor rotation parameter weights. Among them, the inertial sensor parameters may include but are not limited to the inertial sensor translation parameters and the inertial sensor rotation parameters, and the preset parameter weights mentioned above may correspond to the inertial sensor translation parameter weights and the inertial sensor rotation parameter weights.
[0207] Step 812: Generate a target map based on the adjusted at least two sensor parameters.
[0208] Specifically, step 812 may refer to step 512, which will not be described in detail here.
[0209] As another option of this embodiment, after determining whether the scene type is a special scene, the method further includes:
[0210] When the scene type is not a special scene, configuring weights corresponding to the at least two sensor parameters respectively according to a default parameter strategy corresponding to the at least two sensor parameters;
[0211] A target map is generated based on the adjusted at least two sensor parameters.
[0212] Specifically, when it is determined that the scene type in the target image is not a special scene, the corresponding sensor parameters can be directly configured according to the default weights, wherein the default weights can be understood as the weights with the highest accuracy in generating maps in non-special scenes.
[0213] After the sensor parameters are weighted, the adjusted sensor parameters can be brought into the trained map generation neural network to output the target map. It should be noted that the construction of the map according to the sensor parameters can be achieved by common technical means, and this application will not elaborate on it.
[0214] It should be noted that the sensor parameter weights corresponding to different special scenarios in this application are different. Different sensor parameter weights may be used for different sensor models or sensor configurations, but their changing trends are consistent with those for non-special scenarios.
[0215] See also Fig. 9 , Fig. 9 A schematic structural diagram of a map generating device provided in an embodiment of the present application is shown.
[0216] like Fig. 9 As shown, the map generation device 900 may include at least an acquisition module 901, an identification module 902 and a generation module 903, wherein:
[0217] An acquisition module 901 is used to acquire a target image and at least two sensor parameters;
[0218] The recognition module 902 is used to perform scene recognition on the target image to obtain the scene type corresponding to the target image;
[0219] The generating module 903 is used to generate a target map based on at least two sensor parameters and a scene type.
[0220] In some possible embodiments, the device further includes:
[0221] A processing module, configured to perform scene recognition on the target image after acquiring the target image and at least two sensor parameters, and pre-process the target image before obtaining the scene type corresponding to the target image;
[0222] The recognition module is specifically used to perform scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image.
[0223] In some possible embodiments, the processing module is specifically used to:
[0224] Performing distortion correction on the target image according to the camera intrinsic parameters; and / or
[0225] Scaling the target image according to a preset image size; and / or
[0226] Correct the target image according to a preset image color ratio; and / or
[0227] Correct the target image according to the preset image brightness ratio.
[0228] In some possible embodiments, the identification module includes:
[0229] The recognition unit is used to input the preprocessed target image into the trained scene recognition model to obtain scene parameters; each scene parameter corresponds to a different scene type;
[0230] The first determination unit is used to determine the scene type corresponding to the target image according to the scene parameters; the scene recognition model is trained by a plurality of sample images containing known scene types.
[0231] In some possible embodiments, the generating module 903 includes:
[0232] A judging unit, used to judge whether the scene type is a special scene;
[0233] a second determining unit, configured to adjust at least two sensor parameters according to the special scene when the scene type is a special scene;
[0234] The first generating unit is configured to generate a target map based on the adjusted at least two sensor parameters.
[0235] In some possible embodiments, the special scene includes a long corridor scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0236] The second determination unit is used to increase the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters respectively, and reduce the weights corresponding to the laser sensor parameters according to the preset parameter strategy corresponding to the long corridor scene when the scene type is a long corridor scene.
[0237] In some possible embodiments, the special scene includes a carpet scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0238] A second determining unit, configured to obtain a tilt correction parameter corresponding to the carpet scene based on an inertial sensor when the scene type is a carpet scene;
[0239] According to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0240] In some possible embodiments, the special scene includes a glass mirror scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0241] A second determining unit, used for determining the position of the glass mirror scene in the target image when the scene type is a glass mirror scene;
[0242] According to the position of the glass mirror scene in the target image, the laser point cloud data collected by the laser sensor and having the same mirror direction as the glass mirror scene are deleted;
[0243] According to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weights corresponding to the laser sensor parameters are reduced.
[0244] In some possible embodiments, the special scenario includes a threshold scenario; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0245] a second determining unit, configured to obtain a tilt correction parameter corresponding to the threshold scene based on an inertial sensor when the scene type is a threshold scene;
[0246] According to the preset parameter strategy corresponding to the threshold scenario, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the inclination correction parameters are increased.
[0247] In some possible embodiments, the generating module 903 includes:
[0248] A third determining unit is configured to, after determining whether the scene type is a special scene, configure weights corresponding to the at least two sensor parameters according to a default parameter strategy corresponding to the at least two sensor parameters when the scene type is not a special scene;
[0249] The second generating unit is configured to generate a target map based on the adjusted at least two sensor parameters.
[0250] See also Fig.10 , Fig.10 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0251] like Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 and at least one communication bus 1002 .
[0252] The communication bus 1002 may be used to realize the connection and communication among the above-mentioned components.
[0253] The user interface 1003 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0254] The network interface 1004 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0255] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect the various parts of the entire electronic device 1000, and executes various functions and processes data of the routing device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 1001 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0256] Among them, the memory 1005 may include RAM and may also include ROM. Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a map generation application.
[0257] Specifically, the processor 1001 may be used to call a map generation application stored in the memory 1005, and specifically perform the following operations:
[0258] acquiring a target image and at least two sensor parameters;
[0259] Perform scene recognition on the target image to obtain the scene type corresponding to the target image;
[0260] A target map is generated based on at least two sensor parameters and a scene type.
[0261] In some possible embodiments, after acquiring the target image and at least two sensor parameters, the processor 1001 performs scene recognition on the target image, and before obtaining the scene type corresponding to the target image, is further configured to execute:
[0262] Preprocess the target image;
[0263] Perform scene recognition on the target image to obtain the scene type corresponding to the target image, including:
[0264] Perform scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image.
[0265] In some possible embodiments, when the processor 1001 pre-processes the target image, it is used to execute:
[0266] Performing distortion correction on the target image according to the camera intrinsic parameters; and / or
[0267] Scaling the target image according to a preset image size; and / or
[0268] Correct the target image according to a preset image color ratio; and / or
[0269] Correct the target image according to the preset image brightness ratio.
[0270] In some possible embodiments, the processor 1001 performs scene recognition on the preprocessed target image and obtains the scene type corresponding to the target image, and is used to execute:
[0271] The preprocessed target image is input into the trained scene recognition model to obtain scene parameters; each scene parameter corresponds to a different scene type;
[0272] The scene type corresponding to the target image is determined according to the scene parameters; the scene recognition model is trained by multiple sample images containing known scene types.
[0273] In some possible embodiments, when the processor 1001 generates a target map based on at least two sensor parameters and a scene type, it is configured to execute:
[0274] Determine whether the scene type is a special scene;
[0275] When the scene type is a special scene, adjusting at least two sensor parameters according to the special scene;
[0276] A target map is generated based on the adjusted at least two sensor parameters.
[0277] In some possible embodiments, the special scenario includes a long corridor scenario, and the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0278] When the scene type is a special scene, the processor 1001 adjusts at least two sensor parameters according to the special scene to execute:
[0279] When the scene type is a long corridor scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased according to the preset parameter strategy corresponding to the long corridor scene, and the weights corresponding to the laser sensor parameters are reduced.
[0280] In some possible embodiments, the special scene includes a carpet scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0281] When the scene type is a special scene, the processor 1001 adjusts at least two sensor parameters according to the special scene to execute:
[0282] When the scene type is a carpet scene, obtaining a tilt correction parameter corresponding to the carpet scene based on an inertial sensor;
[0283] According to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
[0284] In some possible embodiments, the special scene includes a glass mirror scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0285] When the scene type is a special scene, the processor 1001 adjusts at least two sensor parameters according to the special scene to execute:
[0286] When the scene type is a glass mirror scene, determining the position of the glass mirror scene in the target image;
[0287] According to the position of the glass mirror scene in the target image, the laser point cloud data collected by the laser sensor and having the same mirror direction as the glass mirror scene are deleted;
[0288] According to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weights corresponding to the laser sensor parameters are reduced.
[0289] In some possible embodiments, the special scenario includes a threshold scenario; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter;
[0290] When the scene type is a special scene, the processor 1001 adjusts at least two sensor parameters according to the special scene to execute:
[0291] When the scene type is a threshold scene, obtaining a tilt correction parameter corresponding to the threshold scene based on an inertial sensor;
[0292] According to the preset parameter strategy corresponding to the threshold scenario, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the inclination correction parameters are increased.
[0293] In some possible embodiments, after determining whether the scene type is a special scene, the processor 1001 is further configured to execute:
[0294] When the scene type is not a special scene, configuring weights corresponding to the at least two sensor parameters respectively according to a default parameter strategy corresponding to the at least two sensor parameters;
[0295] A target map is generated based on the adjusted at least two sensor parameters.
[0296] The embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer or a processor, the computer or the processor executes the above-mentioned Figure 2 or Figure 4 or Figure 5 or Figure 6 or Figure 8 One or more steps in the illustrated embodiment. If the components of the electronic device described above are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.
[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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (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 can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0298] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.
[0299] The embodiments described above are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims of the present application.
Claims
1. A map generation method, It is characterized in that include: Acquire a target image and at least two sensor parameters; wherein the at least two sensor parameters include any at least two parameters of a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter; Performing scene recognition on the target image to obtain a scene type corresponding to the target image; generating a target map based on the at least two sensor parameters and the scene type; Wherein, generating a target map based on the at least two sensor parameters and the scene type includes: Determining whether the scene type is a special scene; When the scene type is the special scene, adjusting the weights respectively corresponding to the at least two sensor parameters according to the preset parameters corresponding to the special scene, wherein the adjustment method at least includes increasing or decreasing; A target map is generated based on the adjusted at least two sensor parameters.
2. The method according to claim 1, It is characterized in that After acquiring the target image and at least two sensor parameters, and before performing scene recognition on the target image to obtain the scene type corresponding to the target image, the method further includes: Preprocessing the target image; The performing scene recognition on the target image to obtain the scene type corresponding to the target image includes: Perform scene recognition on the preprocessed target image to obtain a scene type corresponding to the target image.
3. The method according to claim 2, It is characterized in that The preprocessing of the target image comprises: Performing distortion correction processing on the target image according to camera intrinsic parameters; and / or Correcting the target image according to a preset image size; and / or Correcting the target image according to a preset image color ratio; and / or The target image is corrected according to a preset image brightness ratio.
4. The method according to claim 2, It is characterized in that The performing scene recognition on the preprocessed target image to obtain the scene type corresponding to the target image includes: Inputting the preprocessed target image into a trained scene recognition model to obtain scene parameters; each of the scene parameters corresponds to a different scene type; The scene type corresponding to the target image is determined according to the scene parameters; and the scene recognition model is trained by a plurality of sample images containing known scene types.
5. The method according to claim 1, It is characterized in that The special scene includes a long corridor scene, and the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter; When the scene type is the special scene, adjusting the at least two sensor parameters according to the special scene includes: When the scene type is the long corridor scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased according to the preset parameter strategy corresponding to the long corridor scene, and the weight corresponding to the laser sensor parameters is reduced.
6. The method according to claim 1, It is characterized in that The special scene includes a carpet scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter; When the scene type is the special scene, adjusting the at least two sensor parameters according to the special scene includes: When the scene type is the carpet scene, acquiring a tilt correction parameter corresponding to the carpet scene based on an inertial sensor; According to the preset parameter strategy corresponding to the carpet scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the tilt correction parameters are increased.
7. The method according to claim 1, It is characterized in that The special scene includes a glass mirror scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter; When the scene type is the special scene, adjusting the at least two sensor parameters according to the special scene includes: When the scene type is the glass mirror scene, determining a position of the glass mirror scene in the target image; Deleting the laser point cloud data that is consistent with the mirror direction of the glass mirror scene from the laser point cloud data collected by the laser sensor according to the position of the glass mirror scene in the target image; According to the preset parameter strategy corresponding to the glass mirror scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are increased, and the weight corresponding to the laser sensor parameters is reduced.
8. The method according to claim 1, It is characterized in that The special scene includes a threshold scene; the at least two sensor parameters include a wheel speed meter sensor parameter, an inertial sensor parameter, and a laser sensor parameter; When the scene type is the special scene, adjusting the at least two sensor parameters according to the special scene includes: When the scene type is the threshold scene, acquiring a tilt correction parameter corresponding to the threshold scene based on an inertial sensor; According to the preset parameter strategy corresponding to the threshold scene, the weights corresponding to the wheel speed meter sensor parameters and the inertial sensor parameters are reduced, and the weights corresponding to the laser sensor parameters and the inclination correction parameters are increased.
9. The method according to claim 1, It is characterized in that After determining whether the scene type is a special scene, the method further includes: When the scene type is not the special scene, configuring the weights corresponding to the at least two sensor parameters respectively according to the default parameter strategy corresponding to the at least two sensor parameters; A target map is generated based on the adjusted at least two sensor parameters.
10. A map generating device, It is characterized in that include: An acquisition module, used for acquiring a target image and at least two sensor parameters; wherein the at least two sensor parameters include any at least two parameters of a wheel speed meter sensor parameter, an inertial sensor parameter and a laser sensor parameter; A recognition module, used to perform scene recognition on the target image to obtain a scene type corresponding to the target image; A generating module, configured to generate a target map based on the at least two sensor parameters and the scene type; The generation module includes: A judging unit, used to judge whether the scene type is a special scene; A second determining unit is configured to adjust the weights corresponding to the at least two sensor parameters respectively according to preset parameters corresponding to the special scene when the scene type is the special scene, wherein the adjustment method includes at least increasing or decreasing the weights respectively corresponding to the at least two sensor parameters; The first generating unit is configured to generate a target map based on the at least two adjusted sensor parameters.
11. An electronic device, It is characterized in that including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
