CN117853675A - Map model height generation method and device, electronic equipment and storage medium - Google Patents

Map model height generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117853675A
CN117853675A CN202410033388.9A CN202410033388A CN117853675A CN 117853675 A CN117853675 A CN 117853675A CN 202410033388 A CN202410033388 A CN 202410033388A CN 117853675 A CN117853675 A CN 117853675A
Authority
CN
China
Prior art keywords
height
picture
target object
calculating
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410033388.9A
Other languages
Chinese (zh)
Inventor
刘金
贾郭峰
贾双成
万如
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202410033388.9A priority Critical patent/CN117853675A/en
Publication of CN117853675A publication Critical patent/CN117853675A/en
Pending legal-status Critical Current

Links

Abstract

The application relates to a map model height generation method, which is characterized in that a picture is obtained by shooting different measuring points based on a camera module by acquiring pixel coordinates of characteristic points of a target object in the picture; the feature points comprise a top point, a bottom point and a flat view point of the target object, the distances between different measurement points and the target object are calculated through triangulation based on pixel coordinates of the flat view point in the picture, the height of the target object is calculated according to the pixel coordinates and the distances, and the height of a corresponding model of the target object in the map is generated according to a preset proportion and the height, so that the height of the model of the building in the map is scaled according to the actual height, the accuracy of the height of the model in the map is improved, and the map is more fit with the actual situation.

Description

Map model height generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of automatic driving technologies, and in particular, to a method and apparatus for generating a map model height, an electronic device, and a storage medium.
Background
With the development of autopilot technology, people have a higher and higher interest in autopilot. In order to better show the results of the autopilot, some Web maps with showing effects are developed by autopilot companies.
At present, buildings displayed by the automatic driving Web map are randomly generated in height, the difference between the randomly generated height of the building and the actual height is larger, the height is inconsistent with the actual situation, and the reliability of information in the Web map is lower.
Disclosure of Invention
In order to solve or partially solve the problems existing in the related art, the application provides a method, a device, electronic equipment and a storage medium for generating a map model height, which can improve the accuracy of the model height in a map.
The first aspect of the present application provides a method for generating a map model height, including:
acquiring pixel coordinates of characteristic points of a target object in a picture, wherein the picture is obtained by shooting different measuring points based on a camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
calculating the distance between the different measurement points and the target object through triangulation based on pixel coordinates of the flat view point in the picture;
calculating the height of the target object according to the pixel coordinates and the distance;
and generating the height of the corresponding model of the target object in the map according to the preset proportion and the height.
Optionally, the step of calculating the distance between the different measurement points and the target object by triangulation based on pixel coordinates of the flat view point in the picture includes:
calculating normalized coordinates based on pixel coordinates of the flat view point;
and calculating the distance according to the normalized coordinates.
Optionally, the pictures comprise a first picture and a second picture taken at different measurement points; the step of calculating normalized coordinates based on the pixel coordinates of the flat view point includes:
determining a corresponding point of a flat view point in a first picture in a second picture, and acquiring pixel coordinates of the corresponding point;
and calculating normalized coordinates based on the flat view point and the pixel coordinates of the corresponding point.
Optionally, the step of calculating the distance according to the normalized coordinates includes:
calculating a rotation matrix and a translation vector between the first picture and the second picture according to the normalized coordinates;
and calculating the distance according to the normalized coordinates, the rotation matrix and the translation vector.
Optionally, the step of calculating the height of the target object according to the pixel coordinates and the distance includes:
calculating a pitch angle according to the pixel coordinates;
and calculating the height of the target object according to the pitch angle and the distance.
Optionally, the step of calculating the pitch angle according to the pixel coordinates includes:
calculating the pixel height of the target object in the picture according to the pixel coordinates;
acquiring a preset picture height and a preset picture angle of the picture;
and calculating the pitch angle according to the pixel height, the preset picture height and the preset picture angle.
Optionally, the step of calculating the pitch angle according to the pixel height, the preset picture height, and the preset picture angle according to the pixel height includes:
calculating the proportion between the pixel height and the preset picture height;
and calculating the pitch angle according to the proportion and the preset picture angle.
A second aspect of the present application provides an apparatus for map model height generation, including:
the distance module is used for calculating the distance between the different measurement points and the target object through triangulation based on the pixel coordinates of the flat view point in the picture;
the height module is used for calculating the height of the target object according to the pixel coordinates and the distance;
and the generation module is used for generating the height of the corresponding model of the target object in the map according to the preset proportion and the height.
Optionally, the distance module includes:
a normalized coordinate sub-module for calculating normalized coordinates based on pixel coordinates of the flat viewpoint;
and the distance ion module is used for calculating the distance according to the normalized coordinates.
Optionally, the pictures comprise a first picture and a second picture taken at different measurement points; the normalized coordinate submodule includes:
the corresponding point unit is used for determining a corresponding point of the flat view point in the first picture in the second picture and acquiring pixel coordinates of the corresponding point;
and the normalized coordinate unit is used for calculating normalized coordinates based on the flat view point and the pixel coordinates of the corresponding point.
Optionally, the distance submodule includes:
the first calculating unit is used for calculating a rotation matrix and a translation vector between the first picture and the second picture according to the normalized coordinates;
and the second calculation unit is used for calculating the distance according to the normalized coordinates, the rotation matrix and the translation vector.
Optionally, the height module includes:
the pitch angle submodule is used for calculating a pitch angle according to the pixel coordinates;
and the third calculation sub-module is used for calculating the height of the target object according to the pitch angle and the distance.
Optionally, the pitch angle submodule includes:
a pixel height unit, configured to calculate a pixel height of the target object in the picture according to the pixel coordinates;
the acquisition unit is used for acquiring a preset picture height and a preset picture angle of the picture;
and the pitch angle unit is used for calculating the pitch angle according to the pixel height, the preset picture height and the preset picture angle.
Optionally, the pitch angle unit includes:
a proportion subunit, configured to calculate a proportion between the pixel height and the preset picture height;
and the pitch angle subunit is used for calculating the pitch angle according to the proportion and the preset picture angle.
A third aspect of the present application provides an electronic device, comprising:
a processor; and
a memory having executable code stored thereon which, when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform a method as described above.
The technical scheme that this application provided can include following beneficial effect: acquiring pixel coordinates of characteristic points of a target object in a picture, wherein the picture is obtained by shooting different measuring points based on a camera module; the feature points comprise a top point, a bottom point and a flat view point of the target object, the distances between different measurement points and the target object are calculated through triangulation based on pixel coordinates of the flat view point in the picture, the height of the target object is calculated according to the pixel coordinates and the distances, and the height of a corresponding model of the target object in the map is generated according to a preset proportion and the height, so that the height of the model of the building in the map is scaled according to the actual height, the accuracy of the height of the model in the map is improved, and the map is more fit with the actual situation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
FIG. 1 is a flow diagram of a method of map model height generation, as shown in an embodiment of the present application;
FIG. 2 is another flow diagram of a method of map model height generation shown in an embodiment of the present application;
FIG. 3 is a schematic diagram of the measurement principle shown in an embodiment of the present application;
FIG. 4 is a schematic illustration of calculating building height as shown in an embodiment of the present application;
FIG. 5 is a flow chart of a method of map model height generation shown in an embodiment of the present application;
FIG. 6 is a schematic diagram of a map model height generation apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
With the development of autopilot technology, people have a higher and higher interest in autopilot. In order to better show the results of the autopilot, autopilot companies develop web maps with showing effects. At present, buildings displayed by the automatic driving web map are randomly generated in height, the randomly generated height of the buildings is greatly different from the actual height, the height is inconsistent with the actual situation, and the reliability of information in the web map is low.
In view of the above problems, embodiments of the present application provide a method for generating a map model height, which can improve accuracy of the model height in a map.
The following describes the technical scheme of the embodiments of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a flow chart illustrating a method of map model height generation according to an embodiment of the present application.
Referring to fig. 1, the method includes:
step 101, acquiring pixel coordinates of characteristic points of a target object in a picture, wherein the picture is obtained by shooting at different measurement points based on a camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
the Web map may be a map that continuously navigates the user within a continuous spatial system. When a user is navigating a Web map, as if roaming over a large continuous picture, the user can freely view the destination of different places by panning through the map. By zooming in and out of the Web map, the user can see more and more details from the map, such as city streets and buildings, and even information on the height, texture, etc. of the buildings. The Web map can more vividly and specifically show information of streets, buildings and the like contained in the map.
The camera module can be arranged on a vehicle or a fixed support, can be manually held, and can be used for shooting at a certain measurement point and moving to other measurement points. The camera module comprises a plurality of cameras which are arranged at different positions, the cameras can be arranged at the positions of the front side, the rear side, the right left side, the right side and the like of the vehicle, and the cameras can be arranged at proper positions according to actual needs. The camera can be a monocular camera, and the monocular camera only has one camera, so that the three-dimensional space information can be stored as a two-dimensional image, which is equivalent to one projection of a certain scene on the image.
The vehicle can be an automatic driving vehicle, and the vehicle automatically drives to different measuring points, and images of different angles of the target object are acquired at the different measuring points. A certain top point at the top of the target object, a certain bottom point at the bottom, and a flat viewpoint may be taken as feature points. In the process of collecting the pictures, the camera can keep a head-up mode, the pictures of the target objects are collected, and the center point of the pictures is the head-up point of the camera. The target object may be a building, a billboard, a sign, etc., to which the present application is not limited. In an example, if the target object is a building, after capturing pictures of different angles of the target object, feature points of the target object, such as a point on the top of the building, a point on the bottom of the building, and a center point of the picture, may be identified from the pictures. And then acquiring pixel coordinates of the feature points in the picture from the picture.
Step 102, calculating the distances between different measurement points and a target object through triangulation based on pixel coordinates of a flat view point in a picture;
in an example, a point of view in a picture can be selected, when the vehicle automatically drives to a first measurement point, a target object is photographed to obtain a picture, the pixel coordinates of the point of view in the picture are obtained, when the vehicle drives to a second measurement point, the target object is photographed to obtain another picture, a point corresponding to the point of view in the previous picture is determined in the picture, the pixel coordinates of the point are obtained based on a triangulation method, according to the pixel coordinates of two points in the two pictures, camera depths corresponding to the two points when the two measurement points are calculated, and the camera depths corresponding to the two points are the distances between the two measurement points and the target object.
Step 103, calculating the height of the target object according to the pixel coordinates and the distance;
in an example, taking a target object as a building as an example, a picture may be selected, a point at the top of the building, a point at the bottom of the building, and a center point of the picture are taken as feature points, and the height of the target object, that is, the actual height of the target object, is calculated according to the pixel coordinates and the distance of the feature points.
And 104, generating the height of the corresponding model of the target object in the map according to the preset proportion and the height.
In the field of automatic driving, with respect to the current positioning technology, three types of positioning methods are used for automatic driving, and generally, the three methods are used in a crossing way to achieve a more accurate effect by mutual correction, namely, sensor fusion based on a GPS (Global Positioning System ) and an inertial sensor; based on the matching of LIDAR (Light Detection And Ranging) point cloud and high-precision map; visual-based road feature identification. In the embodiment of the present application, an appropriate positioning method may be selected according to actual requirements, which is not limited in the embodiment of the present application. When the vehicle shoots a target object at a measuring point, the space coordinates of the measuring point can be automatically acquired, the space coordinates of the target object can be calculated according to the space coordinates of the measuring point and the distance between the measuring point and the target object, and the corresponding position of the target object in the web map can be determined according to the space coordinates.
After the height of the target object is calculated, the target object can be scaled according to a preset proportion, the height of a corresponding model of the target object in the map is calculated according to the height and the preset proportion, and the height attribute is added to the model of the target object in the Web map based on the calculated height, so that the model corresponding to the target object is displayed at the corresponding position in the Web map.
According to the map model height generation method, pixel coordinates of characteristic points of a target object in a picture are obtained, and the picture is obtained by shooting at different measuring points based on a shooting module; the feature points comprise a top point, a bottom point and a flat view point of the target object, the distances between different measurement points and the target object are calculated through triangulation based on pixel coordinates of the flat view point in the picture, the height of the target object is calculated according to the pixel coordinates and the distances, and the height of a corresponding model of the target object in the map is generated according to a preset proportion and the height, so that the height of the model of the building in the map is scaled according to the actual height, the accuracy of the height of the model in the map is improved, and the map is more fit with the actual situation.
Fig. 2 is another flow diagram of a method of map model height generation as illustrated in an embodiment of the present application.
Referring to fig. 2, the method includes:
step 201, obtaining pixel coordinates of feature points of a target object in a picture, wherein the picture is obtained by shooting at different measurement points based on a camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
install the module of making a video recording on the vehicle, make a video recording the module and include a plurality of camera of installing in different positions, the camera can be installed in the position such as dead ahead, the dead ahead right side of vehicle, can install the camera in suitable position according to actual need. The camera can be a monocular camera, and the monocular camera only has one camera, so that the three-dimensional space information can be stored as a two-dimensional image, which is equivalent to one projection of a certain scene on the image.
The vehicle can be an automatic driving vehicle, and the vehicle automatically drives to different measuring points, and images of different angles of the target object are acquired at the different measuring points. A certain top point at the top of the target object, a certain bottom point at the bottom, and a flat viewpoint may be taken as feature points. In the process of collecting the pictures, the camera can keep a head-up mode, the pictures of the target objects are collected, and the center point of the pictures is the head-up point of the camera. The target object may be a building, a billboard, a sign, etc., to which the present application is not limited. In an example, if the target object is a building, after capturing pictures of different angles of the target object, feature points of the target object, such as a point on the top of the building, a point on the bottom of the building, and a center point of the picture, may be identified from the pictures. And then acquiring pixel coordinates of the feature points in the picture from the picture.
Step 202, determining a corresponding point of a flat view point in a first picture in a second picture, and acquiring pixel coordinates of the corresponding point;
the pictures comprise a first picture and a second picture which are shot at different measuring points, wherein the first picture is the picture shot at the first measuring point by the camera, the second picture is the picture shot at the second measuring point by the camera, as shown in fig. 3, the schematic diagram of the measuring principle provided by the embodiment of the invention is shown, wherein O is as follows 1 ,O 2 The center of the camera at the first measuring point and the second measuring point, p 1 For a flat view in the first picture, p 2 For the sum p in the second picture 1 Corresponding point, P is theoretical line O 1 p 1 And O 2 p 2 Points of intersection in three-dimensional space.
Determining a panning point p in a first picture 1 Then, a feature matching method can be adopted to determine the p-type image in the second image 1 Corresponding point p of (2) 2 And obtain the corresponding point p 2 Is defined in the image data.
And step 203, calculating normalized coordinates based on the flat view point and the pixel coordinates of the corresponding point.
Will flatten the point p 1 And corresponding point p 2 The pixel coordinates of (2) are respectively denoted as p 1 ,p 2 Point of flat view p 1 Normalized coordinate x of (2) 1 And corresponding point p 2 Normalized coordinate x of (2) 2 The calculation can be based on the following formula:
x 1 =K -1 p 1 (1)
x 2 =K -1 p 2 (2)
wherein K is a camera internal reference matrix and is a known parameter.
Step 204, calculating a rotation matrix and a translation vector between the first picture and the second picture according to the normalized coordinates;
the rotation matrix R and the translation vector t are motions of the camera from a first measurement point corresponding to a first picture to a second measurement point corresponding to a second picture, and under the motions, the relationship between normalized coordinates can be expressed by the following formula:
x 2 =Rx 1 +t (3)
by taking equations (1) and (2) into equation (3), the rotation matrix R and translation vector t can be calculated.
Step 205, calculating the distance according to the normalized coordinates, the rotation matrix and the translation vector.
According to the normalized coordinates, the rotation matrix and the translation vector, the plane view point p can be calculated by the following formula 1 And corresponding point p 2 Depth s of (2) 1 、s 2
s 2 x 2 =s 1 Rx 1 +t (4)
At this time, the depth s of the camera 1 、s 2 The distance from the center point of the camera to the corresponding point of the plane view point in the real space when the vehicle is at the first measuring point and the second measuring point can be regarded as the distance from the first measuring point and the second measuring point to the target object.
Step 206, calculating the pixel height of the target object in the picture according to the pixel coordinates;
as shown in fig. 4, if a certain point a at the top of the building, a certain point C at the bottom of the building, and a flat viewpoint B are determined as feature points, pixel heights AC, AB, BC of the target object in the picture, point a to point C, point a to point B, point B to point C, can be calculated from pixel coordinates of the point a, point C, and point B.
Step 207, obtaining a preset picture height and a preset picture angle of a picture;
as will be appreciated by those skilled in the art, since the width of the monocular camera is constant, the height and angle of the picture taken by the monocular camera is constant during the process of keeping the camera in head-up, and the picture height h of the taken picture and the picture angle M can be obtained.
Step 208, calculating the ratio between the pixel height and the preset picture height;
from the calculated pixel height, and the acquired picture height, a ratio between the pixel height and the picture height may be calculated.
And step 209, calculating a pitch angle according to the proportion and a preset picture angle.
Pitch angle refers to the angle between the measuring point to the bottom of the building and the measuring point to the top of the building, and includes elevation angle and overlook angle, the elevation angle is the angle of overlooking the bottom of the building at the measuring point, and the elevation angle is the angle of looking up the top of the building at the measuring point. After calculating the ratio between the pixel height and the picture height, the pitch angle can be calculated from the ratio, and the picture angle. As shown in fig. 4, the elevation angle α can be calculated by the following formula:
α=M*AB/h (5)
the depression angle β can be calculated by the following formula:
β=M*BC/h (6)
step 2010, calculating the height of the target object according to the pitch angle and the distance.
From the calculated distance between the measurement point and the target object, and the pitch angle, the height H of the target object can be calculated using a tangent formula, where O 1 B is the measurement point O 1 Distance to the target object. As shown in fig. 4, when the elevation angle is α, the depression angle is β, and the distance is O 1 B, H can be calculated according to the tangent formula 1 、H 2 The formula is as follows:
H 1 =O 1 B*tanα (7)
H 2 =O 1 B*tanβ (8)
the height H of the target object is calculated by the following formula:
H=H 1 +H 2 (9)
the calculated height H is the actual height of the target object.
In step 2011, the height of the corresponding model of the target object in the map is generated according to the preset scale and the height.
When the vehicle shoots a target object at a measuring point, the space coordinates of the measuring point can be automatically acquired, the space coordinates of the target object can be calculated according to the space coordinates of the measuring point and the distance between the measuring point and the target object, and the corresponding position of the target object in the web map can be determined according to the space coordinates.
After the height of the target object is calculated, the target object can be scaled according to a preset proportion, the height of a corresponding model of the target object in the map is calculated according to the height and the preset proportion, and the height attribute is added to the model of the target object in the Web map based on the calculated height, so that the model corresponding to the target object is displayed at the corresponding position in the Web map.
According to the map model height generation method, pixel coordinates of characteristic points of a target object in a picture are obtained, and the picture is obtained by shooting at different measuring points based on a shooting module; the feature points comprise a top point, a bottom point and a flat view point of the target object, corresponding points of the flat view point in the first picture in the second picture are determined, pixel coordinates of the corresponding points are obtained, normalized coordinates are calculated based on the flat view point and the pixel coordinates of the corresponding points, a rotation matrix and a translation vector between the first picture and the second picture are calculated according to the normalized coordinates, a distance is calculated according to the normalized coordinates, the rotation matrix and the translation vector, a pixel height of the target object in the picture is calculated according to the pixel coordinates, a preset picture height of the picture and a preset picture angle are obtained, a ratio between the pixel height and the preset picture height is calculated, a pitch angle is calculated according to the pitch angle and the preset picture angle, the height of the target object in the map is calculated according to the pitch angle and the distance, the height of the target object in the map is generated according to the preset ratio and the height, the height of the model in the map is performed according to the actual height, the accuracy of the model in the map is improved, and the map is more fit with the actual condition.
Fig. 5 is a flow chart of a method of map model height generation shown in an embodiment of the present application.
Referring to fig. 5, taking a building as a target object as an example, the method includes the steps of:
step 501, obtaining pictures of different angles acquired by a building at different measuring points;
step 502, obtaining pixel coordinates of building feature points in a picture, wherein the feature points comprise top points, bottom points and plane view points of a target object;
the flat view point may be a center point of a picture.
Step 503, determining a corresponding point of a flat view point in a first picture in a second picture, and obtaining pixel coordinates of the corresponding point;
the pictures comprise a first picture and a second picture which are shot at different measuring points, after the flat view point is determined in the first picture, a feature matching method can be adopted to determine the corresponding point of the flat view point in the second picture, and the pixel coordinates of the corresponding point are obtained.
Step 504, calculating the distances between different measuring points and the building according to the flat view point and the pixel coordinates of the corresponding points;
and calculating normalized coordinates of the two points according to the flat view point and the pixel points of the corresponding points, calculating a rotation matrix and a translation vector between the first measurement point corresponding to the first picture and the measurement point corresponding to the second picture according to the normalized coordinates of the two points, and calculating the distance between the measurement point and the target object according to the rotation matrix and the translation vector.
Step 505, calculating the pixel height of the building in the picture according to the pixel coordinates of the feature points;
step 506, obtaining a preset picture height and a preset picture angle of the picture;
step 507, calculating the ratio between the pixel height and the preset picture height;
step 508, calculating a pitch angle according to the proportion and a preset picture angle;
step 509, calculating the height of the building by adopting a tangent formula according to the pitch angle and the distance;
and step 5010, generating the height of the corresponding model of the building in the map according to the preset proportion and the height.
Corresponding to the embodiment of the application function implementation method, the application also provides a device for generating the map model height, electronic equipment and corresponding embodiments.
Fig. 6 is a schematic structural diagram of an apparatus for map model height generation according to an embodiment of the present application.
Referring to fig. 6, the apparatus includes:
the pixel coordinate module 601 is configured to obtain pixel coordinates of feature points of a target object in a picture, where the picture is obtained by shooting at different measurement points based on the camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
the distance module 602 is configured to calculate distances between different measurement points and a target object by triangulation based on pixel coordinates of the flat view point in the picture;
a height module 603, configured to calculate a height of the target object according to the pixel coordinates and the distance;
the generating module 604 is configured to generate the height of the corresponding model of the target object in the map according to the preset scale and the height.
In an alternative embodiment of the present application, distance module 602 includes:
the normalized coordinate sub-module is used for calculating normalized coordinates based on pixel coordinates of the plane view point;
and the distance ion module is used for calculating the distance according to the normalized coordinates.
In an optional embodiment of the present application, the pictures include a first picture and a second picture taken at different measurement points; the normalized coordinates submodule includes:
the corresponding point unit is used for determining a corresponding point of the flat view point in the first picture in the second picture and acquiring pixel coordinates of the corresponding point;
and the normalized coordinate unit is used for calculating normalized coordinates based on the flat view point and the pixel coordinates of the corresponding point.
In an alternative embodiment of the present application, the distance submodule includes:
the first calculating unit is used for calculating a rotation matrix and a translation vector between the first picture and the second picture according to the normalized coordinates;
and the second calculation unit is used for calculating the distance according to the normalized coordinates, the rotation matrix and the translation vector.
In an alternative embodiment of the present application, the altitude module 603 includes:
the pitch angle submodule is used for calculating a pitch angle according to pixel coordinates;
and the third calculation sub-module is used for calculating the height of the target object according to the pitch angle and the distance.
In an alternative embodiment of the present application, the pitch angle submodule comprises:
the pixel height unit is used for calculating the pixel height of the target object in the picture according to the pixel coordinates;
the acquisition unit is used for acquiring a preset picture height and a preset picture angle of the picture;
and the pitch angle unit is used for calculating a pitch angle according to the pixel height, the preset picture height and the preset picture angle.
In an alternative embodiment of the present application, the pitch angle unit comprises:
a proportion subunit for calculating the proportion between the pixel height and the picture height;
and the pitch angle subunit is used for calculating the pitch angle according to the proportion and the picture angle.
According to the map model height generation device, the pixel coordinates of the characteristic points of the target object in the picture are obtained, and the picture is obtained by shooting at different measuring points based on the camera module; the feature points comprise a top point, a bottom point and a flat view point of the target object, corresponding points of the flat view point in the first picture in the second picture are determined, pixel coordinates of the corresponding points are obtained, normalized coordinates are calculated based on the flat view point and the pixel coordinates of the corresponding points, a rotation matrix and a translation vector between the first picture and the second picture are calculated according to the normalized coordinates, a distance is calculated according to the normalized coordinates, the rotation matrix and the translation vector, a pixel height of the target object in the picture is calculated according to the pixel coordinates, a preset picture height of the picture and a preset picture angle are obtained, a ratio between the pixel height and the preset picture height is calculated, a pitch angle is calculated according to the pitch angle and the preset picture angle, the height of the target object in the map is calculated according to the pitch angle and the distance, the height of the target object in the map is generated according to the preset ratio and the height, the height of the model in the map is performed according to the actual height, the accuracy of the model in the map is improved, and the map is more fit with the actual condition.
The specific manner in which the respective modules perform the operations in the apparatus of the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Referring to fig. 7, an electronic device 700 includes a memory 710 and a processor 720.
The processor 720 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 710 may include various types of storage units such as system memory, read Only Memory (ROM), and persistent storage. Where the ROM may store static data or instructions that are required by the processor 720 or other modules of the computer. The persistent storage may be a readable and writable storage. The persistent storage may be a non-volatile memory device that does not lose stored instructions and data even after the computer is powered down. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the persistent storage may be a removable storage device (e.g., diskette, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as dynamic random access memory. The system memory may store instructions and data that are required by some or all of the processors at runtime. Furthermore, memory 710 may include any combination of computer-readable storage media including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks may also be employed. In some implementations, memory 710 may include readable and/or writable removable storage devices such as Compact Discs (CDs), digital versatile discs (e.g., DVD-ROMs, dual layer DVD-ROMs), blu-ray discs read only, super-density discs, flash memory cards (e.g., SD cards, min SD cards, micro-SD cards, etc.), magnetic floppy disks, and the like. The computer readable storage medium does not contain a carrier wave or an instantaneous electronic signal transmitted by wireless or wired transmission.
The memory 710 has stored thereon executable code that, when processed by the processor 720, can cause the processor 720 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing part or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having stored thereon executable code (or a computer program or computer instruction code) which, when executed by a processor of an electronic device (or a server, etc.), causes the processor to perform part or all of the steps of the above-described methods according to the present application.
The embodiments of the present application have been described above, the foregoing description is exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method of map model height generation, the method comprising:
acquiring pixel coordinates of characteristic points of a target object in a picture, wherein the picture is obtained by shooting different measuring points based on a camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
calculating the distance between the different measurement points and the target object through triangulation based on pixel coordinates of the flat view point in the picture;
calculating the height of the target object according to the pixel coordinates and the distance;
and generating the height of the corresponding model of the target object in the map according to the preset proportion and the height.
2. The method of map model height generation according to claim 1, wherein the step of calculating the distances between the different measurement points to the target object by triangulation based on pixel coordinates of the gaze point in the picture comprises:
calculating normalized coordinates based on pixel coordinates of the flat view point;
and calculating the distance according to the normalized coordinates.
3. The method of map model height generation according to claim 2, wherein the pictures comprise a first picture and a second picture taken at different measurement points; the step of calculating normalized coordinates based on the pixel coordinates of the flat view point includes:
determining a corresponding point of a flat view point in a first picture in a second picture, and acquiring pixel coordinates of the corresponding point;
and calculating normalized coordinates based on the flat view point and the pixel coordinates of the corresponding point.
4. A method of map model height generation according to claim 3, wherein the step of calculating the distance from the normalized coordinates comprises:
calculating a rotation matrix and a translation vector between the first picture and the second picture according to the normalized coordinates;
and calculating the distance according to the normalized coordinates, the rotation matrix and the translation vector.
5. The method of map model height generation according to claim 1, wherein the step of calculating the height of the target object from the pixel coordinates and the distance comprises:
calculating a pitch angle according to the pixel coordinates;
and calculating the height of the target object according to the pitch angle and the distance.
6. The method of map model height generation according to claim 5, wherein the step of calculating a pitch angle from the pixel coordinates comprises:
calculating the pixel height of the target object in the picture according to the pixel coordinates;
acquiring a preset picture height and a preset picture angle of the picture;
and calculating the pitch angle according to the pixel height, the preset picture height and the preset picture angle.
7. The method of map model height generation according to claim 6, wherein the step of calculating the pitch angle from the pixel height, the preset picture height, and the preset picture angle comprises:
calculating the proportion between the pixel height and the preset picture height;
and calculating the pitch angle according to the proportion and the preset picture angle.
8. An apparatus for height generation of a map model, the apparatus comprising:
the pixel coordinate module is used for acquiring pixel coordinates of the characteristic points of the target object in pictures, and the pictures are obtained by shooting at different measurement points based on the camera module; the feature points comprise a top point, a bottom point and a flat viewpoint of the target object;
the distance module is used for calculating the distance between the different measurement points and the target object through triangulation based on the pixel coordinates of the flat view point in the picture;
the height module is used for calculating the height of the target object according to the pixel coordinates and the distance;
and the generation module is used for generating the height of the corresponding model of the target object in the map according to the preset proportion and the height.
9. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable code which when executed by a processor of an electronic device causes the processor to perform the method of any of claims 1-7.
CN202410033388.9A 2024-01-09 2024-01-09 Map model height generation method and device, electronic equipment and storage medium Pending CN117853675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410033388.9A CN117853675A (en) 2024-01-09 2024-01-09 Map model height generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410033388.9A CN117853675A (en) 2024-01-09 2024-01-09 Map model height generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117853675A true CN117853675A (en) 2024-04-09

Family

ID=90545803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410033388.9A Pending CN117853675A (en) 2024-01-09 2024-01-09 Map model height generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117853675A (en)

Similar Documents

Publication Publication Date Title
US11393173B2 (en) Mobile augmented reality system
US7929800B2 (en) Methods and apparatus for generating a continuum of image data
US7233691B2 (en) Any aspect passive volumetric image processing method
CN110617821B (en) Positioning method, positioning device and storage medium
JP6897563B2 (en) Image processing equipment and image processing methods and programs
CN108810473B (en) Method and system for realizing GPS mapping camera picture coordinate on mobile platform
US20190012804A1 (en) Methods and apparatuses for panoramic image processing
Li et al. Easy calibration of a blind-spot-free fisheye camera system using a scene of a parking space
US20100118116A1 (en) Method of and apparatus for producing a multi-viewpoint panorama
US20110110557A1 (en) Geo-locating an Object from Images or Videos
TWI681364B (en) Method, device and equipment for generating visual objects
CN113139031B (en) Method and related device for generating traffic sign for automatic driving
CN110036411A (en) The device and method for generating electronics three-dimensional range environment
CN117853675A (en) Map model height generation method and device, electronic equipment and storage medium
CN112911205B (en) Monitoring system and method
CN117853644A (en) Map model rendering method and device, electronic equipment and storage medium
JP5122508B2 (en) 3D spatial data creation method and 3D spatial data creation apparatus
JP6619686B2 (en) Viewing range estimation method and viewing range estimation apparatus
CN112801077A (en) Method for SLAM initialization of autonomous vehicles and related device
CN117824621A (en) Parking lot map construction method and device, vehicle and storage medium
CN114820783A (en) Guideboard generation method, device and equipment
JP2023110400A (en) Information processing device, information processing method, and information processing program
CN114332130A (en) Monocular camera acquisition method and device for high-precision images

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination