A panoramic relationship graph generation method and device, and a readable storage medium
Patent Information
- Application Number
- CN202210945874.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-08-08
AI Technical Summary
In existing technologies, panoramic generation methods fail to effectively and intuitively present the relationships between panoramas, resulting in poor panoramic distribution effects.
By obtaining the panoramic density of the sub-canvas, the rendering position of the panorama to be added is determined based on the sub-canvas with the lowest panoramic density. Then, a panoramic relationship graph is rendered in the canvas based on the rendering position and jump relationship. The point density calculation method is used to reduce the probability of node position repetition and mutual overlap, ensuring that the nodes are evenly distributed.
It improves the distribution effect between panoramas, ensures that nodes are evenly distributed in the canvas, reduces the probability of node position repetition and mutual overlap, and realizes an intuitive and visual presentation of the panorama relationship diagram.
Smart Images

Figure CN117576282B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual reality, and more particularly to a method, apparatus, and computer-readable storage medium for generating a panoramic relationship map. Background Technology
[0002] With the rapid development of network technology, basic text, images, and videos can no longer meet users' information needs. Therefore, panoramic technology has emerged. Panoramic technology provides a comprehensive viewing experience without blind spots, giving users an immersive feeling. Furthermore, the interaction of text, images, and click events in panoramic technology can further enhance the realism of the user experience.
[0003] In related technologies, the main focus is on how to generate panoramic tours from panoramas, without paying attention to how to lay out the panoramic relationship diagram on the canvas. Therefore, it is impossible to intuitively and visually present the relationships between all panoramas in a comprehensive manner, which reduces the distribution effect between panoramas. Summary of the Invention
[0004] This invention provides a method, apparatus, and computer-readable storage medium for generating panoramic relationship diagrams, which improves the distribution effect between panoramas.
[0005] The technical solution of this invention is implemented as follows: This invention provides a method for generating a panoramic relationship diagram, the method comprising: Obtain the panoramic density of each of the at least one sub-canvases corresponding to the canvas; the panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas; Based on the sub-canvas with the lowest panoramic density, the rendering position of the current panoramic to be added in the canvas is determined until multiple rendering positions corresponding to multiple panoramic to be added are obtained; the current panoramic to be added is any one of the multiple panoramic to be added. Based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added, the panorama relationship map corresponding to the multiple panoramas to be added is rendered in the canvas.
[0006] This invention provides an apparatus for generating a panoramic relationship map, the apparatus comprising: an acquisition unit, a determination unit, and a rendering unit; wherein, The acquisition unit is used to acquire the panoramic density of each of the at least one sub-canvas corresponding to the canvas; the panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas; The determining unit is used to determine the rendering position of the current panorama to be added in the canvas based on the sub-canvas with the lowest panorama density, until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added is any one of the multiple panoramas to be added. The rendering unit is used to render the panorama relationship map corresponding to the multiple panoramas to be added in the canvas based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added.
[0007] This invention provides an apparatus for generating a panoramic relationship map, the apparatus comprising: Memory, used to store executable instructions; A processor is configured to execute executable instructions stored in the memory, wherein when the executable instructions are executed, the processor executes the method for generating the panoramic relationship map.
[0008] This invention provides a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform a panoramic relationship diagram generation method as described in this invention.
[0009] This invention provides a method, apparatus, and readable storage medium for generating a panoramic relationship graph, comprising: obtaining the panoramic density of each of at least one sub-canvas corresponding to a canvas; the panoramic density being positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas; determining the rendering position of the current panorama to be added in the canvas based on the sub-canvas with the lowest panoramic density, until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added being any one of the multiple panoramas to be added; and rendering the panoramic relationship graph corresponding to the multiple panoramas to be added in the canvas based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added. In this method, by comparing the panoramic densities of the divided sub-canvases, determining the rendering position of the current panorama to be added in the sub-canvas with the lowest panoramic density, and then performing further division and comparison of panoramic densities until multiple rendering positions corresponding to multiple panoramas to be added are determined in the canvas, the probability of duplicate or overlapping node positions in the panoramic relationship graph is greatly reduced, and the nodes are ensured to be evenly distributed in the canvas, improving the distribution effect between panoramas. Attached Figure Description
[0010] Figure 1 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 1 ; Figure 2 A panoramic relationship map generation system based on point density is provided in an embodiment of the present invention; Figure 3 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 2 ; Figure 4 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 3 ; Figure 5 This is a schematic diagram illustrating the effect of the anchor point index values corresponding to the panorama provided in this embodiment of the invention. Figure 6 This is a schematic diagram of the panoramic relationship effect provided in an embodiment of the present invention; Figure 7 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 4 ; Figure 8 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 5 ; Figure 9 A schematic diagram of the structure of a panoramic relationship diagram generation device provided in an embodiment of the present invention; Figure 10 A schematic diagram of another panoramic relationship diagram generation device provided in an embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0012] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 1 The following steps will provide a detailed explanation.
[0013] S101. Obtain the panoramic density of each sub-canvas in at least one sub-canvas corresponding to the canvas; the panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas.
[0014] In an embodiment of the present invention, the panoramic relationship diagram generation device obtains the panoramic density of at least one sub-canvas corresponding to the canvas; if the number of panoramas in the sub-canvas is greater and the size of the sub-canvas is smaller, then the panoramic density of the sub-canvas is greater.
[0015] In an embodiment of the invention, a source panorama and a target panorama of the roaming hotspot are set, along with information such as the hotspot title and icon. This roaming hotspot information is added to the roaming hotspot data, and the roaming hotspot is rendered at the center position of the current viewpoint of the panoramic roaming. Here, the current viewpoint refers to the viewpoint displayed by the panoramic roaming at this moment, and the roaming hotspot refers to an icon in a panoramic roaming where one can jump to other panoramas through the icon. Then, the panoramic relationship graph generation device divides the canvas according to the information contained in the roaming hotspot data and determines the panoramic position based on the panoramic density of the divided sub-canvases.
[0016] S102. Based on the sub-canvas with the lowest panoramic density, determine the rendering position of the current panorama to be added in the canvas, until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added is any one of the multiple panoramas to be added.
[0017] In an embodiment of the present invention, after the panoramic relationship diagram generation device obtains the panoramic density of each sub-canvas, it selects the sub-canvas with the lowest panoramic density, that is, the sub-canvas with the fewest panoramic views, and adds the current panoramic view to be added to the sub-canvas with the lowest panoramic density, until all panoramic views to be added are added to the canvas.
[0018] S103. Based on the jump relationship between multiple rendering positions and multiple panoramas to be added, render the panorama relationship diagram corresponding to multiple panoramas to be added in the canvas.
[0019] In an embodiment of the present invention, the panoramic relationship diagram generation device renders a panoramic relationship diagram corresponding to multiple panoramas to be added on the canvas based on the rendering positions of multiple panoramas to be added on the canvas and the jump relationships between them.
[0020] In an embodiment of the present invention, Figure 2 This invention provides a system for generating panoramic relationship maps based on point density. Figure 2It includes a data acquisition module, a panoramic relationship diagram initialization module, a roaming hotspot addition module, a node addition module, a connection module, and a save module. Among them, the data acquisition module is used to acquire roaming hotspot data, node data, and connection data; the panoramic relationship diagram initialization module initializes the relevant operation instructions of the relationship diagram canvas, and renders the corresponding nodes and connections in the canvas according to the node data and connection data to generate a panoramic relationship diagram; the roaming hotspot addition module is used to add roaming hotspots in the panoramic roaming, and the roaming hotspots can be dragged to adjust their positions in the panoramic roaming; the node addition module includes two methods: (1) according to the roaming hotspot data, the node position calculation method based on point density is used to calculate the position of the panoramic map node in the canvas, and render the corresponding node in the canvas; (2) respond to the node drag command and drag the panoramic view from the panoramic list to the canvas; the connection module is used to respond to the drag and draw line command to connect two nodes in the canvas; the save module is used to save the roaming hotspot data in the panoramic roaming, the node data and connection data of the panoramic relationship diagram in the canvas.
[0021] Understandably, in the embodiments of this invention, the panoramic density of the divided sub-canvases is compared, and the rendering position of the current panorama to be added is determined in the sub-canvas with the lowest panoramic density. Then, the division and panoramic density comparison are repeated until multiple rendering positions corresponding to multiple panoramas to be added are determined in the canvas. By generating a panoramic relationship graph through bidirectional linkage using a node position calculation method based on point density, the relationships between all panoramas can be presented intuitively and visually, greatly reducing the probability of duplicate or overlapping node positions in the panoramic relationship graph, and ensuring that nodes are evenly distributed across the canvas, thus improving the distribution effect between panoramas. Furthermore, the panoramic relationship graph can respond to operation commands such as canvas scaling / dragging, node dragging / deleting, dragging to draw lines, and deleting connections, providing batch and flexible operations for all panoramas.
[0022] In some embodiments of the present invention, S102 can be implemented by S1021, as will be explained in detail below.
[0023] S1021. When the panoramic density of the sub-canvas with the lowest panoramic density is equal to the panoramic density threshold, determine the rendering position of the current panoramic view to be added in the sub-canvas with the lowest panoramic density based on the height and width values of the sub-canvas with the lowest panoramic density.
[0024] In some embodiments of the present invention, a panoramic density threshold is set. When the panoramic density in the sub-canvas with the lowest panoramic density is equal to the panoramic density threshold, the panoramic relationship graph generation device calculates the rendering position of the current panoramic view to be added in the sub-canvas with the lowest panoramic density based on the height and width values of the sub-canvas with the lowest panoramic density.
[0025] In some embodiments of the present invention, the panoramic density threshold can be set to 0. If there is a sub-canvas 1 with the minimum panoramic density and a panoramic density of 0, it indicates that there is no panoramic node in the sub-canvas 1. The rendering position of the panoramic node to be added in the sub-canvas 1 is calculated based on the height and width values of the sub-canvas 1. The rendering position of the current panoramic node is calculated based on the height, width, and reference coordinate values of the sub-canvas 1 as shown in the following formula (1): (1) In formula (1), The width value of child canvas 1; The height value of child canvas 1; This indicates the current rendering location where the panorama will be added.
[0026] It is understood that in some embodiments of the present invention, the panoramic density corresponding to the sub-canvas with the lowest panoramic density is compared with the panoramic density threshold. When they are equal, it indicates that the sub-canvas with the lowest panoramic density does not have a panoramic view. In this case, a panoramic view is added to the sub-canvas with the lowest panoramic density, which reduces the probability of repeated or overlapping node positions in the panoramic relationship graph and ensures that the nodes are distributed more evenly in the canvas.
[0027] In some embodiments of the present invention Figure 3 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 2 S102 can also be implemented through S102-1 to S102-3, which will be explained in detail in conjunction with the following steps.
[0028] S102-1. When the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than the panoramic density threshold, the sub-canvas with the lowest panoramic density is divided to obtain at least two new sub-canvases corresponding to the canvas.
[0029] In some embodiments of the present invention, when the panoramic density of the sub-canvas with the lowest panoramic density is greater than the set panoramic density threshold, the panoramic relationship graph generation device divides the sub-canvas with the lowest panoramic density to obtain two new sub-canvases.
[0030] In some embodiments of the present invention, the panoramic density threshold can be set to 0, the panoramic density of sub-canvas 1 is the minimum, and when the panoramic density of sub-canvas 1 is greater than 0, it indicates that a panoramic view has been added to sub-canvas 1. Therefore, sub-canvas 1 is divided to obtain at least two new sub-canvases.
[0031] S102-2, Obtain the new panoramic density for each new sub-canvas.
[0032] In some embodiments of the present invention, the apparatus for generating the panoramic relationship graph calculates the panoramic density corresponding to each new sub-canvas after division.
[0033] S102-3. Based on the new sub-canvas with the lowest new panoramic density, determine the rendering position of the current panorama to be added.
[0034] In some embodiments of the present invention, after the panoramic relationship graph generation device obtains the panoramic density corresponding to each new sub-canvas, it selects the new sub-canvas with the smallest panoramic density, compares the panoramic density of the new sub-canvas with the smallest panoramic density with the panoramic density threshold, and if it is equal to the panoramic density threshold, then the rendering position of the current panoramic to be added is determined in the new sub-canvas with the smallest panoramic density, and the determination method is as shown in formula (1). If it is greater than the panoramic density threshold, the new sub-canvas with the smallest panoramic density is divided again to obtain the re-divided sub-canvas, and the minimum panoramic density is judged again for the re-divided sub-canvas. This process is repeated until multiple rendering positions of multiple panoramic to be added in the canvas are obtained.
[0035] It is understood that in some embodiments of the present invention, if the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than the panoramic density threshold, the sub-canvas with the lowest panoramic density is re-divided and iterated continuously, so that each time the panorama to be added is added to the sub-canvas with the lowest panoramic density where the number of panoramas is 0, the probability of repeated or overlapping node positions in the panoramic relationship graph is reduced, and the nodes are ensured to be distributed more evenly in the canvas.
[0036] In some embodiments of the present invention, S102-1 can be implemented by S201 to S202, which will be described in detail in conjunction with the following steps.
[0037] S201. Obtain the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density.
[0038] In some embodiments of the present invention, the apparatus for generating the panoramic relationship map obtains the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density.
[0039] S202. Based on height, width, and reference coordinates, divide the sub-canvas with the lowest panoramic density according to a preset division method to obtain at least two new sub-canvases corresponding to the canvas; the preset division method is used to divide the sub-canvas with the lowest panoramic density into equal parts.
[0040] In some embodiments of the present invention, the panoramic relationship diagram generation device divides the sub-canvas with the lowest panoramic density equally according to the obtained height, width and reference coordinates and a preset division method, to obtain at least two new sub-canvases corresponding to the canvas.
[0041] In some embodiments of the present invention, the sub-canvas with the lowest panoramic density can be divided into two, four, or nine equal parts, and the present invention does not impose any limitation. Taking four equal parts as an example, the center point of the sub-canvas with the lowest panoramic density is calculated based on the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density. The specific calculation formula is shown in formula (2): (2) In formula (2), Center point; The x-coordinate value of the reference point; The ordinate value is the reference point.
[0042] After calculating the center point using the above formula, Using as the dividing point, and Connection and The connecting lines divide the canvas into four sub-canvases. ,in The points simultaneously satisfy and , The points simultaneously satisfy and , The points simultaneously satisfy and , The points simultaneously satisfy and .
[0043] It is understood that, in some embodiments of the present invention, the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density are obtained; based on the height, width, and reference coordinates, the sub-canvas with the lowest panoramic density is divided according to a preset division method to obtain multiple new sub-canvases; the rendering position of the panorama to be added is determined again in the multiple new sub-canvases, which reduces the probability of node positions being repeated or overlapping in the panoramic relationship graph, and ensures that the nodes can be distributed more evenly in the canvas, thereby improving the distribution effect of the panorama.
[0044] In some embodiments of the present invention Figure 4 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 3 S102-2 can be implemented through S301 to S304, which will be explained in detail in conjunction with the following steps.
[0045] S301. Multiply the height and width to get the calculation result.
[0046] In some embodiments of the present invention, the apparatus for generating the panoramic relationship diagram multiplies the height and width of the sub-canvas with the lowest panoramic density to obtain the calculation result.
[0047] S302. Reduce the calculation results according to the preset value to obtain the area of each new sub-canvas.
[0048] In some embodiments of the present invention, a preset value is set, and the panoramic relationship diagram generation device reduces the obtained calculation results according to the preset value to obtain the area of each new sub-canvas.
[0049] In some embodiments of the present invention, the area of each new sub-canvas is calculated as shown in the following formula (3): (3) In the above formula, The area of each new sub-canvas, .
[0050] S303, Get the number of panoramas in each new sub-canvas.
[0051] In some embodiments of the present invention, the apparatus for generating panoramic relationship diagrams acquires the number of panoramas in each new sub-canvas.
[0052] S304. Divide the number of panoramas in each new sub-canvas by the area of each new sub-canvas to obtain the new panorama density of each new sub-canvas.
[0053] In some embodiments of the present invention, the panoramic relationship graph generation device performs a division operation on each new sub-canvas and the number of panoramas in its canvas to obtain a new panoramic density for each new sub-canvas.
[0054] In some embodiments of the present invention, the new panoramic density of each new sub-canvas is calculated as shown in the following formula (4): (4) In the above formula (4), For the panoramic density of the sub-canvas, The number of panoramas in the child canvas. .
[0055] It is understood that, in some embodiments of the present invention, the area of the multiple new sub-canvases after division is calculated using the height and width values of the sub-canvas with the lowest panoramic density, and the panoramic density of the multiple new sub-canvases is obtained based on the area of the multiple new sub-canvases and the number of panoramas they contain. The rendering position of the panorama to be added is determined based on the calculated panoramic density of the new sub-canvases, thus improving the accuracy of determining the rendering position of the panorama to be added.
[0056] In some embodiments of the present invention, S102 can also be implemented by S1021' to S1023, which will be described in conjunction with the following steps.
[0057] S1021' If the number of sub-canvases with the lowest panoramic density is greater than the preset value, then obtain the numbers of multiple sub-canvases with the lowest panoramic density.
[0058] In some embodiments of the present invention, after calculating the panoramic density of each sub-canvas, if the number of sub-canvas with the lowest panoramic density is greater than a preset value, the number carried by each sub-canvas with the lowest panoramic density is obtained.
[0059] In some embodiments of the present invention, if there are sub-canvas 1, sub-canvas 2, sub-canvas 3 and sub-canvas 4, where 1, 2, 3 and 4 are the numbers of the sub-canvases respectively, and the panoramic density of sub-canvas 2, sub-canvas 3 and sub-canvas 4 is equal and the minimum, then the numbers of sub-canvas 2, 3 and 4 are obtained for corresponding judgment.
[0060] S1022. Determine the sub-canvas with the smallest number as the target sub-canvas.
[0061] In some embodiments of the present invention, the apparatus for generating the panoramic relationship map compares the acquired numbers and determines the sub-canvas with the smallest number as the target sub-canvas.
[0062] In some embodiments of the present invention, among sub-canvases 2, 3, and 4, sub-canvas 2 has the smallest number, and therefore sub-canvas 2 is the target sub-canvas.
[0063] S1023. Based on the target sub-canvas, determine the rendering position of the current panorama to be added in the canvas.
[0064] In some embodiments of the present invention, the panoramic relationship diagram generation device determines the rendering position of the current panorama to be added in the canvas based on the target sub-canvas.
[0065] In some embodiments of the present invention, S103 can be implemented by S1031 to S1032, which will be described in detail in conjunction with the following steps.
[0066] S1031. Based on the coordinates of multiple panoramas to be added, determine the anchor point index values of multiple panoramas to be added; the coordinates of the panoramas to be added correspond to the rendering positions of the panoramas to be added.
[0067] In some embodiments of the present invention, the panoramic relationship diagram generation device obtains the corresponding coordinates of multiple positions of the panoramas to be added in the canvas, and then compares the coordinates of the multiple panoramas to be added to determine the anchor point index values of the multiple panoramas to be added.
[0068] In some embodiments of the present invention, an anchor point is a type of hyperlink in web page creation, also called a named anchor. Like a quick locator, it is a hyperlink within a page that can enable intra-page navigation or jump to a certain area of another page.
[0069] S1032. Based on the jump relationship and anchor point index value, connect multiple panoramas to be added to obtain a panorama relationship diagram.
[0070] In some embodiments of the present invention, the panoramic relationship diagram generation device connects multiple panoramas to be added according to the jump relationship and anchor point index value to obtain a panoramic relationship diagram.
[0071] It is understood that, in some embodiments of the present invention, by comparing the coordinate values of multiple panoramas, the target index values of multiple panoramas are determined, thereby enabling the creation of connections between multiple panoramas at appropriate locations; based on the jump relationship and anchor point index values, multiple panoramas are connected to obtain a panorama relationship diagram, which effectively ensures the consistency between the panorama hotspots and the panorama relationship diagram in panorama roaming, and can intuitively and visually present the relationship between all panoramas.
[0072] In some embodiments of the present invention Figure 5 This is a schematic diagram illustrating the effect of anchor point index values corresponding to the panorama provided in an embodiment of the present invention. Figure 5 In this context, anchor points refer to the connection points between multiple panoramas on the canvas. Small circles indicate panorama anchor points, and numbers represent anchor point numbers. In two panoramas, if the index value of panorama one is 0 and the index value of panorama two is 2, then a line is created at the anchor point index 0 above panorama one and the anchor point index 2 below panorama two.
[0073] In some embodiments of the present invention, S401 to S402 are included before S1031, which will be described in detail in conjunction with the following steps.
[0074] S401: Display multiple panoramas and canvases to be added; In some embodiments of the present invention, the panoramic relationship diagram generation device displays the current canvas and multiple panoramas to be added in the canvas to the operator.
[0075] S402. In response to an operation specifying the location of the current panorama to be added, determine multiple rendering locations in the canvas corresponding to multiple panoramas to be added.
[0076] In some embodiments of the present invention, an operator drags a panorama to be added onto a canvas, and the panorama relationship diagram generation device responds to the operator's specified operation for the position of the current panorama to be added, and determines multiple rendering positions corresponding to multiple panoramas to be added in the canvas.
[0077] It is understood that, in some embodiments of the present invention, a manual panoramic dragging method is used to flexibly adjust the panoramic position on the canvas and customize a clearer panoramic relationship diagram layout to better reflect the relationship between panoramic views.
[0078] In some embodiments of the present invention, S402 is followed by S501 to S502, which will be described in detail in conjunction with the following steps.
[0079] S501. In response to the operation of specifying the connection between multiple panoramas to be added, create corresponding connections between the multiple panoramas to be added in the canvas.
[0080] In some embodiments of the present invention, the operator sets a starting panorama and a target panorama among multiple panoramas to be added. Moving the mouse over the panorama activates it, displaying its border and anchor points at the center of the top, bottom, left, and right borders. Moving the mouse over an anchor point activates it; dragging the mouse creates a connection line, thus establishing a directed line from the starting panorama. Dragging the mouse to the anchor point of the target panorama on the canvas completes the connection creation, linking the starting and target panoramas. The panorama relationship diagram generation device responds to the operator's specified connection operation for the multiple panoramas to be added, creating corresponding connections between them on the canvas.
[0081] In some embodiments of the present invention Figure 6 This is a schematic diagram of the panoramic relationship effect provided in an embodiment of the present invention. The automatic generation of the panoramic relationship diagram in processes S101 to S103, or the drag-and-drop generation of the relationship diagram in processes S401 to S402 and S501 to S502, are both as shown. Figure 6 As shown, the panoramic relationship diagram generated based on the point density calculation method and bidirectional linkage can intuitively and visually present the relationships between all panoramas. Figure 6 It includes eight panoramas, all connected by directed lines. Taking panoramas 1, 4, and 6 as examples, panoramas 1 and 4 can be switched bidirectionally, but panoramas 6 cannot be switched back to panoramas 1.
[0082] In some embodiments of the present invention, the panoramic relationship diagram can respond to operation commands such as canvas scaling / drag, node dragging / deleting, dragging to draw lines, and deleting connections, providing batch and flexible operations for all panoramas. Specifically, when a canvas scaling command is received, the canvas is scaled with the mouse position as the center point, and the nodes and connections in the canvas are scaled synchronously; when a canvas drag command is received, the positions of the nodes and connections in the canvas are adjusted as a whole; when a node drag command is received, the position of the node in the canvas is adjusted, and the change in the node position does not affect the position of the connection to the anchor point; a delete button is displayed in the lower right corner of the node, and when a node delete command is received, the node and the node are deleted synchronously. Connecting lines and corresponding hotspots in the panoramic view; when the anchor point of a node is activated, it can respond to the drag-and-draw command, dragging the mouse to create a directed line starting from that node. Dragging the mouse to the anchor point of another node (target node) in the canvas stops the dragging, completing the creation of the line and simultaneously adding a hotspot in the panorama of the starting node; when a line is activated, it is highlighted and a delete button is displayed on the line. When a line deletion command is received, the line is deleted, and the hotspot in the panorama of the starting node of the line is deleted simultaneously; similarly, when a hotspot in the panoramic view is deleted, the corresponding line in the panoramic relationship diagram is deleted simultaneously.
[0083] S502. Based on multiple rendering locations and created connections, determine the panoramic relationship diagram between multiple panoramas to be added.
[0084] In some embodiments of the present invention, the panoramic relationship diagram generation device determines a panoramic relationship diagram between multiple panoramas to be added based on multiple rendering locations and created connections.
[0085] It is understood that in some embodiments of the present invention, any panorama can be manually dragged from the panorama list to the canvas, and the roaming jump relationship between two panoramas can be established by dragging and drawing lines. A custom panorama relationship diagram can be created, which effectively ensures the consistency between the roaming hotspots and the panorama relationship diagram in the panorama roaming, and can intuitively and visually present the relationship between all panoramas.
[0086] In some embodiments of the present invention, S1031 can be implemented by S601 to S604, which will be described in detail in conjunction with the following steps.
[0087] S601. Set the starting panorama and the target panorama among multiple panoramas to be added. The coordinates of the starting panorama include the first ordinate and the first abscissa; the coordinates of the target panorama include the second ordinate and the second abscissa.
[0088] In some embodiments of the present invention, the panoramic relationship diagram generation device sets a starting panoramic view and a target panoramic view among multiple panoramic views to be added. The coordinates of the starting panoramic view are set as a first ordinate and a first abscissa, and the coordinates of the target panoramic view include a second ordinate and a second abscissa.
[0089] S602. When the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the first preset condition, then the anchor point index of the starting panorama is the first preset value, and the anchor point index of the target panorama is the second preset value.
[0090] In some embodiments of the present invention, the first ordinate and the second ordinate are compared. When the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the first preset condition, the anchor point index value of the starting panorama is the first preset value, and the anchor point index value of the target panorama is the second preset value.
[0091] In some embodiments of the present invention, the first preset value may be set to 1 and the second preset value may be set to 3, and the present invention does not impose any limitations.
[0092] In some embodiments of the present invention, the first preset condition is: the first abscissa is less than or equal to the second abscissa, and the difference between the first abscissa and the second abscissa is greater than the width of the starting panorama; or, the difference between the first ordinate and the second ordinate is less than the height of the starting panorama; the width of the starting panorama is equal to the width of the target panorama; and the height of the starting panorama is equal to the height of the target panorama. That is, when At that time, if and but anchor s =1、 anchor y =3.
[0093] S603. If the relationship between the first horizontal coordinate and the second horizontal coordinate satisfies the second preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value.
[0094] In some embodiments of the present invention, the first ordinate and the second ordinate are compared. When the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies a second preset condition, the anchor point index of the starting panorama is the second preset value, and the anchor point index of the target panorama is the first preset value.
[0095] In some embodiments of the present invention, the second preset condition includes: the first horizontal coordinate is greater than the second horizontal coordinate, and the difference between the first and second horizontal coordinates is greater than the width of the initial panorama; or, the difference between the second and first vertical coordinates is less than the height of the initial panorama. That is... and but anchor s =3、 anchor y=1.
[0096] S604. If the relationship between the first horizontal coordinate and the second horizontal coordinate does not satisfy both the first and second preset conditions, then the anchor point index value of the starting panorama is the third preset value, and the anchor point index value of the target panorama is the fourth preset value.
[0097] In some embodiments of the present invention, the first ordinate and the second ordinate are compared. When the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa does not satisfy the first preset condition and the second preset condition, then the anchor point index value of the starting panorama is the third preset value, and the anchor point index value of the target panorama is the fourth preset value.
[0098] In some embodiments of the present invention, the third preset value may be set to 0 and the fourth preset value may be set to 2, and the present invention does not impose any limitations.
[0099] In some embodiments of the present invention, S601 to S604 do not have a sequential relationship.
[0100] It is understood that, in some embodiments of the present invention, target index values of multiple panoramas are determined by comparing the coordinate values of multiple panoramas, thereby enabling the creation of connections at appropriate locations between the multiple panoramas.
[0101] In some embodiments of the present invention, S601 is followed by S601-1 to S601-2, which will be described in detail in conjunction with the following steps.
[0102] S601-1 When the first ordinate is equal to the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the third preset condition, then the anchor point index of the starting panorama is the first preset value, and the anchor point index of the target panorama is the second preset value.
[0103] In some embodiments of the present invention, when the vertical coordinate of the starting panorama is equal to the vertical coordinate of the target panorama, if the relationship between the horizontal coordinate of the starting panorama and the horizontal coordinate of the target panorama satisfies a third preset condition, then the anchor point index value of the starting panorama is a first preset value, and the anchor point index value of the target panorama is a second preset value.
[0104] In some embodiments of the present invention, the third preset condition includes: the first horizontal coordinate is less than or equal to the second horizontal coordinate.
[0105] S601-2. If the relationship between the first horizontal coordinate and the second horizontal coordinate does not meet the third preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value.
[0106] In some embodiments of the present invention, if the relationship between the abscissa of the starting panorama and the abscissa of the target panorama does not satisfy a third preset condition, the panorama relationship diagram generation device sets the anchor point index value of the starting panorama to a second preset value and the anchor point index value of the target panorama to a first preset value.
[0107] In some embodiments of the present invention, S601-1 to S601-2 do not have a sequential relationship.
[0108] It is understood that, in some embodiments of the present invention, target index values of multiple panoramas are determined by comparing the coordinate values of multiple panoramas, thereby enabling the creation of connections at appropriate locations between the multiple panoramas.
[0109] In some embodiments of the present invention, S601 is followed by S601-a to S601-c, which will be described in detail in conjunction with the following steps.
[0110] S601-a. When the first ordinate is greater than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the fourth preset condition, then the anchor point index of the starting panorama is the first preset value, and the anchor point index of the target panorama is the second preset value.
[0111] In some embodiments of the present invention, when the vertical coordinate of the starting panorama is greater than the vertical coordinate of the target panorama, if the relationship between the horizontal coordinate of the starting panorama and the horizontal coordinate of the target panorama satisfies a fourth preset condition, the panorama relationship diagram generation device sets the anchor point index value of the starting panorama to a first preset value and the anchor point index value of the target panorama to a second preset value.
[0112] In some embodiments of the present invention, the fourth preset condition includes: the first abscissa is less than or equal to the second abscissa, and the difference between the second abscissa and the first abscissa is greater than the width of the initial panorama; or, the difference between the first ordinate and the second ordinate is less than the height of the initial panorama. That is... and
[0113] S601-b. If the relationship between the first horizontal coordinate and the second horizontal coordinate satisfies the fifth preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value.
[0114] In some embodiments of the present invention, if the relationship between the abscissa of the starting panorama and the abscissa of the target panorama satisfies a fifth preset condition, the panorama relationship diagram generation device sets the anchor point index value of the starting panorama to a second preset value and the anchor point index value of the target panorama to a first preset value.
[0115] In some embodiments of the present invention, the fifth preset condition includes: the first horizontal coordinate is greater than the second horizontal coordinate, and the difference between the first and second horizontal coordinates is greater than the width of the initial panorama; or, the difference between the second and first vertical coordinates is less than the height of the initial panorama. That is... and
[0116] S601-c. If the relationship between the first and second horizontal coordinates does not satisfy both the fourth and fifth preset conditions, then the anchor point index of the starting panorama is the fourth preset value, and the anchor point index of the target panorama is the third preset value.
[0117] In some embodiments of the present invention, if the relationship between the abscissa of the starting panorama and the abscissa of the target panorama does not simultaneously satisfy the fourth preset condition and the fifth preset condition, the panorama relationship diagram generation device sets the anchor point index value of the starting panorama to the fourth preset value and the anchor point index value of the target panorama to the third preset value.
[0118] In some embodiments of the present invention, S601-a to S601-c do not have a sequential relationship.
[0119] It is understood that, in some embodiments of the present invention, target index values of multiple panoramas are determined by comparing the coordinate values of multiple panoramas, thereby enabling the creation of connections at appropriate locations between the multiple panoramas.
[0120] This invention provides a method for generating a panoramic relationship diagram, such as... Figure 7 As shown, Figure 7 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 4 The following steps will provide a detailed explanation.
[0121] S1. Add roaming hotspots in panoramic roaming.
[0122] In an embodiment of the present invention, in panoramic roaming, the source panorama and target panorama of the roaming hotspot are set, as well as information such as hotspot title and icon. The roaming hotspot information is added to the roaming hotspot data, and the roaming hotspot is rendered at the center position of the current view of the panoramic roaming. The current view refers to the view displayed by the panoramic roaming at this time, and the roaming hotspot refers to an icon in a certain panoramic roaming. Through the icon, one can jump to other panoramas.
[0123] In an embodiment of the present invention, a drag command for a roaming hotspot in panoramic roaming is initialized, the position of the roaming hotspot in panoramic roaming is adjusted in response to the command, and the position information of the hotspot in the roaming hotspot data is updated.
[0124] S2. Calculate the position of the panoramic node in the canvas according to the node position calculation method based on point density.
[0125] In the embodiments of the present invention, S2 is implemented by S2.1-S2.12, which will be described in detail in conjunction with the following steps.
[0126] S2.1, Get Canvas Width ,high Canvas reference point (top left corner) coordinates Canvas Node Dataset ,in m It represents the number of nodes.
[0127] S2.2, Judgment m If the value is 0, proceed to step S2.3; otherwise, proceed to step S2.4. S2.3 Calculate the coordinates of the new node ,Finish; S2.4 Calculate the center point of the canvas ; S2.5, with Using as the dividing point, and Connection and The connecting lines divide the canvas into four sub-canvases. ,in The points simultaneously satisfy and , The points simultaneously satisfy and , The points simultaneously satisfy and , The points simultaneously satisfy and .
[0128] S2.6, Traversal Each sub-canvas ; In some embodiments of the present invention, S2.6 can be implemented by S2.6-a to S2.6-d, which will be specifically described through the following steps.
[0129] S2.6-a, Calculation area ; S2.6-b yes Number of internal nodes ; S2.6-c, Traversal DEach node , The coordinates are ,judge Is it in (See step S2.5 for the judgment condition) If and will Put in node set ; S2.6-d, Calculation Node density ; S2.7 Select the sub-canvas with the lowest node density. , Indicates the sub-canvas number with the lowest node density, and determines... If the quantity is greater than 1, take the number. min The smallest sub-canvas; S2.8 Determine whether the following conditions are met simultaneously. Equal to 0 (panoramic density threshold) and If the value is 0, proceed to step S2.12; otherwise, proceed to step S2.9. S2.9, if min Equals 1, ;like min Equals 2, ; like min Equals 3, ;like min It equals 4. ; S2.10, Update child canvas width ,high ; S2.11, Update D , , yes The set of all nodes in the set (generated in step S2.6-c) is then executed, followed by step S2.4; S2.12 Calculate the coordinates of the new node ; like min Equals 1, , ;like min Equals 2, ; like min Equals 3, , ;like min It equals 4. , .
[0130] S3. Generate node anchor index values.
[0131] In embodiments of the present invention, the index value is an integer between 0 and 3; In some embodiments of the present invention, S3 can be implemented by S3.1 to S3.4, which will be described in detail in conjunction with the following steps.
[0132] S3.1, the coordinates of the starting node and the target node are respectively , The starting and target nodes have the same image width and height. , The starting node and target node anchor index values are respectively , ; S3.2, At that time, if and but anchor s =1 (first preset value) anchor y =3 (second preset value); if and but anchor s =3、 anchor y =1; otherwise (Third preset value) (Fourth preset value); S3.3、 At that time, if ,but anchor s =1、 anchor y =3; otherwise anchor s =3、 anchor y =1.
[0133] S3.4 At that time, if and but anchor s =1、 anchor y =3; if and but anchor s =3、 anchor y =1; otherwise , ; S4, Update node data and connection data.
[0134] In an embodiment of the present invention, the starting node (the source panorama corresponding to the roaming hotspot) and the target node (the target scene corresponding to the roaming hotspot) information are added to the node data, the connection line (a directed line with an arrow connecting the starting node and the target node) information is added to the connection line data, and the corresponding nodes and connections are rendered in the canvas to update the panorama relationship diagram. S5. Render the newly added nodes and connections on the canvas.
[0135] S6. Drag and adjust the position of the nodes on the canvas to update the panoramic relationship diagram.
[0136] In an embodiment of the present invention, the position of the panoramic image nodes in the canvas is adjusted in response to the node drag command, and the panoramic relationship diagram and node position information in the node data are updated.
[0137] It is understood that, in the embodiments of the present invention, a panoramic relationship diagram is generated bidirectionally on the canvas based on the node position calculation method using point density, according to the roaming hotspot data. This provides an intuitive and visual presentation of the relationships between all panoramas, reducing the probability of duplicate or overlapping node positions in the panoramic relationship diagram and ensuring that nodes are evenly distributed across the canvas. Furthermore, the panoramic relationship diagram can respond to operation commands such as canvas scaling / dragging, node dragging / deleting, dragging to draw lines, and deleting connected lines, providing batch and flexible operations for all panoramas.
[0138] This invention provides a method for generating a panoramic relationship diagram, such as... Figure 8 As shown, Figure 8 An optional process for generating a panoramic relationship diagram provided in an embodiment of the present invention. Figure 5 The following steps will provide a detailed explanation.
[0139] Sa, obtain node data and connection data; Sb. Automatically render the corresponding panoramic image and connecting lines to the canvas to generate a panoramic relationship diagram. Sc. Drag the panorama image from the panorama image list to the canvas.
[0140] In an embodiment of the present invention, canvas-related operation instructions are initialized, including node drag instructions and drag line drawing instructions; a list of panoramic images is displayed below the canvas; a panoramic image is dragged from the list of panoramic images to the canvas; the position of the panoramic image in the canvas is adjusted in response to the node drag instructions; and the relevant information of the panoramic image node is added to the node data. Sd, responds to drag-and-drop line drawing commands to connect nodes in the canvas.
[0141] In an embodiment of the present invention, when a panoramic node in the canvas is active (mouse hovers over the node), the node border is displayed, and anchor points are displayed at the center of the top, bottom, left, and right borders, respectively. When the anchor point is active (mouse hovers over the anchor point), dragging the mouse will create a connection line, thus creating a directed connection line with the node as the starting node. Dragging the mouse to the anchor point of another node (target node) in the canvas and stopping the dragging completes the creation of the connection line, connecting the two nodes, updating the panoramic relationship diagram, and adding the connection line information to the connection line data. Se, generate a panoramic relationship diagram.
[0142] Sf, Add roaming hotspots in panoramic roaming.
[0143] Add the roaming hotspot with the source panorama as the starting node and the target panorama as the target node to the roaming hotspot data, and render the roaming hotspot in the initial view of the panoramic roaming. The initial view refers to the position of the screen that is first seen when entering the panoramic roaming.
[0144] It is understood that, in some embodiments of the present invention, in the panorama list in the canvas, any panorama is dragged from the panorama list to the canvas, and then a line is created at the anchor points of multiple panoramas to connect the multiple panoramas and generate a panorama relationship diagram. Using this drag-and-drop method, the node positions in the canvas can be flexibly adjusted, and a clearer panorama relationship diagram layout can be customized to better reflect the relationship between nodes.
[0145] This invention provides an apparatus for generating a panoramic relationship diagram, such as... Figure 9 As shown, Figure 9 This is a schematic diagram of a panoramic relationship map generation device provided in an embodiment of the present invention. The device 9 includes: an acquisition unit 901, a determination unit 902, and a rendering unit 903; wherein, The acquisition unit 901 is used to acquire the panoramic density of each of the at least one sub-canvas corresponding to the canvas; the panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas.
[0146] The determining unit 902 is used to determine the rendering position of the current panorama to be added in the canvas based on the sub-canvas with the smallest panorama density, until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added is any one of the multiple panoramas to be added.
[0147] The rendering unit 903 is used to render the panorama relationship diagram corresponding to the multiple panoramas to be added in the canvas based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added.
[0148] In some embodiments of the present invention, the determining unit 902 is further configured to determine the rendering position of the current panorama to be added in the sub-canvas with the lowest panorama density in the sub-canvas with the lowest panorama density, based on the height, width and reference coordinates of the sub-canvas with the lowest panorama density when the panorama density corresponding to the sub-canvas with the lowest panorama density is equal to the panorama density threshold.
[0149] In some embodiments of the present invention, the determining unit 902 is further configured to: divide the sub-canvas with the lowest panoramic density to obtain at least two new sub-canvases corresponding to the sub-canvas when the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than the panoramic density threshold; and obtain a new panoramic density for each new sub-canvas; and determine the rendering position of the current panorama to be added based on the new sub-canvas with the lowest new panoramic density.
[0150] In some embodiments of the present invention, the determining unit 902 is further configured to obtain the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density; and, based on the height, the width, and the reference coordinates, divide the sub-canvas with the lowest panoramic density according to a preset division method to obtain at least two new sub-canvases corresponding to the canvas; the preset division method is used to divide the sub-canvas with the lowest panoramic density into equal parts.
[0151] In some embodiments of the present invention, the acquisition unit 901 is further configured to multiply the height and the width to obtain a calculation result; and to reduce the calculation result by a preset value to obtain the area of each new sub-canvas; and to obtain the number of panoramas in each new sub-canvas; and to perform a division operation between the number of panoramas in each new sub-canvas and the area of each new sub-canvas to obtain the new panorama density of each new sub-canvas.
[0152] In some embodiments of the present invention, the determining unit 902 is further configured to: obtain the numbers of multiple sub-canvases with the lowest panoramic density if the number of sub-canvases with the lowest panoramic density is greater than a preset value; determine the sub-canvas with the smallest number as the target sub-canvas; and determine the rendering position of the current panorama to be added in the canvas based on the target sub-canvas.
[0153] In some embodiments of the present invention, the determining unit 902 is further configured to determine anchor point index values of multiple panoramas to be added based on the coordinates of multiple panoramas to be added; the coordinates of the panoramas to be added correspond to the rendering positions of the panoramas to be added; and, based on the jump relationship and the anchor point index values, connect the multiple panoramas to be added accordingly to obtain the panorama relationship diagram.
[0154] In some embodiments of the present invention, the determining unit 902 is further configured to display the plurality of panoramas to be added and the canvas; and, in response to a position specification operation for the current panorama to be added, to determine a plurality of rendering positions corresponding to the plurality of panoramas to be added in the canvas.
[0155] In some embodiments of the present invention, the determining unit 902 is further configured to, in response to a connection specification operation for a plurality of panoramas to be added, create corresponding connections between the plurality of panoramas to be added in the canvas; and, based on the plurality of rendering positions and the created connections, determine the panorama relationship diagram between the plurality of panoramas to be added.
[0156] In some embodiments of the present invention, the determining unit 902 is further configured to set a starting panorama and a target panorama among a plurality of panoramas to be added, wherein the coordinates of the starting panorama include a first ordinate and a first abscissa; the coordinates of the target panorama include a second ordinate and a second abscissa; and, when the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies a first preset condition, then the anchor point index of the starting panorama is a first preset value, and the anchor point index of the target panorama is a second preset value; and, if the relationship between the first abscissa and the second abscissa satisfies a second preset condition, then the anchor point index of the starting panorama is the second preset value, and the anchor point index of the target panorama is the first preset value; and, if the relationship between the first abscissa and the second abscissa does not simultaneously satisfy the first preset condition and the second preset condition, then the anchor point index of the starting panorama is a third preset value, and the anchor point index of the target panorama is a fourth preset value.
[0157] In some embodiments of the present invention, after setting the starting panorama and the target panorama among the plurality of panoramas to be added, the determining unit 902 is further configured to, when the first ordinate is equal to the second ordinate, if the size relationship between the first abscissa and the second abscissa satisfies a third preset condition, then the anchor point index value of the starting panorama is the first preset value, and the anchor point index value of the target panorama is the second preset value; and if the size relationship between the first abscissa and the second abscissa does not satisfy the third preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value. In some embodiments of the present invention, after setting a starting panorama and a target panorama among the plurality of panoramas to be added, the determining unit 902 is further configured to, when the first ordinate is greater than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the fourth preset condition, then the anchor point index value of the starting panorama is the first preset value, and the anchor point index value of the target panorama is the second preset value; and, if the relationship between the first abscissa and the second abscissa satisfies the fifth preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value; and, if the relationship between the first abscissa and the second abscissa does not simultaneously satisfy the fourth preset condition and the fifth preset condition, then the anchor point index value of the starting panorama is the fourth preset value, and the anchor point index value of the target panorama is the third preset value.
[0158] In some embodiments of the present invention, the first preset condition includes: the first abscissa is less than or equal to the second abscissa, and the difference between the first abscissa and the second abscissa is greater than the width of the starting panorama; or, the difference between the first ordinate and the second ordinate is less than the height of the starting panorama; the width of the starting panorama is equal to the width of the target panorama; the height of the starting panorama is equal to the height of the target panorama; the second preset condition includes: the first abscissa is greater than the second abscissa, and the difference between the first abscissa and the second abscissa is greater than the width of the starting panorama; or, the difference between the second ordinate and the first ordinate is greater than the width of the starting panorama. The result is less than the height of the initial panorama; the third preset condition includes: the first abscissa is less than or equal to the second abscissa; the fourth preset condition includes: the first abscissa is less than or equal to the second abscissa, and the difference between the second abscissa and the first abscissa is greater than the width of the initial panorama; or, the difference between the first ordinate and the second ordinate is less than the height of the initial panorama; the fifth preset condition includes: the first abscissa is greater than the second abscissa, and the difference between the first abscissa and the second ordinate is greater than the width of the initial panorama; or, the difference between the second ordinate and the first ordinate is less than the height of the initial panorama.
[0159] Understandably, in the above-described device implementation, the panoramic density of each sub-canvas in at least one sub-canvas corresponding to the canvas is obtained. Panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas. Based on the sub-canvas with the lowest panoramic density, the rendering position of the current panorama to be added is determined in the canvas, until multiple rendering positions corresponding to multiple panoramas to be added are obtained. The current panorama to be added is any one of the multiple panoramas to be added. Based on the jump relationship between multiple rendering positions and multiple panoramas to be added, a panoramic relationship graph corresponding to multiple panoramas to be added is rendered in the canvas. By comparing the panoramic densities of the divided sub-canvases, determining the rendering position of the current panorama to be added in the sub-canvas with the lowest panoramic density, and then performing further division and comparison of panoramic densities until multiple rendering positions corresponding to multiple panoramas to be added are determined in the canvas, the probability of duplicate or overlapping node positions in the panoramic relationship graph is greatly reduced, and the nodes are ensured to be distributed more evenly in the canvas, improving the distribution effect between panoramas.
[0160] Based on the methods described in the above embodiments, this invention provides a structural schematic diagram, as shown below. Figure 10 As shown, Figure 10 An apparatus for generating a panoramic relationship diagram is provided in an embodiment of the present invention. The apparatus 10 includes a processor 1001 and a memory 1002. The memory 1002 stores one or more programs executable by the processor 1001. When one or more programs are executed, the processor 1001 executes the panoramic relationship diagram generation apparatus corresponding to the previous embodiment.
[0161] This invention provides a computer-readable storage medium storing executable instructions for inducing a processor to execute the method for generating the panoramic relationship diagram.
[0162] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0163] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0165] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0166] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A method for generating a panoramic relationship diagram, characterized in that, include: Obtain the panoramic density of each of the at least one sub-canvas corresponding to the canvas; The panorama density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas; Based on the sub-canvas with the lowest panoramic density, determine the rendering position of the current panorama to be added in the canvas; determining the rendering position of the current panorama to be added in the canvas based on the sub-canvas with the lowest panoramic density includes: when the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than a panoramic density threshold, dividing the sub-canvas with the lowest panoramic density to obtain at least two new sub-canvases corresponding to the canvas; obtaining the new panoramic density of each new sub-canvas; and determining the rendering position of the current panorama to be added in the canvas based on the new sub-canvas with the lowest new panoramic density. After determining the rendering position, the division and panoramic density are compared again until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added is any one of the multiple panoramas to be added. Based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added, the panorama relationship map corresponding to the multiple panoramas to be added is rendered in the canvas.
2. The method according to claim 1, characterized in that, Determining the rendering position of the current panorama to be added within the canvas based on the sub-canvas with the lowest panorama density includes: When the panoramic density corresponding to the sub-canvas with the lowest panoramic density is equal to the panoramic density threshold, the rendering position of the current panorama to be added in the sub-canvas with the lowest panoramic density is determined according to the height, width and reference coordinates of the sub-canvas with the lowest panoramic density.
3. The method according to claim 1, characterized in that, When the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than the panoramic density threshold, the sub-canvas with the lowest panoramic density is divided to obtain at least two new sub-canvases corresponding to the sub-canvas, including: Obtain the height, width, and reference coordinates of the sub-canvas with the lowest panoramic density; Based on the height, the width, and the reference coordinates, the sub-canvas with the lowest panoramic density is divided according to a preset division method to obtain at least two new sub-canvases corresponding to the canvas; the preset division method is used to divide the sub-canvas with the lowest panoramic density into equal parts.
4. The method according to claim 1, characterized in that, The step of obtaining the new panoramic density for each of the new sub-canvas includes: Multiply the height and width to get the calculation result; The calculation results are scaled down according to a preset value to obtain the area of each new sub-canvas; Obtain the number of panoramas in each of the new sub-canvases; The new panoramic density of each new sub-canvas is obtained by dividing the number of panoramas of each new sub-canvas by the area of each new sub-canvas.
5. The method according to claim 1, characterized in that, Determining the rendering position of the current panorama to be added within the canvas based on the sub-canvas with the lowest panorama density includes: If the number of sub-canvases with the lowest panoramic density is greater than a preset value, then the numbers of multiple sub-canvases with the lowest panoramic density are obtained. The sub-canvas with the smallest number is identified as the target sub-canvas; Based on the target sub-canvas, determine the rendering position of the current panorama to be added within the canvas.
6. The method according to claim 1, characterized in that, The step of rendering a panorama relationship map corresponding to multiple panoramas to be added in the canvas based on the jump relationship between multiple rendering positions and multiple panoramas to be added includes: Based on the coordinates of multiple panoramas to be added, anchor point index values of multiple panoramas to be added are determined; the coordinates of the panoramas to be added correspond to the rendering positions of the panoramas to be added. Based on the jump relationship and the anchor point index value, the multiple panoramas to be added are connected accordingly to obtain the panorama relationship diagram.
7. The method according to claim 6, characterized in that, Before determining the anchor point index values of the multiple panoramas to be added based on their coordinates, the method further includes: Display the multiple panoramas to be added and the canvas; In response to the operation of specifying the position of the current panorama to be added, a plurality of rendering positions corresponding to the plurality of panoramas to be added are determined in the canvas.
8. The method according to claim 7, characterized in that, In response to the operation of specifying the location of the current panorama to be added, after determining the multiple rendering locations corresponding to the multiple panoramas to be added in the canvas, the method further includes: In response to the operation of specifying the connection between multiple panoramas to be added, corresponding connections are created in the canvas between the multiple panoramas to be added; Based on the multiple rendering locations and the created connections, a panoramic relationship diagram is determined among the multiple panoramas to be added.
9. The method according to claim 6, characterized in that, The step of determining anchor point index values for multiple panoramas to be added based on their coordinates includes: In a plurality of panoramas to be added, a starting panorama and a target panorama are set, wherein the coordinates of the starting panorama include a first ordinate and a first abscissa; and the coordinates of the target panorama include a second ordinate and a second abscissa. When the first ordinate is less than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the first preset condition, then the anchor point index value of the starting panorama is the first preset value, and the anchor point index value of the target panorama is the second preset value. If the relationship between the first horizontal coordinate and the second horizontal coordinate satisfies the second preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value. If the relationship between the first horizontal coordinate and the second horizontal coordinate does not satisfy both the first preset condition and the second preset condition, then the anchor point index value of the starting panorama is the third preset value, and the anchor point index value of the target panorama is the fourth preset value.
10. The method according to claim 9, characterized in that, After setting the starting panorama and target panorama among the multiple panoramas to be added, the method further includes: When the first ordinate is equal to the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies a third preset condition, then the anchor point index of the starting panorama is the first preset value, and the anchor point index of the target panorama is the second preset value. If the relationship between the first horizontal coordinate and the second horizontal coordinate does not satisfy the third preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value.
11. The method according to claim 10, characterized in that, After setting the starting panorama and target panorama among the multiple panoramas to be added, the method further includes: When the first ordinate is greater than the second ordinate, if the relationship between the first abscissa and the second abscissa satisfies the fourth preset condition, then the anchor point index value of the starting panorama is the first preset value, and the anchor point index value of the target panorama is the second preset value. If the relationship between the first horizontal coordinate and the second horizontal coordinate satisfies the fifth preset condition, then the anchor point index value of the starting panorama is the second preset value, and the anchor point index value of the target panorama is the first preset value. If the relationship between the first horizontal coordinate and the second horizontal coordinate does not satisfy both the fourth preset condition and the fifth preset condition, then the anchor point index value of the starting panorama is the fourth preset value, and the anchor point index value of the target panorama is the third preset value.
12. The method according to claim 11, characterized in that, The first preset conditions include: the first horizontal coordinate is less than or equal to the second horizontal coordinate, and the difference between the first horizontal coordinate and the second horizontal coordinate is greater than the width of the starting panorama; or, the difference between the first vertical coordinate and the second vertical coordinate is less than the height of the starting panorama; the width of the starting panorama is equal to the width of the target panorama; and the height of the starting panorama is equal to the height of the target panorama. The second preset condition includes: the first horizontal coordinate is greater than the second horizontal coordinate, and the difference between the first horizontal coordinate and the second horizontal coordinate is greater than the width of the starting panorama; or, the difference between the second vertical coordinate and the first vertical coordinate is less than the height of the starting panorama. The third preset condition includes: the first horizontal coordinate is less than or equal to the second horizontal coordinate; The fourth preset condition includes: the first horizontal coordinate is less than or equal to the second horizontal coordinate, and the difference between the second horizontal coordinate and the first horizontal coordinate is greater than the width of the starting panorama; or, the difference between the first vertical coordinate and the second vertical coordinate is less than the height of the starting panorama. The fifth preset condition includes: the first horizontal coordinate is greater than the second horizontal coordinate, and the difference between the first horizontal coordinate and the second horizontal coordinate is greater than the width of the starting panorama; or, the difference between the second vertical coordinate and the first vertical coordinate is less than the height of the starting panorama.
13. A device for generating a panoramic relationship diagram, characterized in that, include: Acquisition unit, determination unit, and rendering unit; among which, The acquisition unit is used to acquire the panoramic density of each of the at least one sub-canvas corresponding to the canvas; the panoramic density is positively correlated with the number of panoramas in the sub-canvas and negatively correlated with the size of the sub-canvas; The determining unit is configured to determine the rendering position of the current panorama to be added in the canvas based on the sub-canvas with the lowest panoramic density; wherein, when the panoramic density corresponding to the sub-canvas with the lowest panoramic density is greater than a panoramic density threshold, the sub-canvas with the lowest panoramic density is divided to obtain at least two new sub-canvases corresponding to the canvas; a new panoramic density is obtained for each new sub-canvas; the rendering position of the current panorama to be added in the canvas is determined based on the new sub-canvas with the lowest new panoramic density; after determining the rendering position, the division and panoramic density are compared again until multiple rendering positions corresponding to multiple panoramas to be added are obtained; the current panorama to be added is any one of the multiple panoramas to be added. The rendering unit is used to render the panorama relationship map corresponding to the multiple panoramas to be added in the canvas based on the jump relationship between the multiple rendering positions and the multiple panoramas to be added.
14. A device for generating a panoramic relationship diagram, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the panoramic relationship map generation method according to any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The storage medium stores executable instructions, which, when executed, cause the processor to perform the panoramic relationship diagram generation method as described in any one of claims 1-12.
Citation Information
Patent Citations
Mobile phone photographing panoramic image splicing method based on minimum spanning tree
CN110675319A
Panoramic image generation method and device
US20200366838A1
