CN114612621A - Panorama generation method and system based on three-dimensional tilt model - Google Patents

Panorama generation method and system based on three-dimensional tilt model Download PDF

Info

Publication number
CN114612621A
CN114612621A CN202210520502.1A CN202210520502A CN114612621A CN 114612621 A CN114612621 A CN 114612621A CN 202210520502 A CN202210520502 A CN 202210520502A CN 114612621 A CN114612621 A CN 114612621A
Authority
CN
China
Prior art keywords
panoramic image
blank
coordinates
model
generating
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
CN202210520502.1A
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.)
QINGDAO INSTITUTE OF SURVEYING AND MAPPING SURVEY
Wuhai Dashi Intelligence Technology Co ltd
Original Assignee
QINGDAO INSTITUTE OF SURVEYING AND MAPPING SURVEY
Wuhai Dashi Intelligence Technology 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 QINGDAO INSTITUTE OF SURVEYING AND MAPPING SURVEY, Wuhai Dashi Intelligence Technology Co ltd filed Critical QINGDAO INSTITUTE OF SURVEYING AND MAPPING SURVEY
Priority to CN202210520502.1A priority Critical patent/CN114612621A/en
Publication of CN114612621A publication Critical patent/CN114612621A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to the technical field of image processing, in particular to a panorama generating method and system based on a three-dimensional tilt model. The panoramic image generation method comprises the following steps: receiving screen projection content sent by at least one source end device; acquiring current position information, and generating a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model; determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values; and filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image to generate the current panoramic image. The panoramic image generation method can achieve the purpose that a brand-new panoramic image acquisition mode is established under the condition of non-manual on-site photographing, improves the convenience of manufacturing the panoramic image, and improves user experience.

Description

Panorama generation method and system based on three-dimensional tilt model
Technical Field
The invention relates to the technical field of image processing, in particular to a panoramic image generation method and a panoramic image generation system based on a three-dimensional tilt model.
Background
With the rapid development of information transfer, flat pictures do not meet the reading requirements of people, and therefore virtual display activities based on panoramas are increased.
Currently, a general panorama acquisition method includes: in actual streets and scenes, a user needs to use a camera to shoot a plurality of pictures in sequence towards different angles, and then the pictures are spliced to form a panoramic image. Such a panorama acquisition method has disadvantages, for example: the user needs to pay attention to the deformation condition of the edges of a plurality of pictures, and the process is complex to operate and low in fault tolerance rate.
Therefore, how to abandon the traditional manual field photographing mode and establish a brand-new panoramic image acquisition mode under the condition of the existing inclined data model, the convenience of manufacturing the panoramic image is improved, and the user experience is improved.
Disclosure of Invention
In order to solve or at least partially solve the technical problem that the existing panoramic image generation efficiency is low, the invention provides a panoramic image generation method and a panoramic image generation system based on a three-dimensional tilt model.
In order to achieve the above object, the present invention provides a panorama generating method based on a three-dimensional tilt model, including:
Acquiring current position information, and generating a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values;
and filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image to generate the current panoramic image.
As a further scheme of the present invention, the obtaining current position information and generating a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model includes:
acquiring current longitude and latitude coordinates of a current position, and converting the current longitude and latitude coordinates into current local coordinates according to preset actual coordinate information and a space coordinate conversion theory to serve as the current position information;
and generating a blank panoramic image corresponding to the current position information according to the resolution in the three-dimensional tilt model.
As a further aspect of the present invention, before determining a color value corresponding to each position in the blank panoramic image according to a mapping relationship between position information and a color value, the method further includes:
According to the equidistant cylindrical projection method, mapping the local coordinate of any point in the blank panoramic image into a spherical coordinate;
determining model color information corresponding to the spherical coordinates based on the three-dimensional tilt model;
and generating a mapping relation between the position information and the color value according to the local coordinates in the blank panoramic image, the spherical coordinates corresponding to the panoramic image coordinates and the model color information corresponding to the spherical coordinates.
As a further aspect of the present invention, the mapping the local coordinates of any point in the blank panoramic image to spherical coordinates according to the method of equidistant cylindrical projection includes:
normalizing the local coordinates (x, y) of any point of the blank panoramic image according to the width and the height of the blank panoramic image to generate corresponding normalized coordinates (u, v);
converting the normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz).
As a further aspect of the invention, the converting the normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz) comprises:
generating spherical coordinates (Px, Py, Pz) corresponding to the normalized coordinates (u, v) according to a preset formula, wherein the preset formula is as follows:
θ=u*2p,
φ=v*p,
Px=cos(θ)*sin(φ),
Py=sin(θ)*sin(φ),
Pz=cos(φ),
Wherein theta and phi are polar coordinates of a spherical surface, theta is an angle between the X positive axis and the XY plane, theta is more than or equal to 0 and less than or equal to 2 pi, phi is a polar angle in the positive direction of the Z axis, and phi is more than or equal to 0 and less than or equal to pi.
As a further aspect of the present invention, the determining, based on the three-dimensional tilt model, model color information corresponding to the spherical coordinates includes:
taking the spherical coordinates as a center, based on a rendering to texture technology and an open graphic library technology, and facing to the positive direction of an X axis, rendering scene photos of six surfaces of the spherical coordinates, namely left, right, front, back, upper and lower surfaces of the spherical coordinates, away from a screen to generate a cubic bounding box;
and determining model color information corresponding to the spherical coordinates according to the cube bounding box.
As a further aspect of the present invention, the determining a color value corresponding to the spherical coordinate according to the cube bounding box includes:
taking a target point as a starting point, and leading out rays according to the spherical coordinates theta and phi corresponding to any point as directions, wherein the model color at the closest intersection point of the rays and the three-dimensional model is a target color value;
according to the range of theta and phi in the spherical coordinates, determining the color information of the image of the bounding box corresponding to the spherical coordinates as the color value corresponding to the spherical coordinates,
As a further solution of the present invention, the filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image, and generating the current panoramic image, includes:
calculating and acquiring an xy coordinate corresponding to the image to be sampled according to the normalized coordinate (u, v) coordinate, and processing the xy coordinate by adopting a bilinear interpolation method to determine a color value corresponding to the spherical coordinate;
and filling each position in the blank panoramic image according to the color value corresponding to the spherical coordinate to generate the current panoramic image.
As a further aspect of the present invention, the processing on the xy coordinates includes:
and processing the xy coordinates by a bilinear interpolation method.
In addition, to achieve the above object, the present application further provides a panorama generating system based on a three-dimensional tilt model, including:
the acquisition module is configured to acquire current position information and generate a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
the determining module is configured to determine color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values;
And the generating module is configured to fill each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image, so as to generate the current panoramic image.
Compared with the prior art, the invention provides a panorama generating method based on a three-dimensional tilt model, which generates a blank panorama image corresponding to current position information from the acquired current position information according to a preset three-dimensional tilt model; determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values; and filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image to generate the current panoramic image. According to the mode, the blank panoramic image corresponding to the current position information is generated according to the current position information and the preset three-dimensional tilt model through the three-dimensional tilt model; determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values; and filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image to generate the current panoramic image. Therefore, according to the panorama generating method based on the three-dimensional inclined model, in the three-dimensional inclined model, according to given position information, under the condition of non-field shooting based on the application of the three-dimensional inclined model, the panorama generating process is simplified, image splicing errors are removed, a user can obtain a panorama with any resolution ratio which is not higher than the texture resolution ratio of the model, the resolution ratio of the obtained panorama image is controllable, the manufacturing convenience is improved, and the technical problem that the generation efficiency of the panorama at any position is low is solved.
Drawings
Fig. 1 is a schematic hardware configuration diagram of a panorama generating apparatus based on a three-dimensional tilt model according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for generating a panorama based on a three-dimensional tilt model according to an embodiment of the present invention;
FIG. 3 is a schematic flowchart illustrating a first embodiment of a panorama generating method according to the present invention;
FIG. 4 is a schematic flowchart illustrating a panoramic image generation method based on a three-dimensional tilt model according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a corresponding method of a point XY and a spherical coordinate P on a panorama based on a three-dimensional tilt model according to the present invention;
FIG. 6 is a schematic diagram showing the relationship between a sphere and a cubic bounding box on a panorama based on a three-dimensional tilt model according to the present invention;
FIG. 7 is a schematic diagram of a corresponding relationship between any point P on the sphere and a point P3 on the cube according to the present invention;
FIG. 8 is a schematic diagram of functional modules of a panorama generating system based on a three-dimensional tilt model according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The panorama generating method based on the three-dimensional tilt model according to the embodiment of the present invention is mainly applied to panorama generating equipment based on the three-dimensional tilt model, and the panorama generating equipment based on the three-dimensional tilt model may be equipment with display and processing functions, such as a PC, a portable computer, and a mobile terminal.
Referring to fig. 1, fig. 1 is a schematic hardware structure diagram of a panorama generating apparatus based on a three-dimensional tilt model according to an embodiment of the present invention. In the embodiment of the present invention, the panorama generating apparatus based on a three-dimensional tilt model may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for implementing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the panorama generating apparatus based on the three-dimensional tilt model, and may include more or less components than those shown, or combine some components, or a different arrangement of components.
With continued reference to fig. 1, a memory 1005, which is one type of computer-readable storage medium in fig. 1, may include an operating system, a network communication module, and a panorama generating program based on a three-dimensional tilt model.
In fig. 1, the network communication module is mainly used for connecting a server and performing data communication with the server; and the processor 1001 may call a panorama generating program based on a three-dimensional tilt model stored in the memory 1005 and perform the panorama generating method based on a three-dimensional tilt model according to the embodiment of the present invention.
A panorama generation method based on a three-dimensional tilt model is described in detail below with reference to the accompanying drawings.
Example 1
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a method for generating a panorama based on a tilt model according to a first embodiment of the present invention.
In this embodiment, the method for generating a panorama based on a three-dimensional tilt model includes the following steps:
step S10, acquiring current position information, and generating a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
In this embodiment, the longitude and latitude coordinates of the target position are obtained, and the longitude and latitude coordinates of the target position are converted into local coordinates according to preset actual coordinate information and a space coordinate conversion theory, and the current position information is used as the local coordinates, and methods for realizing the conversion include a gaussian projection method, a miller coordinate system projection method, a UTM coordinate system projection method, and the like. Image projection occurs whenever a planar image is mapped onto a curved surface, forming a two-dimensional image. The three-dimensional tilt model is an operating system for generating a three-dimensional model by using continuous two-dimensional images, and comprises a plurality of links such as early-stage data acquisition, data processing, data post-processing and data post-application. And selecting from three resolution options according to resolution information in the three-dimensional tilt model, wherein the first resolution option is Low (1024 pixels), the second resolution option is Normal (2048 pixels), and the third resolution option is High (4096 pixels), and generating a blank panoramic image corresponding to the current position information.
Specifically, the target position information is input into the three-dimensional tilt model, and the three-dimensional tilt model performs encoding, feature extraction, feature conversion, and feature decoding on the target position information, so that a blank panoramic image corresponding to the target position can be output.
Referring to fig. 4, fig. 4 is a schematic flowchart of a method for generating a panorama based on a tilt model according to a second embodiment of the present invention.
Step S20, determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values;
wherein, the mapping relation between the position information and the color value comprises:
according to the equidistant cylindrical projection method, mapping the local coordinates of any point in the blank panoramic image into spherical coordinates;
determining model color information corresponding to the spherical coordinates based on the three-dimensional tilt model;
and generating a mapping relation between the position information and the color value according to the local coordinates in the blank panoramic image, the spherical coordinates corresponding to the panoramic image coordinates and the model color information corresponding to the spherical coordinates.
In this embodiment, according to the method of equidistant cylindrical projection, the local coordinates of any point in the blank panoramic image are mapped to spherical coordinates. The equidistant columnar projection method is the most widely applied VR projection method at present, and the projection method can generate a map with the aspect ratio of 2:1 by mapping the longitude lines of the earth into vertical lines with equal intervals and mapping the latitude lines of the earth into horizontal lines with equal intervals. Determining a target meridian according to the longitude in the local coordinate, mapping the target meridian into an equidistant vertical straight line, and mapping a latitude line in the local coordinate into an equidistant horizontal straight line; according to the equidistant vertical straight line and the equidistant horizontal straight line, referring to fig. 5 in the blank panoramic image, fig. 5 is a corresponding method schematic diagram of a point XY and a spherical coordinate P on a panoramic image based on a three-dimensional tilt model, for any point (x, y) on the blank panoramic image, setting the width and the height of the blank panoramic image as w and h respectively, and then setting a normalized coordinate (u, v) with a range of 0-1 as follows:
u = x / w,v = y / h;
Generating spherical coordinates (Px, Py, Pz) corresponding to the normalized coordinates (u, v) according to a preset formula, wherein the preset formula is as follows:
θ=u*2p,,φ=v*p,
Px=cos(θ)*sin(φ),
Py=sin(θ)*sin(φ),
Pz=cos(φ),
wherein theta and phi are spherical polar coordinates, theta is an angle between the X positive axis and the XY plane, theta is greater than or equal to 0 and less than or equal to 2 pi, phi is a polar angle in the positive direction of the Z axis, and phi is greater than or equal to 0 and less than or equal to pi.
The spherical coordinates (Px, Py, Pz) are obtained by the mapping transformation, and at this time, the spherical coordinates (Px, Py, Pz) of any point (x, y) of the blank panorama are obtained.
The determining the model color information corresponding to the spherical coordinates based on the three-dimensional tilt model further comprises:
with the spherical coordinates as the center, based on Render-To-Texture (RTT) technology and open graphics library (OpenGL) technology, we can know that in an OpenGL rendering pipeline, geometric data and Texture are subjected To multiple transformations and multiple tests, and finally displayed on a screen in a two-dimensional pixel form, specifically, what is needed is To construct a Texture object, Render the Texture data, and Render a cube To show a rendered Texture map. Now, in the positive direction of the X axis, rendering scene photos of six surfaces of the spherical coordinates, namely the left surface, the right surface, the front surface, the rear surface and the upper surface, away from the screen, and referring to FIG. 6, FIG. 6 is a schematic diagram of the relation between a sphere and a cubic bounding box on a panorama based on a three-dimensional inclined model to generate the cubic bounding box; and determining model color information corresponding to the spherical coordinates according to the cube bounding box. Determining a color value corresponding to the spherical coordinate according to the model color information, including:
And (3) taking the spherical coordinate point as a starting point, and leading out rays from the spherical coordinate in the directions of theta and phi, wherein the model color at the closest intersection point of the rays and the three-dimensional model is the target color value. Presetting a rule:
selecting a front map of the cubic bounding box as a color value corresponding to the spherical coordinates (where Px is maximum) when 325 ° < θ or θ <45 ° and-45 ° < Φ <45 °, and selecting a left map of the cubic bounding box as a color value corresponding to the spherical coordinates (where Py is maximum) when 45 ° < θ <135 ° and-45 ° < Φ <45 °;
selecting a back map of the cube bounding box as a color value corresponding to the spherical coordinate (at which time-Px is largest) when 135 < θ <225 ° and-45 < φ <45 °;
selecting a right image of the cube bounding box as a color value corresponding to the spherical coordinate (at which-Py is greatest) when 225 ° < θ <325 ° and-45 ° < φ <45 °;
when phi < -45 degrees, selecting a lower graph of the cubic bounding box as a color value corresponding to the spherical coordinates (when-Pz is maximum);
when phi is larger than 45 degrees, selecting the upper graph of the cubic bounding box as a color value corresponding to the spherical coordinates (Pz is maximum at the moment);
Referring to fig. 7, fig. 7 is a schematic view illustrating that any point P on the sphere of the panorama based on the three-dimensional tilt model corresponds to a point P3 on the cube according to the present invention; taking the maximum Px as an example, the color value corresponding to the spherical coordinate at this time is a front map of the stereo bounding box. Taking the spherical coordinate as O, the triangle O, P, P1 (Px, 0, 0) and O, P2 (1, 0, 0), P3(1, y ', z') form an equal ratio triangle, and the corresponding calculation formula of y ', z' can be given by the following formula:
y'=Py*1.0/Px,z'=Pz*1.0/Px
at this time, (y ', z') is the normalized coordinate of 1/4 map in the blank panorama.
And determining the color information of the image of the bounding box corresponding to the spherical coordinates as the color value corresponding to the spherical coordinates according to the belonged ranges of theta and phi in the spherical coordinates. And the color information of the image of the bounding box corresponding to the spherical coordinate is used as the color value corresponding to the spherical coordinate, so that the uniformity of pixel distribution after the radiation projection in each plane of the cubic bounding box can be directly improved.
And step S30, filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image, and generating the current panoramic image.
According to the normalized coordinates (u, v), calculating and obtaining xy coordinates corresponding to the blank panoramic image, determining color values corresponding to the spherical coordinates by a bilinear interpolation method according to the xy coordinates, and filling each position in the blank panoramic image according to the color values corresponding to the spherical coordinates to generate the current panoramic image.
In this embodiment, each position in the blank panoramic image is filled according to the color value corresponding to each position in the blank panoramic image, a FloodFill algorithm is adopted, the color values corresponding to each position in the blank panoramic image form a pixel point matrix, the traversal process of the N-ary tree is completed, and the preliminary color filling performed at each position in the blank panoramic image is obtained. And determining the color value corresponding to the spherical coordinate by adopting a bilinear interpolation method according to the xy coordinate. The bilinear interpolation method performs linear interpolation by using pixel values of 4 adjacent points and giving different weights according to distances from the pixel values to an interpolation point. The bilinear interpolation method has the effect of average low-pass filtering, and plays a role in smoothing the edge of the panoramic image, so that a relatively coherent current panoramic image is generated.
Example 2
Referring to fig. 8, fig. 8 is a functional block diagram of a panorama generating system based on a three-dimensional tilt model according to the present invention. The panorama generating system includes:
the acquiring module 10 is configured to acquire current position information and generate a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
The determining module 20 is configured to determine color values corresponding to respective positions in the blank panoramic image according to a mapping relationship between the position information and the color values;
and a generating module 30 configured to fill each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image, so as to generate the current panoramic image.
Further, the obtaining of the current position information and the generating of the blank panoramic image corresponding to the current position information according to the preset three-dimensional tilt model include:
acquiring current longitude and latitude coordinates of a current position, and converting the current longitude and latitude coordinates into current local coordinates according to preset actual coordinate information and a space coordinate conversion theory to serve as the current position information;
and generating a blank panoramic image corresponding to the current position information according to the resolution in the three-dimensional tilt model.
Further, before determining the color value corresponding to each position in the blank panoramic image according to the mapping relationship between the position information and the color value, the method further includes:
according to the equidistant cylindrical projection method, mapping the local coordinate of any point in the blank panoramic image into a spherical coordinate;
Determining model color information corresponding to the spherical coordinates based on the three-dimensional tilt model;
and generating a mapping relation between the position information and the color value according to the local coordinates in the blank panoramic image, the spherical coordinates corresponding to the panoramic image coordinates and the model color information corresponding to the spherical coordinates.
Further, the mapping the local coordinates of any point in the blank panoramic image to spherical coordinates according to the method of equidistant cylindrical projection includes:
normalizing the local coordinates (x, y) of any point of the blank panoramic image according to the width and the height of the blank panoramic image to generate corresponding normalized coordinates (u, v);
converting the normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz).
Further, said converting said normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz) comprises:
generating spherical coordinates (Px, Py, Pz) corresponding to the normalized coordinates (u, v) according to a preset formula, wherein the preset formula is as follows:
θ=u*2p,
φ=v*p,
Px=cos(θ)*sin(φ),
Py=sin(θ)*sin(φ),
Pz=cos(φ),
wherein theta and phi are polar coordinates of a spherical surface, theta is an angle between the X positive axis and the XY plane, theta is more than or equal to 0 and less than or equal to 2 pi, phi is a polar angle in the positive direction of the Z axis, and phi is more than or equal to 0 and less than or equal to pi.
Further, the determining, based on the three-dimensional tilt model, model color information corresponding to the spherical coordinates includes:
taking the spherical coordinates as a center, based on a rendering to texture technology and an open graphic library technology, and facing to the positive direction of an X axis, rendering scene photos of six surfaces of the spherical coordinates, namely left, right, front, back, upper and lower surfaces of the spherical coordinates, away from a screen to generate a cubic bounding box;
and determining model color information corresponding to the spherical coordinates according to the cube bounding box.
Further, the determining a color value corresponding to the spherical coordinate according to the cube bounding box includes:
taking a target point as a starting point, and leading out rays according to the spherical coordinates theta and phi corresponding to any point as directions, wherein the model color at the closest intersection point of the rays and the three-dimensional model is a target color value;
according to the range of theta and phi in the spherical coordinates, determining the color information of the image of the bounding box corresponding to the spherical coordinates as the color value corresponding to the spherical coordinates,
Further, according to the color value corresponding to each position in the blank panoramic image, filling each position in the blank panoramic image to generate the current panoramic image, including:
Calculating and acquiring an xy coordinate corresponding to the image to be sampled according to the normalized coordinate (u, v) coordinate, and processing the xy coordinate by adopting a bilinear interpolation method to determine a color value corresponding to the spherical coordinate;
and filling each position in the blank panoramic image according to the color value corresponding to the spherical coordinate to generate the current panoramic image.
Further, the processing the xy coordinates includes:
and processing the xy coordinates by a bilinear interpolation method.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A panorama generation method based on a three-dimensional tilt model is characterized by comprising the following steps:
acquiring current position information, and generating a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
Determining color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values;
and filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image to generate the current panoramic image.
2. The method for generating the panorama based on the three-dimensional tilt model according to claim 1, wherein the obtaining the current position information and generating the blank panorama corresponding to the current position information according to a preset three-dimensional tilt model comprises:
acquiring a current longitude and latitude coordinate of a current position, and converting the current longitude and latitude coordinate into a current local coordinate according to preset actual coordinate information and a space coordinate conversion theory to serve as the current position information;
and generating a blank panoramic image corresponding to the current position information according to the resolution in the three-dimensional tilt model.
3. The method as claimed in claim 1, wherein before determining the color values corresponding to the respective positions in the blank panoramic image according to the mapping relationship between the position information and the color values, the method further comprises:
According to the equidistant cylindrical projection method, mapping the local coordinates of any point in the blank panoramic image into spherical coordinates;
determining model color information corresponding to the spherical coordinates based on the three-dimensional tilt model;
and generating a mapping relation between the position information and the color value according to the local coordinates in the blank panoramic image, the spherical coordinates corresponding to the panoramic image coordinates and the model color information corresponding to the spherical coordinates.
4. The method for generating a panorama based on a three-dimensional oblique model according to claim 3, wherein said mapping the local coordinates of any point in the blank panorama image to spherical coordinates according to the method of equidistant cylindrical projection comprises:
normalizing the local coordinates (x, y) of any point of the blank panoramic image according to the width and the height of the blank panoramic image to generate corresponding normalized coordinates (u, v);
converting the normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz).
5. The method of generating a panorama based on a three-dimensional oblique model according to claim 4, wherein said converting said normalized coordinates (u, v) into spherical coordinates (Px, Py, Pz) comprises:
Generating spherical coordinates (Px, Py, Pz) corresponding to the normalized coordinates (u, v) according to a preset formula, wherein the preset formula is as follows:
θ=u*2p,
φ=v*p,
Px=cos(θ)*sin(φ),
Py=sin(θ)*sin(φ),
Pz=cos(φ),
wherein theta and phi are spherical polar coordinates, theta is an angle between the X positive axis and the XY plane, theta is greater than or equal to 0 and less than or equal to 2 pi, phi is a polar angle in the positive direction of the Z axis, and phi is greater than or equal to 0 and less than or equal to pi.
6. The method for generating a panorama based on a three-dimensional tilt model according to claim 4, wherein the determining model color information corresponding to the spherical coordinates based on the three-dimensional tilt model comprises:
taking the spherical coordinates as a center, based on a rendering to texture technology and an open graphic library technology, and rendering scene photos of six surfaces of the spherical coordinates, namely left, right, front, back, upper and lower surfaces, away from a screen in the positive direction of an X axis to generate a cubic bounding box;
and determining model color information corresponding to the spherical coordinates according to the cube bounding box.
7. The method for generating a panorama based on a three-dimensional oblique model according to claim 6, wherein said determining a color value corresponding to the spherical coordinate according to the cube bounding box comprises:
taking a target point as a starting point, and leading out rays according to the spherical coordinates theta and phi corresponding to any point as a direction, wherein the model color at the closest intersection point of the rays and the three-dimensional model is the target color value;
And determining the color information of the image of the bounding box corresponding to the spherical coordinates as the color value corresponding to the spherical coordinates according to the belonged ranges of theta and phi in the spherical coordinates.
8. The method as claimed in claim 7, wherein the generating of the panorama based on the three-dimensional tilt model by filling each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image comprises:
calculating and acquiring an xy coordinate corresponding to the image to be sampled according to the normalized coordinate (u, v), and processing the xy coordinate by adopting a bilinear interpolation method to determine a color value corresponding to the spherical coordinate;
and filling each position in the blank panoramic image according to the color value corresponding to the spherical coordinate to generate the current panoramic image.
9. The method for generating a panorama based on a three-dimensional oblique model according to claim 8, wherein said processing the xy coordinates comprises:
and processing the xy coordinates by a bilinear interpolation method.
10. A panorama generating system based on a three-dimensional tilt model, comprising:
The acquisition module is configured to acquire current position information and generate a blank panoramic image corresponding to the current position information according to a preset three-dimensional tilt model;
the determining module is configured to determine color values corresponding to all positions in the blank panoramic image according to the mapping relation between the position information and the color values;
and the generating module is configured to fill each position in the blank panoramic image according to the color value corresponding to each position in the blank panoramic image, so as to generate the current panoramic image.
CN202210520502.1A 2022-05-13 2022-05-13 Panorama generation method and system based on three-dimensional tilt model Pending CN114612621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210520502.1A CN114612621A (en) 2022-05-13 2022-05-13 Panorama generation method and system based on three-dimensional tilt model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210520502.1A CN114612621A (en) 2022-05-13 2022-05-13 Panorama generation method and system based on three-dimensional tilt model

Publications (1)

Publication Number Publication Date
CN114612621A true CN114612621A (en) 2022-06-10

Family

ID=81870437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210520502.1A Pending CN114612621A (en) 2022-05-13 2022-05-13 Panorama generation method and system based on three-dimensional tilt model

Country Status (1)

Country Link
CN (1) CN114612621A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877140A (en) * 2009-12-18 2010-11-03 北京邮电大学 Panorama-based panoramic virtual tour method
US20140049537A1 (en) * 2012-08-20 2014-02-20 Keshaba Chandra Sahoo Systems and methods for augmenting panoramic image data with performance related data for a building
US20140085295A1 (en) * 2012-09-21 2014-03-27 Tamaggo Inc. Direct environmental mapping method and system
CN107133918A (en) * 2017-05-05 2017-09-05 陈健 A kind of method that optional position in three-dimensional scenic generates panorama sketch
WO2018133380A1 (en) * 2017-01-17 2018-07-26 北京大学深圳研究生院 Panoramic video mapping method based on main viewpoint

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877140A (en) * 2009-12-18 2010-11-03 北京邮电大学 Panorama-based panoramic virtual tour method
US20140049537A1 (en) * 2012-08-20 2014-02-20 Keshaba Chandra Sahoo Systems and methods for augmenting panoramic image data with performance related data for a building
US20140085295A1 (en) * 2012-09-21 2014-03-27 Tamaggo Inc. Direct environmental mapping method and system
WO2018133380A1 (en) * 2017-01-17 2018-07-26 北京大学深圳研究生院 Panoramic video mapping method based on main viewpoint
CN107133918A (en) * 2017-05-05 2017-09-05 陈健 A kind of method that optional position in three-dimensional scenic generates panorama sketch

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
北京邮电大学高等数学双语教学组: "《高等数学》", 28 February 2018 *

Similar Documents

Publication Publication Date Title
CN111127655B (en) House layout drawing construction method and device, and storage medium
KR102208773B1 (en) Panoramic image compression method and apparatus
CN106934772B (en) Horizontal calibration method and system for panoramic image or video and portable terminal
EP3534336B1 (en) Panoramic image generating method and apparatus
CN110246146A (en) Full parallax light field content generating method and device based on multiple deep image rendering
CN113643414B (en) Three-dimensional image generation method and device, electronic equipment and storage medium
CN115690382B (en) Training method of deep learning model, and method and device for generating panorama
CN106558017B (en) Spherical display image processing method and system
CN116310076A (en) Three-dimensional reconstruction method, device, equipment and storage medium based on nerve radiation field
TWI635461B (en) Projection chart construction method and device
CN114782648A (en) Image processing method, image processing device, electronic equipment and storage medium
US10354399B2 (en) Multi-view back-projection to a light-field
CN113793255A (en) Method, apparatus, device, storage medium and program product for image processing
CN107609162B (en) Method for batch importing of two-dimensional map symbols into panorama
CN115359173A (en) Virtual multi-view video generation method and device, electronic equipment and storage medium
CN115187729A (en) Three-dimensional model generation method, device, equipment and storage medium
CN116109765A (en) Three-dimensional rendering method and device for labeling objects, computer equipment and storage medium
CN116363290A (en) Texture map generation method for large-scale scene three-dimensional reconstruction
CN112149383B (en) Text real-time layout method based on GPU, electronic device and storage medium
WO2019042028A1 (en) All-around spherical light field rendering method
Fan et al. Pixels and Panoramas: An Enhanced Cubic Mapping Scheme for Video\/Image-Based Virtual-Reality Scenes
CN114612621A (en) Panorama generation method and system based on three-dimensional tilt model
CN113657074A (en) Linear text layout method in three-dimensional space, electronic device and storage medium
CN114567742A (en) Panoramic video transmission method and device and storage medium
CN113763530B (en) Image processing method, device, computing equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220610

RJ01 Rejection of invention patent application after publication