CN106340056B - A kind of panorama rendering method and device - Google Patents

A kind of panorama rendering method and device Download PDF

Info

Publication number
CN106340056B
CN106340056B CN201610809433.0A CN201610809433A CN106340056B CN 106340056 B CN106340056 B CN 106340056B CN 201610809433 A CN201610809433 A CN 201610809433A CN 106340056 B CN106340056 B CN 106340056B
Authority
CN
China
Prior art keywords
scene
identification card
dimentional
sensor
dimension
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
CN201610809433.0A
Other languages
Chinese (zh)
Other versions
CN106340056A (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.)
Xunfei Dreamland (beijing) Technology Co Ltd
Original Assignee
Xunfei Dreamland (beijing) 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 Xunfei Dreamland (beijing) Technology Co Ltd filed Critical Xunfei Dreamland (beijing) Technology Co Ltd
Priority to CN201610809433.0A priority Critical patent/CN106340056B/en
Publication of CN106340056A publication Critical patent/CN106340056A/en
Application granted granted Critical
Publication of CN106340056B publication Critical patent/CN106340056B/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/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

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

Abstract

The present invention provides a kind of panorama rendering method and devices, belong to rendering field, it include: the two-dimentional identification card for obtaining user's selection, and two-dimentional identification card is placed in preset two dimension pretreatment scene, two-dimentional identification card has corresponding for rendering and showing the 3D scene of image to be rendered for obtaining image to be rendered, two dimension pretreatment scene;Identification is placed on the two-dimentional identification card in two dimension pretreatment scene, obtains the mark of two-dimentional identification card;According to the mark of obtained two-dimentional identification card, image to be rendered is determined;By the preset two-dimentional mark of identification card and the corresponding relationship of render style, the render style of image to be rendered is determined;Image to be rendered is placed into the corresponding 3D scene of two dimension pretreatment scene;3D scene is rendered according to determining render style, obtains rendering result.This method can efficiently quickly render scene, and can quickly replace render scenes according to the demand of user, improve the experience sense of user.

Description

A kind of panorama rendering method and device
Technical field
The present invention relates to 3D to render field, in particular to a kind of panorama rendering method and device.
Background technique
Currently, with augmented reality (Augmented Reality, AR) and virtual reality (Virtual Reality, VR) fast development, scene rendering is essential link in AR, VR technology, the requirement for scene rendering Also higher and higher.
It in the related technology, is that the object after rendering is then submitted into graphics process by rendering one by one to object Device draws the consistent object of rendering state by graphics processor, the scene after forming rendering.
In the actual operation process, repeatedly object is rendered, and repeatedly uploads to graphics processor, result in rendering It under efficiency, and needs to re-start repeatedly upload and graphics process again after converting scene, increases graphics processor Workload can not achieve Fast rendering so that the time totally expended is just long, reduce the experience sense of user.
Summary of the invention
In view of this, the embodiment of the present invention is designed to provide a kind of panorama rendering method and device, to improve panorama The efficiency of rendering simplifies the process of rendering processing, greatly facilitates the user's actions, increase the experience sense of user.
In a first aspect, the embodiment of the invention provides a kind of panorama rendering methods, which comprises
The two-dimentional identification card of user's selection is obtained, and the two-dimentional identification card is placed on to preset two dimension pretreatment scene In, the two dimension identification card has corresponding for rendering and opening up for obtaining image to be rendered, the two dimension pretreatment scene Show the 3D scene of the image to be rendered;
Identification is placed on the two-dimentional identification card in the two dimension pretreatment scene, obtains the mark of the two-dimentional identification card Know;
According to the mark of the obtained two-dimentional identification card, image to be rendered is determined;
By the preset two-dimentional mark of identification card and the corresponding relationship of render style, the image to be rendered is determined Render style, the render style, comprising: textures, texture and material, lighting effect and rendering scheme;
The image to be rendered is placed into the corresponding 3D scene of the two dimension pretreatment scene;
The 3D scene is rendered according to determining render style, obtains rendering result.
With reference to first aspect, the embodiment of the invention provides the first possible embodiments of first aspect, wherein will The image to be rendered is placed into the corresponding 3D scene of the two dimension pretreatment scene, comprising:
Obtain two-dimensional coordinate information of the two-dimentional identification card in two dimension pretreatment scene;
The two-dimensional coordinate information got is converted, obtains the image to be rendered in the 3D scene Three-dimensional relative co-ordinate information;
The image to be rendered is placed on the position of the instruction of three-dimensional relative co-ordinate information described in the 3D scene.
With reference to first aspect, the embodiment of the invention provides second of possible embodiments of first aspect, wherein obtains Take two-dimensional coordinate information of the two-dimentional identification card in two dimension pretreatment scene, comprising:
Two-dimensional coordinate information of the two-dimentional identification card in the two dimension pretreatment scene is obtained by following formula:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in the two-dimensional coordinate information, y indicate the ordinate in the two-dimensional coordinate information, Sensor_x indicates the horizontal distance of the two-dimentional identification card and the two dimension pretreatment scene origin, described in sensor_y expression The vertical range of two-dimentional identification card and the two dimension pretreatment scene origin, sensor_width indicate the two-dimentional preprocessing field The width of scape, the height of the pretreatment scene of two dimension described in sensor_height.
With reference to first aspect, the embodiment of the invention provides the third possible embodiments of first aspect, wherein institute State method further include:
When the two-dimentional identification card moves in the two dimension pretreatment scene, it is calculated by the following formula the two dimension The velocity of displacement information of identification card, the velocity of displacement information includes: horizontal direction speed, vertical speed and acceleration:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates to hang down Histogram is to speed, and m indicates that acceleration, sensor_dy indicate that unit time vertical direction changes coordinate, and sensor_width is indicated The width of the two dimension pretreatment scene, the height of the pretreatment scene of two dimension described in sensor_height, described in speed is indicated The current kinetic speed of two-dimentional identification card, last_speed indicate the movement velocity of the two-dimentional identification card last moment, dt table Show the unit time;
According to the velocity of displacement information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D Scene is moved.
With reference to first aspect, the embodiment of the invention provides the 4th kind of possible embodiments of first aspect, wherein institute State method further include:
When the two-dimentional identification card rotates in the two dimension pretreatment scene, it is calculated by the following formula the two dimension The rotation information of identification card, the rotation information includes: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that the two-dimentional identification card present rotation angel degree, last_a indicate the two-dimentional identification card last moment Angle is rotated, dt indicates the unit time, and PI indicates that pi, A indicate the rotation speed, and last_A indicates the last moment Rotation speed, r indicates the rotary acceleration;
According to the rotation information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D scene It is rotated.
Second aspect, the embodiment of the invention provides a kind of panorama rendering device, described device includes:
Two-dimentional identification card obtains module, puts for obtaining the two-dimentional identification card of user's selection, and by the two-dimentional identification card It sets in preset two dimension pretreatment scene, the two dimension identification card is for obtaining image to be rendered, the two dimension preprocessing field Scape has corresponding for rendering and showing the 3D scene of the image to be rendered;
Two-dimentional identification card identification module, the two dimension identification being placed in the two dimension pretreatment scene for identification Card obtains the mark of the two-dimentional identification card;
Image determining module is rendered, for the mark according to the obtained two-dimentional identification card, determines image to be rendered;
Render style determining module, for the mark pass corresponding with render style by the preset two-dimentional identification card System, determines the render style of the image to be rendered, the render style, comprising: textures, texture and material, lighting effect and wash with watercolours Dye scheme;
Image placement module is rendered, for the image to be rendered to be placed into the corresponding 3D of the two dimension pretreatment scene In scene;
Rendering module obtains rendering result for rendering according to determining render style to the 3D scene.
In conjunction with second aspect, the embodiment of the invention provides the first possible embodiments of second aspect, wherein institute Stating rendering image placement module includes:
Two-dimensional coordinate information acquiring unit is sat for obtaining two dimension of the two-dimentional identification card in two dimension pretreatment scene Mark information;
Two-dimensional coordinate information converting unit obtains described for converting to the two-dimensional coordinate information got Three-dimensional relative co-ordinate information of the image to be rendered in the 3D scene;
Image placement unit is rendered, three-dimensional described in the 3D scene is opposite to sit for the image to be rendered to be placed into On the position for marking information instruction.
In conjunction with second aspect, the embodiment of the invention provides second of possible embodiments of second aspect, wherein two Tieing up coordinate information acquiring unit includes:
Two-dimensional coordinate information computation subunit, it is pre- in the two dimension for obtaining the two-dimentional identification card by following formula Handle the two-dimensional coordinate information in scene:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in the two-dimensional coordinate information, y indicate the ordinate in the two-dimensional coordinate information, Sensor_x indicates the horizontal distance of the two-dimentional identification card and the two dimension pretreatment scene origin, described in sensor_y expression The vertical range of two-dimentional identification card and the two dimension pretreatment scene origin, sensor_width indicate the two-dimentional preprocessing field The width of scape, the height of the pretreatment scene of two dimension described in sensor_height.
In conjunction with second aspect, the embodiment of the invention provides the third possible embodiments of second aspect, wherein institute State device further include:
Velocity of displacement information computational module, for being moved in the two dimension pretreatment scene when the two-dimentional identification card When, it is calculated by the following formula the velocity of displacement information of the two-dimentional identification card, the velocity of displacement information includes: horizontal direction Speed, vertical speed and acceleration:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates to hang down Histogram is to speed, and m indicates that acceleration, sensor_dy indicate that unit time vertical direction changes coordinate, and sensor_width is indicated The width of the two dimension pretreatment scene, the height of the pretreatment scene of two dimension described in sensor_height, described in speed is indicated The current kinetic speed of two-dimentional identification card, last_speed indicate the movement velocity of the two-dimentional identification card last moment, dt table Show the unit time;
According to the velocity of displacement information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D Scene is moved.
In conjunction with second aspect, the embodiment of the invention provides the 4th kind of possible embodiments of second aspect, wherein institute State device further include:
Rotation information computing module, for leading to when the two-dimentional identification card rotates in the two dimension pretreatment scene The rotation information that following formula calculates the two-dimentional identification card is crossed, the rotation information includes: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that the two-dimentional identification card present rotation angel degree, last_a indicate the two-dimentional identification card last moment Angle is rotated, dt indicates the unit time, and PI indicates that pi, A indicate the rotation speed, and last_A indicates the last moment Rotation speed, r indicates the rotary acceleration;
According to the rotation information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D scene It is rotated.
A kind of panorama rendering method provided in an embodiment of the present invention and device, by identifying that the mark of two-dimentional identification card determines Image to be rendered, then determine render style by the mark of two-dimentional identification card and the corresponding relationship of render style, then will be to The image of rendering is placed in the corresponding 3D scene of two dimension pretreatment scene, is rendered to 3D scene, compared with prior art, This method can efficiently quickly render scene, and can quickly replace render scenes according to the demand of user, Greatly improve the experience sense of user.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow chart of panorama rendering method provided by the embodiment of the present invention;
Fig. 2 shows a kind of structural schematic diagrams of panorama rendering device provided by the embodiment of the present invention;
In attached drawing 2, parts list represented by the reference numerals are as follows:
20: two-dimentional identification card acquisition module, 21: two-dimentional identification card identification module,
22: rendering image determining module, 23: render style determining module,
24: rendering image placement module, 25: rendering module.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
In view of in the related technology, being that the object after rendering is then submitted to figure by rendering one by one to object Shape processor draws the consistent object of rendering state by graphics processor, the scene after forming rendering.In practical behaviour During work, repeatedly object is rendered, and repeatedly uploads to graphics processor, is resulted under rendering efficiency, and It needs to re-start repeatedly upload and graphics process after transformation scene again, increases the workload of graphics processor, so that overall The time of consuming is just long, can not achieve Fast rendering, reduces the experience sense of user.Based on this, the embodiment of the present invention is mentioned A kind of panorama rendering method and device have been supplied, has been described below by embodiment.
Embodiment 1
The panorama rendering method that the present embodiment proposes selects two-dimentional identification card by obtaining user, two-dimentional identification card is put The mark render style corresponding with the mark for identifying two-dimentional identification card in two-dimensional process scene is set, and is placed into corresponding 3D In scene, which is rendered, rendering to scene rapidly and efficiently may be implemented, and scene may be implemented It is switched fast, increases the experience sense of user.
Referring to Fig. 1, the present embodiment provides a kind of panorama rendering methods, this method comprises:
Step 100, the two-dimentional identification card of user's selection is obtained, and two-dimentional identification card is placed on preset two dimension and is pre-processed In scene, two-dimentional identification card for obtaining image to be rendered, two dimension pretreatment scene have it is corresponding for render and show to Render the 3D scene of image.
In step 100, two-dimentional identification card is placed in preset two dimension pretreatment scene, to obtain image to be rendered 3D scene is rendered, wherein two dimension pretreatment scene is finishes in advance, and preset 2 d plane picture.
Step 101, identification is placed on the two-dimentional identification card in two dimension pretreatment scene, obtains the mark of two-dimentional identification card.
Wherein, the mark of the two dimension identification card plays a part of label to two-dimentional identification card, by being somebody's turn to do in render process Mark is called two-dimentional identification card.
Step 102, according to the mark of obtained two-dimentional identification card, image to be rendered is determined.
Because two-dimentional identification card mark has label effect to the two dimension identification card, by calling two-dimentional identification card mark to be It can obtain the mark and correspond to image to be rendered, to meet the needs of rendering to scene, wherein image to be rendered includes should be to Render the structural information of image.
Step 103, by the preset two-dimentional mark of identification card and the corresponding relationship of render style, image to be rendered is determined Render style, render style, comprising: textures, texture and material, lighting effect and rendering scheme.
The mark of two-dimentional identification card is being initially that can be endowed a scheduled style, needs to switch render scenes in client When the render style can be replaced, to realize requirement of the user to rendering.
Step 104, image to be rendered is placed into the corresponding 3D scene of two dimension pretreatment scene.
Step 104 specifically includes step (1) to step (3):
(1) two-dimensional coordinate information of the two-dimentional identification card in two dimension pretreatment scene is obtained;
(2) two-dimensional coordinate information got is converted, it is opposite obtains three-dimensional of the image to be rendered in 3D scene Coordinate information;
(3) image to be rendered is placed into 3D scene on the position of three-dimensional relative co-ordinate information instruction.
Wherein, step (1) specifically includes:
Two-dimensional coordinate information of the two-dimentional identification card in two dimension pretreatment scene is obtained by following formula:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in two-dimensional coordinate information, y indicate the ordinate in two-dimensional coordinate information, sensor_x Indicate the horizontal distance of two-dimentional identification card and two dimension pretreatment scene origin, sensor_y indicates two-dimentional identification card and the pre- place of two dimension The vertical range of scene origin is managed, sensor_width indicates the width of two dimension pretreatment scene, and sensor_height two dimension is pre- Handle the height of scene.
Step 105,3D scene is rendered according to determining render style, obtains rendering result.
Wherein, step 105 is quickly rendered according to the 3D scene more than determining render style, to meet user to complete Scape Fast rendering demand, improves rendering efficiency.
In addition to this, this method further include: when two-dimentional identification card moves in two dimension pretreatment scene, pass through following public affairs Formula calculates the velocity of displacement information of two-dimentional identification card, and velocity of displacement information includes: horizontal direction speed, vertical speed and adds Speed:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates to hang down Histogram is to speed, and m indicates that acceleration, sensor_dy indicate that unit time vertical direction changes coordinate, and sensor_width is indicated The width of two dimension pretreatment scene, sensor_height two dimension pre-process the height of scene, and speed indicates two-dimentional identification card Current kinetic speed, last_speed indicate the movement velocity of two-dimentional identification card last moment, and dt indicates the unit time;
According to the velocity of displacement information of obtained two-dimentional identification card, controls image to be rendered and moved in 3D scene.
When two-dimentional identification card rotates in two dimension pretreatment scene, it is calculated by the following formula the rotation of two-dimentional identification card Information, rotation information include: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that two-dimentional identification card present rotation angel degree, last_a indicate two-dimentional identification card last moment rotation angle Degree, dt indicate the unit time, and PI indicates that pi, A indicate rotation speed, and last_A indicates the rotation speed of last moment, r table Show rotary acceleration;
According to the rotation information of obtained two-dimentional identification card, controls image to be rendered and rotated in 3D scene.
When being changed according to user demand to the scene after rendering, can be operated by movement, rotation etc. to rendering Scene is changed, and when moving in two dimension pretreatment scene and rotate two-dimentional identification card, is also synchronized in corresponding 3D scene It is moved and is rotated, to achieve the purpose that quick scene change.
In conclusion the present embodiment provides a kind of panorama rendering method, by identify the mark of two-dimentional identification card determine to The image of rendering, then render style is determined by the mark of two-dimentional identification card and the corresponding relationship of render style, it then will be to wash with watercolours The image of dye is placed in the corresponding 3D scene of two dimension pretreatment scene, is rendered to 3D scene, compared with prior art, should Method can efficiently quickly render scene, and can quickly replace render scenes according to the demand of user, greatly The big experience sense for improving user.
Embodiment 2
Referring to fig. 2, the present embodiment provides panorama rendering device, device includes:
Two-dimentional identification card obtains module 20, for obtaining the two-dimentional identification card of user's selection, and two-dimentional identification card is placed In preset two dimension pretreatment scene, for obtaining image to be rendered, two dimension pretreatment scene has to be corresponded to two-dimentional identification card For rendering and showing the 3D scene of image to be rendered;
Two-dimentional identification card identification module 21, the two-dimentional identification card being placed in two dimension pretreatment scene for identification, obtains The mark of two-dimentional identification card;
Image determining module 22 is rendered, for the mark according to obtained two-dimentional identification card, determines image to be rendered;
Render style determining module 23, for the mark pass corresponding with render style by preset two-dimentional identification card System, determines the render style of image to be rendered, render style, comprising: textures, texture and material, lighting effect and rendering scheme;
Image placement module 24 is rendered, for image to be rendered to be placed into the corresponding 3D scene of two dimension pretreatment scene In;
Rendering module 25 obtains rendering result for rendering according to determining render style to 3D scene.
Rendering image placement module 24 includes:
Two-dimensional coordinate information acquiring unit, for obtaining two-dimensional coordinate letter of the two-dimentional identification card in two dimension pretreatment scene Breath;
Two-dimensional coordinate information converting unit obtains figure to be rendered for converting to the two-dimensional coordinate information got As the three-dimensional relative co-ordinate information in 3D scene;
Image placement unit is rendered, for image to be rendered to be placed into three-dimensional relative co-ordinate information instruction in 3D scene On position.
Two-dimensional coordinate information acquiring unit includes:
Two-dimensional coordinate information computation subunit pre-processes scene in two dimension for obtaining two-dimentional identification card by following formula In two-dimensional coordinate information:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in two-dimensional coordinate information, y indicate the ordinate in two-dimensional coordinate information, sensor_x Indicate the horizontal distance of two-dimentional identification card and two dimension pretreatment scene origin, sensor_y indicates two-dimentional identification card and the pre- place of two dimension The vertical range of scene origin is managed, sensor_width indicates the width of two dimension pretreatment scene, and sensor_height two dimension is pre- Handle the height of scene.
Device further include: velocity of displacement information computational module, for being moved in two dimension pretreatment scene when two-dimentional identification card When dynamic, be calculated by the following formula the velocity of displacement information of two-dimentional identification card, velocity of displacement information include: horizontal direction speed, Vertical speed and acceleration:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates to hang down Histogram is to speed, and m indicates that acceleration, sensor_dy indicate that unit time vertical direction changes coordinate, and sensor_width is indicated The width of two dimension pretreatment scene, sensor_height two dimension pre-process the height of scene, and speed indicates two-dimentional identification card Current kinetic speed, last_speed indicate the movement velocity of two-dimentional identification card last moment, and dt indicates the unit time;
According to the velocity of displacement information of obtained two-dimentional identification card, controls image to be rendered and moved in 3D scene.
Device further include: rotation information computing module, for when two-dimentional identification card two dimension pretreatment scene in rotate when, It is calculated by the following formula the rotation information of two-dimentional identification card, rotation information includes: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that two-dimentional identification card present rotation angel degree, last_a indicate two-dimentional identification card last moment rotation angle Degree, dt indicate the unit time, and PI indicates that pi, A indicate rotation speed, and last_A indicates the rotation speed of last moment, r table Show rotary acceleration;
According to the rotation information of obtained two-dimentional identification card, controls image to be rendered and rotated in 3D scene.
In conclusion a kind of panorama rendering device provided in this embodiment, by identifying that the mark of two-dimentional identification card determines Image to be rendered, then determine render style by the mark of two-dimentional identification card and the corresponding relationship of render style, then will be to The image of rendering is placed in the corresponding 3D scene of two dimension pretreatment scene, is rendered to 3D scene, compared with prior art, This method can efficiently quickly render scene, and can quickly replace render scenes according to the demand of user, Greatly improve the experience sense of user.
The computer program product of panorama rendering method provided by the embodiment of the present invention, including storing program code Computer readable storage medium, the instruction that program code includes can be used for executing the method in previous methods embodiment, specific real Now reference can be made to embodiment of the method, details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of panorama rendering method, which is characterized in that the described method includes:
The two-dimentional identification card of user's selection is obtained, and the two-dimentional identification card is placed in preset two dimension pretreatment scene, The two dimension identification card has corresponding for rendering and showing institute for obtaining image to be rendered, the two dimension pretreatment scene State the 3D scene of image to be rendered;
Identification is placed on the two-dimentional identification card in the two dimension pretreatment scene, obtains the mark of the two-dimentional identification card;
According to the mark of the obtained two-dimentional identification card, image to be rendered is determined;
By the preset two-dimentional mark of identification card and the corresponding relationship of render style, the wash with watercolours of the image to be rendered is determined Contaminate style, the render style, comprising: textures, texture and material, lighting effect and rendering scheme;
The image to be rendered is placed into the corresponding 3D scene of the two dimension pretreatment scene;
The 3D scene is rendered according to determining render style, obtains rendering result.
2. panorama rendering method according to claim 1, which is characterized in that the image to be rendered is placed into described two In the corresponding 3D scene of dimension pretreatment scene, comprising:
Obtain two-dimensional coordinate information of the two-dimentional identification card in two dimension pretreatment scene;
The two-dimensional coordinate information got is converted, three-dimensional of the image to be rendered in the 3D scene is obtained Relative co-ordinate information;
The image to be rendered is placed on the position of the instruction of three-dimensional relative co-ordinate information described in the 3D scene.
3. panorama rendering method according to claim 2, which is characterized in that obtain the two-dimentional identification card at two-dimentional pre- place Manage the two-dimensional coordinate information in scene, comprising:
Two-dimensional coordinate information of the two-dimentional identification card in the two dimension pretreatment scene is obtained by following formula:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in the two-dimensional coordinate information, y indicate the ordinate in the two-dimensional coordinate information, Sensor_x indicates the horizontal distance of the two-dimentional identification card and the two dimension pretreatment scene origin, described in sensor_y expression The vertical range of two-dimentional identification card and the two dimension pretreatment scene origin, sensor_width indicate the two-dimentional preprocessing field The width of scape, the height of the pretreatment scene of two dimension described in sensor_height.
4. panorama rendering method according to claim 1, which is characterized in that the method also includes:
When the two-dimentional identification card moves in the two dimension pretreatment scene, it is calculated by the following formula the two dimension identification The velocity of displacement information of card, the velocity of displacement information includes: horizontal direction speed, vertical speed and acceleration:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates Vertical Square To speed, m indicates acceleration, and sensor_dy indicates that unit time vertical direction changes coordinate, described in sensor_width expression Two dimension pre-processes the width of scene, the height of the pretreatment scene of two dimension described in sensor_height, and speed indicates the two dimension The current kinetic speed of identification card, last_speed indicate the movement velocity of the two-dimentional identification card last moment, and dt indicates single The position time;
According to the velocity of displacement information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D scene It is moved.
5. panorama rendering method according to claim 1, which is characterized in that the method also includes:
When the two-dimentional identification card rotates in the two dimension pretreatment scene, it is calculated by the following formula the two dimension identification The rotation information of card, the rotation information includes: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that the two-dimentional identification card present rotation angel degree, last_a indicate the two-dimentional identification card last moment rotation Angle, dt indicate the unit time, and PI indicates that pi, A indicate the rotation speed, and last_A indicates the rotation of the last moment Rotary speed, r indicate the rotary acceleration;
According to the rotation information of the obtained two-dimentional identification card, controls the image to be rendered and carried out in the 3D scene Rotation.
6. a kind of panorama rendering device, which is characterized in that described device includes:
Two-dimentional identification card obtains module, is placed on for obtaining the two-dimentional identification card of user's selection, and by the two-dimentional identification card In preset two dimension pretreatment scene, the two dimension identification card is for obtaining image to be rendered, the two dimension pretreatment scene tool Have corresponding for rendering and showing the 3D scene of the image to be rendered;
Two-dimentional identification card identification module, the two-dimentional identification card being placed in the two dimension pretreatment scene for identification, obtains To the mark of the two-dimentional identification card;
Image determining module is rendered, for the mark according to the obtained two-dimentional identification card, determines image to be rendered;
Render style determining module, for by the preset two-dimentional mark of identification card and the corresponding relationship of render style, Determine the render style of the image to be rendered, the render style, comprising: textures, texture and material, lighting effect and rendering side Case;
Image placement module is rendered, for the image to be rendered to be placed into the corresponding 3D scene of the two dimension pretreatment scene In;
Rendering module obtains rendering result for rendering according to determining render style to the 3D scene.
7. panorama rendering device according to claim 6, which is characterized in that the rendering image placement module includes:
Two-dimensional coordinate information acquiring unit, for obtaining two-dimensional coordinate letter of the two-dimentional identification card in two dimension pretreatment scene Breath;
Two-dimensional coordinate information converting unit obtains described to wash with watercolours for converting to the two-dimensional coordinate information got Contaminate three-dimensional relative co-ordinate information of the image in the 3D scene;
Image placement unit is rendered, for the image to be rendered to be placed into the letter of three-dimensional relative coordinate described in the 3D scene On the position for ceasing instruction.
8. panorama rendering device according to claim 7, which is characterized in that two-dimensional coordinate information acquiring unit includes:
Two-dimensional coordinate information computation subunit is pre-processed for obtaining the two-dimentional identification card by following formula in the two dimension Two-dimensional coordinate information in scene:
X=sensor_x/sensor_width
Y=sensor_y/sensor_height;
Wherein, x indicates that the abscissa in the two-dimensional coordinate information, y indicate the ordinate in the two-dimensional coordinate information, Sensor_x indicates the horizontal distance of the two-dimentional identification card and the two dimension pretreatment scene origin, described in sensor_y expression The vertical range of two-dimentional identification card and the two dimension pretreatment scene origin, sensor_width indicate the two-dimentional preprocessing field The width of scape, the height of the pretreatment scene of two dimension described in sensor_height.
9. panorama rendering device according to claim 6, which is characterized in that described device further include:
Velocity of displacement information computational module, for leading to when the two-dimentional identification card moves in the two dimension pretreatment scene Cross the velocity of displacement information that following formula calculates the two-dimentional identification card, the velocity of displacement information include: horizontal direction speed, Vertical speed and acceleration:
X=(sensor_dx/sensor_width)/dt
Y=(sensor_dy/sensor_height)/dt
M=(speed-last_speed)/dt,
Wherein, X indicates horizontal direction speed, and sensor_dx indicates that unit time horizontal direction changes coordinate, and Y indicates Vertical Square To speed, m indicates acceleration, and sensor_dy indicates that unit time vertical direction changes coordinate, described in sensor_width expression Two dimension pre-processes the width of scene, the height of the pretreatment scene of two dimension described in sensor_height, and speed indicates the two dimension The current kinetic speed of identification card, last_speed indicate the movement velocity of the two-dimentional identification card last moment, and dt indicates single The position time;
According to the velocity of displacement information of the obtained two-dimentional identification card, the image to be rendered is controlled in the 3D scene It is moved.
10. panorama rendering device according to claim 6, which is characterized in that described device further include:
Rotation information computing module, for when the two-dimentional identification card rotates in the two dimension pretreatment scene, by with Lower formula calculates the rotation information of the two-dimentional identification card, and the rotation information includes: rotation speed and rotary acceleration:
A=((a-last_a)/2*PI)/dt
R=(A-last_A)/dt,
Wherein, a indicates that the two-dimentional identification card present rotation angel degree, last_a indicate the two-dimentional identification card last moment rotation Angle, dt indicate the unit time, and PI indicates that pi, A indicate the rotation speed, and last_A indicates the rotation of the last moment Rotary speed, r indicate the rotary acceleration;
According to the rotation information of the obtained two-dimentional identification card, controls the image to be rendered and carried out in the 3D scene Rotation.
CN201610809433.0A 2016-09-07 2016-09-07 A kind of panorama rendering method and device Active CN106340056B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610809433.0A CN106340056B (en) 2016-09-07 2016-09-07 A kind of panorama rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610809433.0A CN106340056B (en) 2016-09-07 2016-09-07 A kind of panorama rendering method and device

Publications (2)

Publication Number Publication Date
CN106340056A CN106340056A (en) 2017-01-18
CN106340056B true CN106340056B (en) 2019-06-18

Family

ID=57823905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610809433.0A Active CN106340056B (en) 2016-09-07 2016-09-07 A kind of panorama rendering method and device

Country Status (1)

Country Link
CN (1) CN106340056B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109675321B (en) * 2018-12-18 2022-02-15 网易(杭州)网络有限公司 Method and device for controlling number of people displayed on same screen in game
CN114730482A (en) * 2019-11-27 2022-07-08 Oppo广东移动通信有限公司 Device coordinate system in associated multi-person augmented reality system
CN112619154A (en) * 2020-12-28 2021-04-09 网易(杭州)网络有限公司 Processing method and device of virtual model and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201123083A (en) * 2009-12-29 2011-07-01 Univ Nat Taiwan Science Tech Method and system for providing augmented reality based on marker tracing, and computer program product thereof
CN103049728A (en) * 2012-12-30 2013-04-17 成都理想境界科技有限公司 Method, system and terminal for augmenting reality based on two-dimension code
CN103971079A (en) * 2013-01-28 2014-08-06 腾讯科技(深圳)有限公司 Augmented reality implementation method and device of two-dimensional code
CN105894570A (en) * 2015-12-01 2016-08-24 乐视致新电子科技(天津)有限公司 Virtual reality scene modeling method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100927009B1 (en) * 2008-02-04 2009-11-16 광주과학기술원 Haptic interaction method and system in augmented reality

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201123083A (en) * 2009-12-29 2011-07-01 Univ Nat Taiwan Science Tech Method and system for providing augmented reality based on marker tracing, and computer program product thereof
CN103049728A (en) * 2012-12-30 2013-04-17 成都理想境界科技有限公司 Method, system and terminal for augmenting reality based on two-dimension code
CN103971079A (en) * 2013-01-28 2014-08-06 腾讯科技(深圳)有限公司 Augmented reality implementation method and device of two-dimensional code
CN105894570A (en) * 2015-12-01 2016-08-24 乐视致新电子科技(天津)有限公司 Virtual reality scene modeling method and device

Also Published As

Publication number Publication date
CN106340056A (en) 2017-01-18

Similar Documents

Publication Publication Date Title
CN106355153B (en) A kind of virtual objects display methods, device and system based on augmented reality
CN108875633B (en) Expression detection and expression driving method, device and system and storage medium
US7440691B2 (en) 360-° image photographing apparatus
US8797328B2 (en) Automatic generation of 3D character animation from 3D meshes
CN108629843B (en) Method and equipment for realizing augmented reality
CN105094335B (en) Situation extracting method, object positioning method and its system
CN106340056B (en) A kind of panorama rendering method and device
US20130127827A1 (en) Multiview Face Content Creation
CN104680532B (en) A kind of object marking method and device
CN105701828B (en) A kind of image processing method and device
EP2647305A1 (en) Method for virtually trying on footwear
EP3921801B1 (en) Creating training data variability in machine learning for object labelling from images
CN112070782A (en) Method and device for identifying scene contour, computer readable medium and electronic equipment
JP2021136017A5 (en)
CN106886758B (en) Insect identification device and method based on 3 d pose estimation
CN112274926A (en) Virtual character reloading method and device
CN111897422A (en) Real object interaction method and system for real-time fusion of virtual and real objects
JPWO2022102476A5 (en)
CN111179341B (en) Registration method of augmented reality equipment and mobile robot
CN110520904A (en) Display control unit, display control method and program
CN115063485A (en) Three-dimensional reconstruction method, device and computer-readable storage medium
Gang et al. Research on tujia brocade craft visualization based on unmarked motion capture technique
CN113724329A (en) Object attitude estimation method, system and medium fusing plane and stereo information
CN113486941A (en) Live image training sample generation method, model training method and electronic equipment
CN113011327A (en) Three-dimensional graph recognition method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant