Scene switching method, device, electronic device and storage medium

By obtaining the contacts in the current display image of the terminal in the panoramic roaming, determining its spatial contacts in the three-dimensional panoramic model, and determining the hot spot selection range based on the spatial contacts and the current hot spots, thereby determining the target hot spots of the switching scene from the hot spot selection range, solving the problems of large calculations of scene switching, long time and high delay in the prior art, and achieving more efficient scene switching.

CN114511684BActive Publication Date: 2025-05-16SHENZHEN IDEAMAKE SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110019874.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-07
Publication Date
2025-05-16
Estimated Expiration
2041-01-07

AI Technical Summary

Technical Problem

In the prior art, the scene switching method has a large amount of calculation, which results in a long time spent on scene switching and a high delay.

Method used

By acquiring the contacts in the current display image of the terminal, determining its spatial contacts in the three-dimensional panoramic model, and determining the hot spot selection range based on the spatial contacts and the current hot spots, the target hot spots of the switching scene are determined from the hot spot selection range, and the image switching is realized.

Benefits of technology

The calculation time during scene switching is reduced, the delay during scene switching is reduced, and the switching efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511684B_ABST
    Figure CN114511684B_ABST
Patent Text Reader

Abstract

The present application provides a scene switching method, device, electronic device and computer-readable storage medium. The scene switching method includes: obtaining a contact in the current display image of the terminal; determining the spatial contact corresponding to the contact in the three-dimensional panoramic model; determining a hotspot selection range according to the spatial contact and the current hotspot; determining a target hotspot for switching scenes from the hotspot selection range; switching the current display image displayed by the terminal to a target display image associated with the target hotspot. When performing scene switching, the method provided in the present application only needs to select hotspots within the hotspot selection range to obtain the target hotspot, and does not need to select all hotspots in the three-dimensional panoramic model, which reduces the calculation time during scene switching and reduces the delay during scene switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of panoramic roaming, and in particular to a scene switching method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the development of virtual reality technology, virtual reality technology has been widely used in real-life display based on panoramas. In order to interact with users, hot spots are set at one or several locations in the panorama, so that users can switch scenes by clicking on the hot spots based on the panorama display.

[0003] The scene switching method in the prior art needs to calculate the offset between all hot spots and touch points in the 3D panoramic model, and then determine the target hot spot for switching scenes among all hot spots. This switching method has a large amount of calculation, takes a long time when switching scenes, and has high latency. Summary of the invention

[0004] The present application provides a scene switching method, device, electronic device and computer-readable storage medium, aiming to solve the problems of large amount of calculation, long time and high delay in existing scene switching methods.

[0005] In a first aspect, the present application provides a scene switching separation method, the method comprising:

[0006] Acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots;

[0007] Determine a spatial touch point corresponding to the touch point in the three-dimensional panoramic model;

[0008] Determining a hotspot selection range according to the spatial touch point and the current hotspot, wherein the current hotspot refers to a hotspot uniquely associated with the current display image in the three-dimensional panoramic model;

[0009] Determine the target hotspot for switching scenes from the hotspot selection range;

[0010] The current display image displayed by the terminal is switched to the target display image associated with the target hotspot.

[0011] In a second aspect, the present application provides a scene switching separation device, the scene switching separation device comprising:

[0012] A touch point position acquisition unit, used to acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots;

[0013] A spatial point determination unit, used to determine a spatial touch point corresponding to the touch point in the three-dimensional panoramic model;

[0014] A hotspot range acquisition unit, configured to determine a hotspot selection range according to the spatial touch point and the current hotspot, wherein the current hotspot refers to a hotspot uniquely associated with the current display image in the three-dimensional panoramic model;

[0015] A target acquisition unit, used to determine a target hotspot for switching scenes from a hotspot selection range;

[0016] A switching unit is used to switch the current display image displayed by the terminal to a target display image associated with the target hotspot.

[0017] In a possible implementation of the present application, the contact position acquisition unit is specifically used to:

[0018] Determine a target plane which is vertical to the three-dimensional panoramic model and contains the current hotspot;

[0019] On the target plane, determine a first area between two rays that have the same starting point as a reference ray and deviate from preset angles in clockwise and counterclockwise directions, respectively, wherein the reference ray includes a positive projection point of the spatial contact point on the target plane, and the starting point of the reference ray is the current hotspot;

[0020] The first area is used as the hotspot selection range.

[0021] In a possible implementation of the present application, the contact position acquisition unit is specifically used to:

[0022] Acquire a three-dimensional path area, wherein the first area is a plane area on the target plane, and the three-dimensional path area refers to an area formed in the process of moving the first area from the bottom surface of the three-dimensional panoramic model to the top surface of the three-dimensional panoramic model;

[0023] The three-dimensional path area is used as the hotspot selection range.

[0024] In a possible implementation of the present application, the target acquisition unit is specifically used to:

[0025] Acquire the hotspots to be selected within the hotspot selection range, wherein the hotspots to be selected refer to all hotspots within the hotspot selection range;

[0026] Determine a first deviation distance between the hotspot to be selected and the current hotspot;

[0027] The target hotspot among the hotspots to be selected is determined according to the first deviation distance.

[0028] In a possible implementation of the present application, the target acquisition unit is specifically used to:

[0029] From all the hotspots, obtain a first nearest hotspot having the smallest first deviation distance from the current hotspot;

[0030] The first nearest hotspot is used as the target hotspot.

[0031] In a possible implementation of the present application, the target acquisition unit is specifically used to:

[0032] If there are at least two of the first nearest hot spots, determining a second offset distance between the first nearest hot spot and the spatial contact point;

[0033] From the first closest hot spots, obtain a second closest hot spot having the smallest second deviation distance from the spatial contact point;

[0034] The second nearest hotspot is used as the target hotspot.

[0035] In a possible implementation of the present application, the target acquisition unit is specifically used to:

[0036] Determining the hotspot to be selected;

[0037] Determining a third offset distance between the hot spot to be selected and the spatial contact point;

[0038] Obtaining, among the hot spots to be selected, a third closest hot spot having the smallest third deviation distance from the spatial contact point;

[0039] Taking the third closest hotspot as a target hotspot;

[0040] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the processor executes the steps of any scene switching separation method provided in the present application.

[0041] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the scene switching separation method.

[0042] The present application obtains the contact points in the current display image of the terminal; determines the spatial contact points corresponding to the contact points in the three-dimensional panoramic model; determines the hotspot selection range according to the spatial contact points and the current hotspot; determines the target hotspot for switching scenes from the hotspot selection range; and switches the current display image displayed by the terminal to the target display image associated with the target hotspot. It can be seen that when performing scene switching, the method provided by the present application only needs to select the hotspots within the hotspot selection range to obtain the target hotspot, and does not need to select all the hotspots in the three-dimensional panoramic model, which reduces the calculation time when switching scenes and reduces the delay when switching scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 It is a schematic diagram of an application scenario of the scene switching separation method provided in an embodiment of the present application;

[0045] Figure 2 It is a flow chart of a scene switching separation method provided in an embodiment of the present application;

[0046] Figure 3 is a schematic diagram for explaining step S42 provided in an embodiment of the present application;

[0047] Figure 4 is a schematic diagram for explaining step S52 provided in an embodiment of the present application;

[0048] Figure 5 is a schematic diagram for explaining step S52 provided in an embodiment of the present application;

[0049] Figure 6 is a schematic diagram for explaining step S63 provided in the embodiment of the present application;

[0050] Figure 7 It is a schematic diagram of the structure of an embodiment of the scene switching separation device provided in the embodiments of the present application;

[0051] Figure 8 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0053] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0054] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0055] The embodiments of the present application provide a scene switching separation method, device, electronic device and computer readable storage medium. The scene switching device can be integrated in an electronic device, which can be a server or a terminal.

[0056] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the embodiments of the present application is introduced.

[0057] With the development of virtual reality technology, virtual reality technology has been widely used in real-life display based on panoramas, such as 3D real-life house viewing, virtual tourism, etc. In order to interact with users, hot spots will be set at one or several locations in the panorama, so that on the basis of real-life display, users can switch to different scenes by clicking on the hot spots and observe the real scene from different angles in different scenes.

[0058] The scene switching method in the prior art needs to calculate the offsets between all hot spots and touch points in the 3D panoramic model, including angle offsets and distance offsets, and then determine the target hot spot for switching scenes according to the offsets among all hot spots. This switching method needs to calculate the offsets of all hot spots, which is computationally intensive, takes a long time when switching scenes, and has high latency.

[0059] Based on the above-mentioned defects in the existing related technologies, the embodiments of the present application provide a scene switching method, which at least overcomes the defects in the existing related technologies to a certain extent.

[0060] The executor of the scene switching method of the embodiment of the present application may be the scene switching device provided in the embodiment of the present application, or different types of electronic devices such as a server device, a physical host or a user equipment (UE) that integrates the scene switching device, wherein the scene switching device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).

[0061] The electronic device can adopt a single-operation working mode or a device cluster working mode. By applying the scene switching method provided in the embodiment of the present application, it is only necessary to select the hotspots within the hotspot selection range to obtain the target hotspot, and there is no need to select all the hotspots in the three-dimensional panoramic model, which reduces the calculation time during scene switching and reduces the delay during scene switching.

[0062] See also Figure 1 , Figure 1 1 is a schematic diagram of a scene switching system provided in an embodiment of the present application. The scene switching system may include an electronic device 100, in which a scene switching device is integrated.

[0063] In addition, if Figure 1 As shown, the scene switching system may further include a memory 200 for storing data, such as image data and video data.

[0064] It should be noted that Figure 1 The scene diagram of the scene switching system shown is only an example. The scene switching system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the scene switching system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0065] Next, the scene switching method provided in the embodiment of the present application is introduced. In the embodiment of the present application, an electronic device is used as an execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments.

[0066] Reference Figure 2 , Figure 2 1 is a flow chart of a scene switching method provided in an embodiment of the present application. It should be noted that although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that here. The scene switching method includes steps S10 to S50, wherein:

[0067] S10. Acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots.

[0068] The current display image refers to the image currently displayed in the terminal. For example, when a user uses a mobile phone to virtually view a house, the room image displayed on the mobile phone screen is the current display image.

[0069] The touch point refers to the position point in the current displayed image that the movement instruction issued by the user points to when the user performs panoramic roaming. Specifically, the method of issuing the movement instruction may include clicking a point in the image displayed on the touch screen or using a mouse to click a point in the image displayed on the computer screen.

[0070] For example, when a user uses a mobile phone to virtually view a house, he or she can issue a movement instruction by clicking a certain point in the image displayed on the touch screen, or by using a mouse to click a certain point in the image displayed on the computer screen. The certain point is the touch point.

[0071] Furthermore, the terminal may refer to a mobile terminal or a non-mobile terminal. For example, the currently displayed image may be an image displayed on a mobile phone or an image displayed on a computer.

[0072] Furthermore, the image may be an image obtained by rendering a real image acquired by an image acquisition device such as a camera or a video camera, or a virtual panorama drawn by a drawing software, etc. For example, the image may be a street view panorama obtained by rendering a street view image acquired by taking a street view with a camera, or a virtual street view panorama drawn by 3DMAX.

[0073] Furthermore, the 3D panoramic model can be set according to the actual application scenario. For example, the 3D panoramic model can be a 3D model house model for virtual house viewing, or a 3D street model for road navigation.

[0074] S20: Determine the spatial touch point corresponding to the touch point in the three-dimensional panoramic model.

[0075] The spatial touch point refers to the unique corresponding point of the touch point in the current display image in the three-dimensional panoramic model, that is, the position point in the three-dimensional panoramic model pointed to by the movement instruction issued by the user when performing panoramic roaming.

[0076] For example, when performing street navigation, the user clicks on the point where a hospital is located in the currently displayed image. The point where the hospital is located in the currently displayed image is the touch point, and the point where the hospital is located in the three-dimensional street model is the spatial touch point.

[0077] Furthermore, all display images may be firstly marked with respective unique labels, and then when the scene is switched, the corresponding unique spatial touch point in the 3D panoramic model may be determined according to the label of the current display image and the position of the touch point in the current display image.

[0078] S30. Determine a hotspot selection range according to the spatial touch point and the current hotspot, wherein the current hotspot refers to a hotspot uniquely associated with the current display image in the three-dimensional panoramic model.

[0079] The current hot spot refers to a hot spot associated with the currently displayed image in the three-dimensional panoramic model.

[0080] Furthermore, a hotspot refers to a point in the three-dimensional panoramic model that is associated with a display image, and each hotspot is associated with a different display image. The association means that when a hotspot is selected, the display image corresponding to the hotspot is used as the image displayed by the terminal.

[0081] In some embodiments, the number and position of hotspots can be set according to the specific scene requirements. For example, in the scenario of virtual house viewing, the three-dimensional panoramic model is a three-dimensional model house model, so the spatial range of the model is small. When the user is virtually viewing the house, he needs to observe the three-dimensional model house model from various angles to determine the structure of the three-dimensional model house model. Therefore, a large number of hotspots are set in the three-dimensional model house model, and model house display images with different observation angles and positions can be provided. In addition, when virtually viewing the house, the height of the hotspot in the three-dimensional model house model can be set to the default adult height. For example, when the three-dimensional model house model is a cube, the bottom of the three-dimensional model house model is 0 meters, and the height of the hotspot is set to 1.8 meters.

[0082] For another example, in the scenario of street navigation, the three-dimensional panoramic model is a three-dimensional street model, so the spatial range of the model is relatively large. When navigating on the street, users only need to confirm the location they have arrived at through the street view, and do not need street view display images from different observation angles and positions. Therefore, a smaller number of hotspots can be set in the three-dimensional street model. For example, when the three-dimensional street model is a cube, a hotspot is set every 5 meters in a certain direction on the bottom surface of the three-dimensional street model with the center point of the bottom surface as the origin. In addition, during street navigation, the height of the hotspot in the three-dimensional street model can be set to the default adult height. For example, when the three-dimensional street model is a cube, the bottom surface of the three-dimensional street model is 0 meters, and the height of the hotspot is set to 1.7 meters.

[0083] The hotspot selection range includes an area in the three-dimensional panoramic model that includes the hotspot. Further, the hotspot selection range may also include an area in the three-dimensional panoramic model that does not include the hotspot.

[0084] In some embodiments, the hotspot selection range may be a plane area. For example, the hotspot selection range may be any plane in the three-dimensional panoramic model that includes both the current hotspot and the spatial touch point. Specifically, it may be the bottom surface of the three-dimensional panoramic model that includes the current hotspot and the spatial hotspot when the three-dimensional panoramic model is a cube, or it may be a plane that includes the current hotspot and the spatial hotspot with the bottom surface of the three-dimensional panoramic model at 0 meters and parallel to the bottom surface at a height of 1.8 meters when the three-dimensional panoramic model is a cube.

[0085] In some embodiments, the hotspot selection range may be a three-dimensional area. For example, when the three-dimensional panoramic model is a cube, the hotspot selection range may be a three-dimensional area formed by the movement path of the bottom surface of the three-dimensional panoramic model after the bottom surface moves along the height of the three-dimensional panoramic model from the bottom surface to the top of the three-dimensional panoramic model.

[0086] S40: Determine a target hotspot for switching scenes from the hotspot selection range.

[0087] The target hotspot refers to the hotspot corresponding to the image displayed by the terminal after the scene is switched.

[0088] Specifically, the target hotspot may be any hotspot within the hotspot selection range and determined according to a preset rule.

[0089] In some embodiments, the hotspot closest to the spatial touch point within the hotspot selection range can be used as the target hotspot. For example, when the 3D panoramic model is a cube, the center point of the bottom surface of the 3D panoramic model is used as the origin, the height is used as the Z axis, the bottom surface is used as the XY plane, the coordinates of the spatial touch point are (1,2,3), and there are 3 hotspots (1,2,0), (1,0,3), and (0,2,3) within the hotspot selection range, then the hotspot (0,2,3) closest to (1,2,3) is used as the target hotspot.

[0090] In some embodiments, the hotspot closest to the current hotspot within the hotspot selection range can be used as the target hotspot. For example, when the 3D panoramic model is a cube, the center point of the bottom surface of the 3D panoramic model is used as the origin, the height is used as the Z axis, the bottom surface is used as the XY plane, the coordinates of the current hotspot are (2,3,4), and there are 3 hotspots (0,3,4), (2,0,4), and (2,3,0) within the hotspot selection range, then the hotspot (0,3,4) closest to (2,3,4) is used as the target hotspot.

[0091] Furthermore, when the hotspot selection range is a plane area, if the hotspot selection range does not include the spatial contact point, the distance between the orthographic projection point of the spatial contact point on the hotspot selection range and the hotspot within the hotspot selection range can be determined, and then the hotspot within the hotspot selection range with the smallest distance is used as the target hotspot. For example, when the three-dimensional panoramic model is a cube, the center point of the bottom surface of the three-dimensional panoramic model is used as the origin, the height is used as the Z axis, and the bottom surface is used as the XY plane. If the hotspot selection range is the bottom surface of the three-dimensional panoramic model, the hotspot selection range contains hotspots (1,3,0), (2,3,0), (3,4,0), and the spatial contact point is (1,2,3). The orthographic projection point of the spatial contact point (1,2,3) on the ground of the three-dimensional panoramic model is (1,2,0), so the hotspot (1,3,0) that is closest to the orthographic projection point (1,2,0) is used as the target hotspot.

[0092] S50: Switch the current display image displayed by the terminal to a target display image associated with the target hotspot.

[0093] The target display image refers to the display image displayed by the terminal after the scene is switched.

[0094] Furthermore, before switching to the target display image, you can first switch to a preset function. For example, in order to avoid accidental clicks by the user, you can first switch to a preset inquiry function to ask the user whether to switch the current display image to the target display image, and then switch after the user confirms. Furthermore, the hotspot selection range can also include a range without hotspots in the three-dimensional panoramic model. At this time, when the target hotspot cannot be obtained in step S40, you can switch to a preset function. For example, after the hotspot selection range is determined, if there is no target hotspot within the hotspot selection range, switch to the preset prompt function to prompt the user to reselect the contact.

[0095] Further, when the hotspot selection range cannot be obtained, such as the situation described in step S22, no switching is performed.

[0096] The embodiment of the present application obtains the touch point in the current display image of the terminal; determines the spatial touch point corresponding to the touch point in the three-dimensional panoramic model; determines the hotspot selection range according to the spatial touch point and the current hotspot; determines the target hotspot for switching scenes from the hotspot selection range; and switches the current display image displayed by the terminal to the target display image associated with the target hotspot. It can be seen that when the method provided by the present application switches scenes, it only needs to select the hotspots within the hotspot selection range to obtain the target hotspot, and does not need to select all the hotspots in the three-dimensional panoramic model, which reduces the calculation time when switching scenes and reduces the delay when switching scenes.

[0097] In some practical scenarios, in order to make the displayed image associated with the hotspot to be selected include the scene that the user wants to observe, the hotspot selection range can be limited to a certain angle. In this case, the method for determining the hotspot selection range includes the following steps S21-S23:

[0098] S21, determining a target plane that is vertical to the height of the three-dimensional panoramic model and contains the current hotspot.

[0099] Among them, by determining the plane perpendicular to the height, multiple mutually parallel planes can be obtained, and then the plane containing the current hotspot is determined among them and used as the target plane.

[0100] S22. On the target plane, determine the first area contained between two rays that have the same starting point as the reference ray and deviate from preset angles in the clockwise and counterclockwise directions, respectively, wherein the reference ray includes the positive projection point of the spatial contact on the target plane, and the starting point of the reference ray is the current hotspot.

[0101] The preset angle can be set according to the scene requirements. For example, the preset angle can be set to 30 degrees, and then a plane area with the current hotspot as the corner point and the two rays as the boundary is formed between two rays that have the same starting point as the reference ray and deviate by 30 degrees in the clockwise and counterclockwise directions respectively.

[0102] In some embodiments, the two rays may deviate from each other at different angles in the clockwise and counterclockwise directions, for example, the ray may deviate from 30 degrees in the clockwise direction and 50 degrees in the counterclockwise direction, so that a plane region with the current hotspot as the corner point and the two rays as the boundary is formed between the two rays.

[0103] In some embodiments, if the orthographic projection point of the spatial touch point on the target plane coincides with the current hotspot, the first area cannot be determined, and thus there is no hotspot selection range.

[0104] Further, in some embodiments, the first area may be a plane area, specifically a plane area between two rays on the target plane.

[0105] In some embodiments, the first region may be a three-dimensional region, specifically any three-dimensional region whose orthographic projection surface on the target plane is between two rays. For example, if the orthographic projection surface of a cube on the target plane is between two rays, the first region may be the cube. For another example, if a portion of the orthographic projection surface of a cone on the target plane is not between two rays, the cone may not be used as the first region.

[0106] S23. Use the first area as the hotspot selection range.

[0107] In some practical scenarios, in order to expand the hotspot selection range and consider as many hotspots as possible to be selected, the hotspot selection range may be a three-dimensional area.

[0108] Specifically, the orthographic projection plane of the three-dimensional area on the target plane is located between the two rays, and within the planar area on the target plane, the three-dimensional area can be any three-dimensional body.

[0109] In some embodiments, in order to consider the most hot spots to be selected, and the display images associated with the hot spots to be selected include the scenes that the user wants to observe, the three-dimensional area obtained by the following steps can be used as the hot spot selection range, taking the three-dimensional panoramic model as a cube as an example:

[0110] (1) Moving the plane area between the two rays on the target plane from the bottom surface of the 3D panoramic model to the top surface of the 3D panoramic model along the height of the 3D panoramic model.

[0111] (2) The three-dimensional path area formed during the movement of the plane area is used as the hotspot selection range.

[0112] In some practical scenarios, in order to obtain a suitable target hotspot from multiple hotspots within the hotspot selection range, the distance between the multiple hotspots and the current hotspot can be used as a judgment criterion. Specific steps S41-43 are as follows:

[0113] S41. Obtain hot spots to be selected within the hot spot selection range, wherein the hot spots to be selected refer to all hot spots within the hot spot selection range.

[0114] The hotspots to be selected refer to all hotspots within the hotspot selection range.

[0115] For example, if the hotspot selection range is a triangular plane area, the hotspots to be selected refer to all the hotspots within the triangle. For another example, if the hotspot selection range is a cubic three-dimensional area, the hotspots to be selected refer to all the hotspots within the cubic three-dimensional area.

[0116] S42: Determine a first deviation distance between the hotspot to be selected and the current hotspot.

[0117] The first deviation distance may refer to the distance between the hotspot to be selected and the current hotspot.

[0118] In some embodiments, the hotspot selection range is a plane area. The first deviation distance may refer to the distance between the hotspot to be selected and the current hotspot when the hotspot selection range is a plane area that includes the current hotspot; it may also refer to the distance between the orthographic projection point of the current hotspot on the plane area and the hotspot to be selected when the hotspot selection range does not include the current hotspot; it may also refer to the distance between the hotspot to be selected and the current hotspot when the hotspot selection range does not include the current hotspot.

[0119] like Figure 3 For example, when the 3D panoramic model is a cube, the hotspot selection range is the bottom surface of the 3D panoramic model. A, B, and C are three hotspots within the hotspot selection range, D is the current hotspot that is not within the hotspot selection range, and E is the orthographic projection point of D on the bottom surface. The first deviation distance can be the length of the line segments AE, BE, and CE, or the length of the line segments AD, BD, and CD.

[0120] In some embodiments, the hotspot selection range is a three-dimensional area. The first deviation distance may also refer to the distance between the hotspot to be selected and the current hotspot when the hotspot selection range is a three-dimensional area.

[0121] S43. Determine the target hotspot among the hotspots to be selected according to the first deviation distance.

[0122] Among them, all the first deviation distances may be calculated by comparison, and the hotspot to be selected corresponding to the first deviation distance that meets a specific rule is used as the target hotspot.

[0123] Specifically, the hotspot with the largest first deviation distance from the current hotspot among the hotspots to be selected can be included as the target hotspot. In this case, when switching scenes, the scene image associated with the hotspot farthest from the current hotspot can be switched to, so the user can switch to the target scene image with the least number of switches. For example, when performing street navigation, since the user does not need to observe the street view from multiple angles in detail, he only needs to navigate to the target scene as quickly as possible, that is, display the target scene image in the terminal, so this judgment method can be used to determine the target hotspot.

[0124] It can be seen from steps S41 to S43 that using the distance between the hotspot to be selected and the current hotspot as a judgment criterion can effectively select a target hotspot that meets the scene requirements from multiple hotspots to be selected within the hotspot selection range.

[0125] In some actual scenarios, in order to display multiple display images of the target scene from different angles for the user, the specific rule in step S43 can be set as: among all hotspots, the hotspot with the smallest first deviation distance from the current hotspot is used as the target hotspot. In this case, the specific steps S51-S52 are as follows:

[0126] S51. Obtain, from all the hotspots, a first nearest hotspot having the smallest first deviation distance from the current hotspot.

[0127] S52: Taking the first nearest hotspot as the target hotspot.

[0128] The first nearest hotspot refers to a hotspot among the hotspots to be selected, which has the smallest first deviation distance from the current hotspot.

[0129] For example, if the coordinates of the hotspot to be selected are (2,3,4), and the hotspot to be selected includes three hotspots with coordinates (0,3,4), (2,0,4) and (2,3,0), then the lengths of the line segments between the hotspots to be selected are 2, 3, and 4 respectively, so the first closest hotspot is the hotspot with coordinates (0,3,4).

[0130] In some embodiments, when the hotspot selection range is a plane area and the current hotspot is not within the hotspot selection range, the distance between the orthographic projection point of the current hotspot in the plane area and the hotspot to be selected can also be used as the first deviation distance, and the hotspot to be selected with the smallest first deviation distance can be used as the first nearest hotspot.

[0131] When the first nearest hotspot is used as the target hotspot, the image displayed on the terminal can be switched to the scene image associated with the hotspot closest to the current hotspot after the scene is switched. Therefore, the user's "steps" of roaming are smaller each time. On a path in the three-dimensional panoramic model, the terminal can display multiple display images showing the target scene from different angles, so that the user can observe the target scene from multiple angles.

[0132] For example, when the 3D panoramic model is a model room, the user can roam the 3D model room model through the scene image switching method described in this application. When the first nearest hotspot is used as the target hotspot, for furniture such as a dining table in the 3D panoramic model, the user can observe the dining table from several different angles through several scene switching.

[0133] like Figure 4 As shown, for home A, the user can switch to the display images associated with hotspots B, C, and D respectively to observe A from different angles.

[0134] Furthermore, when the first nearest hotspot is used as the target hotspot, it can also avoid the problem that the user selects a target hotspot that is too far away after an erroneous operation. Due to obstacles between the target hotspot and the current hotspot, the position of the current hotspot cannot be seen in the switched display image, making it difficult to switch back to the current display image through a single scene switch.

[0135] like Figure 5 As shown, take the case of two accidental clicks as an example. When the three-dimensional panoramic model is a model room, the current hotspot is point A, B is the target hotspot selected at the first click, E is the contact point at the second click, C and D are the hotspots to be selected, and F is the wall. When the user accidentally clicks the edge of the screen, the display image is switched twice. If the hotspot with the largest first deviation distance from the current hotspot is used as the target hotspot, the terminal displays the display image associated with point B after the first click, and the current hotspot becomes point B. The target hotspot selected after the second click is point D, so the final display image is the first display image corresponding to point D. The distance between point A and point D is relatively far, and they are separated by the F wall, so the position of point A may not be seen in the first display image. If the method in this embodiment is adopted, the first target hotspot is point B, and the target hotspot selected after the second click is point C, and the final display image is the second display image corresponding to point C. Since the distance between point A and point C is short and there is no spacer, the problem of point A not being visible in the second display image does not occur. You only need to obtain the appropriate touch point again and switch the second display image displayed on the terminal to the current display image through a scene switch.

[0136] In some actual scenarios, there may be multiple first nearest hotspots within the hotspot selection range. In order to select the target hotspot with the smallest deviation from the direction the user wants to go from the multiple first nearest hotspots and improve the accuracy of scene switching, the distance between the first nearest hotspot and the spatial contact point can be determined to select the target hotspot. At this time, the specific steps S61-S63 are as follows:

[0137] S61. If there are at least two of the first nearest hot spots, determine a second deviation distance between the first nearest hot spot and the spatial contact point.

[0138] The second offset distance refers to the distance between the first nearest hotspot and the spatial contact point.

[0139] In some embodiments, the hotspot selection range is a plane area. The second deviation distance may refer to the distance between the first nearest hotspot and the current hotspot when the hotspot selection range is a plane area that includes the current hotspot; it may also refer to the distance between the orthographic projection point of the current hotspot on the plane area and the first nearest hotspot when the hotspot selection range does not include the current hotspot; it may also refer to the distance between the first nearest hotspot and the current hotspot when the hotspot selection range does not include the current hotspot.

[0140] In some embodiments, the hotspot selection range is a three-dimensional area. The second offset distance may also refer to the distance between the first nearest hotspot and the current hotspot when the hotspot selection range is a three-dimensional area.

[0141] S62: Obtain, from the first closest hot spots, a second closest hot spot having the smallest second deviation distance from the spatial contact point.

[0142] S63: Use the second nearest hotspot as the target hotspot.

[0143] The second closest hotspot refers to the first closest hotspot having the shortest distance to the spatial contact point.

[0144] Depend on Figure 6 As shown, taking the hotspot selection range as a three-dimensional area as an example, the cube shown in the figure is the hotspot selection range. The current hotspot is point A, and the spatial touch point is point C. Because the distance between the first closest hotspot and the current hotspot is the first deviation distance, the first closest hotspot is located on a sphere with the current hotspot point A as the center and the first deviation distance as the radius. The straight line AC intersects the sphere at point B. The closer the point on the sphere is to point B, the smaller the distance to point C, and the smallest acute angle between the second closest hotspot and the line connecting the current hotspot and the spatial touch point. For example, if the second closest hotspot is a solid circle point D, then the acute angle between the straight line AD and the straight line AC, that is, the acute angle DAC between the second closest hotspot and the line connecting the current hotspot and the spatial touch point, is the smallest.

[0145] Therefore, by selecting the first nearest hotspot with the smallest distance to the spatial contact as the target hotspot, the first nearest hotspot with the smallest deviation angle from the line between the current hotspot and the spatial contact can be selected from multiple first nearest hotspots, that is, the first nearest hotspot with the smallest deviation from the direction in which the user issues a move instruction and wants to move can be selected as the target hotspot, thereby improving the accuracy of scene switching.

[0146] In some actual scenarios, in order to use the hotspot closest to the spatial touch point as the target hotspot, so as to switch from the current display image to the display image associated with the hotspot closest to the spatial touch point, the method of steps S71-S73 can be adopted. The specific steps are as follows:

[0147] S71, determining the hotspot to be selected.

[0148] S72. Determine a third deviation distance between the hotspot to be selected and the spatial contact point.

[0149] S73, obtaining the third closest hotspot among the hotspots to be selected, which has the smallest third deviation distance from the spatial contact point.

[0150] The third offset distance may refer to the distance between the hot spot to be selected and the spatial contact point.

[0151] In some embodiments, the hotspot selection range is a plane area. The third deviation distance may refer to the distance between the hotspot to be selected and the space touch point when the hotspot selection range is a plane area including the space touch point; it may also refer to the distance between the orthographic projection point of the space touch point on the plane area and the hotspot to be selected when the hotspot selection range does not include the space touch point; it may also refer to the distance between the hotspot to be selected and the space touch point when the hotspot selection range does not include the space touch point.

[0152] For example, when the 3D panoramic model is a cube and the hotspot selection range is the bottom surface of the 3D panoramic model, if the coordinates of the spatial touch point are (1,2,3), the hotspots to be selected include three hotspots with coordinates (1,3,0), (2,3,0) and (3,4,0), so the third closest hotspot is the hotspot with coordinates (0,2,3) that is closest to (1,3,0). Or the spatial touch point is projected onto the bottom surface of the 3D panoramic model to obtain the orthographic projection point (1,2,0), so the third closest hotspot is the hotspot with coordinates (1,3,0) that is closest to the projection point (1,2,0).

[0153] In some embodiments, the hotspot selection range is a three-dimensional area. The first deviation distance may also refer to the distance between the hotspot to be selected and the current hotspot when the hotspot selection range is a three-dimensional area.

[0154] S74: Use the third closest hotspot as the target hotspot.

[0155] It can be known from steps S71 to S74 that by taking the third closest hotspot as the target hotspot, it is possible to switch from the current display image to the display image associated with the hotspot closest to the spatial touch point.

[0156] In order to better implement the scene switching separation method in the embodiment of the present application, based on the scene switching separation method, the embodiment of the present application also provides a scene switching separation device, such as Figure 7 FIG. 1 is a schematic diagram of a structure of a scene switching separation device according to an embodiment of the present application. The scene switching separation device 700 includes:

[0157] A touch point position acquisition unit, used to acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots;

[0158] A spatial point determination unit, used to determine a spatial touch point corresponding to the touch point in the three-dimensional panoramic model;

[0159] A hotspot range acquisition unit, configured to determine a hotspot selection range according to the spatial touch point and the current hotspot, wherein the current hotspot refers to a hotspot uniquely associated with the current display image in the three-dimensional panoramic model;

[0160] A target acquisition unit, used to determine a target hotspot for switching scenes from a hotspot selection range;

[0161] A switching unit is used to switch the current display image displayed by the terminal to a target display image associated with the target hotspot.

[0162] In some embodiments of the present application, the contact position acquisition unit is specifically used to:

[0163] Determine a target plane which is vertical to the three-dimensional panoramic model and contains the current hotspot;

[0164] On the target plane, determine a first area between two rays that have the same starting point as a reference ray and deviate from preset angles in clockwise and counterclockwise directions, respectively, wherein the reference ray includes a positive projection point of the spatial contact point on the target plane, and the starting point of the reference ray is the current hotspot;

[0165] The first area is used as the hotspot selection range.

[0166] In some embodiments of the present application, the contact position acquisition unit is specifically used to:

[0167] Acquire a three-dimensional path area, wherein the first area is a plane area on the target plane, and the three-dimensional path area refers to an area formed in the process of moving the first area from the bottom surface of the three-dimensional panoramic model to the top surface of the three-dimensional panoramic model;

[0168] The three-dimensional path area is used as the hotspot selection range.

[0169] In some embodiments of the present application, the target acquisition unit is specifically used to:

[0170] Acquire the hotspots to be selected within the hotspot selection range, wherein the hotspots to be selected refer to all hotspots within the hotspot selection range;

[0171] Determine a first deviation distance between the hotspot to be selected and the current hotspot;

[0172] The target hotspot among the hotspots to be selected is determined according to the first deviation distance.

[0173] In some embodiments of the present application, the target acquisition unit is specifically used to:

[0174] From all the hotspots, obtain a first nearest hotspot having the smallest first deviation distance from the current hotspot;

[0175] The first nearest hotspot is used as the target hotspot.

[0176] In some embodiments of the present application, the target acquisition unit is specifically used to:

[0177] If there are at least two of the first nearest hot spots, determining a second offset distance between the first nearest hot spot and the spatial contact point;

[0178] From the first closest hot spots, obtain a second closest hot spot having the smallest second deviation distance from the spatial contact point;

[0179] The second nearest hotspot is used as the target hotspot.

[0180] In some embodiments of the present application, the target acquisition unit is specifically used to:

[0181] Determining the hotspot to be selected;

[0182] Determining a third offset distance between the hot spot to be selected and the spatial contact point;

[0183] Obtaining, among the hot spots to be selected, a third closest hot spot having the smallest third deviation distance from the spatial contact point;

[0184] The third closest hotspot is used as the target hotspot.

[0185] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0186] Since the scene switching separation device can execute the present application as follows Figures 1 to 6 Corresponding to the steps in the scene switching separation method in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 6 For the beneficial effects that can be achieved by the scene switching separation method in any embodiment, please refer to the previous description in detail and will not be repeated here.

[0187] In addition, in order to better implement the scene switching separation method in the embodiment of the present application, on the basis of the scene switching separation method, the embodiment of the present application also provides an electronic device, referring to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. Specifically, the electronic device provided by the embodiment of the present application includes a processor 801, and the processor 801 is used to execute a computer program stored in a memory 802 to implement the following Figures 1 to 6 Corresponding to each step of the scene switching separation method in any embodiment; or, the processor 801 is used to execute the computer program stored in the memory 802 to implement the following Figure 7 The functions of each unit in the corresponding embodiment.

[0188] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 802, and executed by the processor 801 to complete the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0189] The electronic device may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that the illustration is merely an example of an electronic device and does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the illustration, or may combine certain components, or different components, for example, the electronic device may also include input and output devices, network access devices, buses, etc., and the processor 801, memory 802, input and output devices, and network access devices, etc., are connected via a bus.

[0190] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0191] The memory 802 can be used to store computer programs and / or modules. The processor 801 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 802 and calling the data stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0192] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the scene switching separation device, the electronic device and its corresponding units described above can refer to the following. Figures 1 to 6 The description of the scene switching separation method in any embodiment will not be repeated here.

[0193] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0194] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figures 1 to 6 For the steps in the scene switching separation method in any embodiment, the specific operations can be referred to as follows: Figures 1 to 6 The description of the scene switching separation method in any embodiment will not be repeated here.

[0195] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0196] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figures 1 to 6 Corresponding to the steps in the scene switching separation method in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 6 For the beneficial effects that can be achieved by the scene switching separation method in any embodiment, please refer to the previous description in detail and will not be repeated here.

[0197] The above is a detailed introduction to a scene switching separation method, device, electronic device and computer-readable storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A scene switching method, characterized in that: The method comprises: Acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots; Determine a spatial touch point corresponding to the touch point in the three-dimensional panoramic model; Determine a target plane that is vertical to the height of the three-dimensional panoramic model and contains a current hotspot, wherein the current hotspot refers to a hotspot in the three-dimensional panoramic model that is uniquely associated with the current display image; On the target plane, determine a first area between two rays that have the same starting point as a reference ray and deviate from preset angles in clockwise and counterclockwise directions, respectively, wherein the reference ray includes a positive projection point of the spatial contact point on the target plane, and the starting point of the reference ray is the current hotspot; The first area is selected as a hotspot range; Determine a target hotspot for switching scenes from the hotspot selection range; The current display image displayed by the terminal is switched to the target display image associated with the target hotspot.

2. The scene switching method according to claim 1, characterized in that: The step of selecting the first area as a hotspot selection range includes: Acquire a three-dimensional path area, wherein the first area is a plane area on the target plane, and the three-dimensional path area refers to an area formed in the process of moving the first area from the bottom surface of the three-dimensional panoramic model to the top surface of the three-dimensional panoramic model; The three-dimensional path area is used as the hotspot selection range.

3. The scene switching method according to claim 1, characterized in that: The determining of the target hotspot for switching scenes from the hotspot selection range includes: Acquire the hotspots to be selected within the hotspot selection range, wherein the hotspots to be selected refer to all hotspots within the hotspot selection range; Determine a first deviation distance between the hotspot to be selected and the current hotspot; The target hotspot among the hotspots to be selected is determined according to the first deviation distance.

4. The scene switching method according to claim 3, characterized in that: The step of determining the target hotspot among the hotspots to be selected according to the first deviation distance includes: From all the hotspots, obtain a first nearest hotspot having the smallest first deviation distance from the current hotspot; The first nearest hotspot is used as the target hotspot.

5. The scene switching method according to claim 4, characterized in that: The taking the first nearest hotspot as the target hotspot further includes: If there are at least two of the first nearest hot spots, determining a second offset distance between the first nearest hot spot and the spatial contact point; From the first closest hot spots, obtain a second closest hot spot having the smallest second deviation distance from the spatial contact point; The second nearest hotspot is used as the target hotspot.

6. The scene switching method according to claim 1, characterized in that: The determining of the target hotspot for switching scenes from the hotspot selection range includes: Determine the hotspot to be selected; Determining a third offset distance between the hot spot to be selected and the spatial contact point; Obtaining, among the hot spots to be selected, a third closest hot spot having the smallest third deviation distance from the spatial contact point; The third closest hotspot is used as the target hotspot.

7. A scene switching device, characterized in that: The scene switching device comprises: A touch point position acquisition unit, used to acquire a touch point in a current display image of the terminal, wherein the current display image refers to an image displayed by the terminal in a three-dimensional panoramic model, and the three-dimensional panoramic model includes a plurality of hot spots; A spatial point determination unit, used to determine a spatial touch point corresponding to the touch point in the three-dimensional panoramic model; A hotspot range acquisition unit is used to determine a target plane that is vertical to the three-dimensional panoramic model and contains a current hotspot, wherein the current hotspot refers to a hotspot that is uniquely associated with the current display image in the three-dimensional panoramic model; on the target plane, determine a first area contained between two rays that have the same starting point as a reference ray and deviate from a preset angle in a clockwise and counterclockwise direction, respectively, wherein the reference ray includes a positive projection point of the spatial contact point on the target plane, and the starting point of the reference ray is the current hotspot; and use the first area as a hotspot selection range; A target acquisition unit, used to determine a target hotspot for switching scenes from the hotspot selection range; A switching unit is used to switch the current display image displayed by the terminal to a target display image associated with the target hotspot.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the scene switching method according to any one of claims 1 to 6 is executed.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the scene switching method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cylinder frame buffer texture re-labeling geometric correction method based on software

    CN101221658A

  • Panoramic image generation method and device and storage medium

    CN111462311A