CN108447086B - A kind of Environment mapping method and device - Google Patents

A kind of Environment mapping method and device Download PDF

Info

Publication number
CN108447086B
CN108447086B CN201810150486.5A CN201810150486A CN108447086B CN 108447086 B CN108447086 B CN 108447086B CN 201810150486 A CN201810150486 A CN 201810150486A CN 108447086 B CN108447086 B CN 108447086B
Authority
CN
China
Prior art keywords
textures
value
dome
coordinate system
value range
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.)
Active
Application number
CN201810150486.5A
Other languages
Chinese (zh)
Other versions
CN108447086A (en
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.)
EASYAR INFORMATION TECHNOLOGY (SHANGHAI) Co Ltd
Original Assignee
EASYAR INFORMATION TECHNOLOGY (SHANGHAI) 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 EASYAR INFORMATION TECHNOLOGY (SHANGHAI) Co Ltd filed Critical EASYAR INFORMATION TECHNOLOGY (SHANGHAI) Co Ltd
Priority to CN201810150486.5A priority Critical patent/CN108447086B/en
Publication of CN108447086A publication Critical patent/CN108447086A/en
Priority to PCT/CN2019/072919 priority patent/WO2019157923A1/en
Application granted granted Critical
Publication of CN108447086B publication Critical patent/CN108447086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
    • G06T3/12
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Abstract

The embodiment of the invention discloses a kind of Environment mapping methods, comprising the following steps: sphere is divided into three parts by the first step;The size of textures is arranged in second step;Third step, the mode that lateral parts and top/bottom are respectively adopted to different texture coordinate maps are mapped to texture coordinate system.Fidelity is higher, the simple conic projection of operation using close within the scope of human eye plumb visible by the present invention, the characteristics of due to its Conformal, so that obtaining preferable effect when observing the scenes such as streetscape.In the processing of two domes in north and south, dome is mapped on rectangle textures by the present invention as homogeneously as possible, by adjusting the size of north and south dome rectangle textures, the seam between north and south dome and equator region can be eliminated, and reduces the storage consumption at north and south the two poles of the earth.By the continuity for ensuring to map, the pixel rendezvous problem of two, north and south pole in traditional cylindrical projection is eliminated.

Description

A kind of Environment mapping method and device
Technical field
The present embodiments relate to a kind of computer graphics methods, and in particular to a kind of Environment mapping method.This Inventive embodiments further relate to a kind of device using Environment mapping method.
Background technique
Environment mapping is to be drawn in computer graphical rendering using the texture image simulation viewpoint ambient enviroment precalculated A kind of high efficiency method in face.Texture is used to store the image of viewpoint ambient enviroment, and two-dimensional texture is mapped in some way Environment ball surface, to simulate the environment picture around viewpoint.Environment mapping has a wide range of applications: such as 360 degree of streetscape wash with watercolours Dye, indoor exhibition, environment inside car displaying and 360 degree of VR videos etc..
Existing environment mapping (Environment Mapping) method has following several:
Spherical shape mapping (Spherical Map): being a kind of environment mapping method the simplest;A given radius is 1 Sphere, any point<x, y, z>satisfaction: x on spherome surface2+y2+z2=1, enable p=sqrt (x2+y2+(z+1)2), then the point Texture coordinate be (x/2p+0.5, y/2p+0.5).Its advantage is that it is simple, and disadvantage is: it stretches and distortion is obvious, especially When z is close to 0, i.e., around the equator of sphere.This is a critical defect when showing the environment such as streetscape.In addition textures are not It is utilized effectively, there are invalid white spaces.
Dual paraboloid environment maps (Dual Paraboloid Environment Mapping): dual paraboloid environment reflects Penetrate the improvement actually to spherical shape mapping.Using dual paraboloid, the distortion and stretching of edge are improved, and is supported 360 degree of environment mapping.The disadvantage is that: still remain distortion and stretching;With spherical mapping, there is also textures wastes Problem.
Cylindrical projection (Cylindrical Map): the sphere that a given radius is 1, under spheric coordinate system, sphere table On face any point can with θ andTo indicate.Wherein, θ is referred to as polar angle (polar angle), and value range is [0, π]; AndReferred to as azimuth (azimuthal angle), value range are [0,2* π].Then any point on spherical surface Texture coordinate beIts advantage is that: cylindrical projection be a kind of Conformal (so-called Conformal, i.e., Conformal projection refers to when a region is mapped to another region, keeps angle constant), it is protected within the scope of human viewable True degree is higher, suitable for environment such as displaying streetscapes.Format is simple, and popularity rate is higher, and many Environments are with cylindrical projection Mode is provided.Disadvantage is: there are pixels to assemble situation at north and south the two poles of the earth, and memory space consuming is more.
Cubic covering methodi (Cube Map): the sphere that a given radius is 1, according to any point < x on spherome surface, Y, z > and maximum component is found first, for external cube of dignity of positioning ball, texture seat is then calculated on this plane Mark.The cubic covering methodi of standard is divided into 6 faces, and sequence is: X-axis positive direction, X-axis negative direction, Y-axis positive direction, Y-axis losing side To, Z axis positive direction, Z axis negative direction.Its advantage is that: it is relatively easy, have corresponding hardware realization and accelerates.Disadvantage is: for The usually unconcerned north and south the two poles of the earth of human eye have still used sample rate identical with sphere side.
Deng square cubic covering methodi (IsoCube): IsoCube mapping is actually a mutation of cubic covering methodi.It is different In cubic covering methodi, spherical surface is more uniformly mapped on cube by technology trial.Its advantage is that: it is reflected relative to cube It penetrates more uniform.Disadvantage is: non-conformal mapping, there are pixel distortion problems.North and south the two poles of the earth usually unconcerned for human eye Sample rate identical with sphere side is still used.It is not high additionally, due to its popularity rate, it is desirable that already existing environment is pasted Figure carries out resampling, this will lead to textures accuracy decline.
HEALPix mapping, it is Hierarchical Equal Area that HEALPix, which maps full name, isoLatitudePixelization.Segmentation of spheres is first the identical quadrangle block of 12 areas by this method, is then passed Block is subdivided into smaller quadrangle block with returning.But, anti-aliasing sampling is carried out for HEALPix mapping mode to need Special algorithm, so that its mapping operations is complex.Its advantage is that: entire sphere realizes that uniform mapping, area are consistent, turn round It is bent small.Disadvantage is: operation is complex.Not high to the concern of north and south the two poles of the earth in this way for 360 degree of streetscapes uses scene, not North and south the two poles of the earth are optimized.
To sum up, when showing static scene using 360 degree of environment balls, above-mentioned environment mapping method cannot be full simultaneously well The consumption of foot low memory space, high image quality demand.Spherical shape mapping (Spherical Map) and its improved method dual paraboloid Mapping (Dual Paraboloid Environment Mapping) has that textures waste, and at mapped boundaries The problem of pixel distortion and aggregation;Cylindrical projection (Cylindrical Map) based on longitude and latitude is imitated within the scope of human viewable Fruit is preferable, but there are problems that pixel aggregation and a large amount of memory spaces are wasted at north and south the two poles of the earth;Cubic covering methodi (Cube Etc. Map), square cubic covering methodi (IsoCube), HEALPix mapping then waste more memory space, for storing non-region of interest Domain, the i.e. pixel at environment ball north and south the two poles of the earth.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of Environment mapping methods that part is conformal, it can To use less data volume, achieve the effect that approximation is same within the scope of human viewable, and solve cylindrical projection simultaneously in south The problem of pixel aggregation at northern the two poles of the earth.
The technical solution of the conformal Environment mapping method in part proposed by the present invention the following steps are included:
Environment ball is divided into three parts by the first step:
Lateral parts: θ value range is [pi/2-A1,π/2+A2] land portions;
Top surface: θ value range is [0, pi/2-A1) spherical surface at the top of dome section;
Bottom surface: θ value range is (pi/2+A2, π) spherical surface bottom dome section;
Wherein, θ is the direction vector at any point and the angle of Z axis on spherome surface in spheric coordinate system;Spherical coordinate System refers to that a given radius is 1 sphere, under spheric coordinate system, any point polar angle θ and azimuth on spherome surface It indicating, the value range of θ is [0, π],Value range be [0,2 π];
Angle A1Value range be 0 < A1< pi/2;
Angle A2Value range be 0 < A2< pi/2;
Preferably, A in the first step1And A2Value be π/6≤A1≤ π/3, test result show the first step Middle A1And A2Best value be π/4.
The size of textures is arranged in second step are as follows:
Enabling the corresponding textures width of lateral parts is N, the power that the value of N is 2;The then corresponding textures size difference in every part Are as follows:
Lateral parts: textures width is N, a height of S1×N×((A1+A2)/(2π));
Wherein, S1For zoom factor;
Top/bottom part: textures width is S2× N/4, a height of S3×N/4;
Wherein, S2And S3It is zoom factor.
Preferably, the S1、S2、S3Value be 1, then the dome section textures of top and bottom width and a height of N/4, The width of lateral parts textures is N.
Third step, the mode that lateral parts and top/bottom are respectively adopted to different texture coordinate maps are mapped to line Coordinate system is managed, the texture coordinate system refers to the horizontal direction of textures that for u axis, vertical direction is v axis, four angles of textures Coordinate is respectively the coordinate system of (0,0), (1,0), (0,1), (1,1), the lateral parts and top/bottom dome mapping Shape afterwards and the size of the textures match.
Further, in the third step lateral parts texture coordinate are as follows:
V=(θ-A1)/(A1+A2);
Wherein,The folder of X/Y plane and X-axis is projected to for the direction vector at any point on spherome surface in spheric coordinate system Angle;
U is the coordinate value of horizontal direction in texture coordinate system;
V is the coordinate value of vertical direction in texture coordinate system.
Further, in the third step top/bottom part texture coordinate map method are as follows:
Top/bottom dome is subjected to uniform cutting, every piece is respectively mapped on a part of position of rectangle.
It further, is 4 parts by the uniform cutting of top/bottom dome, every part of corresponding position for being respectively mapped to rectangle;
The most short ball face arcuate distance at any point on dome to dome central point is defined as D, enabling L is to normalize D To the numerical value in [0,0.5] range, then on the dome of top surface any point L value are as follows: 0.5 × θ/(pi/2-A1), and bottom surface dome The L value at upper any point are as follows: 0.5 × (π-θ)/(pi/2-A2);
DefinitionTo incite somebody to actionValue range be mapped to [- π/4,7 × π/4) numerical value, that is:
(whenWhen)
(whenWhen)
Then the texture coordinate of top/bottom dome is divided into following 4 kinds of situations, corresponds respectively to 4 regions:
The first,
V=0.5+L
Second,
U=0.5+L
The third,
V=0.5-L
4th kind,
U=0.5-L
Wherein,The folder of X/Y plane and X-axis is projected to for the direction vector at any point on spherome surface in spheric coordinate system Angle;
U is the coordinate value of horizontal direction in texture coordinate system;
V is the coordinate value of vertical direction in texture coordinate system.
The present invention also provides a kind of devices using Environment mapping method, its technical solution is that:
Including processor, the processor is for executing method and step above-mentioned.
What the present invention can achieve has the technical effect that
The plumb visible range of human eye is about 100 degree, and the present invention is using fidelity close within the scope of human eye plumb visible Higher, the simple conic projection of operation is spent, the characteristics of due to its Conformal, so that obtaining when observing the scenes such as streetscape Preferable effect.In addition, as a large amount of already existing environment mapping textures be in the form of conic projection existing for, for this A little already existing textures, present invention can ensure that without carrying out textures resampling within the scope of human viewable, to will not go out Existing loss of significance.
In the processing of two domes in north and south, dome is mapped on rectangle textures by the present invention as homogeneously as possible, is passed through The size for adjusting north and south dome rectangle textures, can eliminate the seam between north and south dome and equator region, and reduce south The storage consumption at northern the two poles of the earth.By the continuity for ensuring to map, the pixel of two poles in north and south in traditional cylindrical projection is eliminated Rendezvous problem.Optimally, above-mentioned parameter A1And A2All value π/4 and S1、S2And S3When all taking 1, the textures of entire sphere just may be used To surround seamless connection, and 75% data volume of cylindrical projection is only used.
Detailed description of the invention
It should be understood by those skilled in the art that following explanation is only schematically to illustrate the principle of the present invention, the principle It can apply in many ways, to realize many different alternative embodiments.These explanations are only used for showing religion of the invention Lead the General Principle of content, it is not intended to which limitation is conceived in this disclosed invention.
It is incorporated in the present specification and forms part of this specification that accompanying drawing shows embodiment of the present invention, and And the principle for explaining the present invention together with the detailed description of general description and following drawings above.
The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
Fig. 1 is the schematic diagram of spheric coordinate system used in the embodiment of the present invention;
Fig. 2 is the schematic diagram of texture coordinate system used in the embodiment of the present invention;
Fig. 3 is the schematic diagram of the mapping method of texture coordinate of the embodiment of the present invention;
Fig. 4 is the schematic diagram of textures used by the prior art;
Fig. 5 is the schematic diagram of textures used by the embodiment of the present invention;
Fig. 6 is schematic diagram of the embodiment of the present invention using the image processing apparatus of Environment mapping method.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention Attached drawing, the technical solution of the embodiment of the present invention is clearly and completely described.Obviously, described embodiment is this hair Bright a part of the embodiment, instead of all the embodiments.Based on described the embodiment of the present invention, ordinary skill Personnel's every other embodiment obtained under the premise of being not necessarily to creative work, shall fall within the protection scope of the present invention.It removes Non- other definition, the technical term or scientific term used herein are should be in fields of the present invention with general technical ability The ordinary meaning that personage is understood.The similar word such as " comprising " used herein mean to occur element before the word or Object, which is covered, appears in the element of the word presented hereinafter perhaps object and its equivalent and be not excluded for other elements or object.
Herein using to coordinate system be defined as follows:
Spheric coordinate system: the sphere that a given radius is 1, under spheric coordinate system, any point can on spherome surface With with θ andTo indicate;Wherein, θ is referred to as polar angle (polar angle), and value range is [0, π];AndReferred to as orientation Angle (azimuthal angle), value range are [0,2 π].
As shown in Figure 1 is spheric coordinate system used in the embodiment of the present invention, wherein r=1,For the throwing of spherical surface direction vector Shadow is to the angle of X/Y plane and X-axis, and value range is [0,2 π], and θ is the angle of spherical surface direction vector and Z axis, and value range is [0,π]。
Texture coordinate system: the horizontal direction of image is u axis, and vertical direction is v axis, and the corresponding coordinate in four angles of image is as schemed Shown in 2.
Coordinate system herein is stated only for facilitating.Even if can also be turned by coordinate system using other coordinate systems It changes, realizes effect achieved of the embodiment of the present invention.
Embodiment one:
The embodiment of the invention provides a kind of Environment mapping methods, comprising the following steps:
Environment ball is divided into three parts by the first step (S1):
Lateral parts: θ value range is [pi/2-A1,π/2+A2] land portions;
Top surface: θ value range is [0, pi/2-A1) spherical surface at the top of dome section;
Bottom surface: θ value range is (pi/2+A2, π] spherical surface bottom dome section;
Wherein, angle A1Value range be 0 < A1< pi/2;
Angle A2Value range be 0 < A2< pi/2;
Preferably, A1And A2Value can be π/6≤A1≤ π/3, test result show A1And A2Best value be π/ 4。
Second step (S2) is arranged the size of textures and different textures is respectively adopted in lateral parts and top/bottom and sits The mode of mark mapping is mapped to texture coordinate system, and the texture coordinate system refers to the horizontal direction of textures for u axis, vertical direction For v axis, the coordinate at four angles of textures is respectively the coordinate system of (0,0), (1,0), (0,1), (1,1), the lateral parts and The size of shape and the textures after the top/bottom dome mapping matches.
Enabling the corresponding textures width of lateral parts is N, and the value of N is generally 2 power;The then corresponding textures size in every part It is respectively as follows: with the texture coordinate on textures
Lateral parts: textures width is N, a height of S1×N×((A1+A2)/(2π));
Wherein, S1For zoom factor, S1Best value be 1;
V=(θ-A1)/(A1+A2);
Top/bottom part: textures width is S2× N/4, a height of S3×N/4;
Wherein, S2And S3It is zoom factor, S2And S3Best value be 1.
Work as S1、S2And S3When all taking 1, the width and Gao Douwei N/4 of the dome section textures of top and bottom, lateral parts patch The width of figure be N, at this moment entire segmentation of spheres at three parts textures just can around seamless connection.
Work as A1And A2All value π/4 and S1、S2And S3When all taking 1, the textures of entire sphere can surround seamless connection just, And 75% data volume of cylindrical projection is only used.
The mapping method of top/bottom dome is as shown in figure 3, be 4 parts, every part point by the uniform cutting of top/bottom dome It is not mapped to the corresponding position of rectangle;
The most short ball face arcuate distance at any point on dome to dome central point is defined as D, enabling L is to normalize D To the numerical value in [0,0.5] range, then on the dome of top surface any point L value are as follows: 0.5 × θ/(pi/2-A1), and bottom surface dome The L value at upper any point are as follows: 0.5 × (π-θ)/(pi/2-A2);
DefinitionTo incite somebody to actionValue range be mapped to [- π/4,7 × π/4) numerical value, that is:
(whenWhen)
(whenWhen)
Then the texture coordinate of top/bottom dome can be divided into following 4 kinds of situations, correspond respectively to 4 areas in Fig. 3 Domain:
The first,
V=0.5+L
Second,
U=0.5+L
The third,
V=0.5-L
4th kind,
U=0.5-L
It is above texture coordinate map formula.
In embodiments of the present invention, since the plumb visible range of human eye is about 100 degree, vertically may be used close to human eye Fidelity is higher, the simple conic projection of operation depending on using in range, the characteristics of due to its Conformal, so that seeing Preferable effect is obtained when examining the scenes such as streetscape.In addition, since a large amount of already existing environment mapping textures are with conic projection Form existing for, for these already existing textures, present invention can ensure that without pasting within the scope of human viewable Figure resampling, from without loss of significance.
In the processing of two domes in north and south, dome is mapped on rectangle textures by the present invention as homogeneously as possible, is passed through The size for adjusting north and south dome rectangle textures, can eliminate the seam between north and south dome and equator region, and reduce south The storage consumption at northern the two poles of the earth.By the continuity for ensuring to map, the pixel of two poles in north and south in traditional cylindrical projection is eliminated Rendezvous problem.Optimally, above-mentioned parameter A1And A2All value π/4 and S1、S2And S3When all taking 1, the textures of entire sphere just may be used To surround seamless connection, and 75% data volume of cylindrical projection is only used.
Embodiment two:
The embodiment of the invention also provides a kind of preferred Environment mapping methods, comprising the following steps:
S1, sphere is divided into three parts, in which:
Lateral parts: (best value is 45 to any one numerical value between sphere equator up and down 0 degree to 90 degree of respective value Degree), the cutting in horizontal direction, obtained curved surface are carried out respectively;Conic projection is used for curved surface;
Top surface: remaining southern dome after being cut to sphere;
Bottom surface: remaining northern dome after being cut to sphere;
The coordinate of the size and textures of textures in texture coordinate system is set, in which:
S11, in the present embodiment, the size of textures can be 1024 pixels × 512 pixels, and top half shows sphere top The mapping result in face, middle section show the mapping result of sphere side, and lower half portion shows the mapping result of sphere bottom surface, on Half part: middle section: lower half portion=1:2:1;
S12, with the horizontal direction of textures for u axis, vertical direction is v axis, and the coordinate at four angles of textures is respectively defined as (0,0), (1,0), (0,1), (1,1) construct the texture coordinate systems of textures;
S2, the mode that lateral parts and top/bottom are respectively adopted to different texture coordinate maps are mapped to texture seat The lateral parts of sphere are carried out cylindrical projection, mapping result are shown in the middle section of textures by mark system;By top and bottom Texture coordinate map is carried out, mapping result is respectively displayed on to top half and the lower half portion of remaining textures.
Lateral parts, top and bottom are hinted obliquely at after result is all mapped in textures, three parts content can be completely It is stitched together, improves visual experience effect.
Embodiment three:
Environment mapping method provided by the embodiment of the present invention can be applied in the scene that AR/VR sees vehicle, below Technical solution of the present invention is illustrated using AR/VR car show as embodiment:
When doing AR/VR car show, a kind of scene is needed the true interior view of the viewpoint simulation of user Point can look around, check upholstery, actually be sitting in the in-vehicle device that Che Lineng sees including seat, instrument board etc.;This Realization of the displaying of sample in 3D engine is usually the inner wall that a hollow ball is attached to using panorama sketch, by the position of video camera It is fixed on the centre of sphere, so that it may see close to true interior effect, in the present embodiment, constructing a radius is 5 meters hollow Sphere;The acquisition of panorama sketch can be shot, the prior art is logical there are many kinds of mode generally by special camera live Frequently with original interior trim textures as shown in Figure 4, this is also the textures that spherical mapping can be used directly.
Spherical mapping textures as shown in Figure 4 are divided into 3 parts, 512 × 64 pixel sizes since textures top Region is the part of skylight in exhibition vehicle, and the region of intermediate 512 × 128 pixel sizes is the part for showing head-up range, textures The region of 512 × 64 pixel sizes of bottom is the part of bottom in exhibition vehicle;If passing through ball on the sphere in this scene Shape mapping uses this textures, it can be found that the textures north and south the two poles of the earth have used a large amount of pixel, but spherical surface textures when It waits, only can correspond to few pixel, this is greatly to waste;The textures area of this mode is total up to 512 × 256= 131072;
What is observed when user's major part is to be sitting in the range looked squarely inside automobile, can be looked around one week;For roof and There are many part at vehicle bottom, just having lacked for observation.It is therefore possible to use method of the invention:
Original cylinder textures are divided into three parts: top, intermediate and bottom, wherein the textures size of top and bottom It is equally big;
The size that textures are arranged is 512 × 256, uses optimized parameter, it may be assumed that A1And A2All value π/4 and S1、S2And S3All take 1, the three parts of hollow spheric are mapped respectively:
Lateral parts use cylindrical projection, are mapped to the textures region for showing head-up range, the ruler after lateral parts mapping Very little is 512 × 128;Lateral parts are identical as the textures size of spherical shape mapping and content as the textures for showing head-up range;
Top surface uses texture mapping, each point of top surface is mapped as texture coordinate, the ruler after summit portion mapping Very little is 128 × 128;Textures of the summit portion as skylight in exhibition vehicle;
Bottom surface also uses texture mapping, each point of bottom surface is mapped as texture coordinate, after bottom surface portions mapping Having a size of 128 × 128;Textures of the bottom surface portions as bottom in exhibition vehicle;
After hollow ball is mapped to textures region, the seamless connection and displaying of image are completed, as shown in Figure 5.
After method provided by the embodiment of the present invention, the textures area after hollow sphere is mapped is 128 × 128+128 × 128+512 × 128=98304;Therefore spherical textures are compared, using method provided by the embodiment of the present invention, textures region Compression ratio can achieve 98304/131072=75%.
Example IV:
As shown in fig. 6, further including memory using the device of Environment mapping method provided by the embodiment of the present invention 41 and processor 42, wherein memory 41 is used for store code and related data, and processor 42 is for calling in memory 41 Data execute the code in memory 41, and executing the code in the memory 41 may be implemented embodiment one, two institute of embodiment The Environment mapping method of offer, the description of specific method step with reference to the foregoing embodiments, details are not described herein.
In embodiments of the present invention, memory 41 may include volatile memory, for example, random access memory (random access memory, RAM), the RAM may include static RAM or dynamic ram.The memory 41 may also Including nonvolatile memory (non-volatile memory), such as read-only memory (read-only memory, PROM), programmable read only memory (programmable read-only memory, PROM), erasable programmable is read-only deposits Reservoir (erasable programmable read-only memory, EPROM), electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM) or flash memory (flash memory).The memory 41 is also possible to be external flash, at least one magnetic disk storage or buffer.
In embodiments of the present invention, processor 42 can be central processing unit (Central Processing Unit, CPU), processor 42 can also be other general controls processors, digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components etc..The general controls processor can be microcontrol processor or It is any conventional control processor, such as single-chip microcontroller etc..
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, institute Display or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit Indirect coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
Person of ordinary skill in the field, which is understood that, realizes that all or part of the steps of above method embodiment can be with It being done through the relevant hardware of the program instructions, program above-mentioned can store in computer-readable storage medium, and by Processor inside communication apparatus executes, and processor can be executed including above method embodiment program above-mentioned when executed All or part of step.Wherein, the processor can be used as the implementation of one or more processors chip, or can be A part of one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC); And storage medium above-mentioned can include but is not limited to following kind of storage medium: flash memory (Flash Memory) read-only is deposited Reservoir (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), mobile hard disk, The various media that can store program code such as magnetic or disk.
The equator region of sphere is used cylindrical projection by the present invention, and north and south the two poles of the earth of sphere are each mapped to rectangle On, fidelity is higher within the scope of human viewable, while solving the problems, such as that cylindrical projection is assembled in the pixel at north and south the two poles of the earth, also Reduce storage consumption.
Obviously, those skilled in the art can carry out various changes and deformation to the present invention, without departing from of the invention Spirit and scope.In this way, if these modifications of the invention belong within the scope of the claims in the present invention and its equivalent technology, Then the present invention is also intended to encompass including these changes and deformation.

Claims (9)

1. a kind of Environment mapping method, which comprises the following steps:
Environment ball is divided into three parts by the first step:
Lateral parts: θ value range is [pi/2-A1,π/2+A2] land portions;
Top surface: θ value range is [0, pi/2-A1) spherical surface at the top of dome section;
Bottom surface: θ value range is (pi/2+A2, π] spherical surface bottom dome section;
Wherein, θ is the direction vector at any point and the angle of Z axis on spherome surface in spheric coordinate system;Spheric coordinate system is Show the sphere that a fixed radius is 1, under spheric coordinate system, any point polar angle θ and azimuth on spherome surfaceCome It indicating, the value range of θ is [0, π],Value range be [0,2 π];
Angle A1Value range be 0 < A1< pi/2;
Angle A2Value range be 0 < A2< pi/2;
The size of textures is arranged in second step;
Third step, the mode that lateral parts and top/bottom are respectively adopted to different texture coordinate maps are mapped to texture seat Mark system, the texture coordinate system refer to the horizontal direction of textures that for u axis, vertical direction is v axis, the coordinate at four angles of textures After the respectively coordinate system of (0,0), (1,0), (0,1), (1,1), the lateral parts and top/bottom dome mapping Shape and the size of the textures match;Wherein:
The texture coordinate map method of top/bottom part in the third step are as follows:
Top/bottom dome is subjected to uniform cutting, every piece is respectively mapped on a part of position of rectangle.
2. Environment mapping method according to claim 1, which is characterized in that A in the first step1And/or A2Take Value are as follows:
Angle A1Value range be π/6≤A1≤π/3;
Angle A2Value range be π/6≤A1≤π/3。
3. Environment mapping method according to claim 2, which is characterized in that A in the first step1And/or A2Take Value is π/4.
4. Environment mapping method according to claim 1, which is characterized in that the ruler of textures is arranged in the second step It is very little are as follows:
Enabling the corresponding textures width of lateral parts is N, then the corresponding textures size in every part is respectively as follows:
Lateral parts: textures width is N, a height of S1×N×((A1+A2)/(2π));
Wherein, S1For zoom factor;
Top/bottom part: textures width is S2× N/4, a height of S3×N/4;
Wherein, S2And S3It is zoom factor.
5. Environment mapping method according to claim 4, which is characterized in that the power that the value of the N is 2.
6. Environment mapping method according to claim 4, which is characterized in that the S1、S2、S3Value be 1, then The width of the dome section textures of top and bottom and a height of N/4, the width of lateral parts textures are N.
7. Environment mapping method according to claim 4, which is characterized in that the line of lateral parts in the third step Manage coordinate are as follows:
V=(θ-A1)/(A1+A2);
Wherein,The angle of X/Y plane and X-axis is projected to for the direction vector at any point on spherome surface in spheric coordinate system;
U is the coordinate value of horizontal direction in texture coordinate system;
V is the coordinate value of vertical direction in texture coordinate system.
8. Environment mapping method according to claim 1, which is characterized in that by the uniform cutting of top/bottom dome It is 4 parts, every part of corresponding position for being respectively mapped to rectangle;
The most short ball face arcuate distance at any point on dome to dome central point is defined as D, enable L be D is normalized to [0, 0.5] numerical value in range, then on the dome of top surface any point L value are as follows: 0.5 × θ/(pi/2-A1), and it is any on the dome of bottom surface The L value of a bit are as follows: 0.5 × (π-θ)/(pi/2-A2);
DefinitionTo incite somebody to actionValue range be mapped to [- π/4,7 × π/4) numerical value, that is:
(whenWhen)
(whenWhen)
Then the texture coordinate of top/bottom dome is divided into following 4 kinds of situations, corresponds respectively to 4 regions:
The first,
V=0.5+L
Second,
U=0.5+L
The third,
V=0.5-L
4th kind,
U=0.5-L
Wherein,The angle of X/Y plane and X-axis is projected to for the direction vector at any point on spherome surface in spheric coordinate system;
U is the coordinate value of horizontal direction in texture coordinate system;
V is the coordinate value of vertical direction in texture coordinate system.
9. a kind of device using Environment mapping method, it is characterised in that: including processor, the processor is for executing Method and step as claimed in any one of claims 1 to 8.
CN201810150486.5A 2018-02-13 2018-02-13 A kind of Environment mapping method and device Active CN108447086B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810150486.5A CN108447086B (en) 2018-02-13 2018-02-13 A kind of Environment mapping method and device
PCT/CN2019/072919 WO2019157923A1 (en) 2018-02-13 2019-01-24 Environment mapping method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810150486.5A CN108447086B (en) 2018-02-13 2018-02-13 A kind of Environment mapping method and device

Publications (2)

Publication Number Publication Date
CN108447086A CN108447086A (en) 2018-08-24
CN108447086B true CN108447086B (en) 2019-02-26

Family

ID=63192463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810150486.5A Active CN108447086B (en) 2018-02-13 2018-02-13 A kind of Environment mapping method and device

Country Status (2)

Country Link
CN (1) CN108447086B (en)
WO (1) WO2019157923A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108447086B (en) * 2018-02-13 2019-02-26 视辰信息科技(上海)有限公司 A kind of Environment mapping method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484896A (en) * 2014-10-30 2015-04-01 无锡梵天信息技术股份有限公司 Physical method based on environment mapping for simulating human skin subsurface scattering

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106691A (en) * 2013-01-14 2013-05-15 清华大学 Method and system of interactive browsing visualization of moon model with grains and annotations
KR101871222B1 (en) * 2013-02-01 2018-06-27 삼성전자주식회사 Image processing apparatus and method
CN103559733B (en) * 2013-10-09 2017-02-08 浙江大学 Spherical body drawing method supporting three-dimension data inner viewpoint roaming
CN104463959A (en) * 2014-11-25 2015-03-25 无锡梵天信息技术股份有限公司 Method for generating cubic environment maps
US10977764B2 (en) * 2015-12-29 2021-04-13 Dolby Laboratories Licensing Corporation Viewport independent image coding and rendering
CN107317998A (en) * 2016-04-27 2017-11-03 成都理想境界科技有限公司 Full-view video image fusion method and device
US10249019B2 (en) * 2016-05-06 2019-04-02 Mediatek Inc. Method and apparatus for mapping omnidirectional image to a layout output format
CN106355635A (en) * 2016-08-30 2017-01-25 北京像素软件科技股份有限公司 Method and device for displaying sky sphere in game scene
CN106527857A (en) * 2016-10-10 2017-03-22 成都斯斐德科技有限公司 Virtual reality-based panoramic video interaction method
CN106792151A (en) * 2016-12-29 2017-05-31 上海漂视网络科技有限公司 A kind of virtual reality panoramic video player method
CN108447086B (en) * 2018-02-13 2019-02-26 视辰信息科技(上海)有限公司 A kind of Environment mapping method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484896A (en) * 2014-10-30 2015-04-01 无锡梵天信息技术股份有限公司 Physical method based on environment mapping for simulating human skin subsurface scattering

Also Published As

Publication number Publication date
WO2019157923A1 (en) 2019-08-22
CN108447086A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
US9384596B2 (en) Visualization of obscured objects in 3D space
US6683608B2 (en) Seaming polygonal projections from subhemispherical imagery
US9766712B2 (en) Systems and methods for orienting a user in a map display
CN109993823A (en) Shading Rendering method, apparatus, terminal and storage medium
CN102117500B (en) Three-dimensional modeling method and system
US20180101931A1 (en) Apparatus and methods for the optimal stitch zone calculation of a generated projection of a spherical image
CN107146274B (en) Image data processing system, texture mapping compression method and method for generating panoramic video
US20180018807A1 (en) Method and apparatus for generating panoramic image with texture mapping
JP6672315B2 (en) Image generation device and image display control device
KR20180107271A (en) Method and apparatus for generating omni media texture mapping metadata
CN112370784B (en) Virtual scene display method, device, equipment and storage medium
CN110335333A (en) For efficiently rendering the method and system of skies gas effect figure in three-dimensional map
US5694531A (en) Method and apparatus for simulating movement in multidimensional space with polygonal projections
CN106558017B (en) Spherical display image processing method and system
US8675013B1 (en) Rendering spherical space primitives in a cartesian coordinate system
Jian et al. Augmented virtual environment: fusion of real-time video and 3D models in the digital earth system
US8059121B2 (en) Method and aircraft display system for generating three dimensional image
CN108447086B (en) A kind of Environment mapping method and device
CN113077541B (en) Virtual sky picture rendering method and related equipment
JP4980153B2 (en) Image display device and image display method
CN109214981B (en) Method for projecting spherical image to plane image
Böttger et al. Detail‐In‐Context Visualization for Satellite Imagery
CN114359456B (en) Picture pasting method and device, electronic equipment and readable storage medium
Ryoo et al. Full-view panoramic navigation using orthogonal cross cylinder
WO2023284503A1 (en) Tone mapping method and apparatus for panoramic image

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
GR01 Patent grant
GR01 Patent grant