Panoramic image display method and apparatus, electronic device, and computer storage medium

By parsing and encoding the binary stream of panoramic images, and using technologies such as JavaScript, WebGL, and Three.js to render panoramic images, the cross-platform problem of panoramic image display is solved, enabling display on different terminals.

CN115661296BActive Publication Date: 2026-03-03同辉佳视(北京)信息技术股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211384997.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2026-03-03
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

Existing panoramic image display technologies are mostly limited to specific devices or playback platforms, and cannot achieve cross-platform display.

Method used

By acquiring the initial image, parsing its binary stream and determining the target encoding, generating the target encoding using Base64 encoding rules, and combining technologies such as JavaScript, WebGL, and Three.js to draw panoramic images, cross-platform display is achieved.

Benefits of technology

It enables cross-platform display of panoramic images on different terminal platforms, improving the applicability and display efficiency of panoramic images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661296B_ABST
    Figure CN115661296B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a panoramic image display method and device, electronic equipment and computer storage medium, the method comprises acquiring an initial image, analyzing the image, determining the corresponding target code, drawing a panoramic image according to the target code, and performing panoramic display on the initial image. Thus, in the present embodiment, the target code corresponding to the initial image is obtained by analysis, and the panoramic image is drawn based on the target code for panoramic display, so that the initial image content can be displayed based on different platform terminals, realizing cross-platform display of panoramic images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a panoramic image display method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Panoramic images, through wide-angle techniques and formats such as painting, photography, video, and 3D models, depict as much of the surrounding environment as possible. 360-degree panoramas, on the other hand, are created by capturing images of an entire scene with a professional camera or rendering images using modeling software. These images are then stitched together and played back using a dedicated player. Essentially, a flat photograph or computer-modeled image is transformed into a 360-degree panoramic view for virtual reality browsing, simulating a realistic three-dimensional space for the viewer.

[0003] However, existing panoramic images or videos can only be viewed using specific devices, and cannot be used without the corresponding equipment. Summary of the Invention

[0004] In view of this, the embodiments of the present invention aim to provide a panoramic image display method, apparatus, electronic device and computer storage medium to realize cross-platform display of panoramic images.

[0005] In a first aspect, embodiments of the present invention aim to provide a panoramic image display method, the method comprising:

[0006] Get the initial image;

[0007] The initial image is parsed to determine the corresponding target code;

[0008] A panoramic image is drawn based on the target encoding to provide a panoramic view of the initial image.

[0009] Further, the step of parsing the initial image to determine the target encoding corresponding to the initial image includes:

[0010] The initial image is parsed to determine the corresponding binary stream;

[0011] Based on preset encoding rules, feature encoding is performed on the binary stream to determine the target encoding corresponding to the initial image.

[0012] Further, the step of drawing the panoramic image based on the target encoding includes:

[0013] The target code is decoded based on a preset decoding rule to generate an intermediate image corresponding to the target code;

[0014] A panoramic image is drawn based on the intermediate image.

[0015] Further, the step of drawing a panoramic image based on the intermediate image includes:

[0016] Construct a spherical background;

[0017] The intermediate image is applied to the sphere background and rendered to generate the first image;

[0018] The panoramic image is drawn based on the first image.

[0019] Further, drawing the panoramic image based on the first image includes:

[0020] Construct a cube background;

[0021] The pixels of the first image on the background of the sphere are mapped onto the cube to generate the second image;

[0022] The second image is transformed based on the Cascading Style Sheets to generate the panoramic image.

[0023] Furthermore, the target encoding is generated based on Base64 encoding rules.

[0024] Secondly, embodiments of the present invention aim to provide a panoramic image display device, the device comprising:

[0025] The acquisition module is used to acquire the initial image;

[0026] The parsing module is used to parse the initial image and determine the corresponding target code;

[0027] The display module is used to draw a panoramic image based on the target encoding in order to display the initial image in a panoramic view.

[0028] Thirdly, embodiments of the present invention aim to provide a computer program product, the computer program product including a computer program / instruction, which, when executed by a processor, implements the method described in any of the preceding claims.

[0029] Fourthly, embodiments of the present invention aim to provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any of the preceding claims.

[0030] Fifthly, embodiments of the present invention aim to provide a computer storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0031] The technical solution of this invention acquires an initial image, parses the initial image to determine the corresponding target code, and draws a panoramic image based on the target code to display the initial image in a panoramic view. Therefore, this embodiment can preserve the image content while ensuring that the display of the initial image content is not limited to the platform corresponding to the initial image, thus achieving cross-platform display of the initial image. Attached Figure Description

[0032] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0033] Figure 1 This is a flowchart of a panoramic image display method according to an embodiment of the present invention;

[0034] Figure 2 This is a flowchart of the target encoding generation method according to an embodiment of the present invention;

[0035] Figure 3 This is a flowchart illustrating the process of drawing a panoramic image based on target encoding according to an embodiment of the present invention;

[0036] Figure 4 This is a flowchart illustrating the process of drawing a panoramic image based on an intermediate image, according to an embodiment of the present invention.

[0037] Figure 5 This is a flowchart of drawing a panoramic image based on a first image according to an embodiment of the present invention;

[0038] Figure 6 This is an overall flowchart of the panoramic display method according to an embodiment of the present invention;

[0039] Figure 7 This is a schematic diagram of the panoramic display device according to an embodiment of the present invention;

[0040] Figure 8 This is another schematic diagram of the panoramic display device according to an embodiment of the present invention;

[0041] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0042] The present invention is described below based on embodiments, but the invention is not limited to these embodiments. In the detailed description of the invention below, certain specific details are described in detail. Those skilled in the art will fully understand the invention even without these details. To avoid obscuring the essence of the invention, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0043] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0044] Unless the context explicitly requires it, words such as "including" or "contains" in the instruction manual should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0045] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0046] Existing panoramic image displays are mostly limited to specific devices or playback platforms, resulting in significant limitations in their use. Therefore, this invention aims to provide a panoramic image display method to achieve cross-platform display of panoramic images.

[0047] Figure 1 This is a flowchart of a panoramic image display method according to an embodiment of the present invention. Figure 1 As shown, the panoramic image display method in this embodiment includes the following steps.

[0048] In step S100, an initial image is obtained.

[0049] In this embodiment, the initial image can be a panoramic image captured by an image acquisition device, or it can be a panoramic image corresponding to a certain video frame obtained after processing a panoramic video. The panoramic video can be a panoramic VR video, a live panoramic video, or other types of panoramic video.

[0050] In step S200, the initial image is parsed to determine the corresponding target code.

[0051] In this embodiment, the target encoding format is related to the data encoding method of the panoramic display platform to meet the cross-platform panoramic display requirements of the initial image. Optionally, the target encoding in this embodiment is Base64 encoding, which is generated based on the Base64 encoding rules. Base64 is one of the most common encoding methods used on the internet for transmitting 8-bit byte code. It is a method that converts binary data into characters and represents binary data based on 64 printable characters, and can be used to transmit longer identification information in an HTTP environment. Base64 encoding is unreadable and requires decoding to be readable.

[0052] Optionally, in this embodiment, the initial image is parsed using JavaScript to determine the target encoding corresponding to the initial image. JavaScript (JS) is a lightweight, interpreted or just-in-time (JIT) programming language with a function-first approach. While it is best known as a scripting language for developing web pages, it is also used in many non-browser environments. JavaScript is a prototype-based, multi-paradigm dynamic scripting language that supports object-oriented, imperative, declarative, and functional programming paradigms. Compared to other programming languages, JavaScript is an object-based scripting language that can not only create objects but also use existing objects, interpreting them line by line during program execution. It also features simple and compact design, strong dynamism, and cross-platform compatibility. Specifically, JavaScript uses weakly typed variables, without strict requirements on the data types used. Furthermore, JavaScript is event-driven, responding to user input without requiring a web server. For example, when accessing a webpage, users can directly respond to events by simply clicking, moving the mouse up and down, or moving the window. Moreover, JavaScript is not dependent on the operating system, requiring only browser support. Therefore, a JavaScript script, once written, can be used on any machine that supports the JavaScript language. Thus, in this embodiment, JavaScript is used to parse the initial image and determine the target encoding corresponding to the initial image, enabling cross-platform display of panoramic images based on the target encoding.

[0053] Optionally, such as Figure 2 As shown, in this embodiment, the initial image is parsed based on the following steps, and the target code corresponding to the initial image is determined.

[0054] In step S210, the initial image is parsed to determine the binary stream corresponding to the initial image.

[0055] Since images are usually saved as binary files, in this embodiment, after obtaining the initial image, the initial image will be parsed to determine the binary stream corresponding to the initial image.

[0056] In step S220, feature encoding is performed on the binary stream based on preset encoding rules to determine the target encoding corresponding to the initial image.

[0057] In this embodiment, the target encoding format is Base64. Therefore, based on the encoding rules corresponding to Base64 encoding, feature encoding is performed on the binary stream, and the target encoding corresponding to the initial image is determined. Optionally, in this embodiment, a Base64 encoding tool can be used to encode the binary stream data corresponding to the initial image and generate the corresponding target encoding, that is, to generate the target encoding corresponding to the initial object.

[0058] In step S300, a panoramic image is drawn according to the target code to display the initial image in a panoramic view.

[0059] In this embodiment, after parsing the initial image to obtain the target code corresponding to the initial image, a panoramic image is drawn based on the target code to display the image content corresponding to the initial image in a panoramic view. Since the target code retains the feature data corresponding to the initial image, users can draw panoramic images applicable to different terminals according to the actual display requirements of the panoramic image based on the target code, thereby realizing cross-platform display of the panoramic image corresponding to the initial image.

[0060] Figure 3 This is a flowchart illustrating the process of drawing a panoramic image based on target encoding, according to an embodiment of the present invention. For example... Figure 3 As shown, in this embodiment, a panoramic image is drawn through the following steps.

[0061] In step S310, the target code is decoded based on a preset decoding rule to generate an intermediate image corresponding to the target code.

[0062] In this embodiment, decoding is the reverse process of encoding. Based on the decoding rules corresponding to the encoding and the reverse process of decoding, the target encoding is decoded to generate an intermediate image corresponding to the target encoding. Optionally, in this embodiment, the target encoding can be decoded using a Java Base64 decoding program to generate the intermediate image corresponding to the target encoding.

[0063] In step S320, a panoramic image is drawn based on the intermediate image.

[0064] In this embodiment, the intermediate image format is consistent with the standard panoramic image. The standard panoramic image is essentially an equidistant cylindrical projection, which is obtained by projecting each point on a three-dimensional sphere onto the side of a cylinder, and then unfolding the resulting image to obtain a rectangular image with an aspect ratio of 2:1. Furthermore, in this embodiment, when drawing the panoramic image based on the intermediate image and then displaying the image in a panoramic view, it actually corresponds to the reverse process of equidistant cylindrical projection, that is, restoring the intermediate image to a three-dimensional display effect.

[0065] Figure 4 This is a flowchart illustrating the process of drawing a panoramic image based on an intermediate image, according to an embodiment of the present invention. Figure 4 As shown, in this embodiment, the panoramic image is drawn based on the intermediate image through the following steps.

[0066] In step S321, a spherical background is constructed.

[0067] In this embodiment, since the process of drawing and displaying panoramic images is equivalent to the reverse process of equidistant cylindrical projection, when drawing panoramic images, it is necessary to first construct a spherical background and draw the panoramic image corresponding to the intermediate image based on the spherical background.

[0068] Optionally, WebGL can be used to construct the spherical background in this embodiment. WebGL (Web Graphics Library) is a 3D graphics protocol. As a graphics technology standard, it allows the combination of JavaScript and OpenGL ES 2.0. By adding a JavaScript binding to OpenGL ES 2.0, it provides hardware-accelerated 3D rendering for HTML5 Canvas, enabling web developers to utilize the system's graphics card to more smoothly display 3D scenes and models in the browser, as well as create complex navigation and data visualizations. Simultaneously, the WebGL technology standard enables the creation of interactive 3D animations on the web through the HTML script itself, without the need for any browser plugins. Through a unified, standard, and cross-platform OpenGL interface, it utilizes the underlying graphics hardware acceleration capabilities to achieve graphics rendering, eliminating the need to develop dedicated web page rendering plugins. It can be used to create website pages with complex 3D structures, and can be used to design 3D web games, etc. Therefore, this embodiment constructs a spherical background using the above method, and then draws the panoramic image corresponding to the intermediate image, facilitating the cross-platform display of panoramic images and improving the efficiency of cross-platform panoramic image display.

[0069] Furthermore, while most existing browsers support WebGL, developing directly using WebGL interfaces requires learning complex shader languages, performing numerous 3D calculations, and has a long development cycle. Therefore, to improve the efficiency of generating the first image from an intermediate image, this embodiment can also choose to program using a more lightweight 3D library with a more convenient API, such as Three.js, and apply textures to the sphere background model to generate the first image from the intermediate image. Three.js simplifies the complex interface by encapsulating WebGL, making it more convenient to use. At the same time, Three.js, based on object-oriented thinking, objectifies data structures, making it easy to use, widely applicable, and easier to develop. Therefore, this embodiment can generate the first image based on the above method, improving the generation efficiency of the first image and thus improving the cross-platform display efficiency of the panoramic image.

[0070] In step S322, the intermediate image is mapped onto the sphere background and rendered to generate the first image.

[0071] In this embodiment, after determining the intermediate image corresponding to the target code, the intermediate image is used as a material texture on the sphere background for rendering to generate the first image.

[0072] Furthermore, the specific program code for generating the first image using Three.js in this embodiment can be found as follows:

[0073]

[0074] In step S323, a panoramic image is drawn based on the first image.

[0075] Optionally, in this embodiment, the above method can quickly generate the first image corresponding to the intermediate image, thereby improving the efficiency of drawing the panoramic image based on the first image. However, due to the characteristics of WebGL itself, the compatibility of the first image still needs to be improved. Therefore, in order to improve the compatibility of the drawn panoramic image, this embodiment will use CCS 3D conversion to draw the panoramic image corresponding to the first image, so as to further improve the final panoramic image display effect.

[0076] Furthermore, such as Figure 5 As shown, in this embodiment, a panoramic image is drawn through the following steps.

[0077] In step S323-1, a cube background is constructed.

[0078] In this embodiment, since the first image is generated by pasting onto a spherical background, and CCS cannot operate on the spherical background, when drawing a panoramic image based on the first image, this embodiment first constructs a cube background around the existing spherical background, transforming the first image into an image in a 3D scene, thereby improving the compatibility of the drawn panoramic image and meeting the panoramic display needs of different platforms.

[0079] In step S323-2, the pixels of the first image on the sphere background are mapped onto the cube to generate the second image.

[0080] In this embodiment, based on the principle of panoramic images, the viewpoint is placed at the center of the sphere. By viewing the reflection of the real scene on the sphere from the center, a 360-degree visual experience in space is created. Therefore, in this embodiment, after constructing the cube scene, the pixels of the first image on the sphere's background are mapped onto the cube to generate the second image.

[0081] Optionally, this embodiment introduces coordinates. Based on the correspondence between the coordinates of the same pixel on the spherical background and the cube background, each pixel of the first image on the spherical background is mapped onto the cube to generate the second image. In this process, a spherical coordinate system needs to be established first to determine the spherical coordinates of each pixel on the spherical background. Then, based on the coordinate transformation relationship between the spherical coordinate system and the corresponding Cartesian coordinate system of the cube background, the Cartesian coordinates of each pixel on the cube background are determined. Finally, the second image is generated based on the Cartesian coordinates and pixel features of each pixel.

[0082] In this embodiment, the variables described by the sphere coordinates include the radius r and the vertical angle θ and the horizontal angle φ. Assuming r is 1 in the sphere background, θ ranges from 0 to π, and φ ranges from -π / 4 to 7π / 4. Based on this, the coordinates of each point on the sphere in the Cartesian coordinate system can be determined as x = sinθcosφ, y = sinθsinφ, and z = cosθ. Therefore, for the projection of each pixel from the sphere background onto the cube background, when the angles θ and φ are the same, the radius r of the sphere is extended until it intersects the face of the cube. Assuming the length at this point is R, the points on the cube corresponding to the points (sinθcosφ, sinθsinφ, cosθ) on the sphere background are (Rsinθcosφ, Rsinθsinφ, Rcosθ). Suppose we need to determine a point on the plane where x = 1, then 1 = Rsinθcosφ. We can then determine R = 1 / (sinθcosφ), and the coordinates of the point mapped onto the x-plane are (1, tanφ, cotθ / cosφ). Simultaneously, based on the above method, we can determine the projections onto other planes in the cube background, thereby generating a second image.

[0083] Furthermore, since image processing in this embodiment is performed on a pixel-by-pixel basis, when generating the second image corresponding to the cube background, it can be achieved by traversing every pixel on the spherical image and projecting each pixel onto the cube face, or by traversing the points on each face of the cube background, finding the points mapped to the spherical background, and obtaining the pixel with the closest position on the spherical surface as the point on the corresponding face of the cube background. Specifically, since the method of traversing every pixel on the spherical image and projecting each pixel onto the cube face may result in duplicated pixels or missing pixels at certain positions on the cube face after projection, this embodiment uses the latter method to generate the second image. That is, by traversing every point on each face of the cube background, finding the position mapped to the spherical surface, and obtaining the pixel with the closest position on the spherical background as the pixel of the point on the corresponding 3D background face, the second image is formed by combining all the corresponding pixels on each face.

[0084] In step S323-3, the second image is transformed based on the Cascading Style Sheet to generate a panoramic image.

[0085] In this embodiment, after generating the second image, it is transformed based on Cascading Style Sheets (CSS) to generate a panoramic image for display. CSS is a computer language used to style HTML (an application of Standard Generalized Markup Language) or XML (a subset of CSS) documents. CSS can not only statically format web pages, but also dynamically format various elements of a web page in conjunction with various scripting languages. By using CSS, pixel-level precise control over the layout of elements on a web page is possible, it supports almost all font sizes and styles, and it has the ability to edit the styles of web page objects and models.

[0086] Optionally, the program corresponding to the panoramic display method in this embodiment can be implemented using Electron, enabling the panoramic image drawn based on the initial image to adapt to multiple types of terminals. By displaying the drawn panoramic image on the terminal, cross-platform display of the panoramic image is achieved. Electron is a cross-platform desktop application built using JavaScript, HTML, and CSS. It is based on the Node.js and Chromium software platform and is used by the Atom editor and many other applications. Electron is compatible with Mac, Windows, and Linux, and applications can be built for all three platforms.

[0087] Furthermore, the panoramic image drawn in this embodiment can be played and displayed using mxreality.js. mxreality.js includes the source code of a playback library that simultaneously supports HLS (an adaptive bitrate streaming media transmission protocol based on HTTP), FLV (Flash Video), WebRTC (a real-time communication protocol), and panoramic image H5 protocols. It is a player that supports ordinary videos, panoramic VR videos, live ordinary videos, live panoramic videos, and cubemap videos and images. Therefore, in this embodiment, after the panoramic image is drawn, it can be played and displayed using the aforementioned player, achieving cross-platform display of panoramic images while improving the user's viewing experience.

[0088] The technical solution of this embodiment acquires an initial image, parses the initial image to determine the corresponding target code, and draws a panoramic image based on the target code to display the initial image in a panoramic view. Therefore, by obtaining the target code corresponding to the initial image through parsing, this embodiment can preserve the image content while drawing a panoramic image based on the target code for panoramic display. This allows the initial image content to be displayed on different platform terminals, achieving cross-platform display of panoramic images, rather than being limited to the display platform corresponding to the initial image, thus improving the applicability of panoramic images.

[0089] Figure 6 This is an overall flowchart of the panoramic display method according to an embodiment of the present invention. Figure 6 As shown, this embodiment achieves cross-platform display of panoramic images through the following steps.

[0090] In step S410, an initial image is obtained.

[0091] In step S420, the initial image is parsed to determine the binary stream corresponding to the initial image.

[0092] In step S430, feature encoding is performed on the binary stream based on preset encoding rules to determine the target encoding corresponding to the initial image.

[0093] In step S440, the target code is decoded based on a preset decoding rule to generate an intermediate image corresponding to the target code.

[0094] In step S450, a spherical background is constructed.

[0095] In step S460, the intermediate image is mapped onto the sphere background and rendered to generate the first image.

[0096] In step S470, a cube background is constructed.

[0097] In step S480, the pixels of the first image on the sphere background are mapped onto the cube to generate the second image.

[0098] In step S490, the second image is transformed based on the Cascading Style Sheet to generate a panoramic image.

[0099] It should be noted that the implementation of each step in the panoramic image display method of this embodiment has been described in detail in the foregoing content, and will not be repeated here.

[0100] The technical solution of this invention, after acquiring the initial image, parses the binary stream of the initial image, converts the binary stream into a target code that can be directly used and displayed, and then processes the target code to redraw the panoramic image, so that the drawn panoramic image can be applied to different terminal platforms, realizing cross-platform display of panoramic images.

[0101] Figure 7 This is a schematic diagram of a panoramic display device according to an embodiment of the present invention. Figure 7 As shown, the panoramic display device in this embodiment includes an acquisition module 1, a parsing module 2, and a display module 3. The acquisition module 1 acquires an initial image. The parsing module 2 parses the initial image to determine the corresponding target code. The display module 3 draws a panoramic image based on the target code to display the initial image in a panoramic view.

[0102] Optionally, such as Figure 8 As shown, the parsing module 2 in this embodiment includes a first parsing unit 21 and a second parsing unit 22. The first parsing unit 21 parses the initial image to determine the corresponding binary stream. The second parsing unit 22 performs feature encoding on the binary stream based on preset encoding rules to determine the target encoding corresponding to the initial image.

[0103] Optionally, such as Figure 8 As shown, the display module 3 in this embodiment includes a first generation unit 31, a second generation unit 32, and a third generation unit 33. The first generation unit 31 decodes the target encoding based on preset decoding rules to generate an intermediate image corresponding to the target encoding. The second generation unit 32 draws a panoramic image based on the intermediate image. Specifically, the second generation unit 32 constructs a spherical background, maps the intermediate image onto the spherical background, and renders it to generate a first image. The third generation unit 33 draws a panoramic image based on the first image. Specifically, the third generation unit 33 constructs a cube background, maps the pixels of the first image on the spherical background onto the cube to generate a second image, and transforms the second image based on a Cascading Style Sheets (CSS) to generate a panoramic image.

[0104] The technical solution of this embodiment acquires an initial image through an acquisition module, parses the initial image through a parsing module to determine the corresponding target code, and draws a panoramic image based on the target code through a display module to display the initial image in a panoramic view. Therefore, this embodiment can preserve the image content while making the display of the initial image content no longer limited to the display platform corresponding to the initial image, thereby achieving cross-platform display of the initial image.

[0105] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (For example...) Figure 9 As shown, Figure 9 The illustrated electronic device is a general address lookup device, comprising a general computer hardware architecture, including at least a processor 91 and a memory 92. The processor 91 and memory 92 are connected via a bus 93. The memory 92 is adapted to store instructions or programs executable by the processor 91. The processor 91 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 91 executes the instructions stored in the memory 92, thereby performing the method flow of the embodiments of the present invention as described above to process data and control other devices. The bus 93 connects the aforementioned components together, and also connects these components to a display controller 94, a display device, and an input / output (I / O) device 95. The input / output (I / O) device 95 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 95 is connected to the system via an input / output (I / O) controller 96.

[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.

[0108] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.

[0109] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.

[0110] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.

[0111] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can be modified and varied in various ways. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for displaying panoramic images, characterized in that, The method includes: Acquire an initial image, which is a single frame from a panoramic video or a panoramic image directly acquired by an image acquisition device; The initial image is parsed to determine the corresponding target code; A panoramic image is drawn based on the target code to provide a panoramic view of the initial image; The step of drawing the panoramic image based on the target encoding includes: The target code is decoded based on a preset decoding rule to generate an intermediate image corresponding to the target code; Draw a panoramic image based on the intermediate image; The step of drawing a panoramic image based on the intermediate image includes: Construct a spherical background; The intermediate image is applied to the sphere background and rendered to generate the first image; Construct a cube background; Construct a spherical coordinate system and determine the spherical coordinates of each pixel on the spherical background; Based on the coordinate transformation relationship between the spherical coordinate system and the corresponding rectangular coordinate system of the cube background, determine the rectangular coordinates of each pixel on the cube background; A second image is generated based on the Cartesian coordinates and pixel features of each pixel. The second image is transformed based on the Cascading Style Sheets to generate the panoramic image.

2. The method according to claim 1, characterized in that, The step of parsing the initial image to determine the target encoding corresponding to the initial image includes: The initial image is parsed to determine the corresponding binary stream; Based on preset encoding rules, feature encoding is performed on the binary stream to determine the target encoding corresponding to the initial image.

3. The method according to claim 1, characterized in that, The target encoding is generated based on Base64 encoding rules.

4. A panoramic image display device, characterized in that, The device includes: The acquisition module is used to acquire an initial image, which is a single frame from a panoramic video or a panoramic image directly acquired by an image acquisition device. The parsing module is used to parse the initial image and determine the corresponding target code; The display module is used to draw a panoramic image based on the target code, so as to display the initial image in a panoramic view; The display module is also used for: The target code is decoded based on a preset decoding rule to generate an intermediate image corresponding to the target code; Draw a panoramic image based on the intermediate image; The step of drawing a panoramic image based on the intermediate image includes: Construct a spherical background; The intermediate image is applied to the sphere background and rendered to generate the first image; Construct a cube background; Construct a spherical coordinate system and determine the spherical coordinates of each pixel on the spherical background; Based on the coordinate transformation relationship between the spherical coordinate system and the corresponding rectangular coordinate system of the cube background, determine the rectangular coordinates of each pixel on the cube background; A second image is generated based on the Cartesian coordinates and pixel features of each pixel. The second image is transformed based on the Cascading Style Sheets to generate the panoramic image.

5. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method of any one of claims 1-3.

6. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any one of claims 1-3.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method steps of any one of claims 1-3.

Citation Information

Patent Citations

  • Electronic guide method and device for scenic spot, electronic equipment and storage medium

    CN114359719A