CN116662688A - Method and related device for restoring panorama based on browser - Google Patents

Method and related device for restoring panorama based on browser Download PDF

Info

Publication number
CN116662688A
CN116662688A CN202310508143.2A CN202310508143A CN116662688A CN 116662688 A CN116662688 A CN 116662688A CN 202310508143 A CN202310508143 A CN 202310508143A CN 116662688 A CN116662688 A CN 116662688A
Authority
CN
China
Prior art keywords
panorama
sub
target
pictures
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310508143.2A
Other languages
Chinese (zh)
Inventor
刘钦锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ideamake Software Technology Co Ltd
Original Assignee
Shenzhen Ideamake Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ideamake Software Technology Co Ltd filed Critical Shenzhen Ideamake Software Technology Co Ltd
Priority to CN202310508143.2A priority Critical patent/CN116662688A/en
Publication of CN116662688A publication Critical patent/CN116662688A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application provides a method for restoring a panoramic image based on a browser and a related device, wherein the method comprises the steps of determining the size and the scale of a target display area in the browser; sending an acquisition request to a server according to the size and the scale; receiving a first image packet from a server; invoking a target subprogram in a browser according to the first image package, and splicing a plurality of first sub-images into a partial panorama; displaying the partial panorama in the target display area; and acquiring a second image package from the server, and splicing the second image package into a target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image. Therefore, the performance requirement of the terminal side on panorama synthesis can be reduced, and the panorama synthesis efficiency is improved.

Description

Method and related device for restoring panorama based on browser
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a method and a related device for restoring a panoramic image based on a browser.
Background
Currently, the prior art supports multiple people to synthesize panoramic views simultaneously through a server. Because the synthesis processing is completed by the server side, the processing resources of the server side are insufficient to meet the requirement that too many users simultaneously synthesize the panoramic image, when more users simultaneously synthesize the panoramic image, the processing efficiency is low, the users often need to wait for a long time in a queuing way, and the processing efficiency is low.
Disclosure of Invention
The embodiment of the application provides a method and a related device for restoring a panoramic image based on a browser, which are used for reducing the performance requirement of a terminal side for panoramic image synthesis and improving the panoramic image synthesis efficiency.
In a first aspect, an embodiment of the present application provides a method for restoring a panorama based on a browser, which is applied to a terminal device in a panorama processing system, where the panorama processing system includes a server and the terminal device, the server is communicatively connected with the terminal device, and a browser is running in the terminal device; the method comprises the following steps:
determining the size and the scale of a target display area in the browser;
sending an acquisition request to the server according to the size and the scale, wherein the acquisition request is used for acquiring a first image package of a target panoramic image, the first image package comprises a plurality of first sub-images, and the plurality of first sub-images are used for synthesizing and adapting to the local panoramic image which is displayed on the scale and has the same size as the target display area;
receiving the first map packet from the server;
invoking a target subprogram in the browser according to the first image package, and splicing the plurality of first sub-images into the partial panorama;
displaying the partial panorama in the target display area;
and acquiring a second image package from the server, and splicing the second image package into the target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image.
In a second aspect, an embodiment of the present application provides a device for restoring a panorama based on a browser, which is applied to a terminal device in a panorama processing system, where the panorama processing system includes a server and the terminal device, the server is communicatively connected with the terminal device, and a browser is running in the terminal device; the method comprises the following steps:
the determining unit is used for determining the size and the scale of the target display area in the browser;
the sending unit is used for sending an acquisition request to the server according to the size and the scale, wherein the acquisition request is used for acquiring a first image packet of a target panoramic image, the first image packet comprises a plurality of first sub-images, and the plurality of first sub-images are used for synthesizing and adapting to the local panoramic image which is displayed on the scale and has the same size as the target display area;
a receiving unit, configured to receive the first packet from the server;
the splicing unit is used for calling a target subprogram in the browser according to the first image packet and splicing the plurality of first sub-images into the partial panorama;
a display unit configured to display the partial panorama in the target display area;
the splicing unit is further configured to obtain a second image packet from the server, and splice the second image packet into a target panoramic image on the basis of the local panoramic image, where the second image packet includes a plurality of second sub-images except the plurality of first sub-images in the target panoramic image.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the first or second aspects of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in the first or second aspects of the present embodiment.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first or second aspects of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that in the embodiment of the present application, the size and the scale of the target display area in the browser are determined first; sending an acquisition request to a server according to the size and the scale; receiving a first image packet from a server; invoking a target subprogram in a browser according to the first image package, and splicing a plurality of first sub-images into a partial panorama; displaying the partial panorama in the target display area; and acquiring a second image package from the server, and splicing the second image package into a target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image. Therefore, the performance requirement of the terminal equipment for panorama synthesis can be reduced, and the panorama synthesis efficiency of the terminal equipment is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a schematic diagram of a panorama processing system according to an embodiment of the present application;
fig. 1b is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for restoring a panorama based on a browser according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a device for restoring a panorama based on a browser according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, system, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following description will first be made of the relevant terms that the present application relates to.
krnano: panorama roaming software and tools, also known as a panorama engine.
Panorama editor: refers to a tool developed based on krnano to edit 720 scenes, resembling 720 clouds.
xml file: refers to a method for storing panoramic data files, wherein the file format is xml.
Cutting: the panorama is cut into pictures, typically cube or tile, for the need of krnano panorama.
Cube map: six faces of the cube, each face having a picture, represent a certain face of the scene. Also referred to herein as "generic cut map".
Tile map: similar to a Goldmap, the map is formed by splicing innumerable small pictures, the resolution of different levels is different, and the larger the level is, the higher the resolution is, and the clearer the picture is. It can be converted from "ordinary cut map". Also referred to herein as "Gao Qingqie map".
Pictures used in krnano scene: either "cube map" or "tile map" except that the tile map is somewhat clear.
Synthesizing a panoramic view: restoring the cube map and the tile map into a panoramic map.
Front and rear ends: refers to front-end development and back-end development. The front-end development mainly comprises data rendering, data interaction and the like of webpages running on a PC end, a mobile end and the like, and the back-end development mainly comprises specific business logic, data storage and the like.
Currently, the prior art supports multiple people to synthesize panoramic views simultaneously through a server. Because the synthesis processing is completed by the server side, the processing resources of the server side are insufficient to meet the requirement that too many users simultaneously synthesize the panoramic image, when more users simultaneously synthesize the panoramic image, the processing efficiency is low, the users often need to wait for a long time in a queuing way, and the processing efficiency is low.
In order to solve the problems, the embodiment of the application provides a method for restoring a panoramic image based on a browser. The method can be applied to a scene for panorama synthesis based on a browser. The size and the scale of the target display area in the browser can be determined; sending an acquisition request to a server according to the size and the scale; receiving a first image packet from a server; invoking a target subprogram in a browser according to the first image package, and splicing a plurality of first sub-images into a partial panorama; displaying the partial panorama in the target display area; and acquiring a second image package from the server, and splicing the second image package into a target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image. Therefore, the performance requirement of the terminal equipment for panorama synthesis can be reduced, and the panorama synthesis efficiency of the terminal equipment is improved. The present solution may be applied to a variety of scenarios, including but not limited to the application scenarios mentioned above.
The system architecture to which the embodiments of the present application relate is described below.
The application also provides a panorama processing system 100, as shown in fig. 1a, the panorama processing system 100 comprises a server 110 and a terminal device 120, wherein the server 110 is in communication connection with the terminal device 120, and a browser 121 is operated in the terminal device 120. The browser 121 has a plurality of image processing tools, such as a panorama composing tool APIcanvas, webgl, deployed therein. The browser 121 may call the above-described synthesis tool as a target subroutine to process when synthesizing the panorama.
The present application also provides an electronic device 10, as shown in FIG. 1b, comprising at least one processor (processor) 11; a display screen 12; and a memory (memory) 13, which may also include a communication interface (Communications Interface) 15 and a bus 14. The processor 11, the display 12, the memory 13 and the communication interface 15 may communicate with each other via a bus 14. The display 12 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 15 may transmit information. The processor 11 may call logic instructions in the memory 13 to perform the methods of the above embodiments.
Alternatively, the electronic device 10 may be a mobile electronic device, or may be an electronic device or other device, which is not limited in uniqueness herein.
Further, the logic instructions in the memory 13 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 13, as a kind of computer readable storage medium, may be configured to store a software program, a computer executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 11 executes functional applications and data processing, i.e. implements the methods of the above embodiments, by running software programs, instructions or modules stored in the memory 13.
The memory 13 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the electronic device 10, and the like. Further, the memory 13 may include a high-speed random access memory, and may also include a nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used.
The specific method is described in detail below.
Referring to fig. 2, fig. 2 is a flow chart of a method for restoring a panorama based on a browser, which is provided by an embodiment of the present application, wherein the method is applied to a terminal device in a panorama processing system, the panorama processing system includes a server and the terminal device, the server is in communication connection with the terminal device, and a browser is running in the terminal device. The method comprises the following steps:
step 201, determining the size and the scale of the target display area in the browser.
And 202, sending an acquisition request to the server according to the size and the scale.
The acquisition request is used for acquiring a first image package of a target panoramic image, the first image package comprises a plurality of first sub-images, and the plurality of first sub-images are used for synthesizing and adapting to the local panoramic image which is displayed on the scale and has the same size as the target display area.
Step 203, receiving the first packet from the server.
And 204, calling a target subprogram in the browser according to the first image package, and splicing the plurality of first sub-images into the partial panorama.
In one possible embodiment, the invoking the target subroutine in the browser according to the first package, stitching the plurality of first sub-pictures into the partial panorama includes: determining a picture type of the plurality of first sub-pictures, the picture type comprising a tile map and a cube map; if the picture type is a tile map, a first target subprogram is called to splice the plurality of first sub-pictures into the partial panorama; and if the picture type is a cube picture, invoking a second target subprogram to splice the plurality of first sub-pictures into the partial panorama.
In a specific implementation, when the terminal device determines that the picture types of the plurality of first sub-pictures are tile pictures, a first target sub-program in a browser is opened, and the plurality of first sub-pictures are spliced into the local panorama. And when the terminal equipment determines that the picture type of the plurality of first sub-pictures is cube pictures, opening a first target subprogram in a browser, and splicing the plurality of first sub-pictures into the partial panorama. It will be appreciated that the partial panorama may be a cube map, a view made up of a plurality of cubes, or a portion of a cube map, and is not limited to being unique. The first target subroutine and the second target subroutine may be the same applet, plug-in or software, or may be different applet, plug-in or software, which are not limited uniquely herein.
It can be seen that in this embodiment, the stitching is performed according to the picture types, and different synthesis flows are executed for different picture types, so that the processing efficiency of the terminal device for panorama synthesis is improved.
Step 205, displaying the partial panorama in the target display area.
Step 206, obtaining a second image package from the server.
And splicing the target panoramic image on the basis of the local panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image.
In one possible embodiment, the obtaining the second map packet from the server, and stitching the target panorama based on the local panorama, includes: acquiring a second map packet of the target panoramic map from a server; invoking the target subprogram, starting from the edge of the local panorama, and splicing the plurality of second sub-pictures in the background to obtain a hidden panorama, wherein the target panorama comprises the local panorama and the hidden panorama; acquiring a switching instruction input by a user; and switching and displaying the local panorama and the hidden panorama on the target display area according to the switching instruction.
In a specific implementation, after the local panoramic image is spliced, the local panoramic image is displayed on the target display area. And then, obtaining the remaining second image package of the target panoramic image from the server, determining a plurality of edge image coordinates of the local panoramic image, and starting to splice adjacent images corresponding to the plurality of edge images into the hidden panoramic image. And when the user needs to switch views to display other views, switching the local panoramic view and the hidden panoramic view on the target display area according to the switching operation indicated by the switching instruction.
Specifically, the second sub-graph package comprises a plurality of sub-graph packages, and the plurality of sub-graph packages comprise a target sub-graph package and a plurality of first sub-graph packages; and the invoking the target subprogram starts from the edge of the local panorama, and the splicing is carried out on the plurality of second sub-pictures in the background to obtain a hidden panorama, wherein the invoking comprises the following steps: determining a target cube map to which the partial panorama belongs; invoking the target subprogram, starting from the edge of the partial panorama, and splicing a plurality of third sub-pictures in the target sub-picture package in the background to obtain a target sub-cube picture, wherein the plurality of second sub-pictures comprise the plurality of third sub-pictures; invoking the target subprogram to splice a plurality of fourth sub-pictures corresponding to the plurality of first sub-pictures into five first cube pictures in the background, wherein the plurality of second sub-pictures comprise the plurality of fourth sub-pictures; and splicing the target sub-cube map and the five first cube maps into the hidden panorama.
In a specific implementation, since the existing panorama is generally composed of six cube diagrams, the partial panorama to be initially displayed in the target display area may be a preset initial position, for example, a panorama of the interior of the house, and the initial position may be set as a partial image of the entrance of the doorway from an inward viewing angle. Therefore, it may be determined, first, to which cube map the partial panorama currently to be displayed in the target display area belongs, and the cube map to which the partial panorama belongs is the target cube map. And when the local panorama only occupies a part of the target cube map, starting the target subroutine to determine an edge picture of the local panorama, determining adjacent third sub-pictures of the edge picture, and splicing the plurality of third sub-pictures from the adjacent third sub-pictures to obtain the target cube map. And respectively splicing a plurality of fourth sub-pictures in each first picture package to form a corresponding first cube map, so as to obtain the five first cube maps, and splicing the five first cube maps to form the hidden panorama. And finally, splicing the target sub-cube map and the five first cube maps into the target panoramic map.
In a possible embodiment, the invoking the target subroutine starts from the edge of the local panorama and splices the plurality of second sub-pictures in the background to obtain a hidden panorama, including: and if the partial panorama is a target cube map, calling the target subroutine, starting from the edge of the partial panorama, and splicing the five first cube maps into the hidden panorama in the background.
In a specific implementation, when the local panorama is the target cube map, starting the target subroutine to determine an edge picture of the local panorama, determining four first cube maps corresponding to the edge picture, firstly splicing the four first cube maps together, and finally splicing a fifth first cube map to obtain the hidden panorama.
It can be seen that in this embodiment, different synthesis flows are invoked for different picture types, so that the processing efficiency of the terminal device for panorama synthesis is improved.
In a possible embodiment, after the stitching the target panorama based on the partial panorama, the method further comprises: acquiring a storage instruction input by the user; and storing the target panoramic image in a target storage space.
In a specific implementation, after the target panoramic image is spliced, if a user needs to download the target panoramic image, the user may click a download button, and after the terminal device detects that the user clicks the download button, the user is prompted to select a target storage space, and after the target storage space is determined, the target panoramic image is stored in the target storage space.
It can be seen that in this embodiment, storage of the target panorama is achieved.
In one possible embodiment, the invoking the target subroutine in the browser according to the first package, stitching the plurality of first sub-pictures into the partial panorama includes: determining the current idle processing resources of the terminal equipment; determining at least one processing thread according to the idle processing resources; and according to the picture types of the plurality of first sub-pictures, invoking the at least one processing thread pair to splice the plurality of first sub-pictures into the partial panorama, wherein each processing thread in the at least one processing thread runs one target subprogram.
In a specific implementation, determining how many processing threads exist in idle processing resources in the terminal equipment, and determining at least one processing thread under the condition that other tasks are not influenced. If the slice type is a first slice type, determining N first processing threads from the idle processing resources, wherein N is a positive integer greater than or equal to 0; if the slice type is the second slice type, determining M first processing threads and K second processing threads from the idle processing resources, wherein M and K are positive integers greater than or equal to 0.
In addition, it can be understood that, when performing the panorama synthesis processing of the second package, the processing thread may also be determined according to the device performance, which is not described herein.
It can be seen that in this embodiment, when the cube map is cut, it is determined how many threads can be started to execute tasks according to the performance of the user terminal device, and if the configuration of the user terminal device is high, the combination is fast, and if the configuration is low, the user terminal device will not be blocked, so as to achieve reasonable utilization of the terminal device. And the efficiency of synthesizing the target panorama by the terminal equipment is improved.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the mobile electronic device, in order to achieve the above-described functionality, comprises corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional units of the electronic device according to the method example, for example, each functional unit can be divided corresponding to each function, and two or more functions can be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a device 30 for restoring a panorama based on a browser, where the device 30 for restoring a panorama based on a browser is applied to a terminal device in a panorama processing system, the panorama processing system includes a server and the terminal device, the server is communicatively connected with the terminal device, and a browser is running in the terminal device; the browser-based apparatus 30 for restoring a panorama includes:
a determining unit 31 for determining the size and scale of the target display area in the browser;
a sending unit 32, configured to send an acquisition request to the server according to the size and the scale, where the acquisition request is used to acquire a first image packet of a target panoramic image, where the first image packet includes a plurality of first sub-images, and the plurality of first sub-images are used to synthesize a local panoramic image that is adapted to the display scale and has the same size as the target display area;
a receiving unit 33, configured to receive the first packet from the server;
a stitching unit 34, configured to invoke a target subroutine in the browser according to the first image packet, and stitch the plurality of first sub-images into the partial panorama;
a display unit 35 for displaying the partial panorama in the target display area;
the stitching unit 34 is further configured to obtain a second image package from the server, and stitch the second image package into a target panorama based on the local panorama, where the second image package includes a plurality of second sub-images except the plurality of first sub-images in the target panorama.
It can be seen that in the embodiment of the present application, the size and the scale of the target display area in the browser are determined first; sending an acquisition request to a server according to the size and the scale; receiving a first image packet from a server; invoking a target subprogram in a browser according to the first image package, and splicing a plurality of first sub-images into a partial panorama; displaying the partial panorama in the target display area; and acquiring a second image package from the server, and splicing the second image package into a target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image. Therefore, the performance requirement of the terminal equipment for panorama synthesis can be reduced, and the panorama synthesis efficiency of the terminal equipment is improved.
In one possible embodiment, the obtaining the second map packet from the server, and stitching the second map packet into the target panorama based on the local panorama, the stitching unit 34 is specifically configured to: acquiring a second map packet of the target panoramic map from a server; invoking the target subprogram, starting from the edge of the local panorama, and splicing the plurality of second sub-pictures in the background to obtain a hidden panorama, wherein the target panorama comprises the local panorama and the hidden panorama; acquiring a switching instruction input by a user; and switching and displaying the local panorama and the hidden panorama on the target display area according to the switching instruction.
In one possible embodiment, the second sub-graph package includes a plurality of sub-graph packages including a target sub-graph package and a plurality of first sub-graph packages; the invoking the target subroutine starts from the edge of the partial panorama and splices the plurality of second sub-pictures in the background to obtain an aspect of the hidden panorama, and the splicing unit 34 is specifically configured to: determining a target cube map to which the partial panorama belongs; invoking the target subprogram, starting from the edge of the partial panorama, and splicing a plurality of third sub-pictures in the target sub-picture package in the background to obtain a target sub-cube picture, wherein the plurality of second sub-pictures comprise the plurality of third sub-pictures; invoking the target subprogram to splice a plurality of fourth sub-pictures corresponding to the plurality of first sub-pictures into five first cube pictures in the background, wherein the plurality of second sub-pictures comprise the plurality of fourth sub-pictures; and splicing the target sub-cube map and the five first cube maps into the hidden panorama.
In a possible embodiment, the invoking the target subroutine starts from the edge of the partial panorama and splices the plurality of second sub-pictures in the background to obtain a hidden panorama, and the splicing unit 34 is specifically configured to: and if the partial panorama is a target cube map, calling the target subroutine, starting from the edge of the partial panorama, and splicing the five first cube maps into the hidden panorama in the background.
In one possible embodiment, after the stitching into the target panorama based on the partial panorama, the apparatus 30 for restoring a panorama based on a browser further comprises: the acquisition unit is used for acquiring the storage instruction input by the user; and the storage unit is used for storing the target panoramic image in a target storage space.
In one possible embodiment, the step of calling the target subroutine in the browser according to the first package, and stitching the plurality of first sub-pictures into the aspect of the partial panorama, the stitching unit 34 is specifically configured to: determining a picture type of the plurality of first sub-pictures, the picture type comprising a tile map and a cube map; if the picture type is a tile map, a first target subprogram is called to splice the plurality of first sub-pictures into the partial panorama; and if the picture type is a cube picture, invoking a second target subprogram to splice the plurality of first sub-pictures into the partial panorama.
In one possible embodiment, the step of calling the target subroutine in the browser according to the first package, and stitching the plurality of first sub-pictures into the aspect of the partial panorama, the stitching unit 34 is specifically configured to: determining the current idle processing resources of the terminal equipment; determining at least one processing thread according to the idle processing resources; and according to the picture types of the plurality of first sub-pictures, invoking the at least one processing thread pair to splice the plurality of first sub-pictures into the partial panorama, wherein each processing thread in the at least one processing thread runs one target subprogram.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more sets of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program makes a computer execute part or all of the steps of any one of the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and system may be implemented in other manners. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, magnetic disk, optical disk, volatile memory or nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example but not limitation, many forms of random access memory (random access memory, RAM) are available, such as Static RAM (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM). Etc. various media in which program code may be stored.
Although the present application is disclosed above, the present application is not limited thereto. Variations and modifications, including combinations of the different functions and implementation steps, as well as embodiments of the software and hardware, may be readily apparent to those skilled in the art without departing from the spirit and scope of the application.

Claims (10)

1. The method for restoring the panorama based on the browser is characterized by being applied to terminal equipment in a panorama processing system, wherein the panorama processing system comprises a server and the terminal equipment, the server is in communication connection with the terminal equipment, and the browser is operated in the terminal equipment; the method comprises the following steps:
determining the size and the scale of a target display area in the browser;
sending an acquisition request to the server according to the size and the scale, wherein the acquisition request is used for acquiring a first image package of a target panoramic image, the first image package comprises a plurality of first sub-images, and the plurality of first sub-images are used for synthesizing and adapting to the local panoramic image which is displayed on the scale and has the same size as the target display area;
receiving the first map packet from the server;
invoking a target subprogram in the browser according to the first image package, and splicing the plurality of first sub-images into the partial panorama;
displaying the partial panorama in the target display area;
and acquiring a second image package from the server, and splicing the second image package into the target panoramic image on the basis of the partial panoramic image, wherein the second image package comprises a plurality of second sub-images except the plurality of first sub-images in the target panoramic image.
2. The method according to claim 1, wherein the obtaining the second map packet from the server, and stitching the target panorama based on the local panorama, comprises:
acquiring a second map packet of the target panoramic map from a server;
invoking the target subprogram, starting from the edge of the local panorama, and splicing the plurality of second sub-pictures in the background to obtain a hidden panorama, wherein the target panorama comprises the local panorama and the hidden panorama;
acquiring a switching instruction input by a user;
and switching and displaying the local panorama and the hidden panorama on the target display area according to the switching instruction.
3. The method of claim 2, wherein the second sub-graph package comprises a plurality of sub-graph packages, the plurality of sub-graph packages comprising a target sub-graph package and a plurality of first sub-graph packages;
and the invoking the target subprogram starts from the edge of the local panorama, and the splicing is carried out on the plurality of second sub-pictures in the background to obtain a hidden panorama, wherein the invoking comprises the following steps:
determining a target cube map to which the partial panorama belongs;
invoking the target subprogram, starting from the edge of the partial panorama, and splicing a plurality of third sub-pictures in the target sub-picture package in the background to obtain a target sub-cube picture, wherein the plurality of second sub-pictures comprise the plurality of third sub-pictures;
invoking the target subprogram to splice a plurality of fourth sub-pictures corresponding to the plurality of first sub-pictures into five first cube pictures in the background, wherein the plurality of second sub-pictures comprise the plurality of fourth sub-pictures;
and splicing the target sub-cube map and the five first cube maps into the hidden panorama.
4. The method of claim 2, wherein invoking the object subroutine begins with the local panorama edge and stitching the plurality of second sub-pictures in the background to obtain a hidden panorama, comprising:
and if the partial panorama is a target cube map, calling the target subroutine, starting from the edge of the partial panorama, and splicing the five first cube maps into the hidden panorama in the background.
5. The method of any of claims 1-4, wherein after stitching the partial panorama into a target panorama based on the partial panorama, the method further comprises:
acquiring a storage instruction input by the user;
and storing the target panoramic image in a target storage space.
6. The method of any of claims 1-4, wherein invoking the target subroutine in the browser from the first package, stitching the plurality of first sub-images into the partial panorama, comprises:
determining a picture type of the plurality of first sub-pictures, the picture type comprising a tile map and a cube map;
if the picture type is a tile map, a first target subprogram is called to splice the plurality of first sub-pictures into the partial panorama;
and if the picture type is a cube picture, invoking a second target subprogram to splice the plurality of first sub-pictures into the partial panorama.
7. The method of any of claims 1-4, wherein invoking the target subroutine in the browser from the first package, stitching the plurality of first sub-images into the partial panorama, comprises:
determining the current idle processing resources of the terminal equipment;
determining at least one processing thread according to the idle processing resources;
and according to the picture types of the plurality of first sub-pictures, invoking the at least one processing thread pair to splice the plurality of first sub-pictures into the partial panorama, wherein each processing thread in the at least one processing thread runs one target subprogram.
8. The device for restoring the panorama based on the browser is characterized by being applied to terminal equipment in a panorama processing system, wherein the panorama processing system comprises a server and the terminal equipment, the server is in communication connection with the terminal equipment, and the browser is operated in the terminal equipment; the device for restoring the panorama based on the browser comprises:
the determining unit is used for determining the size and the scale of the target display area in the browser;
the sending unit is used for sending an acquisition request to the server according to the size and the scale, wherein the acquisition request is used for acquiring a first image packet of a target panoramic image, the first image packet comprises a plurality of first sub-images, and the plurality of first sub-images are used for synthesizing and adapting to the local panoramic image which is displayed on the scale and has the same size as the target display area;
a receiving unit, configured to receive the first packet from the server;
the splicing unit is used for calling a target subprogram in the browser according to the first image packet and splicing the plurality of first sub-images into the partial panorama;
a display unit configured to display the partial panorama in the target display area;
the splicing unit is further configured to obtain a second image packet from the server, and splice the second image packet into a target panoramic image on the basis of the local panoramic image, where the second image packet includes a plurality of second sub-images except the plurality of first sub-images in the target panoramic image.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to execute the instructions of the steps in the method according to any one of claims 1-7.
CN202310508143.2A 2023-05-06 2023-05-06 Method and related device for restoring panorama based on browser Pending CN116662688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310508143.2A CN116662688A (en) 2023-05-06 2023-05-06 Method and related device for restoring panorama based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310508143.2A CN116662688A (en) 2023-05-06 2023-05-06 Method and related device for restoring panorama based on browser

Publications (1)

Publication Number Publication Date
CN116662688A true CN116662688A (en) 2023-08-29

Family

ID=87710283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310508143.2A Pending CN116662688A (en) 2023-05-06 2023-05-06 Method and related device for restoring panorama based on browser

Country Status (1)

Country Link
CN (1) CN116662688A (en)

Similar Documents

Publication Publication Date Title
CN106155454B (en) Interface display method and device and electronic equipment
CN108939556B (en) Screenshot method and device based on game platform
CN111124567B (en) Operation recording method and device for target application
CN111722885B (en) Program running method and device and electronic equipment
EP2897350A1 (en) Picture displaying method, apparatus and terminal device
US11991470B2 (en) Simulated photographing special effect generation method and apparatus, device, and medium
CN113411664B (en) Video processing method and device based on sub-application and computer equipment
CN112307403A (en) Page rendering method, device, storage medium and terminal
US10460490B2 (en) Method, terminal, and computer storage medium for processing pictures in batches according to preset rules
CN113791751B (en) Method and system for displaying carousel graphs, storage medium and terminal equipment
AU2021407925A9 (en) Simulated photographing special effect generation method and apparatus, device, and medium
CN110990106B (en) Data display method and device, computer equipment and storage medium
CN107092494B (en) Method and device for accessing APK (android Package) resource
CN115794095B (en) JavaScript-based illusion engine UI development method and system
CN116662688A (en) Method and related device for restoring panorama based on browser
CN109862295B (en) GIF generation method, device, computer equipment and storage medium
CN112929682B (en) Method, device and system for transparently processing image background and electronic equipment
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN116847147A (en) Special effect video determining method and device, electronic equipment and storage medium
CN114331808A (en) Action posture storage method, device, medium and electronic equipment
CN113822978A (en) Electronic map rendering method and device
CN113126942A (en) Display method and device of cover picture, electronic equipment and storage medium
CN112037341A (en) Method and device for processing VR panorama interaction function based on Web front end
CN112270733A (en) AR expression package generation method and device, electronic equipment and storage medium
CN111064894A (en) Image processing method, terminal device and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination