Image display method and device
By adjusting the brightness, saturation, and contrast consistency of images and skyboxes in virtual reality devices, the dizziness problem caused by image rotation is solved, improving the user experience.
Patent Information
- Application Number
- CN202111324350.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-11-10
AI Technical Summary
When displaying three-dimensional images on a virtual reality device, the image rotation causes a strong sense of dizziness, especially when the image rotates in the direction, the human eye cannot focus, affecting the user's immersive experience.
By obtaining the attribute information of the image to be rotated and the skybox image, the target attribute information is adjusted to make their brightness, saturation and contrast consistent, reducing the color difference during the rotation process, and restoring the original attribute information after rotation.
It reduces the dizziness during image rotation, improves the user's immersive experience, and ensures the normal display of the image.
Smart Images

Figure CN113902884B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image display method and device. Background Art
[0002] The basic principle of 3D images is to display slightly different images to the left and right eyes to create a stereoscopic effect, but this also leads to visual axis focusing conflicts.
[0003] Normally, the human eye automatically adjusts its focal length and can focus on distant objects or objects that are moving in and out. However, when a three-dimensional image is displayed on a virtual reality (VR) device, the objects in the image are imaged on a display plane in the coordinate space. The distance from the human eye is not obvious, but the human eye has to frequently adjust its focal length. This makes it impossible for the human eye to determine the object to focus on, resulting in a feeling of dizziness. In particular, when the direction of the image displayed on the VR device needs to be rotated (such as when the image is shot in portrait mode and the VR device needs to display the image in landscape mode), the feeling of dizziness will be stronger. This is because the color difference between the rotating image and the skybox is large, the visual range of the VR device is small, and the human eye cannot focus on the object during rotation. Summary of the Invention
[0004] The embodiments of the present application provide an image display method and device to reduce dizziness when viewing images and enhance the immersive experience.
[0005] In a first aspect, an embodiment of the present application provides an image display method, applied to a VR device, comprising:
[0006] In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated;
[0007] Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information;
[0008] Display the drawn target image and target skybox image, and rotate the drawn target image;
[0009] The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed.
[0010] In a second aspect, an embodiment of the present application provides an image display method, comprising:
[0011] The server device obtains, in response to the image rotation request, first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated;
[0012] The server device determines target attribute information according to the first attribute information and the second attribute information, and draws a target image and a target skybox image according to the target attribute information;
[0013] The server device sends a rendering completion message to the virtual reality VR device, where the rendering completion message carries a download address of the rendered target image and the target skybox image.
[0014] In a third aspect, an embodiment of the present application provides an image display method, comprising:
[0015] The virtual reality (VR) device receives a drawing completion message sent by the server device, the drawing completion message carrying a download address of a drawn target image and a target skybox image; wherein the drawing completion message is sent by the server device after the target image and the target skybox image are drawn according to target attribute information, wherein the target attribute information is determined according to first attribute information of the image to be rotated and second attribute information of the skybox image corresponding to the image to be rotated;
[0016] The VR device obtains the drawn target image and target skybox image respectively according to the download address and displays them synchronously;
[0017] The VR device rotates the acquired target image;
[0018] The VR device restores the first attribute information of the target image and the second attribute information of the target skybox image, and displays the restored target image and target skybox image.
[0019] In a fourth aspect, an embodiment of the present application provides a VR device, including a memory, a display, and a processor;
[0020] The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations:
[0021] In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated;
[0022] Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information;
[0023] Sending a drawing completion message to the display, the drawing completion message carrying a download address of the drawn target image and the target skybox image, so that the display obtains the drawn target image and the target skybox image according to the download address and displays them;
[0024] Rotating the target image displayed on the display;
[0025] The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display.
[0026] In a fifth aspect, an embodiment of the present application provides a server device, comprising at least one external communication interface, a memory, and a processor:
[0027] The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations:
[0028] In response to the image rotation request, obtaining, through the at least one external communication interface, first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated;
[0029] Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information;
[0030] A rendering completion message is sent to the virtual reality VR device through the at least one external communication interface, where the rendering completion message carries a download address of the rendered target image and the target skybox image.
[0031] In a sixth aspect, an embodiment of the present application provides a VR device, comprising at least one external communication interface, a memory, a display, and a processor:
[0032] The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations:
[0033] Receiving, via the at least one external communication interface, a drawing completion message sent by the server device, the drawing completion message carrying a download address of the drawn target image and the target skybox image; wherein the drawing completion message is sent by the server device after the target image and the target skybox image are drawn according to target attribute information, wherein the target attribute information is determined according to first attribute information of the image to be rotated and second attribute information of the skybox image corresponding to the image to be rotated;
[0034] According to the download address, respectively acquiring the drawn target image and target skybox image through the at least one external communication interface, and synchronously displaying them on the display;
[0035] Rotating the target image displayed on the display;
[0036] The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display.
[0037] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the above-mentioned image display method.
[0038] In the above-mentioned embodiment of the present application, after receiving the image rotation request, the target attribute information is determined according to the obtained first attribute information of the image to be rotated and the second attribute information of the skybox image, and the target image and the target skybox image are drawn respectively according to the target attribute information. Since the target attribute information combines the first attribute information and the second attribute information, the color difference between the drawn target image and the target skybox image is reduced. In this way, when the displayed target image is rotated, the dizziness caused by the color difference during the image rotation process can be reduced, thereby enhancing the user's immersive experience; and after the rotation is completed, the attribute information of the target image and the target skybox image can also be restored, thereby ensuring the normal display of the target image and the skybox image, and will not affect the user's normal viewing. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 The structure diagram of the display system provided by the embodiment of the present application is exemplarily shown;
[0041] Figure 2 Another display system structure diagram provided by an embodiment of the present application is exemplarily shown;
[0042] Figure 3 The following is a flowchart illustrating an image display method provided by an embodiment of the present application.
[0043] Figure 4 The following is an exemplary flowchart of a method for obtaining brightness attributes provided in an embodiment of the present application;
[0044] Figure 5 The following is an exemplary flow chart showing a method for obtaining saturation attributes provided in an embodiment of the present application;
[0045] Figure 6The following is an exemplary flowchart of a method for obtaining contrast attributes provided by an embodiment of the present application;
[0046] Figure 7 The following is an exemplary flowchart of an image drawing method provided by an embodiment of the present application;
[0047] Figure 8 The following is a flowchart illustrating another image display method provided by an embodiment of the present application;
[0048] Figure 9 The following is an exemplary diagram of the hardware structure of the VR device provided in the embodiment of the present application;
[0049] Figure 10 The hardware structure diagram of the server device provided in the embodiment of the present application is exemplified;
[0050] Figure 11 The hardware structure diagram of another VR device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION
[0051] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0052] All other embodiments derived by persons of ordinary skill in the art based on the exemplary embodiments described herein without inventive effort are within the scope of protection of the claims appended hereto. Furthermore, although the disclosure herein is presented based on one or more exemplary embodiments, it should be understood that each aspect of the disclosure may constitute a complete embodiment on its own.
[0053] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.
[0054] In the specification and claims of this application and the drawings, the terms "first," "second," and the like are used to distinguish similar or similar objects or entities and are not necessarily intended to limit a particular order or precedence, unless otherwise indicated. It should be understood that the terms used in this manner are interchangeable where appropriate, for example, enabling implementation in an order other than that shown or described in the drawings or descriptions of the embodiments of this application.
[0055] In addition, the terms "comprise" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0056] The term "module" as used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0057] In order to clearly describe the embodiments of the present application, the basic properties of the images in the embodiments of the present application are explained below.
[0058] Brightness: refers to the brightness of the image color, indicating the human eye's perception of the brightness and darkness of the object, with a value of 0%-100%.
[0059] Saturation: This refers to the depth of an image's color, indicating its purity. It's determined by the reflective or projective properties of an object, and typically ranges from 0% to 100%. Saturation is expressed as the number of grayscale shades proportional to the hue. Therefore, adjusting an image's saturation is essentially adjusting its hue. Lowering an image's saturation to 0% results in a grayscale image, while increasing saturation increases its hue.
[0060] Contrast refers to the contrast between different colors or values within an image. The greater the contrast, the greater the difference between two colors, and vice versa. For example, increasing the contrast of a grayscale image makes the black and white more distinct. When the contrast is increased to its limit, the image becomes a single black and white image. Conversely, when the contrast is reduced to its limit, the grayscale image loses its visual quality and becomes just a gray background.
[0061] Sky Box: A 360° landscape photo surrounding the camera. In essence, it is a cube surrounding the camera, and the camera is inside this cube.
[0062] Skybox image: unfold a cube and then apply corresponding textures on the six faces.
[0063] The following is an overview of the design concepts of the embodiments of the present application.
[0064] In some scenarios, when users use VR devices to view images, some images need to be rotated before they can be displayed normally. However, most current VR devices and players do not have an image rotation function, and users cannot view them normally. Very few VR devices have implemented the image rotation function, but they only rotate the image. However, during the rotation process, the human eye can see the changes in the image, and it is easy to switch between the image and the skybox that serves as the image background. Due to the large color difference between the image and the skybox, the visual range of the VR device is small, which makes it impossible for the human eye to focus on the objects in the image, causing dizziness and reducing the user's immersive experience. Moreover, this feeling of dizziness has nothing to do with the size of the image. Whether it is a square image or a circular image, it will cause dizziness.
[0065] In view of this, an embodiment of the present application provides an image display method and device. For scenarios where an image needs to be rotated, the image to be rotated and the skybox image are fused, the colors of the rotated image and the skybox image are changed, and the saturation, brightness and contrast of the rotated image and the skybox image are kept consistent, thereby reducing the color difference between the rotated image and the skybox. The human eye can automatically focus on objects in the image, reducing dizziness and enhancing the user's immersive experience.
[0066] It should be noted that since the user does not need to pay attention to the image processing process and frequent operations on the image will cause dizziness, the image processing process may not be displayed to the user, and only the rotation process of the processed image may be displayed. In this way, the image processing and rotation display processes can be deployed independently.
[0067] In some embodiments, for all-in-one VR machines, the image processing process can be executed on the Android side, and the image rotation and display process can be executed on the Unity side. For split VR machines, the image processing process can be executed on the server side (such as a PC), and the image rotation and display process can be executed on the Unity side.
[0068] Taking the VR all-in-one machine as an example, Figure 1 The structure diagram of the display system provided in the embodiment of the present application is shown as an example; Figure 1As shown, the VR device includes an Android end and a Unity end. The Android end performs a fusion process on the image to be rotated and the skybox image to keep the saturation, brightness and contrast of the image to be rotated and the skybox image consistent. After the processing is completed, the Android end sends a message to the Unity end. The message carries the Uniform Resource Locator (URL) address of the processed image to be rotated (recorded as the target image) and the skybox image (recorded as the target skybox image). The Unity end obtains the processed target image and target skybox image according to the URL address and displays them to the user. During the display process, the target image is rotated. After the rotation is completed, the original colors of the target image and the target skybox image are restored and displayed.
[0069] Take VR split machine as an example, Figure 2 The structure diagram of the display system provided in the embodiment of the present application is shown as an example; Figure 1 As shown, the server device performs fusion processing on the image to be rotated and the skybox image to keep the saturation, brightness and contrast of the image to be rotated and the skybox image consistent. After the processing is completed, a message is sent to the VR device. The message carries the URL address of the processed target image and the target skybox image. The VR device obtains the processed target image and the target skybox image according to the URL address and displays them to the user. During the display process, the target image is rotated. After the rotation is completed, the original colors of the target image and the target skybox image are restored and displayed.
[0070] The above-mentioned server-side devices can be PCs, cloud servers, server clusters and other devices.
[0071] based on Figure 1 The architecture shown, Figure 3 A flowchart of an image display method provided in an embodiment of the present application is shown in FIG. Figure 3 As shown in the figure, the process is executed by the VR device and mainly includes the following steps:
[0072] S301: In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated.
[0073] In S301, the first and second attribute information include, but are not limited to, brightness, saturation, and contrast. The skybox serves as the background of the image to be rotated, and the color difference between it and the image to be rotated directly affects the user's visual experience. Therefore, upon receiving an image rotation request, the VR device obtains the first and second attribute information of the image to be rotated and the skybox image, respectively.
[0074] It should be noted that the embodiment of the present application does not impose any restrictive requirements on the triggering method of the image rotation request. It can be triggered based on the state of the image itself (such as: the shooting method of the image is inconsistent with the display method of the VR device), or it can be triggered by the user according to actual needs (such as: the user clicks the "rotate" button on the played image).
[0075] For the image to be rotated and the skybox image, the method for obtaining the attribute information is the same. Taking the first attribute information and the second attribute information including brightness as an example, the method for obtaining the attribute information is as follows: Figure 4 :
[0076] S301_11: Get the width and height of the current image to obtain the total number of pixels contained in the current image.
[0077] In S301_11, the current image includes the image to be rotated and the skybox image. When the width of the current image is W and the height is H, the total number of pixels obtained after traversing the current image is W*H (number).
[0078] S301_12: Obtain the color value of each pixel and determine the brightness value of each pixel.
[0079] Usually, images are displayed in RGB format. According to the conversion relationship between RGB format and YUV format, the brightness value can be determined according to the color value of the pixel. The conversion relationship between RGB format and YUV format is:
[0080]
[0081] Among them, R, G, and B represent the red component, green component, and blue component in the RGB format respectively, and Y, U, and V represent the brightness component and two chrominance components in the YUV format respectively.
[0082] According to formula 1, the calculation formula for the brightness value of each pixel is:
[0083] Y=0.299R+0.587G+0.114B Formula 2
[0084] S301_13: Obtain a target brightness value for each pixel according to the sum of the brightness values of each pixel and the total number of pixels.
[0085] In S301_13, the brightness values of the pixels are added together to obtain a total brightness value, and the total brightness value is divided by the total number of pixels to obtain an average brightness value of the pixels. The average brightness value is used as the target brightness value of each pixel.
[0086] It should be noted that in Figure 4The process of obtaining the brightness value of the image to be rotated and the process of obtaining the brightness value of the sky box image can be performed sequentially or in parallel.
[0087] For the image to be rotated and the skybox image, taking the first attribute information and the second attribute information including saturation as an example, the method for obtaining the attribute information is as follows: Figure 5 :
[0088] S301_21: Get the width and height of the current image to obtain the total number of pixels contained in the current image.
[0089] This step is the same as S301_11 and will not be repeated here.
[0090] S301_22: Obtain the color value of each pixel and determine the saturation value of each pixel.
[0091] According to the conversion relationship between RGB format and YUV format in S301_12, the calculation formula of the saturation value S of each pixel is:
[0092] S = 1-3 × [min(R, G, B)] / (R + G + B) Formula 3
[0093] S301_23: Obtain a target saturation value for each pixel point according to the sum of the saturation values of each pixel point and the total number of pixels.
[0094] In S301_23, the saturation values of each pixel are added to obtain the total saturation value, and the total saturation value is divided by the total number of pixels to obtain the average saturation value of each pixel, and the average saturation value is used as the target saturation value of each pixel.
[0095] For the image to be rotated and the skybox image, taking the first attribute information and the second attribute information including contrast and degree as an example, the method of obtaining the attribute information is as follows: Figure 6 :
[0096] S301_31: Expand the number of rows and columns of the original image.
[0097] In S301_31, the original image includes the image to be rotated and the skybox image. Assuming that the number of rows of the original image is m and the number of columns is n, the number of rows of the expanded image is r and the number of columns is c, then r≥m, c≥n.
[0098] S301_32: Convert the expanded image into a double-precision floating-point type, and determine the sum of the squares of the differences between the grayscale value of the central pixel and the grayscale values of N adjacent pixels, where N is an integer greater than or equal to 1.
[0099] Usually, the value of RGB image is between 0-255. In order to better process the image, the image value is usually converted to between 0-1. This conversion process is the process of converting the uint8 type of the image to the float type.
[0100] After the type conversion is completed, the difference between the grayscale value of the expanded central pixel and the grayscale values of N adjacent pixels is determined, and the sum of the squares of the N differences is calculated. N can be 8.
[0101] S301_33: Obtain the target contrast value of the original image according to the sum of the squares of the differences.
[0102] In S301_33, the value of the square sum divided by N is used as the target contrast value of the original image.
[0103] It should be noted that Figures 4 to 6 The process of obtaining the brightness value, saturation value, and contrast value can be performed sequentially or in parallel. This application does not impose any restrictive requirements on the order of obtaining.
[0104] S302: Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information.
[0105] In the embodiment of the present application, there is no restrictive requirement on the method of determining the target attribute information.
[0106] For example, an optional implementation is that when executing S302, the VR device performs a weighted operation on the obtained first attribute information and the second attribute information according to a preset weight to obtain the target attribute information.
[0107] For another example, an optional implementation is that when executing S302, the VR device calculates the attribute mean of the first attribute information and the second attribute information, and uses the attribute mean as the target attribute information.
[0108] After obtaining the target attribute information, the target image and the target skybox image are drawn according to the target attribute information. For any of the images to be drawn, see the drawing process. Figure 7 :
[0109] S3021: Create a canvas with the same width and height as the image to be drawn.
[0110] In S3021, during the process of creating a canvas, a brush is created for the corresponding canvas, and anti-aliasing is set to soften the edge of the image.
[0111] S3022: Assign the value of each sub-attribute in the target attribute information to the corresponding sub-attribute matrix.
[0112] In S3022, a corresponding number of sub-attribute matrices are created according to the types of sub-attributes included in the attribute information, and the values of the corresponding sub-attributes in the target attribute information are assigned to the corresponding sub-attribute matrices.
[0113] For example, if the attribute information includes brightness, saturation, and contrast, create a brightness matrix, a saturation matrix, and a contrast matrix, respectively. Assign the brightness value in the target attribute information to the brightness matrix of the image to be drawn, the saturation value in the target attribute information to the saturation matrix of the image to be drawn, and the contrast value in the target attribute information to the contrast matrix of the image to be drawn. The number of rows in the matrix is the same as the height of the image to be drawn, and the number of columns in the matrix is the same as the width of the image to be drawn.
[0114] S3023: Perform a fusion operation on each sub-attribute matrix, and assign the fusion result to the brush corresponding to the canvas.
[0115] Brightness refers to the lightness or darkness of the image color, saturation refers to the depth of the image color, and contrast refers to the contrast between different colors or brightness in the image. These three sub-attributes all affect the color of the image. Therefore, in S3023, the brightness matrix, saturation matrix, and contrast matrix are fused, and the relevant properties of the brush are set according to the fusion results.
[0116] S3024: Draw the corresponding image on the canvas using the brush.
[0117] From the drawing process of S3021 to S3024, it can be seen that the properties of the brushes used to draw the target image and the skybox image are determined based on the target attribute information. In this way, the brightness, saturation, and contrast between the drawn target image and the target skybox image are consistent, thus reducing the color gap between the image to be rotated and the skybox image.
[0118] S303: Display the drawn target image and the target skybox image, and rotate the drawn target image.
[0119] In S303, after the Android side of the VR device has rendered the target image and target skybox image with consistent brightness, saturation, and contrast, it sends a drawing completion message to the Unity side. The drawing completion message carries the download address of the target image and target skybox image. The Unity side retrieves the target image and target skybox image based on the download address and displays them to the user. During the display process, the Unity side rotates the target image according to the image rotation request.
[0120] S304: Restore the first attribute information of the target image and the second attribute information of the target skybox image, and display the restored target image and target skybox image.
[0121] In S304, after the rotation of the target image is completed, the target attribute information of the target image is replaced by the obtained first attribute information, and the target attribute information of the target sky box is replaced by the obtained second attribute information, thereby restoring the true colors of the image to be rotated and the sky box image, and displaying them to the user to ensure normal viewing of the user.
[0122] based on Figure 2 The architecture shown, Figure 8 A flowchart of an image display method provided in an embodiment of the present application is shown in FIG. Figure 8 As shown in the figure, the process is jointly executed by the server device and the VR device, and mainly includes the following steps:
[0123] S801: In response to an image rotation request, the server device obtains first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated.
[0124] S802: The server device determines target attribute information according to the first attribute information and the second attribute information, and draws a target image and a target skybox image according to the target attribute information.
[0125] S803: The server device sends a drawing completion message to the VR device. The drawing completion message carries the download address of the drawn target image and the target skybox image.
[0126] The above-mentioned process of S801 to S803 of the server-side device processing the image is consistent with the process performed by the Android side in the VR all-in-one machine. For details, please refer to the description of S301 to S302, which will not be repeated here.
[0127] S804: The VR device receives the drawing completion message sent by the server device, and obtains the drawn target image and target skybox image according to the download address carried in the drawing completion message.
[0128] S805: The VR device synchronously displays the target image and the target skybox image, and rotates the target image.
[0129] S806: The VR device restores the first attribute information of the target image and the second attribute information of the target skybox image, and displays the restored target image and target skybox image.
[0130] The process of rotating and displaying the image by the VR device in S804 to S805 is consistent with the process performed by the Unity end in the VR all-in-one machine. For details, please refer to the description of S303 to S304, which will not be repeated here.
[0131] In the above-mentioned embodiment of the present application, by performing fusion processing on the image to be rotated and the sky box image, the brightness, saturation and contrast of the processed target image and the target sky box image are made consistent, thereby reducing the color difference between the images. When the processed target image is rotated, since the color difference between the rotated image and the sky box is reduced, the human eye can focus on the object in the image, thereby reducing the feeling of dizziness and improving the user experience; and after the rotation is completed, the brightness, saturation and contrast of the target image and the target sky box image are restored to the values before rotation, thereby ensuring the normal display of the image and will not affect the user's normal viewing.
[0132] Based on the same technical concept, the embodiment of the present application provides a VR device, which can perform the VR Figure 3 The method flow shown in the images is the same and can achieve the same technical effect, so it will not be repeated here.
[0133] See also Figure 9 The VR device includes a processor 901, a memory 902, and a display 903. The display 903 and the memory 902 are connected to the processor 901 via a bus 904. The memory 902 stores computer program instructions, and the processor 901 implements the following operations by executing the computer program instructions:
[0134] In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated;
[0135] Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information;
[0136] Sending a drawing completion message to the display 903, the drawing completion message carrying the download address of the drawn target image and the target skybox image, so that the display 903 obtains the drawn target image and the target skybox image according to the download address and displays them;
[0137] Rotating the target image displayed on the display 903;
[0138] The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display 903 .
[0139] Based on the same technical concept, the embodiment of the present application provides a server device, which can execute the embodiment of the present application. Figure 8 The method flow shown in the images is the same and can achieve the same technical effect, so it will not be repeated here.
[0140] See also Figure 10The server device includes a processor 1001, a memory 1002, and at least one external communication interface 1003. The at least one external communication interface 1003 and the memory 1002 are connected to the processor 1001 via a bus 1004. The memory 1002 stores computer program instructions, and the processor 1001 implements the following operations by executing the computer program instructions:
[0141] In response to the image rotation request, obtaining, through at least one external communication interface 1003, first attribute information of the image to be rotated and second attribute information of the skybox image corresponding to the image to be rotated;
[0142] Determine target attribute information according to the first attribute information and the second attribute information, and draw a target image and a target skybox image respectively according to the target attribute information;
[0143] A rendering completion message is sent to the VR device via at least one external communication interface 1003 , where the rendering completion message carries the download address of the rendered target image and the target skybox image.
[0144] Based on the same technical concept, the embodiment of the present application provides a VR device, which can perform the VR Figure 8 The method flow shown in the images is the same and can achieve the same technical effect, so it will not be repeated here.
[0145] See also Figure 11 The VR device includes a processor 1101, a memory 1102, a display 1103, and at least one external communication interface 1104. The at least one external communication interface 1104, the display 1103, and the memory 1102 are connected to the processor 1101 via a bus 1105. The memory 1102 stores computer program instructions, and the processor 1101 implements the following operations by executing the computer program instructions:
[0146] Receiving, via at least one external communication interface 1104, a drawing completion message sent by the server device, the drawing completion message carrying a download address of the drawn target image and the target skybox image; wherein the drawing completion message is sent by the server device after the target image and the target skybox image are drawn according to the target attribute information, wherein the target attribute information is determined according to the first attribute information of the image to be rotated and the second attribute information of the skybox image corresponding to the image to be rotated;
[0147] According to the download address, the drawn target image and target skybox image are obtained through at least one external communication interface 1104, and are displayed synchronously by the display 1103;
[0148] Rotating the target image displayed on the display 1103;
[0149] The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display 1103 .
[0150] The embodiment of the present application also provides a computer-readable storage medium for storing some instructions, which, when executed, can complete the method of the aforementioned embodiment.
[0151] An embodiment of the present application further provides a computer program product for storing a computer program, wherein the computer program is used to execute the method of the aforementioned embodiment.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0153] For ease of explanation, the above description has been made with reference to specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations are possible. The above embodiments are selected and described to better explain the principles and practical applications, so that those skilled in the art can better utilize the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. An image display method, characterized in that: Applied to virtual reality VR devices, including: In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated, wherein each attribute information includes at least one of brightness, saturation, and contrast; Determining target attribute information based on the first attribute information and the second attribute information, and drawing a target image of the image to be rotated and a target skybox image of the skybox image respectively according to the target attribute information; the target attribute information is used to reduce a color difference between the target image and the target skybox image; Display the drawn target image and target skybox image, and rotate the drawn target image; The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed.
2. The method according to claim 1, wherein Drawing the target image and the target skybox image respectively according to the target attribute information includes: For any one of the image to be rotated and the skybox image to be drawn, perform the following operations: Create a canvas with the same width and height as the image to be drawn; Assign the value of each sub-attribute in the target attribute information to the corresponding sub-attribute matrix; Perform fusion operation on each sub-attribute matrix, and assign the fusion results to the brushes corresponding to the canvas respectively; The corresponding image is drawn on the canvas by the brush.
3. The method according to claim 1 or 2, wherein: If the attribute information includes brightness, the method for obtaining the attribute information includes: Obtaining the width and height of a current image to obtain the total number of pixels in the current image, where the current image includes the image to be rotated and the skybox image; Obtaining the color value of each pixel and determining the brightness value of each pixel; The target brightness value of each pixel point is obtained according to the sum of the brightness values of each pixel point and the total number of pixels.
4. The method according to claim 1 or 2, wherein: If the attribute information includes saturation, the method for obtaining the attribute information includes: Obtaining the width and height of a current image to obtain the total number of pixels in the current image, where the current image includes the image to be rotated and the skybox image; Obtaining the color value of each pixel and determining the saturation value of each pixel; A target saturation value of each pixel point is obtained according to the sum of the saturation values of each pixel point and the total number of pixels.
5. The method according to claim 1 or 2, wherein: If the attribute information includes contrast, methods for obtaining the attribute information include: Expanding the number of rows and columns of an original image, wherein the original image includes the image to be rotated and the skybox image; Convert the expanded image into a double-precision floating-point type, and determine the sum of the squares of the differences between the grayscale value of the central pixel and the grayscale values of N adjacent pixels, where N is an integer greater than or equal to 1; The target contrast value of the original image is obtained according to the sum of the squares of the differences.
6. An image display method, characterized in that: include: The server device obtains, in response to the image rotation request, first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated; each attribute information includes at least one of brightness, saturation, and contrast; The server device determines target attribute information according to the first attribute information and the second attribute information, and draws the target image of the image to be rotated and the target skybox image of the skybox image according to the target attribute information; The target attribute information is used to reduce the color difference between the target image and the target skybox image; The server device sends a rendering completion message to the virtual reality VR device, where the rendering completion message carries a download address of the rendered target image and the target skybox image.
7. An image display method, characterized in that: include: The virtual reality (VR) device receives a drawing completion message sent by the server device, the drawing completion message carrying a download address of a drawn target image and a target skybox image; wherein the drawing completion message is sent by the server device after the target image and the target skybox image are drawn according to target attribute information, the target attribute information being determined according to first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated; each attribute information includes at least one of brightness, saturation, and contrast; and the target attribute information is used to reduce a color difference between the target image and the target skybox image; The VR device obtains the drawn target image and target skybox image respectively according to the download address and displays them synchronously; The VR device rotates the acquired target image; The VR device restores the first attribute information of the target image and the second attribute information of the target skybox image, and displays the restored target image and target skybox image.
8. A virtual reality (VR) device, characterized in that: Includes memory, display, and processor; The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations: In response to an image rotation request, obtaining first attribute information of an image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated, wherein each attribute information includes at least one of brightness, saturation, and contrast; Determining target attribute information according to the first attribute information and the second attribute information, and drawing a target image of the image to be rotated and a target skybox image of the skybox image respectively according to the target attribute information; The target attribute information is used to reduce the color difference between the target image and the target skybox image; Sending a drawing completion message to the display, the drawing completion message carrying a download address of the drawn target image and the target skybox image, so that the display obtains the drawn target image and the target skybox image according to the download address and displays them; Rotating the target image displayed on the display; The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display.
9. A server device, characterized in that: Includes at least one external communication interface, a memory and a processor: The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations: In response to the image rotation request, obtaining, through the at least one external communication interface, first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated, wherein each attribute information includes at least one of brightness, saturation, and contrast; Determining target attribute information according to the first attribute information and the second attribute information, and drawing a target image of the image to be rotated and a target skybox image of the skybox image respectively according to the target attribute information; The target attribute information is used to reduce the color difference between the target image and the target skybox image; A rendering completion message is sent to the virtual reality VR device through the at least one external communication interface, where the rendering completion message carries a download address of the rendered target image and the target skybox image.
10. A virtual reality (VR) device, characterized in that: Includes at least one external communication interface, memory, display, and processor: The memory stores computer program instructions, and when the processor executes the computer program instructions, the processor performs the following operations: Receiving, via the at least one external communication interface, a drawing completion message sent by the server device, the drawing completion message carrying a download address of the drawn target image and the target skybox image; wherein the drawing completion message is sent by the server device after the target image and the target skybox image are drawn according to target attribute information, the target attribute information being determined based on first attribute information of the image to be rotated and second attribute information of a skybox image corresponding to the image to be rotated; each attribute information including at least one of brightness, saturation, and contrast; and the target attribute information being used to reduce a color difference between the target image and the target skybox image; According to the download address, respectively acquiring the drawn target image of the image to be rotated and the target skybox image of the skybox image through the at least one external communication interface, and synchronously displaying them on the display; Rotating the target image displayed on the display; The first attribute information of the target image and the second attribute information of the target skybox image are restored, and the restored target image and target skybox image are displayed on the display.
Citation Information
Patent Citations
Augmented reality scene generation method, device and equipment
CN106383587A
Image data display method, related device and computer storage medium
CN107798714A