Panoramic roaming method and device, electronic equipment and storage medium

By utilizing 3D models and color values ​​and location information of all points of interest in panoramic roaming, the problems of insufficient spatial sense and abrupt scene transitions in panoramic roaming are solved, achieving more natural scene transitions and realistic occlusion effects, thus improving the user experience.

CN114419286BActive Publication Date: 2025-11-07GUANGDONG SANWEIJIA INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111523115.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-11-07
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Existing panoramic roaming technology lacks a sense of space, the scene transitions are abrupt, the user experience is poor, and it lacks realistic scene occlusion effects.

Method used

By acquiring a 3D model and a collection of all viewpoints, and using the color values ​​and location information of all viewpoints, combined with the distance ratio, the target color value of the moving point is determined, and the screen points are colored to achieve occlusion effects and natural scene transitions in a 3D scene.

Benefits of technology

It enhances the sense of space in panoramic roaming, achieves the occlusion effect of real scenes, and improves the user's visual experience and the naturalness of scene transitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419286B_ABST
    Figure CN114419286B_ABST
Patent Text Reader

Abstract

The application provides a panoramic roaming method and device, electronic equipment and storage medium, and belongs to the technical field of virtual reality. The application obtains a three-dimensional model corresponding to a target scheme and a panoramic point set corresponding to the three-dimensional model; when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, a first color value corresponding to the first panoramic point and a first position of the first panoramic point are determined, and a second color value corresponding to the second panoramic point and a second position of the second panoramic point are determined; for any moving point in the roaming process, a target color value corresponding to the moving point is determined based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position; and the target color value is used to color a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the virtual reality technical field, and particularly relates to a panoramic roaming method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the online home decoration field, a panoramic picture is a common performance means. At present, a panoramic camera device including at least two cameras is generally used to shoot a space, wherein the sum of the angles of view of all camera lenses forms a spherical angle of view greater than or equal to 360 degrees, and then the shot image is transmitted to an image processing terminal, and a processing software is used to modify the pictures shot by different cameras to realize smooth combination of the pictures shot by different cameras, thereby generating a 360-degree panoramic picture. However, since the panoramic picture for realizing panoramic roaming is a 2D picture without three-dimensional data of the space, the global scene is not fully displayed, the spatial sense is not strong, the scene switching process is relatively abrupt, and the switching point floats on the panoramic picture without the occlusion effect of the real scene, thereby resulting in poor user experience. SUMMARY

[0003] The present application aims to provide a panoramic roaming method, device, electronic equipment and storage medium to solve the problems of weak spatial sense and abrupt scene switching process in the current panoramic roaming. The specific technical solutions are as follows.

[0004] In a first aspect, a panoramic roaming method is provided, and the method comprises:

[0005] obtaining a three-dimensional model corresponding to a target scheme and a panoramic point set corresponding to the three-dimensional model, wherein the panoramic point set comprises a plurality of panoramic points and a plurality of panoramic pictures corresponding to the panoramic points;

[0006] when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, determining a first color value of a panoramic picture corresponding to the first panoramic point, a first position of the first panoramic point in the three-dimensional model, a second color value of a panoramic picture corresponding to the second panoramic point, and a second position of the second panoramic point in the three-dimensional model;

[0007] for any moving point in the roaming process, determining a target color value corresponding to the moving point based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position;

[0008] coloring a target screen point by using the target color value, wherein the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen.

[0009] In a possible implementation, the determining the target color value corresponding to the moving point based on the first color value, the second color value, the first distance between the first position and the second position, and the second distance between the moving point and the second position comprises:

[0010] determining a first ratio of the second distance to the first distance, and determining a second ratio based on the first ratio, wherein a sum of the first ratio and the second ratio is one;

[0011] determining, as the target color value corresponding to the moving point, a sum of a product of the first ratio and the first color value, and a product of the second ratio and the second color value.

[0012] In a possible implementation, the method further comprises:

[0013] obtaining a UV coordinate corresponding to a vertex of the three-dimensional model;

[0014] for any panorama point in the set of panorama points, obtaining a picture texture of a panorama corresponding to the panorama point;

[0015] inputting the UV coordinate and the picture texture into a preset processing model, so that the preset processing model outputs a color value corresponding to the panorama.

[0016] In a possible implementation, the obtaining the UV coordinate corresponding to the vertex of the three-dimensional model comprises:

[0017] obtaining a physical coordinate, a camera coordinate corresponding to the vertex of the three-dimensional model, and a model world matrix corresponding to the three-dimensional model;

[0018] multiplying the physical coordinate and the model world matrix to obtain a world coordinate corresponding to the vertex;

[0019] subtracting the camera coordinate from the world coordinate to obtain a target vector;

[0020] inverting the target vector to obtain the UV coordinate corresponding to the vertex.

[0021] In a possible implementation, the method further comprises:

[0022] obtaining a camera projection matrix corresponding to the three-dimensional model, a model world matrix, and a physical coordinate corresponding to a vertex of the three-dimensional model;

[0023] multiplying the camera projection matrix and the model world matrix to obtain a conversion matrix;

[0024] multiplying the physical coordinate and the conversion matrix to obtain the target coordinate point.

[0025] In a second aspect, a panoramic roaming device is provided, the device comprising:

[0026] an obtaining module configured to obtain a three-dimensional model corresponding to a target scheme and a set of panoramic points corresponding to the three-dimensional model, the set of panoramic points comprising a plurality of panoramic points and a plurality of panoramic images corresponding to the plurality of panoramic points;

[0027] a first determining module configured to, when roaming from any first panoramic point in the set of panoramic points to any second panoramic point in the set of panoramic points, determine a first color value of a panoramic image corresponding to the first panoramic point and a first position of the first panoramic point in the three-dimensional model, and determine a second color value of a panoramic image corresponding to the second panoramic point and a second position of the second panoramic point in the three-dimensional model;

[0028] a second determining module configured to, for any moving point in the roaming process, determine a target color value corresponding to the moving point based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position;

[0029] a coloring module configured to color a target screen point with the target color value, wherein the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen.

[0030] In a possible implementation, the second determining module is specifically configured to:

[0031] determine a first proportion of the second distance to the first distance, and determine a second proportion based on the first proportion, a sum of the first proportion and the second proportion being one;

[0032] determine, as the target color value corresponding to the moving point, a sum of a product of the first proportion and the first color value and a product of the second proportion and the second color value.

[0033] In a possible implementation, the device further comprises an input module, the input module being configured to:

[0034] obtain a UV coordinate corresponding to a vertex of the three-dimensional model;

[0035] for any panoramic point in the set of panoramic points, obtain a picture texture of a panoramic image corresponding to the panoramic point;

[0036] input the UV coordinate and the picture texture into a preset processing model, so that the preset processing model outputs a color value corresponding to the panoramic image.

[0037] In a possible implementation, the input module is further configured to:

[0038] obtain physical coordinates corresponding to vertices of the three-dimensional model, camera coordinates corresponding to the three-dimensional model, and a model world matrix corresponding to the three-dimensional model;

[0039] multiply the physical coordinates by the model world matrix to obtain world coordinates corresponding to the vertices;

[0040] subtract the camera coordinates from the world coordinates to obtain target vectors;

[0041] invert the target vectors to obtain UV coordinates corresponding to the vertices.

[0042] In a possible implementation, the device further includes a conversion module, which is configured to:

[0043] obtain a camera projection matrix corresponding to the three-dimensional model, a model world matrix, and physical coordinates corresponding to vertices of the three-dimensional model;

[0044] multiply the camera projection matrix by the model world matrix to obtain a conversion matrix;

[0045] multiply the physical coordinates by the conversion matrix to obtain the target coordinate points.

[0046] In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus.

[0047] The memory is configured to store a computer program.

[0048] The processor is configured to execute the program stored on the memory, and implement the method steps of any of the first aspect.

[0049] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, which is executed by a processor to implement the method steps of any of the first aspect.

[0050] In a fifth aspect, a computer program product including instructions is provided, which, when executed on a computer, causes the computer to perform the panoramic roaming method of any of the above aspects.

[0051] The embodiments of the present application have the following beneficial effects:

[0052] The embodiment of the present application provides a panoramic roaming method and device, electronic equipment and storage medium. In the present application, panoramic roaming is realized by using a three-dimensional model corresponding to a design scheme, so that the sense of space in the panoramic roaming process can be increased. In a three-dimensional scene, objects in the scene can shield a switching point, so that the shielding effect of a real scene is realized. In addition, for a moving point between any two panoramic points in the three-dimensional model, the color value of a panoramic picture corresponding to the two panoramic points and the distance between the moving point and the panoramic points are used to determine the color value, and then the color value is used to color a screen point, so that when roaming between the two panoramic points, the color of the screen point changes with the change of the roaming position, and the process of roaming between the two panoramic points is visually felt.

[0053] Of course, implementing any product or method of the present application does not necessarily require all the advantages described above. BRIEF DESCRIPTION OF DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0055] Figure 1 A flowchart of a panoramic roaming method provided by an embodiment of the present application;

[0056] Figure 2 A flowchart of a panoramic roaming method provided by another embodiment of the present application;

[0057] Figure 3 A flowchart of a panoramic roaming method provided by another embodiment of the present application;

[0058] Figure 4 A flowchart of a panoramic roaming processing provided by an embodiment of the present application;

[0059] Figure 5 A structural schematic diagram of a panoramic roaming device provided by an embodiment of the present application;

[0060] Figure 6 A structural schematic diagram of an electronic equipment provided by an embodiment of the present application. DETAILED DESCRIPTION

[0061] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0062] Since the panoramic picture for realizing panoramic roaming at present is a 2D picture without spatial three-dimensional data, the global scene is not fully displayed, the spatial sense is not strong, the scene switching process is relatively abrupt, and the switching point floats on the panoramic picture without the occlusion effect of the real scene, the user experience is poor. Therefore, the present application provides a panoramic roaming method which can be applied to a platform system for realizing panoramic roaming.

[0063] The panoramic roaming method provided by the embodiments of the present application will be described in detail below with reference to the specific implementation manners, as shown in the following Figure 1 The specific steps are as follows:

[0064] S101, a three-dimensional model corresponding to a target scheme and a panoramic point set corresponding to the three-dimensional model are obtained, the panoramic point set includes a plurality of panoramic points and a plurality of panoramic pictures corresponding to the plurality of panoramic points.

[0065] The panoramic roaming method provided by the embodiments of the present application can be applied to a platform system for realizing panoramic roaming. The platform system includes a 3D design software. A home decoration design scheme can be input into the 3D design software, and a 3D design model can be output by the 3D design software. The platform system further includes a renderer. The 3D design model can be input into the renderer, and all panoramic points and panoramic pictures corresponding to each panoramic point can be output by the renderer.

[0066] In the embodiments of the present application, the target scheme is a home decoration design scheme, the three-dimensional model is a 3D design model corresponding to the target scheme, and all panoramic points corresponding to the three-dimensional model and the panoramic pictures corresponding to each panoramic point constitute a panoramic point set.

[0067] Specifically, when a user inputs a target scheme, the system can output a three-dimensional model corresponding to the target scheme by using a 3D design software, and then output a panoramic point set corresponding to the three-dimensional model by using a renderer.

[0068] S102, when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, determining a first color value of a panoramic picture corresponding to the first panoramic point and a first position of the first panoramic point in the three-dimensional model, and determining a second color value of a panoramic picture corresponding to the second panoramic point and a second position of the second panoramic point in the three-dimensional model.

[0069] In the embodiments of the present application, when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, for the first panoramic point, a first color value of the panoramic picture corresponding to the first panoramic point and a first position of the first panoramic point in the three-dimensional model are determined, the first position being a camera shooting position when a camera shoots the panoramic picture corresponding to the first panoramic point; for the second panoramic point, a second color value of the panoramic picture corresponding to the second panoramic point and a second position of the second panoramic point in the three-dimensional model are determined, the second position being a camera shooting position when a camera shoots the panoramic picture corresponding to the second panoramic point.

[0070] In the embodiments of the present application, for any moving point in the roaming process, a target color value corresponding to the moving point is determined based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position.

[0071] In the embodiments of the present application, the moving point is a position point passed through by the camera in the process of roaming from the first panoramic point to the second panoramic point, and there are a plurality of moving points in the process of roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set.

[0072] For each moving point, a target color value corresponding to the moving point can be determined based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position.

[0073] It can be understood that when the moving point coincides with the first panoramic point, the first color value corresponding to the first panoramic point is the target color value, and similarly, when the moving point coincides with the second panoramic point, the second color value corresponding to the second panoramic point is the target color value.

[0074] In the embodiments of the present application, the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on the display screen. After the target color value corresponding to the moving point is determined, the target screen point can be colored by using the target color value.

[0075] In the embodiments of the present application, the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on the display screen. After the target color value corresponding to the moving point is determined, the target screen point can be colored by using the target color value.

[0076] In the embodiments of the present application, firstly, the panoramic roaming is realized by using the three-dimensional model corresponding to the design scheme, which can increase the sense of space in the panoramic roaming process, and in the three-dimensional scene, the objects in the scene can shield the switching points to realize the shielding effect of the real scene. In addition, for the moving point between any two panoramic points in the three-dimensional model, the color value of the panoramic image corresponding to the two panoramic points and the distance between the moving point and the panoramic point are used to determine the color value, and then the color value is used to color the screen point, so that when roaming between the two panoramic points, the color of the screen point changes accordingly with the change of the roaming position, and the process of roaming between the two panoramic points is visually felt.

[0077] In another embodiment of the present application, the S103 can include the following steps:

[0078] Step one, determining the first proportion of the second distance to the first distance, and determining the second proportion based on the first proportion, the sum of the first proportion and the second proportion being one.

[0079] Step two, determining the sum of the product of the first proportion and the first color value, and the product of the second proportion and the second color value, as the target color value corresponding to the moving point.

[0080] In the embodiments of the present application, the system can determine the first proportion of the second distance to the first distance, and obtain the second proportion by subtracting the first proportion, that is, the sum of the first proportion and the second proportion is one. Then the first proportion and the second proportion are used to fuse the first color value and the second color value to obtain the target color value, and the fusion process is specifically to determine the sum of the product of the first proportion and the first color value, and the product of the second proportion and the second color value, as the target color value corresponding to the moving point.

[0081] For example, the first distance between the first position and the second position is 10, the second distance between the moving point and the second position is 8, the first proportion is 0.8, the second proportion is 0.2, and the target color value = first color value * 0.8 + second color value * 0.2.

[0082] The specific implementation process of determining the first proportion of the second distance to the first distance is as follows: taking the distance of the camera moving from the panoramic point 1 to the panoramic point 2 as the time of moving to the point 2 at a constant speed, calculating the refresh rate of the camera to the panoramic point 2 according to the frame frequency = the distance from the moving point where the camera is currently located to the panoramic point 2 / the first distance. Thus, the calculation efficiency can be improved.

[0083] In the embodiment of the present application, for a moving point between two panorama points, the color values corresponding to the two panorama points are fused according to the distance ratio between the moving point and the two panorama points, to obtain a target color value corresponding to the moving point, so that a color gradient effect is generated in the moving process, the scene transition effect is natural, and the panorama roaming experience of the user is more realistic.

[0084] In another embodiment of the present application, as shown in Figure 2 the method can further include the following steps:

[0085] S201, obtaining the UV coordinates corresponding to the vertex of the three-dimensional model.

[0086] S202, for any panorama point in the set of panorama points, obtaining the picture texture of the panorama picture corresponding to the panorama point.

[0087] S203, inputting the UV coordinates and the picture texture into a preset processing model, so that the preset processing model outputs the color value corresponding to the panorama picture.

[0088] In the embodiment of the present application, a two-dimensional texture processing class (texture2D) function can be built in the preset processing model. For any panorama point in the set of panorama points, the picture texture of the panorama picture corresponding to the panorama point and the UV coordinates corresponding to the vertex of the three-dimensional model are input into the preset processing model, and the color value corresponding to the panorama picture has been output by the preset processing model.

[0089] In S201, the specific implementation process of obtaining the UV coordinates corresponding to the vertex of the three-dimensional model is as follows: obtaining the physical coordinates, camera coordinates corresponding to the vertex of the three-dimensional model and the model world matrix corresponding to the three-dimensional model; multiplying the physical coordinates by the model world matrix to obtain the world coordinates corresponding to the vertex; subtracting the camera coordinates from the world coordinates to obtain a target vector; and taking the inverse of the target vector to obtain the UV coordinates corresponding to the vertex.

[0090] In order to meet the system calculation requirements, the physical coordinates corresponding to the vertex of the three-dimensional model can be converted into four-dimensional coordinates in advance before calculation.

[0091] Through the present solution, the system can determine the color value of the picture corresponding to each panorama point according to the coordinates corresponding to the vertex of the three-dimensional model and the picture texture of the panorama picture corresponding to the panorama point, and then determine the color value corresponding to the moving point between two panorama points according to the color values of the pictures corresponding to the two panorama points, thereby improving the visual experience of the user during panorama roaming.

[0092] In another embodiment of the present application, as shown in Figure 3 the method can further include the following steps:

[0093] S301, obtain the camera projection matrix, model world matrix, and physical coordinates of the vertices of the 3D model corresponding to the 3D model.

[0094] S302, multiply the camera projection matrix by the model world matrix to obtain the transformation matrix.

[0095] S303, Multiply the physical coordinates by the transformation matrix to obtain the target coordinate point.

[0096] In this embodiment, the camera projection matrix and the model world matrix can be pre-calculated. Multiplying the camera projection matrix and the model world matrix yields a transformation matrix that converts coordinates from the physical coordinate system to the screen coordinate system. Multiplying the physical coordinates of a vertex of the 3D model by this transformation matrix gives the target coordinate point of that vertex on the display screen. This method allows for the rapid location of the target screen point corresponding to a vertex of the 3D model.

[0097] Optionally, in yet another embodiment of this application, such as Figure 4 As shown, a panoramic roaming processing flow is provided, and the specific flow is as follows.

[0098] First, the vertex coordinates of the model are converted into four-dimensional coordinates, and then the four-dimensional coordinates are converted into world coordinates through the model's world matrix.

[0099] Then, for the panoramic view corresponding to the full viewpoint 1 Figure 1 Panoramic views were captured using the world coordinates of the model vertices and the camera. Figure 1 The corresponding camera coordinates 1 are used to obtain the vector (v_targetUv), based on v_targetUv and the panorama. Figure 1 The corresponding image texture (cubetexture) is used to obtain the panorama using the function texture2D(cubetexture, v_targetUv). Figure 1 The corresponding color value is 1.

[0100] For the panoramic view corresponding to the full scenic spot 2 Figure 2 Utilizing panoramic Figure 1 The same process yields a panoramic view. Figure 2 The corresponding color value is 2.

[0101] During the process of roaming from panoramic viewpoint 1 to panoramic viewpoint 2 (i.e., when the camera moves from panoramic viewpoint 1 to panoramic viewpoint 2), the distance ratio is obtained based on the distance between the camera and panoramic viewpoint 2, and the distance between panoramic viewpoint 1 and panoramic viewpoint 2. Based on color value 1, color value 2 and distance ratio, the blending function mix is ​​used to blend color value 1 and color value 2 to obtain the blended color value (i.e., the target color value).

[0102] In addition, a screen point matrix (i.e., a conversion matrix) of the model displayed on the screen is obtained by multiplying a camera projection matrix with a model world matrix, and a target screen point corresponding to a vertex of the model is obtained by multiplying a physical coordinate of the vertex with the screen point matrix.

[0103] Finally, the target screen point is colored by using the fused color value.

[0104] In the embodiment, when the camera moves between any two panorama points, a color value is determined by using color values of panorama pictures corresponding to the two panorama points and distances between the camera position point and the panorama points, and the screen point is colored by using the color value, so that the color of the screen point changes with the change of the roaming position when roaming between the two panorama points, and the process of roaming between the two panorama points is visually perceived.

[0105] Based on the same technical concept, the embodiment of the present application also provides a panorama roaming device, as shown in the figure, the device comprises: Figure 5

[0106] The acquisition module 501 is configured to acquire a three-dimensional model corresponding to a target scheme and a panorama point set corresponding to the three-dimensional model, the panorama point set comprising a plurality of panorama points and a plurality of panorama pictures corresponding to the panorama points.

[0107] The first determination module 502 is configured to determine a first color value of a panorama picture corresponding to a first panorama point and a first position of the first panorama point in the three-dimensional model when roaming from the first panorama point to a second panorama point in the panorama point set, and determine a second color value of a panorama picture corresponding to the second panorama point and a second position of the second panorama point in the three-dimensional model.

[0108] The second determination module 503 is configured to determine a target color value corresponding to any moving point in the roaming process based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position.

[0109] The coloring module 504 is configured to color a target screen point by using the target color value, wherein the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen.

[0110] In one possible implementation, the second determination module is specifically configured to:

[0111] determine a first proportion of the second distance and the first distance, and determine a second proportion based on the first proportion, and a sum of the first proportion and the second proportion is one. ​

[0112] a product of the first ratio and the first color value, and a sum of a product of the second ratio and the second color value.

[0113] In a possible implementation, the apparatus further includes an input module, configured to:

[0114] obtain a UV coordinate corresponding to a vertex of the three-dimensional model;

[0115] For any panorama point in the set of panorama points, obtain a picture texture of a panorama corresponding to the panorama point;

[0116] input the UV coordinate and the picture texture into a preset processing model, so that the preset processing model outputs a color value corresponding to the panorama.

[0117] In a possible implementation, the input module is further configured to:

[0118] obtain a physical coordinate, a camera coordinate corresponding to a vertex of the three-dimensional model, and a model world matrix corresponding to the three-dimensional model;

[0119] multiply the physical coordinate and the model world matrix to obtain a world coordinate corresponding to the vertex;

[0120] subtract the camera coordinate from the world coordinate to obtain a target vector;

[0121] obtain the UV coordinate corresponding to the vertex by negating the target vector.

[0122] In a possible implementation, the apparatus further includes a conversion module, configured to:

[0123] obtain a camera projection matrix corresponding to the three-dimensional model, a model world matrix, and a physical coordinate corresponding to a vertex of the three-dimensional model;

[0124] multiply the camera projection matrix and the model world matrix to obtain a conversion matrix;

[0125] multiply the physical coordinate and the conversion matrix to obtain the target coordinate point.

[0126] In this embodiment, firstly, a panoramic roaming is achieved using the 3D model corresponding to the design scheme. This enhances the sense of space during the panoramic roaming process. Furthermore, in the 3D scene, objects can occlude switching points, achieving a realistic occlusion effect. Additionally, for any movement point between two panoramic viewpoints in the 3D model, a color value is determined using the color values ​​of the panoramic images corresponding to the two panoramic viewpoints and the distance between the movement point and the panoramic viewpoint. This color value is then used to color the screen point, thus enabling the screen point's color to change accordingly as the roaming position changes during the roaming between the two panoramic viewpoints, achieving a visual perception of the roaming process between the two panoramic viewpoints.

[0127] Based on the same technical concept, embodiments of this application also provide an electronic device, such as... Figure 6 As shown, it includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0128] Memory 113 is used to store computer programs;

[0129] When processor 111 executes a program stored in memory 113, it performs the following steps:

[0130] Obtain the 3D model corresponding to the target solution and the set of panoramic viewpoints corresponding to the 3D model. The set of panoramic viewpoints includes multiple panoramic viewpoints and panoramic images corresponding to multiple panoramic viewpoints.

[0131] When roaming from any first panoramic viewpoint in the panoramic viewpoint set to any second panoramic viewpoint in the panoramic viewpoint set, the first color value of the panoramic image corresponding to the first panoramic viewpoint and the first position of the first panoramic viewpoint in the three-dimensional model are determined, and the second color value of the panoramic image corresponding to the second panoramic viewpoint and the second position of the second panoramic viewpoint in the three-dimensional model are determined;

[0132] For any moving point during the roaming process, the target color value corresponding to the moving point is determined based on the first color value, the second color value, the first distance between the first position and the second position, and the second distance between the moving point and the second position;

[0133] The target screen point is colored using the target color value, wherein the target screen point is the target coordinate point corresponding to the vertex of the 3D model on the display screen.

[0134] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0135] The communication interface is used for communication between the above electronic device and other devices.

[0136] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the above processor.

[0137] The above processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0138] In another embodiment provided in the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of any of the above panoramic roaming methods.

[0139] In another embodiment provided in the present application, a computer program product containing instructions is also provided, and when the computer program product is run on a computer, the computer is caused to execute any of the panoramic roaming methods in the above embodiments.

[0140] In the embodiments described above, all or some of the steps can be implemented by software, hardware or firmware, or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program can be stored in any computer readable medium, and loaded into the computer for execution. The computer readable medium includes: a computer storage medium and a computer communication medium. The computer storage medium includes: volatile memory and non-volatile memory. The computer communication medium includes: computer program transmitted via any transmission medium (for example, wired network or wireless network). The computer program product of the present application can be a computer program that can be executed by one or more computers.

[0141] It should be noted that the terms "first" and "second" and the like in this text are used only to distinguish one entity or action from another, and do not necessarily require or imply these entities or actions have any such actual relationship or order. Also, the terms "comprises", "comprising", or any other variations thereof are intended to cover a non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements does not only include those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, the element defined by the statement "comprises a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0142] The above description is only a specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of panoramic roaming, characterized by, The method comprises: acquiring a three-dimensional model corresponding to a target scheme and a panoramic point set corresponding to the three-dimensional model, the panoramic point set comprising a plurality of panoramic points and a plurality of panoramic pictures corresponding to the panoramic points, the target scheme being a home decoration design scheme, and the three-dimensional model being a 3D design model corresponding to the target scheme; when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, determining a first color value of a panoramic picture corresponding to the first panoramic point and a first position of the first panoramic point in the three-dimensional model, and determining a second color value of a panoramic picture corresponding to the second panoramic point and a second position of the second panoramic point in the three-dimensional model; for any moving point in the roaming process, determining a target color value corresponding to the moving point based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position, wherein when the moving point coincides with the first panoramic point, the first color value corresponding to the first panoramic point is the target color value, and when the moving point coincides with the second panoramic point, the second color value corresponding to the second panoramic point is the target color value; coloring a target screen point using the target color value, wherein the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen; acquiring a UV coordinate corresponding to a vertex of the three-dimensional model; for any panoramic point in the panoramic point set, acquiring a picture texture of a panoramic picture corresponding to the panoramic point; inputting the UV coordinate and the picture texture into a preset processing model to make the preset processing model output a color value corresponding to the panoramic picture, a two-dimensional texture processing class function being built in the preset processing model; the acquiring of the UV coordinate corresponding to the vertex of the three-dimensional model comprises: acquiring a physical coordinate, a camera coordinate corresponding to a vertex of the three-dimensional model, and a model world matrix corresponding to the three-dimensional model; multiplying the physical coordinate and the model world matrix to obtain a world coordinate corresponding to the vertex; subtracting the camera coordinate from the world coordinate to obtain a target vector; taking the inverse of the target vector to obtain the UV coordinate corresponding to the vertex.

2. The method of claim 1, wherein, the determining of the target color value corresponding to the moving point based on the first color value, the second color value, the first distance between the first position and the second position, and the second distance between the moving point and the second position comprises: determining a first proportion of the second distance and the first distance, and determining a second proportion based on the first proportion, the sum of the first proportion and the second proportion being one; determining, as the target color value corresponding to the moving point, a sum of a product of the first proportion and the first color value and a product of the second proportion and the second color value.

3. The method of claim 1, wherein, the method further comprises: acquiring a camera projection matrix corresponding to the three-dimensional model, a model world matrix, and a physical coordinate corresponding to a vertex of the three-dimensional model; multiplying the camera projection matrix and the model world matrix to obtain a conversion matrix; multiplying the physical coordinate and the conversion matrix to obtain the target coordinate point.

4. A panoramic roaming device, characterized by, The device comprises: an acquisition module, configured to acquire a three-dimensional model corresponding to a target scheme and a panoramic point set corresponding to the three-dimensional model, the panoramic point set comprising a plurality of panoramic points and a plurality of panoramic pictures corresponding to the panoramic points, the target scheme being a home decoration design scheme, and the three-dimensional model being a 3D design model corresponding to the target scheme; a first determination module, configured to, when roaming from any first panoramic point in the panoramic point set to any second panoramic point in the panoramic point set, determine a first color value of a panoramic picture corresponding to the first panoramic point and a first position of the first panoramic point in the three-dimensional model, and determine a second color value of a panoramic picture corresponding to the second panoramic point and a second position of the second panoramic point in the three-dimensional model; a second determination module, configured to, for any moving point in the roaming process, determine a target color value corresponding to the moving point based on the first color value, the second color value, a first distance between the first position and the second position, and a second distance between the moving point and the second position, wherein, when the moving point coincides with the first panoramic point, the first color value corresponding to the first panoramic point is the target color value, and, when the moving point coincides with the second panoramic point, the second color value corresponding to the second panoramic point is the target color value; a coloring module, configured to color a target screen point using the target color value, wherein the target screen point is a target coordinate point corresponding to a vertex of the three-dimensional model on a display screen; The device further comprises an input module, configured to: acquire a UV coordinate corresponding to a vertex of the three-dimensional model; for any panoramic point in the panoramic point set, acquire a picture texture of a panoramic picture corresponding to the panoramic point; input the UV coordinate and the picture texture into a preset processing model, so that the preset processing model outputs a color value corresponding to the panoramic picture, and a two-dimensional texture processing class function is built in the preset processing model; The acquisition of the UV coordinate corresponding to the vertex of the three-dimensional model comprises: acquiring a physical coordinate, a camera coordinate corresponding to the vertex of the three-dimensional model, and a model world matrix corresponding to the three-dimensional model; multiplying the physical coordinate and the model world matrix to obtain a world coordinate corresponding to the vertex; subtracting the camera coordinate from the world coordinate to obtain a target vector; taking the inverse of the target vector to obtain the UV coordinate corresponding to the vertex.

5. The apparatus of claim 4, wherein, The second determination module is specifically configured to: determine a first ratio of the second distance to the first distance, and determine a second ratio based on the first ratio, wherein the sum of the first ratio and the second ratio is one; determine, as the target color value corresponding to the moving point, a sum of a product of the first ratio and the first color value and a product of the second ratio and the second color value.

6. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; The processor is used to execute the program stored on the memory, and implement the method steps of any one of claims 1-3.

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

Citation Information

Patent Citations

  • Panoramic image completion method and device, computer readable storage medium and electronic equipment

    CN111402404A