Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for displaying a panoramic image, so as to solve the technical problems mentioned in the foregoing background, or at least partially solve the technical problems mentioned in the foregoing background.
In a first aspect, an embodiment of the present invention provides a panoramic image display method, including:
synchronously displaying the panoramic image information in a global projection mode and a local projection mode;
and when the view angle conversion instruction is acquired, performing cooperative conversion on the global projection mode and the local projection mode of the panoramic image information according to the view angle conversion instruction.
More specifically, the step of synchronously displaying the panoramic image information in a global projection manner and a local projection manner specifically includes:
obtaining the overall projection of the panoramic image information according to the panoramic image information;
acquiring trigger event information, and generating a local projection according to the trigger event information;
the local projection is displayed in an overlapping manner on the global projection or the local projection and the global projection are displayed in parallel.
More specifically, the partial projection is a straight line projection.
More specifically, the global projection is a spherical polar plane projection, an equidistant cylindrical projection or an orthogonal projection.
More specifically, the view angle conversion instruction includes a view angle range conversion instruction and a view angle center conversion instruction.
More specifically, if the view angle transformation command is a view angle center transformation command, correspondingly, the step of performing cooperative transformation on the global projection mode and the local projection mode of the panoramic image information according to the view angle transformation command specifically includes:
changing the view angle center of the local projection according to the view angle center changing instruction to obtain the changed local projection;
and determining transformation position area information of the transformed local projection in the global projection, and marking the transformation position area information in the global projection to obtain the transformed global projection.
More specifically, if the view angle transformation command is a view angle range transformation command, correspondingly, the step of performing cooperative transformation on the global projection mode and the local projection mode of the panoramic image information according to the view angle transformation command further includes:
changing the view angle range of the local projection according to the view angle range conversion instruction to obtain the converted local projection;
and determining transformation position area information of the transformed local projection in the global projection, and marking the transformation position area information in the global projection to obtain the transformed global projection.
In a second aspect, an embodiment of the present invention provides a panoramic image display apparatus, including:
the synchronous display module is used for synchronously displaying the panoramic image information in a global projection mode and a local projection mode;
and the cooperative transformation module is used for performing cooperative transformation on the global projection mode and the local projection mode of the panoramic image information according to the view transformation instruction when the view transformation instruction is acquired.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the panoramic image display method according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the panoramic image display method according to the first aspect.
According to the panoramic image display method and device provided by the embodiment of the invention, projection is performed in multiple different modes for display, the projection mode is ensured to be most consistent with human vision, meanwhile, panoramic image information is displayed in a global projection mode, the integrity of the panoramic image is ensured, the complementation of different projection modes is realized by using a local projection synchronous display mode, a better panoramic image display method is realized, and meanwhile, when the view angle is changed in any projection of synchronous display, the other corresponding projection is cooperatively changed in a stepping mode, so that the use experience of a user is further effectively improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a panoramic image display method described in an embodiment of the present invention, as shown in fig. 1, including:
step S1, synchronously displaying the panoramic image information through a global projection mode and a local projection mode;
and step S2, when a view angle conversion instruction is acquired, carrying out cooperative conversion on the global projection mode and the local projection mode of the panoramic image information according to the view angle conversion instruction.
Specifically, the panoramic image information described in the embodiment of the present invention includes panoramic photograph information or panoramic video frame information.
Specifically, the projection modes described in the embodiments of the present invention are mainly divided into two types, namely, global projection and local projection, where the local projection is used to show projection content conforming to human visual perception, such as linear projection. The global projection is used for displaying global information of the panoramic image, and integrity of the global image is guaranteed, and the global projection described herein can be any one of a spherical polar plane projection, an equidistant columnar projection or an orthogonal projection.
The synchronous display described in the embodiment of the present invention may refer to parallel or superimposed display of multiple projections in different projection modes, for example, when the content of the synchronous display includes local projection and global projection, the local projection and the global projection may be displayed in parallel in the same interface, or after the global projection is displayed, the local projection may be superimposed on the global projection for display after the trigger information is acquired and the local projection is generated.
The local projection may be displayed, and the thumbnail of the global projection may be displayed in a corner of the local projection in an overlapping manner.
The partial projection described in the embodiments of the present invention may be displayed in a scaled-up or scaled-down manner.
The view angle conversion instruction information described in the embodiment of the present invention refers to instruction information for view angle conversion for panoramic image projection, and may specifically include a view angle range conversion instruction and a view angle center conversion instruction.
The cooperative transformation described in the embodiment of the present invention means that the perspective transformation is performed on any one of the plurality of projections, and the other projections are also subjected to corresponding cooperative transformation.
Fig. 2 is a schematic diagram of a coordinated transformation of linear projection and orthogonal projection according to an embodiment of the present invention, where as shown in fig. 2, a in fig. 2 is a schematic diagram of linear projection and orthogonal projection before a central transformation instruction of an angle of view is received, a part of a panoramic picture is displayed in a linear projection manner in a main portion of a display area, and on an orthogonal projection at a lower right corner, a position and a size of a linear projection area currently being displayed in the entire panoramic picture are indicated by a dashed box; when the linear projection display area receives a user event with a changed visual angle, the image of the linear projection is projected and displayed according to a new visual angle, and meanwhile, a dotted frame on the orthogonal projection in the lower right corner area is correspondingly changed. The user event of visual angle transformation comprises that the visual angle center is changed through the up-down, left-right keys, the size of the visual angle is changed through the roller, and b in the graph 2 is an effect graph after the visual angle range is reduced.
When the orthogonal projection area receives the click event, the panoramic photo is projected in a straight line again by taking the click position as the center and displayed. Meanwhile, the dotted frame on the orthogonal projection is also changed correspondingly to reflect the region displayed by the current linear projection, and c in fig. 2 is an effect diagram after clicking the center of the lower edge of the black block on the orthogonal projection region. The embodiment of the invention displays through projection in various different modes, ensures that the projection mode is most consistent with the human vision, simultaneously displays the panoramic image information in a global projection mode, ensures the integrity of the panoramic image, realizes the complementation of different projection modes by utilizing a local projection synchronous display mode, realizes a better panoramic image display method, simultaneously performs the visual angle transformation in any projection of synchronous display, and simultaneously performs the step-by-step cooperative transformation on the other corresponding projection, thereby further effectively improving the use experience of a user.
More specifically, the global projection described in the embodiments of the present invention may refer to a spherical polar plane projection, an equidistant cylindrical projection, an orthogonal projection, or the like; the partial projection described in the embodiment of the present invention may refer to a straight line projection or the like.
The embodiment of the invention displays the local projection of the local area of the result of the global projection and the local projection on the basis of displaying the global projection through the global projection and the local projection. The results of multiple projections can be effectively interacted and cooperated, and the user experience is improved.
On the basis of the foregoing embodiment, the step of synchronously displaying the panoramic image information in a global projection manner and a local projection manner specifically includes:
obtaining the overall projection of the panoramic image information according to the panoramic image information;
acquiring trigger event information, and generating a local projection according to the trigger event information;
the local projection is displayed in an overlapping manner on the global projection or the local projection and the global projection are displayed in parallel.
Specifically, the trigger event information described in the embodiment of the present invention may be a predetermined time, or a preset mouse retention time, which may be specifically set according to actual requirements.
The trigger event information described in the embodiment of the present invention may also refer to an interactive instruction of the user terminal for global projection or local projection, and specifically may refer to click interaction, a keyboard event, or a time for holding a mouse at the same position exceeding a preset threshold.
After generating the global projection of the panoramic image according to the panoramic image information, generating a local projection according to the trigger event information, for example, if the stay of a mouse at the target position of the global projection exceeds a preset threshold, generating the local projection of the target position, and then synchronously displaying the local projection and the global projection.
For example, fig. 3 is a schematic diagram of a global projection described in an embodiment of the present invention, as shown in fig. 3, a point a exists in fig. 3, and if a time for a mouse to stay at the point a exceeds a preset threshold, a linear projection image with a preset size is generated. Fig. 4 is a schematic diagram of a local projection of a point a in a global projection described in an embodiment of the present invention, and fig. 5 is a schematic diagram of an overlay display of the local projection and the global projection described in the embodiment of the present invention, and as shown in fig. 5, the local projection and the global projection are overlay-displayed, so that both the integrity and the visibility of a picture can be considered, and the efficiency of user interaction can be improved.
In another example, fig. 6 is a schematic diagram of a global projection according to another embodiment of the present invention, as shown in fig. 6, where fig. 6 includes a B point, and after the B point is clicked, a local projection image with a preset size is generated. FIG. 7 is a partial perspective view of another embodiment of the present invention. Fig. 8 is a schematic diagram illustrating parallel display of local projection and global projection according to another embodiment of the present invention, which can achieve both image integrity and visibility and improve user interaction efficiency.
Fig. 9 is a schematic diagram illustrating a panoramic photograph in a manner of spherical polar plane projection according to an embodiment of the present invention, as shown in fig. 9, a user clicks a point a of the panoramic photograph through a touch screen to generate a specific linear projection image, fig. 10 is a linear projection diagram generated by the point a according to an embodiment of the present invention, as shown in fig. 10, a linear projection image with a preset size is generated by taking the point a as a center, and the image is displayed in a magnified 2 times. Fig. 11 is a schematic diagram illustrating a superimposed display of a spheropole plane projection image and a line projection image according to an embodiment of the present invention, where the line projection image is superimposed and displayed at a as shown in fig. 11.
By the mode, the integrity and the visibility of the picture can be considered, and the interaction efficiency of the user is improved. In addition, on the basis of global projection reservation, a user can quickly and conveniently switch the linear projection view angle.
On the basis of the foregoing embodiment, the step of synchronously displaying the local projection and the global projection specifically further includes:
determining position area information of a local projection in a global projection, and marking the position area information in the global projection to obtain an enhanced global projection image;
and synchronously displaying the local projection and the enhanced global projection.
Specifically, the position area information of the local projection in the global projection described in the embodiment of the present invention specifically refers to a position occupied by the local position shown in the local projection in the global projection.
The embodiment of the present invention indicates that the position area information may be a specific position point or an area range, and the specific manner of indication may be marking by a dotted line or a color line.
The enhanced global projection image in the embodiment of the invention is the marked global projection.
For example, fig. 12 is a schematic diagram of a local projection described in another embodiment of the present invention, as shown in fig. 12, showing local content in a panoramic image, and fig. 13 is a schematic diagram of a synchronous display of the local projection and a global projection described in another embodiment of the present invention, as shown in fig. 13, showing a global projection of the same panoramic image in a lower left corner of a display area, and a position and a size of a local projection area currently being shown in the global projection are marked by a dashed box.
On the basis of the above embodiment, the view angle conversion instruction includes a view angle range conversion instruction and a view angle center conversion instruction.
Specifically, the view range transformation instruction described in the embodiment of the present invention specifically refers to adjusting the size of the view, for example, adjusting the projection area by zooming.
The view angle center transformation command described in the embodiments of the present invention refers to adjusting the center view angle of the projection, for example, dragging left and right to adjust the center view angle of the local projection.
On the basis of the foregoing embodiment, if the view angle transformation instruction is a view angle center transformation instruction, correspondingly, the step of performing cooperative transformation on the global projection mode and the local projection mode of the panoramic image information according to the view angle transformation instruction specifically includes:
changing the view angle center of the local projection according to the view angle center changing instruction to obtain the changed local projection;
and determining transformation position area information of the transformed local projection in the global projection, and marking the transformation position area information in the global projection to obtain the transformed global projection.
Specifically, when the local projection area receives a view center conversion instruction, the view center of the local projection is changed, projection and display are performed according to a new view center to obtain a converted local projection, conversion position area information of the converted local projection in the global projection is determined, the conversion position area information is converted relative to original position area information, the global projection is relabeled according to the converted local projection, and the angle of the position area information is correspondingly adjusted to obtain the converted global projection.
For example, fig. 14 is a schematic projection diagram of a transformed panoramic image described in an embodiment of the present invention, where a in fig. 14 is a global projection and a local projection before receiving a view center transformation instruction, when a local projection display area receives a user event with a view transformed, the locally projected image is projected and displayed according to a new view, and a dashed box on the global projection in the lower left corner area is also changed accordingly. The user event of the visual angle center conversion instruction comprises that the visual angle center is changed by dragging up and down, left and right, and the size of the visual angle is changed by gestures. B in fig. 14 is an effect diagram after the right drag changes the center of the viewing angle.
According to the embodiment of the invention, after any one of the plurality of projection modes is adjusted, other plurality of projections can be correspondingly subjected to cooperative transformation after the projection is adjusted, so that the use feeling of a user is further improved.
On the basis of the foregoing embodiment, if the view angle transformation instruction is a view angle range transformation instruction, correspondingly, the step of performing cooperative transformation on the global projection mode and the local projection mode of the panoramic image information according to the view angle transformation instruction further includes:
changing the view angle range of the local projection according to the view angle range conversion instruction to obtain the converted local projection;
and determining transformation position area information of the transformed local projection in the global projection, and marking the transformation position area information in the global projection to obtain the transformed global projection.
Specifically, the view range conversion instruction described in the embodiment of the present invention may specifically refer to scaling the projection, that is, changing the view range of the projection, and specifically, if scaling the size of the position region information marked in the global projection, the size of the position region information may be adjusted in the global projection, and the local projection may be correspondingly converted; if the local projection is zoomed, the transformation position area information is determined in the global projection again according to the zoomed local projection to obtain the transformed global projection.
According to the embodiment of the invention, after any one of the plurality of projection modes is adjusted, other plurality of projections can be correspondingly subjected to cooperative transformation after the projection is adjusted, so that the use feeling of a user is further improved.
In another embodiment of the present invention, fig. 15 is a schematic view illustrating a multi-projection superposition of a panoramic image according to an embodiment of the present invention, as shown in fig. 15, a in fig. 15 is an equidistant columnar projection display, and in a display area, the panoramic image is displayed in a bottom view manner in an equidistant columnar projection manner; b in fig. 15 is multi-projection overlay display, in which a linear projection with a preset size is performed with the current equidistant columnar projection center of the same panoramic photo as the view center, and the linear projection is overlay displayed in the center of the display area; fig. 15 c shows the multi-projection overlay after view angle conversion, when a view angle center conversion command is received, such as changing the view angle center through a left/right button, the video frame of the equidistant columnar projection is correspondingly updated with the new horizontal view angle as the center, and meanwhile, the linear projection with the preset size is performed with the current equidistant columnar projection center as the view center, and the content of the linear projection area is updated; fig. 15 d is another multi-projection overlay display after view angle conversion, and when the equidistant columnar projection area receives a view angle center conversion command, the panorama picture performs equidistant columnar projection again with the command click position as the center, and updates the display. Meanwhile, linear projection with a preset size is carried out by taking the current equidistant columnar projection center as a view center, and the content of the linear projection area is updated.
Fig. 16 is a schematic structural diagram of a panoramic image display apparatus according to an embodiment of the present invention, as shown in fig. 16, including: asynchronized display module 1610 and acollaborative transformation module 1620; thesynchronous display module 1610 is configured to synchronously display the panoramic image information in a global projection manner and a local projection manner; thecooperative transformation module 1620 is configured to perform cooperative transformation on the global projection manner and the local projection manner of the panoramic image information according to the view transformation instruction when the view transformation instruction is acquired.
The apparatus provided in the embodiment of the present invention is used for executing the above method embodiments, and for details of the process and the details, reference is made to the above embodiments, which are not described herein again.
The embodiment of the invention displays through projection in various different modes, ensures that the projection mode is most consistent with the human vision, simultaneously displays the panoramic image information in a global projection mode, ensures the integrity of the panoramic image, realizes the complementation of different projection modes by utilizing a local projection synchronous display mode, realizes a better panoramic image display method, simultaneously performs the visual angle transformation in any projection of synchronous display, and simultaneously performs the step-by-step cooperative transformation on the other corresponding projection, thereby further effectively improving the use experience of a user.
Fig. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 17, the electronic device may include: a processor (processor)1710, acommunication Interface 1720, a memory (memory)1730, and acommunication bus 1740, wherein theprocessor 1710, thecommunication Interface 1720, and thememory 1730 communicate with each other via thecommunication bus 1740. Theprocessor 1710 may call logic instructions in thememory 1730 to perform the following method: synchronously displaying the panoramic image information in a global projection mode and a local projection mode; and when the view angle conversion instruction is acquired, performing cooperative conversion on the global projection mode and the local projection mode of the panoramic image information according to the view angle conversion instruction.
In addition, the logic instructions in thememory 1730 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: synchronously displaying the panoramic image information in a global projection mode and a local projection mode; and when the view angle conversion instruction is acquired, performing cooperative conversion on the global projection mode and the local projection mode of the panoramic image information according to the view angle conversion instruction.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing server instructions, where the server instructions cause a computer to execute the method provided in the foregoing embodiments, for example, the method includes: synchronously displaying the panoramic image information in a global projection mode and a local projection mode; and when the view angle conversion instruction is acquired, performing cooperative conversion on the global projection mode and the local projection mode of the panoramic image information according to the view angle conversion instruction.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.