CN114327329A - Curved surface display method and equipment for image - Google Patents
Curved surface display method and equipment for image Download PDFInfo
- Publication number
- CN114327329A CN114327329A CN202111511889.6A CN202111511889A CN114327329A CN 114327329 A CN114327329 A CN 114327329A CN 202111511889 A CN202111511889 A CN 202111511889A CN 114327329 A CN114327329 A CN 114327329A
- Authority
- CN
- China
- Prior art keywords
- display screen
- curved surface
- drawn
- vertexes
- surface display
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000013507 mapping Methods 0.000 claims abstract description 25
- 230000006870 function Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 15
- 238000009877 rendering Methods 0.000 claims description 7
- 230000000694 effects Effects 0.000 abstract description 16
- 238000010586 diagram Methods 0.000 description 18
- 230000000007 visual effect Effects 0.000 description 9
- 238000003860 storage Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000009826 distribution Methods 0.000 description 4
- 210000001508 eye Anatomy 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 210000005252 bulbus oculi Anatomy 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The application relates to the technical field of VR (virtual reality), and provides a curved surface display method and equipment of an image, wherein the length-width ratio of a curved surface display screen to be drawn, the resolution of a plane image and the view size of a UI (user interface) camera in an orthogonal mode are respectively configured based on preset UI interface resolution, so that a mapping relation between the curved surface display screen to be drawn and the plane image is established, the view size of the UI camera is configured, the curved surface display screen to be drawn can be full of the view of the whole camera, and a user can be ensured not to see images outside the curved surface display screen; and then, on the basis of a plane display screen, generating a plurality of triangular patches through vertex interpolation, determining two-dimensional coordinates of each vertex on the curved surface display screen to be drawn by utilizing a trigonometric function relation aiming at two adjacent vertexes on the same edge in each triangular patch, and drawing the curved surface display screen based on the two-dimensional coordinates of each vertex, thereby realizing the curved surface display effect of the UI interface in the VR equipment.
Description
Technical Field
The application relates to the technical field of display, in particular to the technical field of Virtual Reality (VR), and provides a curved surface display method and equipment for an image.
Background
The development of VR applications mainly uses a Unity engine, and a User Interface (UI) of VR applications is mainly developed by using a graphics processor (abbreviated as UGUI) in the Unity engine. However, UGUI provides a flat display effect for mobile-end applications, and does not provide a special curved display effect for VT applications.
At present, the VR application mostly adopts a common flat display screen to display a UI interface, and in order to fit the visual habit of human eyes, the optimization of the visual effect is performed by rotating the angle of the flat display screen. However, this approach has limitations on the size of the display screen; moreover, for the display of the UI interface of the integrated wide display screen, the UI interface cannot be visually displayed well by the rotation angle, and the UI interface needs to be split into a plurality of sub-display screens, which is complicated and has poor display effect.
Disclosure of Invention
The embodiment of the application provides a curved surface display method and equipment for an image, which are used for achieving a curved surface display effect of a UI (user interface) in VR (virtual reality) equipment.
In one aspect, an embodiment of the present application provides a curved surface display method for an image, which is applied to a VR device, where the VR device includes a UI camera, and the method includes:
determining the length-width ratio of a curved surface display screen to be drawn and the resolution of a planar image displayed by the VR equipment according to a preset UI interface resolution, so as to obtain a mapping relation between the curved surface display screen to be drawn and the planar image;
according to the UI interface resolution, adjusting the view size of the UI camera in an orthogonal mode so that the curved screen to be drawn can fill the whole camera view;
drawing a curved surface display screen according to the plane display screen of the plane image;
and rendering and displaying the plane image on the drawn curved surface display screen according to the mapping relation.
In another aspect, an embodiment of the present application provides a virtual reality VR device, including a processor, a memory, and a UI camera, where the memory and the UI camera are connected to the processor through a bus;
the UI camera is used for acquiring a plane image displayed by the VR equipment; the memory stores a computer program, and the processor performs the following operations according to the computer program:
determining the length-width ratio of a curved surface display screen to be drawn and the resolution of the planar image according to a preset UI interface resolution, and obtaining a mapping relation between the curved surface display screen to be drawn and the planar image;
according to the UI interface resolution, adjusting the view size of the UI camera in an orthogonal mode so that the curved screen to be drawn can fill the whole camera view;
drawing a curved surface display screen according to the plane display screen of the plane image;
and rendering the plane image on the drawn curved surface display screen for display according to the mapping relation.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to enable a computer to execute the curved surface display method for an image provided in the embodiment of the present application.
In the embodiment of the application, the length-width ratio of the curved surface display screen to be drawn, the resolution of the planar image and the view field size of the UI camera in the orthogonal mode are respectively determined according to the preset UI interface resolution, so that a mapping relation between the curved surface display screen to be drawn and the planar image is established on the basis of the UI interface, the curved surface display screen to be drawn can fill the whole camera view field, and the user can be ensured not to see images outside the curved surface display screen; furthermore, a curved surface display screen is drawn based on the flat surface display screen of the flat image, and the flat image is rendered and displayed on the drawn curved surface display screen according to the established mapping relation, so that the curved surface display effect of the UI interface in the VR equipment is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is an overall frame diagram for displaying a curved image according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a curved surface display method for an image according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a drawing method of a curved display screen according to an embodiment of the present disclosure;
fig. 4A is a schematic diagram illustrating a planar display effect of an image according to an embodiment of the present application;
FIG. 4B is a schematic view of a vertex distribution of a flat panel display according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a vertex distribution of a flat panel display screen according to an embodiment of the present disclosure after being updated;
FIG. 6 is a schematic diagram of a vertex interpolation process provided in the embodiments of the present application;
fig. 7 is a schematic diagram of a plurality of triangular patches generated by each vertex according to an embodiment of the present disclosure;
fig. 8 is a flowchart of a method for determining coordinates of each vertex on a curved display screen to be rendered according to the present application;
fig. 9 is a schematic diagram of a coordinate calculation method for each vertex on a curved display screen to be drawn according to an embodiment of the present application;
FIG. 10 is a top view of a curved display screen rendered according to an embodiment of the present application;
fig. 11 is a schematic view illustrating a curved surface display effect of a planar image according to an embodiment of the present application;
fig. 12 is a flowchart of a method for implementing an UI interface interaction function in a curved display screen according to an embodiment of the present application;
fig. 13 is a block diagram of a VR device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a curved surface display method and equipment for an image, which are used for bending a plane through a custom algorithm on the premise of not splitting a display panel to obtain a curved surface display screen, so that a video and the image are displayed through the curved surface display screen. Because the eyeballs of the people are in a convex state with radian, the radian of the curved surface display screen can ensure that the distance between the eyes and each pixel point on the display screen is equal, so that better visual sensory experience is brought; in addition, the edge of the curved display screen is slightly bent towards the user and can be closer to the eyes of the user, so that the user at the edge and the user at the center of the curved display screen can achieve the same viewing angle, and a wider visual field is brought to the user.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the technical solutions of the present application. All other embodiments obtained by a person skilled in the art without any inventive step based on the embodiments described in the present application are within the scope of the protection of the present application.
As shown in fig. 1, the overall framework diagram for displaying a curved surface image provided in the embodiment of the present application includes a configuration module 100, an image association module 200, a curved surface display screen drawing module 300, and an image display module 400.
The configuration module 100 is configured to configure a UI camera in the VR device, a RenderTexture in the Unity engine, and a length-width ratio of the curved surface display screen to be drawn, respectively, based on a preset UI interface. Specifically, when the UI camera is configured, the projection mode of the UI camera is adjusted to an orthogonal mode (orthogonal), and a view space in the orthogonal mode is a cube, so that the problem that a collected plane image has no big or small size can be solved, and a size parameter for controlling the view size of the UI camera is set, so that the curved screen to be drawn can fill the view of the whole camera, and it is ensured that a user cannot see an image outside the curved display screen; the RenderTexture is used for receiving a plane image collected by the UI camera, setting a size parameter as the resolution of the UI interface when the RenderTexture is configured, and configuring basic parameters such as ColorFormat and the like; and when the length-width ratio of the curved surface display screen to be drawn is configured, the length-width ratio is equal to the horizontal-vertical ratio of the resolution of the UI.
Optionally, in some embodiments, when the RenderTexture is configured, the MipMaps may also be turned on to prevent the problem of high-definition image flicker caused when the original resolution of the planar image captured by the UI camera is inconsistent with the resolution of the UI interface.
With the above configuration, the image association module 200 may establish a mapping relationship between the curved display screen to be drawn and the planar image, where the mapping relationship specifically includes: the length-width ratio of the curved surface display screen to be drawn is equal to the ratio of the horizontal and vertical resolutions of the plane image.
And the curved surface display screen drawing module 300 is used for drawing the Mesh vertex by a self-defined curved surface display screen drawing method on the basis of the plane display screen to generate the curved surface display screen.
And the image display module 400 is configured to render and display a planar image on the drawn curved surface display screen according to a mapping relationship between the curved surface display screen to be drawn and the planar image.
Based on the overall block diagram shown in fig. 1, a flow of a curved surface display method of an image according to an embodiment of the present application is shown in fig. 2, and as shown in fig. 2, the flow is executed by a VR device and mainly includes the following steps:
s201: and determining the length-width ratio of the curved surface display screen to be drawn and the resolution of the planar image displayed by the VR equipment according to the preset UI interface resolution, so as to obtain the mapping relation between the curved surface display screen to be drawn and the planar image.
For example, assuming that the resolution of the UI interface is 3500 × 1200 (pixels), it is determined that the length-to-width ratio of the curved display screen to be drawn is 3.5: 1.2, and the size parameter in RenderTexture is set to 3500 × 1200, so that RenderTexture adjusts the resolution of each of the planar images captured by the UI camera to 3500 × 1200 (pixels), thereby ensuring that the display screen ratio is not distorted when the curved display screen is subsequently rendered according to the planar images.
In S201, the length-width ratio of the curved display screen to be drawn and the horizontal-vertical resolution ratio of the planar image are in one-to-one correspondence with each other through the preset UI interface resolution, so as to obtain the mapping relationship between the curved display screen to be drawn and the planar image.
The planar image may be an image of the VR device itself (e.g., a power-on interface), or may be an image displayed in an Application (Application) installed in the VR device.
S202: and adjusting the view field size of the UI camera in the orthogonal mode according to the UI interface resolution, so that the curved screen to be drawn can fill the whole camera view field.
In the embodiment of the present application, when S202 is executed, first, the projection mode of the UI camera is adjusted to an orthogonal mode, where a view space is a cube in the mode, so as to ensure that a planar image acquired by the UI camera does not have a problem of large or small size; then, the size parameter of the UI camera is set, so that the curved screen to be drawn can fill the whole camera view, and the user can not see images outside the curved display screen.
For example, the length-width ratio of the curved display screen to be drawn is 3.5: 1.2, and the size parameter of the UI camera is set to be 1.2.
S203: and drawing a curved surface display screen according to the plane display screen of the plane image.
The Unity engine renders a flat display screen for the flat image obtained by the render texture, which can achieve the effect of flat display, as shown in fig. 4A. In order to achieve the display effect of the curved surface image, in the embodiment of the application, a plurality of vertexes are drawn by a self-defined curved surface display screen drawing method in Mesh class based on four vertexes on a plane display screen, so as to generate the curved surface display screen, and the specific drawing process is as shown in fig. 3:
s2031: and adjusting indexes of four vertexes on the flat display screen so that the adjusted vertex arrangement rule meets the drawing condition of the curved display screen.
Typically, a flat display screen drawn by the Unity engine contains four vertices, consisting of two triangles, as shown in FIG. 4B. In order to draw a curved surface display screen, more vertexes are needed to be obtained on the basis of four vertexes to form more triangles, so that the effect of the curved surface is pieced together.
As shown in fig. 4B, the index of the top left vertex is 3, the index of the bottom left vertex is 0, the index of the bottom right vertex is 2, and the index of the top right vertex is 1, that is, the default vertex distribution regularity is not obvious, and it is difficult to determine the coordinates of the user-defined vertex, so in S2031, the arrangement of the four vertices on the planar display screen is adjusted, so that the adjusted vertex arrangement regularity meets the drawing condition of the curved display screen.
In an alternative embodiment, when S2031 is executed, the vertex with index 0 is moved to the upper left corner, the vertex with index 1 is moved to the lower left corner, the vertex with index 2 is moved to the upper right corner, and the vertex with index 3 is moved to the lower right corner, that is, the index numbers of the 4 vertices are sequentially increased counterclockwise, and the adjusted vertex distribution is shown in fig. 5.
S2032: and respectively carrying out interpolation between two vertexes of the upper edge and the lower edge of the flat display screen to obtain a plurality of vertexes of the upper edge and the lower edge of the curved display screen to be drawn.
In the embodiment of the application, four vertexes of the flat display screen can be used as basic vertexes for drawing the curve display screen, after the positions (coordinates) of the basic vertexes are determined, interpolation is respectively carried out between two vertexes of the upper edge and the lower edge of the flat display screen, namely, interpolation is carried out between two basic vertexes of the upper edge and the lower edge respectively, a plurality of vertexes on the upper edge and the lower edge of the curved display screen to be drawn are obtained, and two-dimensional coordinates of each vertex after interpolation are recorded.
The vertex interpolation process is as shown in fig. 6, and interpolation is performed between vertex 0 and vertex 2 to obtain all vertices of the upper edge of the curved display screen to be drawn, and interpolation is performed between vertex 1 and vertex 3 to obtain all vertices of the lower edge of the curved display screen to be drawn. The more the number of the vertexes of the interpolation is, the smoother the radian of the drawn curved display screen is, but the corresponding rendering pressure is increased. Optionally, the embodiment of the present application uses 130 vertices (including vertices 0, 1, 2, and 3) to complete the drawing of the curved surface.
S2033: and generating each triangular patch according to a plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn.
After obtaining each vertex on the upper edge and the lower edge of the curved surface to be drawn through interpolation, the drawing effect can be finally shown only by finishing the drawing of the triangular patch by using the vertex. According to the drawing algorithm of the triangular patch, only one triangular patch can be drawn by three vertexes, and two vertexes are shared by adjacent triangular patches.
The schematic diagram of the triangular patch generated by each vertex provided in the embodiment of the present application is shown in fig. 7, and 65 triangular patches can be drawn by 130 vertices.
It should be noted that, the triangle patch is drawn not directly depending on the coordinates of each vertex, but directly according to the customized vertex index.
S2034: and determining two-dimensional coordinates of two adjacent vertexes on the same edge of each triangular patch by utilizing a trigonometric function relation.
After the triangle patch is drawn, the whole display panel is of a plane type, if a curved surface effect is to be realized, the plane coordinate of each vertex on a curved surface display screen to be drawn needs to be adjusted, namely, the vertex is subjected to offset with a certain radian according to a custom algorithm, and the specific process is as shown in fig. 8:
s2034_ 1: and determining a central angle between two adjacent vertexes according to the preset radian of the curved surface and the number of the vertexes of the curved surface display screen to be drawn.
In the embodiment of the present application, the central angle between two adjacent vertexes is equal to the number of preset camber radians/upper edges including vertexes, or the central angle between two adjacent vertexes is equal to the number of preset camber radians/lower edges including vertexes.
For example, assuming that the radian of the curved surface is 130 °, the curved surface display screen to be drawn after interpolation includes 130 vertexes, that is, 65 upper edges and 65 lower edges, then the central angles between two adjacent vertexes in the upper and lower edges are: 130 °/65 is 2 °.
S2034_ 2: and determining the sector radius corresponding to the two adjacent vertexes according to the arc length of the curved surface display screen to be drawn and the central angle between the two adjacent vertexes.
In the embodiment of the present application, the same edge is an upper edge and a lower edge of the display screen to be rendered, wherein the maximum distance between two vertexes in the upper edge is the distance between the two outermost vertexes of the upper edge, i.e., the distance between vertex 0 and vertex 128 (base vertex 3), and the maximum distance between two vertexes in the lower edge is the distance between the two outermost vertexes of the lower edge, i.e., the distance between vertex 1 and vertex 129 (base vertex 2).
In S2034_2, after the arc length of the curved display screen to be drawn is obtained, according to the relationship between the arc length, the central angle, and the radius: l n pi R/180 °, the radius of the fan corresponding to two adjacent vertices can be determined.
Wherein l is the arc length between two adjacent vertexes, n is the central angle between two adjacent vertexes, and R is the sector radius corresponding to two adjacent vertexes, wherein l equals the number of vertexes contained in the arc length/upper edge of the curved display screen to be drawn, or l equals the number of vertexes contained in the arc length/lower edge of the curved display screen to be drawn.
In some embodiments, because the multiple vertexes on the upper edge and the lower edge of the curved display screen to be drawn are obtained by uniform interpolation on the basis of the four basic vertexes of the flat display screen, the radius of the sector formed by every two adjacent vertexes is the same, and a formula L ═ α r can be directly used, where L is the arc length of the curved display screen to be drawn, α is the preset curvature radian of the curved display screen to be drawn, and r is the radius of the sector formed by the two adjacent vertexes.
S2034_ 3: and determining two-dimensional coordinates of the two adjacent vertexes by utilizing a trigonometric function relationship according to the central angles and the fan-shaped radiuses corresponding to the two adjacent vertexes.
Taking any one first vertex of two adjacent vertexes as an example, determining the longitudinal movement distance of the first vertex and the target abscissa of the first vertex by utilizing a trigonometric function relationship according to the central angle and the sector radius corresponding to the two adjacent vertexes, and taking the difference value between the original longitudinal coordinate and the longitudinal movement distance of the first vertex as the target ordinate of the first vertex to obtain the two-dimensional coordinate of the first vertex. The original ordinate of the first vertex is obtained by interpolating four vertices on the flat display screen.
In fig. 9, it is assumed that a vertex a and a vertex B are upper edges of a flat display screen, a DCE is an upper edge of a curved display screen to be drawn, O is a sector center point of the DCE, G is a first vertex after interpolation, a center angle between two adjacent vertices is 20 °, a sector radius is R, and using a cosine trigonometric function, the length of OH is R cos20 °, the longitudinal movement distance GF CH of the first vertex G is R — OH, that is, GF R — R cos20 °, the moved point is a point F on the curved display screen to be drawn, so that the target ordinate of the point F on the curved display screen to be drawn is G.z-CH, and the target abscissa is R20 °. Wherein G.z represents the original longitudinal coordinate of the first vertex G.
It should be noted that, in the real scene, the point B and the point D, and the point a and the point E in fig. 9 are not on a vertical line, and fig. 9 is only for explaining the coordinate calculation process of each vertex on the display screen of the curved surface to be drawn. In an actual scene, a point D and a point E on a display screen of a curved surface to be drawn are close to the middle.
In some embodiments, when the center of the circle of the fan shape corresponding to two adjacent vertices is the origin (0, 0) of the coordinate system, the target ordinate of the F point on the display screen of the curved surface to be drawn is R × cos20 °.
In the embodiment of the present application, the determination manner of the coordinates of other vertices on the display screen of the curved surface to be drawn is the same as that of fig. 9, and is not repeated here.
S2035: and drawing the curved surface display screen according to the two-dimensional coordinates of the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn.
In S2035, after the two-dimensional coordinates of each vertex on the upper edge and the lower edge of the curved display screen to be drawn are obtained, curve fitting is performed to obtain a drawn curved display screen, and the drawing effect is shown in fig. 10.
S204: and rendering and displaying the plane image on the drawn curved surface display screen according to the mapping relation.
Since the length-width ratio of the curved display screen to be drawn is equal to the ratio of the horizontal and vertical resolutions of the planar image, the planar image can be rendered on the curved display screen without distortion, and the rendered result is shown in fig. 11.
The method comprises the steps that based on preset UI interface resolution, the length-width ratio of a curved surface display screen to be drawn, the resolution of a plane image and the size of a visual field of a UI camera in an orthogonal mode are respectively determined, so that a mapping relation exists between the length-width ratio of the curved surface display screen to be drawn and the horizontal and vertical resolutions of the plane image, the size of the visual field of the UI camera is adjusted, the visual field of the whole camera can be filled with the curved surface display screen to be drawn, and a user can be ensured not to see images outside the curved surface display screen; then, based on 4 vertexes of the plane display screen, interpolation is respectively carried out between two vertexes of the upper edge and the lower edge, and a triangular patch is generated between each vertex after interpolation, two-dimensional coordinates of each vertex on the upper edge and the lower edge of the curved surface display screen to be drawn are determined by utilizing a trigonometric function relation aiming at two adjacent vertexes on the same edge in each triangular patch, and the curved surface display screen is drawn based on the two-dimensional coordinates of each vertex, so that the curved surface display effect of a UI (user interface) in VR (virtual reality) equipment is realized, and the viewing visual field of a user can be expanded because the curved surface display screen is more fit with the visual characteristics of human eyes.
After the planar image is displayed on the curved surface display screen, only image data is acquired by the self-defined curved surface display screen, and the control button for displaying the image on the UI interface is touched (including clicking, sliding and the like), so that no interactive logic is generated, namely the touch operation cannot obtain the correct response of the VR equipment.
In the embodiment of the present application, in order to satisfy the interactive function of the UI interface, the event trigger system PointerInputModule in the UGUI is rewritten to implement the interactive function of the UI interface in the curved display screen, which is specifically shown in fig. 12:
s2051: and acquiring touch coordinates on the curved surface display screen.
In an alternative embodiment, the vertex of the lower left corner of the curved surface display screen is used as the origin of coordinates, and the coordinate of the vertex of the upper right corner of the curved surface display screen is the maximum coordinate of the curved surface display screen. And acquiring touch coordinates on the curved surface display screen through the touch operation of the user and a function interface of the touch event.
S2052: and converting the touch coordinate into a plane coordinate relative to the plane image according to the mapping relation.
When the curved surface display screen is drawn, the resolution of the plane image corresponds to the resolution of the UI (user interface) one by one, the length-width ratio of the curved surface display screen corresponds to the transverse-longitudinal resolution ratio of the plane display screen one by one, and the touch coordinate on the curved surface display screen is converted into the plane coordinate relative to the plane image according to the mapping relation among the plane image, the UI and the curved surface display screen.
S2053: and responding to the control of the touch operation on the plane image according to the plane coordinates.
In S2053, the touch coordinate acquisition interface of the PointerInputModule is truncated by rewriting the PointerInputModule of the UGUI, and the coordinate acquisition interface defined in the embodiment of the present application is replaced with the touch coordinate acquisition interface, and the interface converts the touch coordinate into a plane coordinate, thereby responding to control of the touch operation on the plane image according to the plane coordinate.
Based on the same technical concept, embodiments of the present application provide a VR device, which may use the methods in fig. 2 and fig. 12 in the foregoing embodiments, and achieve the same technical effect.
Referring to fig. 13, the VR device includes a processor 1301, a memory 1302, and a UI camera 1303, where the processor 1301, the memory 1302, and the UI camera 1303 are all connected by a bus 1304;
the memory 1302 stores a computer program that when executed by the processor 1301 performs the following operations:
the UI camera 1303 is used for acquiring a plane image displayed by the VR device; the memory 1302 stores a computer program, and the processor 1301 performs the following operations according to the computer program:
determining the length-width ratio of the curved surface display screen to be drawn and the resolution of the planar image according to the preset UI interface resolution, and obtaining the mapping relation between the curved surface display screen to be drawn and the planar image;
according to the UI interface resolution, adjusting the view field size of the UI camera in an orthogonal mode so that the curved screen to be drawn can fill the whole camera view field;
drawing a curved surface display screen according to the plane display screen of the plane image;
and rendering the plane image display on the drawn curved surface display screen according to the mapping relation.
Optionally, after the processor 1301 displays the planar image on the curved display screen, the following steps are further performed:
acquiring touch coordinates on a curved surface display screen;
converting the touch coordinate into a plane coordinate relative to the plane image according to the mapping relation;
and responding to the control of the touch operation on the plane image according to the plane coordinates.
Optionally, the processor 1301 draws a curved display screen according to the flat display screen of the flat image, and the specific operations are as follows:
adjusting indexes of four vertexes on the flat display screen so that the adjusted vertex arrangement rule meets the drawing condition of the curved display screen;
interpolating between two vertexes of the upper edge and the lower edge of the flat display screen respectively to obtain a plurality of vertexes of the upper edge and the lower edge of the curved display screen to be drawn;
generating each triangular patch according to a plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn;
determining two-dimensional coordinates of two adjacent vertexes on the same edge of each triangular patch by utilizing a trigonometric function relation;
and drawing the curved surface display screen according to the two-dimensional coordinates of the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn.
Optionally, the processor 1301 determines two-dimensional coordinates of two adjacent vertices of the same edge of each triangular patch by using a trigonometric function relationship, and the specific operation is as follows:
determining a central angle between two adjacent vertexes according to a preset radian of the curved surface and the number of the vertexes of the curved surface display screen to be drawn;
taking the maximum distance between two vertexes on the same edge as the arc length of the curved surface display screen to be drawn, and determining the sector radius corresponding to two adjacent vertexes according to the arc length and the central angle;
and determining two-dimensional coordinates of the two adjacent vertexes by utilizing a trigonometric function relationship according to the central angles and the fan-shaped radiuses corresponding to the two adjacent vertexes.
Optionally, the processor 1301 determines the two-dimensional coordinates of the two adjacent vertexes according to the central angle and the sector radius corresponding to the two adjacent vertexes by using a trigonometric function relationship, and the specific operation is as follows:
determining the longitudinal movement distance of a first vertex and the target abscissa of the first vertex by utilizing a trigonometric function relationship according to the central angle and the sector radius, wherein the first vertex is any one of two adjacent vertexes;
and taking the difference value between the original longitudinal coordinate and the longitudinal moving distance of the first vertex as the target longitudinal coordinate of the first vertex to obtain the two-dimensional coordinate of the first vertex.
Optionally, the length-width ratio of the curved display screen to be drawn is equal to the ratio of the horizontal and vertical resolutions of the planar image.
For example, the processor 1301 may be a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU), the number of the processors 1301 may be one or more, and the processor 1301 and the memory 1302 may be in a coupled configuration or may be in a relatively independent configuration.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the computer program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Based on the same technical concept, the embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions that, when executed on a computer, cause the computer to execute the curved surface display method of an image as discussed above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A curved surface display method of an image is applied to Virtual Reality (VR) equipment, the VR equipment comprises a UI camera, and the method comprises the following steps:
determining the length-width ratio of a curved surface display screen to be drawn and the resolution of a planar image displayed by the VR equipment according to a preset UI interface resolution, so as to obtain a mapping relation between the curved surface display screen to be drawn and the planar image;
according to the UI interface resolution, adjusting the view size of the UI camera in an orthogonal mode so that the curved screen to be drawn can fill the whole camera view;
drawing a curved surface display screen according to the plane display screen of the plane image;
and rendering and displaying the plane image on the drawn curved surface display screen according to the mapping relation.
2. The method of claim 1, wherein after displaying the planar image on the curved display screen, the method further comprises:
acquiring touch coordinates on the curved surface display screen;
converting the touch coordinate into a plane coordinate relative to the plane image according to the mapping relation;
and responding to the control of touch operation on the plane image according to the plane coordinates.
3. The method of claim 1 or 2, wherein said drawing a curved display screen from said flat display screen of said flat image comprises:
adjusting indexes of four vertexes on the flat display screen so that the adjusted vertex arrangement rule meets the drawing condition of the curved display screen;
interpolating between two vertexes of the upper edge and the lower edge of the flat display screen respectively to obtain a plurality of vertexes of the upper edge and the lower edge of the curved display screen to be drawn;
generating each triangular patch according to the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn;
determining two-dimensional coordinates of two adjacent vertexes on the same edge of each triangular patch by utilizing a trigonometric function relation;
and drawing the curved surface display screen according to the two-dimensional coordinates of the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn.
4. The method of claim 3, wherein determining the two-dimensional coordinates of two adjacent vertices on the same edge in each of the triangular patches using a trigonometric function relationship comprises:
determining a central angle between two adjacent vertexes according to a preset radian of the curved surface and the number of the vertexes of the curved surface display screen to be drawn;
taking the maximum distance between two vertexes on the same edge as the arc length of the curved surface display screen to be drawn, and determining the sector radius corresponding to the two adjacent vertexes according to the arc length and the central angle;
and determining the two-dimensional coordinates of the two adjacent vertexes by utilizing a trigonometric function relationship according to the central angles and the fan-shaped radiuses corresponding to the two adjacent vertexes.
5. The method of claim 4, wherein determining the two-dimensional coordinates of the two adjacent vertices according to the central angle and the sector radius of the two adjacent vertices by using a trigonometric function relationship comprises:
determining the longitudinal movement distance of a first vertex and the target abscissa of the first vertex by utilizing a trigonometric function relationship according to the central angle and the sector radius, wherein the first vertex is any one of the two adjacent vertexes;
and taking the difference value between the original longitudinal coordinate of the first vertex and the longitudinal moving distance as a target longitudinal coordinate of the first vertex to obtain a two-dimensional coordinate of the first vertex.
6. The method of claim 1 or 2, wherein the length-width ratio of the curved display screen to be drawn is equal to the ratio of the horizontal and vertical resolutions of the planar image.
7. A Virtual Reality (VR) device comprising a processor, a memory, and a UI camera, the memory and the UI camera connected to the processor via a bus;
the UI camera is used for acquiring a plane image displayed by the VR equipment; the memory stores a computer program, and the processor performs the following operations according to the computer program:
determining the length-width ratio of a curved surface display screen to be drawn and the resolution of the planar image according to a preset UI interface resolution, and obtaining a mapping relation between the curved surface display screen to be drawn and the planar image;
according to the UI interface resolution, adjusting the view size of the UI camera in an orthogonal mode so that the curved screen to be drawn can fill the whole camera view;
drawing a curved surface display screen according to the plane display screen of the plane image;
and rendering the plane image on the drawn curved surface display screen for display according to the mapping relation.
8. The VR device of claim 7, wherein the processor, after displaying the planar image on the curved display screen, further performs:
acquiring touch coordinates on the curved surface display screen;
converting the touch coordinate into a plane coordinate relative to the plane image according to the mapping relation;
and responding to the control of touch operation on the plane image according to the plane coordinates.
9. The VR device of claim 7 or 8, wherein the processor draws a curved display from the flat display of the flat image by:
adjusting indexes of four vertexes on the flat display screen so that the adjusted vertex arrangement rule meets the drawing condition of the curved display screen;
interpolating between two vertexes of the upper edge and the lower edge of the flat display screen respectively to obtain a plurality of vertexes of the upper edge and the lower edge of the curved display screen to be drawn;
generating each triangular patch according to the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn;
determining two-dimensional coordinates of two adjacent vertexes on the same edge of each triangular patch by utilizing a trigonometric function relation;
and drawing the curved surface display screen according to the two-dimensional coordinates of the plurality of vertexes on the upper edge and the lower edge of the curved surface display screen to be drawn.
10. The VR device of claim 9, wherein the processor determines two-dimensional coordinates of two adjacent vertices on a same edge in each triangle patch using trigonometric functions by:
determining a central angle between two adjacent vertexes according to a preset radian of the curved surface and the number of the vertexes of the curved surface display screen to be drawn;
taking the maximum distance between two vertexes on the same edge as the arc length of the curved surface display screen to be drawn, and determining the sector radius corresponding to the two adjacent vertexes according to the arc length and the central angle;
and determining the two-dimensional coordinates of the two adjacent vertexes by utilizing a trigonometric function relationship according to the central angles and the fan-shaped radiuses corresponding to the two adjacent vertexes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111511889.6A CN114327329A (en) | 2021-12-07 | 2021-12-07 | Curved surface display method and equipment for image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111511889.6A CN114327329A (en) | 2021-12-07 | 2021-12-07 | Curved surface display method and equipment for image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114327329A true CN114327329A (en) | 2022-04-12 |
Family
ID=81050263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111511889.6A Pending CN114327329A (en) | 2021-12-07 | 2021-12-07 | Curved surface display method and equipment for image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114327329A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114578972A (en) * | 2022-05-05 | 2022-06-03 | 江西科骏实业有限公司 | Trigger method and system for compatible plane and curved surface UI (user interface) event in VR (virtual reality) scene |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007325043A (en) * | 2006-06-02 | 2007-12-13 | Victor Co Of Japan Ltd | Image display apparatus and image display program |
JP2008299663A (en) * | 2007-05-31 | 2008-12-11 | Victor Co Of Japan Ltd | Image display device and image display method |
CN106604006A (en) * | 2016-12-20 | 2017-04-26 | Tcl集团股份有限公司 | Curved surface curtain projection method and system for projection television |
US20170323475A1 (en) * | 2016-05-05 | 2017-11-09 | Nvidia Corporation | System, method, and computer program product for rendering at variable sampling rates using projective geometric distortion |
CN109461213A (en) * | 2018-11-16 | 2019-03-12 | 京东方科技集团股份有限公司 | Image processing method, device, equipment and storage medium based on virtual reality |
CN111127658A (en) * | 2019-12-23 | 2020-05-08 | 北京工商大学 | Point cloud reconstruction-based feature-preserving curved surface reconstruction method for triangular mesh curved surface |
CN113206992A (en) * | 2021-04-20 | 2021-08-03 | 聚好看科技股份有限公司 | Method for converting projection format of panoramic video and display equipment |
CN113542679A (en) * | 2021-06-24 | 2021-10-22 | 海信视像科技股份有限公司 | Image playing method and device |
-
2021
- 2021-12-07 CN CN202111511889.6A patent/CN114327329A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007325043A (en) * | 2006-06-02 | 2007-12-13 | Victor Co Of Japan Ltd | Image display apparatus and image display program |
JP2008299663A (en) * | 2007-05-31 | 2008-12-11 | Victor Co Of Japan Ltd | Image display device and image display method |
US20170323475A1 (en) * | 2016-05-05 | 2017-11-09 | Nvidia Corporation | System, method, and computer program product for rendering at variable sampling rates using projective geometric distortion |
CN106604006A (en) * | 2016-12-20 | 2017-04-26 | Tcl集团股份有限公司 | Curved surface curtain projection method and system for projection television |
CN109461213A (en) * | 2018-11-16 | 2019-03-12 | 京东方科技集团股份有限公司 | Image processing method, device, equipment and storage medium based on virtual reality |
CN111127658A (en) * | 2019-12-23 | 2020-05-08 | 北京工商大学 | Point cloud reconstruction-based feature-preserving curved surface reconstruction method for triangular mesh curved surface |
CN113206992A (en) * | 2021-04-20 | 2021-08-03 | 聚好看科技股份有限公司 | Method for converting projection format of panoramic video and display equipment |
CN113542679A (en) * | 2021-06-24 | 2021-10-22 | 海信视像科技股份有限公司 | Image playing method and device |
Non-Patent Citations (1)
Title |
---|
王新社 等: "基于三角面片顶点均值的网格编辑方法", 河南大学学报(自然科学版), no. 04, 16 July 2009 (2009-07-16), pages 81 - 85 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114578972A (en) * | 2022-05-05 | 2022-06-03 | 江西科骏实业有限公司 | Trigger method and system for compatible plane and curved surface UI (user interface) event in VR (virtual reality) scene |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018188499A1 (en) | Image processing method and device, video processing method and device, virtual reality device and storage medium | |
US8456484B2 (en) | Apparatus and methods for wrapping texture onto the surface of a virtual object | |
WO2017113731A1 (en) | 360-degree panoramic displaying method and displaying module, and mobile terminal | |
CN108282694B (en) | Panoramic video rendering method and device and electronic equipment | |
US9799102B2 (en) | Smoothing images using machine learning | |
US9754398B1 (en) | Animation curve reduction for mobile application user interface objects | |
EP3814876B1 (en) | Placement and manipulation of objects in augmented reality environment | |
WO2013185516A1 (en) | Animation display method and apparatus for three-dimensional curve | |
WO2012097556A1 (en) | Three dimensional (3d) icon processing method, device and mobile terminal | |
US10275947B2 (en) | Modifying a simulated character by direct manipulation | |
CN114663632A (en) | Method and equipment for displaying virtual object by illumination based on spatial position | |
CN114327329A (en) | Curved surface display method and equipment for image | |
JP2005275646A (en) | Three-dimensional plotting model generation method, three-dimensional model plotting method, and program therefor | |
WO2022068430A1 (en) | Display processing method and device | |
CN109598672B (en) | Map road rendering method and device | |
CN114022349A (en) | Perspective projection-based plane image processing method and device | |
CN108230430B (en) | Cloud layer mask image processing method and device | |
KR101919077B1 (en) | Method and apparatus for displaying augmented reality | |
CN116547718A (en) | User interface | |
CN106716500B (en) | Information processing device and depth definition method | |
CN110751026B (en) | Video processing method and related device | |
CN111260767A (en) | Rendering method in game, rendering device, electronic equipment and readable storage medium | |
CN107452045B (en) | Space point mapping method based on virtual reality application anti-distortion grid | |
KR101428577B1 (en) | Method of providing a 3d earth globes based on natural user interface using motion-recognition infrared camera | |
JPH11185054A (en) | Image processor |
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 |