Panoramic image generation method and device, storage medium and electronic device

By obtaining building project data to generate a visual building model, determining the coordinate information and center of gravity of the area to be processed, and combining with the solid objects, the coordinates of the target position are automatically determined, which solves the problem of low target position generation efficiency in the existing technology and realizes an efficient panoramic view Figure generation.

CN114218638BActive Publication Date: 2025-01-14SHENZHEN XUMI YUNTU SPACE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the efficiency of generating target bits is low and the lack of unified specifications leads to the inefficient efficiency of the panoramic image generation process.

Method used

By obtaining building project data, a visual building model is generated, the coordinate information of the area to be processed is determined, the center of gravity coordinates are calculated, and the target coordinates are determined based on the entity object and center of gravity coordinates are determined, thereby generating a point panoramic map.

Benefits of technology

The automated target bit generation method is realized, which improves the generation efficiency and makes the target bit more in line with the actual application scenarios, and unifies the generation method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218638B_ABST
    Figure CN114218638B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for generating a panoramic image, and relates to the field of computer technology. The method includes: acquiring construction project data, generating a visual building model based on the construction project data; determining the area to be processed in the visual building model according to the construction project data, and determining the coordinate information of the area to be processed; calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; identifying the entity objects in the area to be processed, and determining the target position coordinates according to the coordinates of the entity objects and the center of gravity; generating a point position panoramic image of the area to be processed on the target position coordinates. The method can automatically generate a visual building model according to the construction project data, and then automatically determine the final target position coordinates for each area to be processed in the visual building model based on the calculated center of gravity, so as to generate a point position panoramic image on the target position coordinates, thereby unifying the generation method of the target position and improving the generation efficiency of the target position.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Panoramic technology has a wide range of applications in various fields. Before generating a point panorama, it is often necessary to first determine the target position as the observation point.

[0003] In the existing related technologies, when determining the target position, business personnel (such as designers or operators) usually determine one or more target positions for each household based on their own experience and through subjective judgment. Therefore, the efficiency of determining the target position is very low, and there is a lack of unified standards for determining the target position.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a panoramic image generation method, device, electronic device and storage medium to solve the problem of low efficiency and lack of unified standards in generating target positions in related technologies.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a panoramic image generation method is provided, including: acquiring construction project data, and generating a visual building model based on the construction project data; determining an area to be processed in the visual building model according to the construction project data, and determining coordinate information of the area to be processed; calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; identifying a physical object in the area to be processed, and determining a target position coordinate according to the coordinates of the physical object and the center of gravity; and generating a point-position panoramic image of the area to be processed at the target position coordinates.

[0008] In one embodiment of the present disclosure, building project data is obtained from a Revit application; and the step of generating a visual building model based on the building project data includes: exporting the building project data in Datasmith format to generate a building information model file; loading the building information model file through Unreal Engine 4 UE4 to generate a visual building model.

[0009] In one embodiment of the present disclosure, the steps of determining an area to be processed in a visualized building model based on building project data and determining coordinate information of the area to be processed include: obtaining spatial contour information in the building project data; taking the bottom surface area in the spatial contour information as the area to be processed; obtaining an initial boundary coordinate point set of the area to be processed in the visualized building model, and determining the coordinate information of the area to be processed based on the initial boundary coordinate point set.

[0010] In one embodiment of the present disclosure, the step of determining the coordinate information of the area to be processed based on the initial boundary coordinate point set includes: obtaining a first distance threshold, calculating the distance between every two initial boundary coordinate points in the initial boundary coordinate point set; deduplicating the initial boundary coordinate points in the initial boundary coordinate point set according to the distance and the first distance threshold to obtain target boundary coordinate points; sorting all target boundary coordinate points according to the clockwise or counterclockwise direction of the boundary of the area to be processed to obtain an ordered coordinate set; and using the coordinate points in the ordered coordinate set as the coordinate information of the area to be processed.

[0011] In one embodiment of the present disclosure, the step of calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed includes: based on the coordinate information of the area to be processed, obtaining the coordinates of the initial center of gravity of the area to be processed by a center of gravity algorithm; when the coordinates of the initial center of gravity are within the area to be processed, using the coordinates of the initial center of gravity as the coordinates of the center of gravity; when the coordinates of the initial center of gravity are outside the area to be processed, adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity.

[0012] In one embodiment of the present disclosure, the coordinates of the initial center of gravity are adjusted to obtain the coordinates of the center of gravity, including: determining the coordinate point closest to the initial center of gravity in the coordinate information of the area to be processed as the target boundary coordinate point; determining the connecting line between the initial center of gravity and the target boundary coordinate point, and taking the line segment of the connecting line located in the area to be processed as the target line segment; and determining the coordinates of the center of gravity on the target line segment.

[0013] In one embodiment of the present disclosure, the coordinates of the initial center of gravity are adjusted to obtain the coordinates of the center of gravity, including: dividing the area to be processed to obtain at least two second areas to be processed, and determining the second coordinate information of each second area to be processed based on the coordinate information of the area to be processed; calculating the coordinates of the second center of gravity of the second area to be processed based on the second coordinate information of the second area to be processed, and determining the coordinates of the center of gravity of the area to be processed based on the coordinates of all the second centers of gravity.

[0014] In one embodiment of the present disclosure, the type of the entity object in the visualized building model is a basic mesh type; and the step of determining the target position coordinates according to the coordinates of the entity object and the center of gravity includes: obtaining a collision box of the entity object; when the coordinates of the center of gravity are outside or above the collision box, using the coordinates of the center of gravity as the target position coordinates; when the coordinates of the center of gravity are within the collision box, using the collision box where the coordinates of the center of gravity are located as a first collision box; and adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates.

[0015] In one embodiment of the present disclosure, the steps of adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates include: obtaining a second distance threshold, and if there is a neighboring collision box whose distance to the first collision box is less than the second distance threshold, determining the second collision body according to the neighboring collision box and the first collision box; taking the area occupied by the second collision body in the area to be processed as the collision area; determining the collision boundary point on the boundary of the collision area that is closest to the center of gravity; and determining the target position coordinates according to the collision boundary point.

[0016] In one embodiment of the present disclosure, the method also includes: determining the floor to which the area to be processed belongs based on the first direction coordinate information of the area to be processed; searching for the area information of the floor in the building project data; determining the area identification of the area to be processed based on the second direction coordinate information and the third direction coordinate information of the area to be processed; searching for area description data corresponding to the area identification in the area information, and storing the area description data in association with the area to be processed.

[0017] According to another aspect of the present disclosure, a panoramic image generating device is provided, comprising:

[0018] An acquisition module is used to acquire construction project data and generate a visual building model based on the construction project data; a determination module is used to determine the area to be processed in the visual building model according to the construction project data, and determine the coordinate information of the area to be processed; a calculation module is used to calculate the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; the determination module is also used to identify the entity objects in the area to be processed, and determine the target position coordinates according to the coordinates of the entity objects and the center of gravity; a generation module is used to generate a point-by-point panoramic view of the area to be processed at the target position coordinates.

[0019] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned panoramic image generation method is implemented.

[0020] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned panoramic image generation method by executing the executable instructions.

[0021] The panoramic image generation method provided by the embodiment of the present disclosure can generate a visual building model based on the acquired construction project data, and then determine the area to be processed in the visual building model, and then calculate the center of gravity coordinates of the area to be processed based on the coordinate information of the area to be processed, and then determine the target position based on the identified entity objects and center of gravity coordinates in the area to be processed, so as to generate a point position panoramic image of the area to be processed at the target position. It can be seen that the method provided by the present disclosure can automatically generate a visual building model based on the construction project data, and then automatically determine the final target position coordinates for each area to be processed in the visual building model based on the calculated center of gravity, so as to generate a point position panoramic image at the target position coordinates, thereby unifying the target position generation method and improving the target position generation efficiency.

[0022] Furthermore, the panoramic image generation method provided by the embodiment of the present disclosure can also adjust the center of gravity according to the physical objects in the area to be processed to determine the final target position coordinates, so that the determined target position is more in line with the actual application scenario.

[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0025] Figure 1 A schematic diagram showing an exemplary system architecture to which the panoramic image generation method according to an embodiment of the present disclosure can be applied;

[0026] Figure 2 A flowchart of a method for generating a panoramic image according to an embodiment of the present disclosure is shown;

[0027] Figure 3 A flowchart of a method for generating a panoramic image according to an embodiment of the present disclosure is shown;

[0028] Figure 4 A block diagram showing a panoramic image generating apparatus according to an embodiment of the present disclosure; and

[0029] Figure 5 A structural block diagram of a panoramic image generating computer device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0032] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0033] In view of the technical problems existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a panoramic image generation method to solve at least one or all of the above-mentioned technical problems.

[0034] Figure 1 A schematic diagram showing an exemplary system architecture to which the panoramic image generation method according to an embodiment of the present disclosure can be applied; Figure 1 As shown:

[0035] The system architecture may include a server 101, a network 102, and a client 103. The network 102 is used to provide a medium for a communication link between the client 103 and the server 101. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables.

[0036] The server 101 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the client 203. The background management server may import the building project data into the relevant application in the client 203, so that the application generates and displays a visual building model. The background management server may also calculate the coordinates of the center of gravity of the area to be processed in the visual building model. The background management server may also determine the final target position coordinates based on the coordinates of the center of gravity, so as to generate a point-position panoramic view of the area to be processed at the target position coordinates, and then display the point-position panoramic view in the corresponding interface of the client 203.

[0037] In some optional embodiments, the server 101 can obtain construction project data, and generate a visual building model based on the construction project data; the server 101 can determine the area to be processed in the visual building model according to the construction project data, and determine the coordinate information of the area to be processed; the server 101 can calculate the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; the server 101 can identify the entity objects in the area to be processed, and determine the target position coordinates according to the coordinates of the entity objects and the center of gravity; the server 101 can generate a point-by-point panoramic view of the area to be processed at the target position coordinates.

[0038] The client 103 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, smart home devices, AR (Augmented Reality) devices, VR (Virtual Reality) devices, etc., or the client 103 may also be a personal computer, such as a laptop computer and a desktop computer.

[0039] In some optional embodiments, the client 103 may display to the operator a visualized building model generated according to the building project data, and may display to the operator a generated point-by-point panoramic view.

[0040] It should be understood that Figure 1 The number of clients, networks and servers is merely illustrative, and the server 101 may be a physical server, a server cluster consisting of multiple servers, or a cloud server. It may have any number of clients, networks and servers according to actual needs.

[0041] Hereinafter, each step of the panoramic image generating method in the exemplary embodiment of the present disclosure will be described in more detail with reference to the accompanying drawings and embodiments.

[0042] Figure 2 A flow chart of a method for generating a panoramic image according to an embodiment of the present disclosure is shown. The method provided by the embodiment of the present disclosure can be performed as follows: Figure 1The process is executed in the server or client shown in the figure, but the present disclosure is not limited to this.

[0043] In the following examples, the server cluster 101 is used as the execution subject for example description.

[0044] like Figure 2 As shown, the panoramic image generation method provided by the embodiment of the present disclosure may include the following steps:

[0045] Step S201, acquiring building project data, and generating a visual building model based on the building project data;

[0046] Step S202, determining the area to be processed in the visual building model according to the building project data, and determining the coordinate information of the area to be processed;

[0047] Step S203, calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed;

[0048] Step S204, identifying the physical object in the area to be processed, and determining the target position coordinates according to the coordinates of the physical object and the center of gravity;

[0049] Step S205, generating a point-by-point panoramic image of the area to be processed at the target coordinates.

[0050] In the panoramic image generation method provided by the present disclosure, a visual building model can be generated according to the acquired building project data, and then the area to be processed in the visual building model can be determined, and then the center of gravity coordinates of the area to be processed can be calculated according to the coordinate information of the area to be processed, and then the target position can be determined according to the identified entity objects and center of gravity coordinates in the area to be processed, so as to generate a point position panoramic image of the area to be processed at the target position. It can be seen that the method provided by the present disclosure can automatically generate a visual building model according to the building project data, and then automatically determine the final target position coordinates for each area to be processed in the visual building model based on the calculated center of gravity, so as to generate a point position panoramic image at the target position coordinates, thereby unifying the target position generation method and improving the target position generation efficiency.

[0051] Next, we will combine Figure 2 The steps S201 to S205 of the panoramic image generating method in the exemplary embodiment are described in more detail.

[0052] Step S201, obtaining construction project data, and generating a visual construction model based on the construction project data. The construction project data may be data of a specified target building, and the target building may be a park, a building, a floor, a house, etc.

[0053] In some embodiments, the building project data may be obtained from a Revit application. The step of generating a visual building model based on the building project data in step S201 may include: exporting the building project data in a Datasmith format to generate a building information model file; and loading the building information model file through Unreal Engine 4 UE4 to generate a visual building model.

[0054] Among them, the corresponding building project data can be located in the Revit application according to the building identification of the target building. You can pre-install a plug-in (such as the DatasmithforRevit plug-in) that can provide the function of exporting to the Datasmith format on the Revit application, and then export the building project data in the Datasmith format to generate a Datasmith format file (such as a .udatasmith type file). In some practical applications, you can export a .udatasmith configuration file and a model material folder, where the .udatasmith configuration file can be used to generate a basic visualization model in UE4, and the model material folder can display corresponding effects on the basic visualization model, such as gloss, texture, material, etc.

[0055] Step S203, determining the area to be processed in the visualized building model according to the building project data, and determining the coordinate information of the area to be processed. Wherein, when the area to be processed in the visualized building model corresponds to the actual scene, it can be regarded as a balcony, a bedroom, a living room, a study, etc. in the actual scene. The number of areas to be processed in the visualized building model can be one or more.

[0056] In some embodiments, step S203 may specifically include: obtaining spatial contour information in the construction project data; using the bottom surface area in the spatial contour information as the area to be processed; obtaining the initial boundary coordinate point set of the area to be processed in the visual building model, and determining the coordinate information of the area to be processed according to the initial boundary coordinate point set. In some practical applications, the construction project data may include model data and building information; wherein the model data may be, for example, a structural surface model, an element model, a decorative model of the element model, material information of the decorative model, etc.; the building information may be, for example, structural surface dimension information, element dimension information, coordinate information of the element model, area identification corresponding to the structural surface model, coordinate information of the structural surface model, building dimension information, etc. In addition, the coordinate information of the area to be processed may be a set of multiple coordinates. For example, for a rectangular area to be processed, a set of coordinates of the four vertices of the rectangle may be used as the coordinate information of the area to be processed.

[0057] Further, in some embodiments, the above-mentioned step of determining the coordinate information of the area to be processed based on the initial boundary coordinate point set may include: obtaining a first distance threshold, calculating the distance between every two initial boundary coordinate points in the initial boundary coordinate point set; deduplicating the initial boundary coordinate points in the initial boundary coordinate point set according to the distance and the first distance threshold to obtain target boundary coordinate points; sorting all target boundary coordinate points according to the clockwise or counterclockwise direction of the boundary of the area to be processed to obtain an ordered coordinate set; and using the coordinate points in the ordered coordinate set as the coordinate information of the area to be processed.

[0058] Among them, in the deduplication process, two initial boundary coordinate points whose distance is less than the first distance threshold can be determined first, and then a coordinate point is selected from the two initial boundary coordinate points for removal. The first distance threshold can be adjusted and set according to the actual situation. When the distance between the two coordinate points is less than the first distance threshold, the two coordinate points can be considered to be repeated. Therefore, after the deduplication process step, the distance between each target boundary coordinate point can be made to exceed the first distance threshold. It can avoid the existence of a large number of duplicate points and cause unnecessary storage space occupation and computing resource occupation.

[0059] In some practical applications, the step of sorting all target boundary coordinate points can also be: select a reference point inside the area to be processed, and determine a reference ray with the reference point as the starting point; then connect each target boundary coordinate point with the reference point to obtain the connecting line between each target boundary coordinate point and the reference point; then calculate the rotation angle data that needs to be rotated from the reference ray to each connecting line, and then sort according to the rotation angle data to obtain an ordered coordinate set.

[0060] Step S205, calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed. After the coordinate information that can represent the boundary of the area to be processed is determined, the center of gravity of the area to be processed can be calculated using the coordinate information.

[0061] In some embodiments, step S205 may specifically include: based on the coordinate information of the area to be processed, obtaining the coordinates of the initial center of gravity of the area to be processed through a center of gravity algorithm; when the coordinates of the initial center of gravity are within the area to be processed, using the coordinates of the initial center of gravity as the coordinates of the center of gravity; when the coordinates of the initial center of gravity are outside the area to be processed, adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity.

[0062] Among them, when the area to be processed is a concave polygon, its initial center of gravity may fall outside the area to be processed. Since the panoramic image provided to the user needs to give the user an indoor browsing experience, the initial center of gravity needs to be adjusted so that the adjusted center of gravity falls within the area to be processed.

[0063] Among them, in some embodiments, the above-mentioned step of adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity may be: determining the coordinate point closest to the initial center of gravity in the coordinate information of the area to be processed as the target boundary coordinate point; determining the connecting line between the initial center of gravity and the target boundary coordinate point, and taking the line segment of the connecting line located in the area to be processed as the target line segment; and determining the coordinates of the center of gravity on the target line segment.

[0064] Among them, in some other embodiments, the above-mentioned step of adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity can also be: dividing the area to be processed to obtain at least two second areas to be processed, and determining the second coordinate information of each second area to be processed according to the coordinate information of the area to be processed; calculating the coordinates of the second center of gravity of the second area to be processed based on the second coordinate information of the second area to be processed, and determining the coordinates of the center of gravity of the area to be processed according to the coordinates of all the second centers of gravity.

[0065] In some practical applications, when it is ensured that the coordinates of all second centers of gravity are within the area to be processed, the coordinates of all second centers of gravity can be directly used as the coordinates of the center of gravity of the area to be processed, and then when a panorama is generated later, multiple panoramas can be generated in the concave polygonal area to be processed based on these multiple second centers of gravity. In some other practical applications, when it is ensured that the coordinates of all second centers of gravity are within the area to be processed, a final coordinate can be calculated again based on the coordinates of these multiple second centers of gravity as the coordinates of the center of gravity of the area to be processed. For example, the coordinates of the second centers of gravity can be connected in sequence in a preset direction to obtain a broken line segment. Since the coordinates of each second center of gravity are within the area to be processed, the broken line segment is also within the area to be processed, and a point can be selected on the broken line segment as the coordinates of the center of gravity of the area to be processed.

[0066] Step S207, identifying the entity object in the area to be processed, and determining the target position coordinates according to the coordinates of the entity object and the center of gravity. The floor to which the center of gravity belongs can be determined according to the Z-axis coordinate information of the coordinates of the area to be processed or the center of gravity, and then the component model existing in the floor is determined, and then the component of the entity type is found in the construction model as the entity object.

[0067] In some embodiments, the type of the entity object in the visualized building model is a basic mesh type; and the step of determining the target position coordinates according to the coordinates of the entity object and the center of gravity in step S207 may include: obtaining a collision box of the entity object; when the coordinates of the center of gravity are outside or above the collision box, using the coordinates of the center of gravity as the target position coordinates; when the coordinates of the center of gravity are within the collision box, using the collision box where the coordinates of the center of gravity are located as the first collision box; adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates. The type of the entity object in the visualized building model may be, for example, a StaticMeshActor type.

[0068] Further, in some embodiments, the step of adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates includes: obtaining a second distance threshold, if there is a neighboring collision box whose distance to the first collision box is less than the second distance threshold, determining the second collision body according to the neighboring collision box and the first collision box; taking the area occupied by the second collision body in the area to be processed as the collision area; determining the collision boundary point on the boundary of the collision area that is closest to the center of gravity; and determining the target position coordinates according to the collision boundary point.

[0069] Step S209, generating a point-by-point panoramic view of the area to be processed at the target coordinates. In some practical applications, based on a visualized architectural scene with a virtual decoration effect, multiple scene pictures with decoration effects of the space belonging to the target coordinates can be obtained, for example, at least one upward view, at least one overhead view, and at least one view in each of the four directions of southeast, northwest, and northeast, and then a panoramic view with the target coordinates as the observation point is rendered to serve as a point-by-point panoramic view of the area to be processed.

[0070] In some embodiments, the method further includes: determining the floor to which the area to be processed belongs based on the first direction coordinate information of the area to be processed; searching for the area information of the floor in the building project data; determining the area identification of the area to be processed based on the second direction coordinate information and the third direction coordinate information of the area to be processed; searching for the area description data corresponding to the area identification in the area information, and storing the area description data in association with the area to be processed. The first direction may be the Z-axis direction. For example, when the coordinate data of the area to be processed in the Z-axis direction is 3.05 meters, and the known floor height is 3 meters, it can be calculated that the floor to which the area to be processed belongs is the 2nd floor. The area description data may be the area name marked by the designer when designing the building, such as the names of the kitchen, study, balcony, etc.

[0071] Figure 3 A flowchart of a method for generating a panoramic image according to an embodiment of the present disclosure is shown. Figure 3 As shown, including:

[0072] Step S301, extracting building structure information. The building project data of the building can be extracted in the Revit application, and the building structure information can be extracted from the building project data.

[0073] Step S303, sorting and associating data. The spatial outline and regional information of the building can be determined from the construction project data, wherein the area to be processed of the building can be determined according to each spatial outline to determine which areas need to calculate the target coordinates and then generate a panoramic view. It is also possible to obtain the occupancy coordinate points of each component in a 2D perspective based on the family information and structural information of the components (i.e., components) in the construction project data. The structural information of the component may include a component model, and the component model and the occupancy coordinate points of the component may be used to determine the shape and position of the component in the building scene model. Among them, the regional information in the construction project data may be defined by the designer, for example, it may be a regional name, and the regional information may be associated with the corresponding space, for example, the corresponding regional name can be found through the regional identification of the space.

[0074] Step S305, importing the scene. The building model can be exported from the Revit application to obtain a Datasmith format file that can be used by Unreal Engine 4 (UE4), and then the Datasmith format file can be imported into UE4 to display the generated visual building model.

[0075] Step S307, calculate the center point of the area. The center point is the center of gravity point. The coordinate point array of the space outline can be obtained from the building project data, and then the space outline coordinate point array is deduplicated and sorted to obtain a continuous and non-repetitive set of coordinate points as the coordinate information of the area to be processed.

[0076] Then, the algorithm can be used to obtain the center of gravity position of the area to be processed. In the process of determining the center of gravity position, the center of gravity offset caused by irregular polygons and situations that do not conform to the actual application scenario can be excluded. For example, when the center of gravity position of the area to be processed obtained by the algorithm is outside the area to be processed, the center position can be adjusted so that the adjusted center of gravity position is within the area to be processed.

[0077] Step S309: adjust the center point in combination with the scenario and business rules to obtain the target point.

[0078] In the UE4 scene, you can first determine the floor to which the center point belongs, and then determine the entity objects with collision information in the floor to which the center point belongs based on the component models and occupancy coordinate points of each component obtained in step S303; then obtain the collision box volume of these entity objects, and then recursively detect and offset to the appropriate position until the center point is offset outside all collision boxes to obtain the target point. During the offset process, the offset direction can be adjusted. Furthermore, when selecting the offset direction, the direction toward the geometric center of the area has a higher priority, so that the target point finally determined can be closer to the geometric center of the area to generate a panoramic view of the points near the center of the area.

[0079] Step S311, binding regional geometry and business information. According to the associated data obtained in step S303, the region to be processed in the visual building scene and additional information of the visual building scene are added, for example, the region name and the region to be processed in the visual building scene can be associated and stored.

[0080] Step S313, generating a panoramic image according to the target point. After the panoramic images of each area to be processed are generated, the user can browse and view them in the corresponding interface of UE4 to obtain the browsing experience of being indoors in each area of ​​the whole house.

[0081] It can be seen that through the panoramic image generation method provided by the embodiment of the present disclosure, the target position coordinate information of the target point in each space of the building can be automatically calculated by using the geometric calculation method according to the spatial contour information, and the method provided by the present disclosure can be used to automatically generate in batches. In addition, in the panoramic image generation method provided by the embodiment of the present disclosure, the soft decoration collision box corresponding to the entity object can be automatically avoided based on the identified entity object in the process of determining the target position coordinate, and finally the best target position coordinate that meets the actual needs is determined.

[0082] It should be noted that the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0083] Figure 4 FIG. 4 is a block diagram showing a panoramic image generating device 400 in the fifth embodiment of the present disclosure; Figure 4 As shown, including:

[0084] The acquisition module 401 is used to acquire the construction project data and generate a visual building model based on the construction project data; the determination module 402 is used to determine the area to be processed in the visual building model according to the construction project data, and determine the coordinate information of the area to be processed; the calculation module 403 is used to calculate the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; the determination module 402 is also used to identify the entity objects in the area to be processed, and determine the target position coordinates according to the coordinates of the entity objects and the center of gravity; the generation module 404 is used to generate a point-by-point panoramic view of the area to be processed at the target position coordinates.

[0085] In some embodiments, the building project data is obtained from the Revit application; and the step of obtaining module 401 generating a visual building model based on the building project data includes: exporting the building project data in Datasmith format to generate a building information model file; loading the building information model file through Unreal Engine 4 UE4 to generate a visual building model.

[0086] In some embodiments, the determination module 402 determines the area to be processed in the visual building model based on the building project data, and the steps of determining the coordinate information of the area to be processed include: obtaining the spatial contour information in the building project data; taking the bottom surface area in the spatial contour information as the area to be processed; obtaining the initial boundary coordinate point set of the area to be processed in the visual building model, and determining the coordinate information of the area to be processed based on the initial boundary coordinate point set.

[0087] In some embodiments, the step of determining the coordinate information of the area to be processed based on the initial boundary coordinate point set by the determination module 402 includes: obtaining a first distance threshold, calculating the distance between every two initial boundary coordinate points in the initial boundary coordinate point set; deduplicating the initial boundary coordinate points in the initial boundary coordinate point set based on the distance and the first distance threshold to obtain target boundary coordinate points; sorting all target boundary coordinate points according to the clockwise or counterclockwise direction of the boundary of the area to be processed to obtain an ordered coordinate set; and using the coordinate points in the ordered coordinate set as the coordinate information of the area to be processed.

[0088] In some embodiments, the calculation module 403 calculates the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed, including: based on the coordinate information of the area to be processed, obtaining the coordinates of the initial center of gravity of the area to be processed by a center of gravity algorithm; when the coordinates of the initial center of gravity are located within the area to be processed, using the coordinates of the initial center of gravity as the coordinates of the center of gravity; when the coordinates of the initial center of gravity are located outside the area to be processed, adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity.

[0089] In some embodiments, the calculation module 403 adjusts the coordinates of the initial center of gravity, and the steps of obtaining the coordinates of the center of gravity include: determining the coordinate point closest to the initial center of gravity in the coordinate information of the area to be processed as the target boundary coordinate point; determining the connecting line between the initial center of gravity and the target boundary coordinate point, and taking the line segment of the connecting line located in the area to be processed as the target line segment; and determining the coordinates of the center of gravity on the target line segment.

[0090] In some embodiments, the calculation module 403 adjusts the coordinates of the initial center of gravity, and the step of obtaining the coordinates of the center of gravity includes: dividing the area to be processed to obtain at least two second areas to be processed, and determining the second coordinate information of each second area to be processed according to the coordinate information of the area to be processed; calculating the coordinates of the second center of gravity of the second area to be processed based on the second coordinate information of the second area to be processed, and determining the coordinates of the center of gravity of the area to be processed according to the coordinates of all the second centers of gravity.

[0091] In some embodiments, the type of the entity object in the visual building model determined by module 402 is the basic mesh type; and the step of determining the target position coordinates according to the coordinates of the entity object and the center of gravity includes: obtaining a collision box of the entity object; when the coordinates of the center of gravity are outside or above the collision box, using the coordinates of the center of gravity as the target position coordinates; when the coordinates of the center of gravity are within the collision box, using the collision box where the coordinates of the center of gravity are located as the first collision box; adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates.

[0092] In some embodiments, the generation module 404 adjusts the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates, including: obtaining a second distance threshold, if there is a neighboring collision box whose distance to the first collision box is less than the second distance threshold, determining the second collision body according to the neighboring collision box and the first collision box; taking the area occupied by the second collision body in the area to be processed as the collision area; determining the collision boundary point on the boundary of the collision area that is closest to the center of gravity; and determining the target position coordinates according to the collision boundary point.

[0093] In some embodiments, the panoramic image generating device 400 also includes an association module 405, which is used to determine the floor to which the area to be processed belongs based on the first direction coordinate information of the area to be processed; search for the area information of the floor in the building project data; determine the area identification of the area to be processed based on the second direction coordinate information and the third direction coordinate information of the area to be processed; search for area description data corresponding to the area identification in the area information, and store the area description data in association with the area to be processed.

[0094] In the panoramic image generation device provided by the present disclosure, a visual building model can be generated according to the acquired building project data, and then the area to be processed in the visual building model can be determined, and then the center of gravity coordinates of the area to be processed can be calculated according to the coordinate information of the area to be processed, and then the target position can be determined according to the identified entity objects and center of gravity coordinates in the area to be processed, so as to generate a point position panoramic image of the area to be processed at the target position. It can be seen that the device provided by the present disclosure can automatically generate a visual building model according to the building project data, and then automatically determine the final target position coordinates for each area to be processed in the visual building model based on the calculated center of gravity, so as to generate a point position panoramic image at the target position coordinates, thereby unifying the generation method of the target position and improving the generation efficiency of the target position.

[0095] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0096] Figure 5 The structural block diagram of a panoramic image generating computer device in the embodiment of the present disclosure is shown. It should be noted that the electronic device shown in the figure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present invention.

[0097] Refer to the following Figure 5 The electronic device 500 according to this embodiment of the present invention is described. Figure 5 The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0098] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).

[0099] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 2In step S201, building project data is obtained, and a visual building model is generated based on the building project data; in step S202, a region to be processed in the visual building model is determined according to the building project data, and coordinate information of the region to be processed is determined; in step S203, the coordinates of the center of gravity of the region to be processed are calculated based on the coordinate information of the region to be processed; in step S204, a physical object in the region to be processed is identified, and the coordinates of the target position are determined according to the coordinates of the physical object and the center of gravity;

[0100] Step S205, generating a point-by-point panoramic image of the area to be processed at the target coordinates.

[0101] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .

[0102] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0103] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0104] The electronic device 500 may also communicate with one or more external devices 600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or may communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0105] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0106] The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0107] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0108] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0109] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0110] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0111] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0112] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0113] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0114] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for generating a panoramic image, characterized in that: include: Acquire building project data, and generate a visual building model based on the building project data; Determine the area to be processed in the visual building model according to the building project data, and determine the coordinate information of the area to be processed; Calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; Identifying a physical object in the area to be processed, and determining target position coordinates according to the coordinates of the physical object and the center of gravity; Generating a point-by-point panoramic image of the area to be processed at the target position coordinates; The step of determining the area to be processed in the visual building model according to the building project data, and determining the coordinate information of the area to be processed includes: Acquire spatial contour information in the building project data; use the bottom surface area in the spatial contour information as the area to be processed; acquire an initial boundary coordinate point set of the area to be processed in the visualized building model, and determine the coordinate information of the area to be processed according to the initial boundary coordinate point set; The type of the entity object in the visual building model is a basic grid type; and the step of determining the target position coordinates according to the coordinates of the entity object and the center of gravity comprises: Acquire a collision box of the entity object; when the coordinates of the center of gravity are outside or above the collision box, use the coordinates of the center of gravity as the target position coordinates; when the coordinates of the center of gravity are inside the collision box, use the collision box where the coordinates of the center of gravity are located as the first collision box; adjust the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates; The step of adjusting the coordinates of the center of gravity according to the first collision box to obtain the coordinates of the target position includes: Acquire a second distance threshold, and if there is an adjacent collision box whose distance to the first collision box is less than the second distance threshold, determine a second collision box according to the adjacent collision box and the first collision box; Taking the area occupied by the second collision body in the area to be processed as the collision area; Determine a collision boundary point on the boundary of the collision area that is closest to the center of gravity; The target position coordinates are determined according to the collision boundary point.

2. The method according to claim 1, characterized in that: The said building project data is obtained from the Revit application; as well as, The step of generating the visual building model based on the building project data comprises: Exporting the building project data in Datasmith format to generate a building information model file; The building information model file is loaded through Unreal Engine 4 (UE4) to generate the visual building model.

3. The method according to claim 1, characterized in that: The step of determining the coordinate information of the area to be processed according to the initial boundary coordinate point set comprises: Obtaining a first distance threshold, and calculating the distance between every two initial boundary coordinate points in the initial boundary coordinate point set; Deduplication processing is performed on the initial boundary coordinate points in the initial boundary coordinate point set according to the distance and the first distance threshold to obtain target boundary coordinate points; Sorting all target boundary coordinate points according to the clockwise direction or counterclockwise direction of the boundary of the area to be processed to obtain an ordered coordinate set; The coordinate points in the ordered coordinate set are used as the coordinate information of the area to be processed.

4. The method according to claim 1, characterized in that: The step of calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed comprises: Based on the coordinate information of the area to be processed, obtaining the coordinates of the initial center of gravity of the area to be processed by a center of gravity algorithm; In the case where the coordinates of the initial center of gravity are located within the area to be processed, the coordinates of the initial center of gravity are used as the coordinates of the center of gravity; When the coordinates of the initial center of gravity are outside the area to be processed, the coordinates of the initial center of gravity are adjusted to obtain the coordinates of the center of gravity.

5. The method according to claim 4, characterized in that The step of adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity comprises: Determine the coordinate point closest to the initial center of gravity in the coordinate information of the area to be processed as the target boundary coordinate point; Determine a connecting line between the initial center of gravity and the target boundary coordinate point, and use a line segment of the connecting line located in the area to be processed as a target line segment; The coordinates of the center of gravity are determined on the target line segment.

6. The method according to claim 4, characterized in that The step of adjusting the coordinates of the initial center of gravity to obtain the coordinates of the center of gravity comprises: Dividing the area to be processed to obtain at least two second areas to be processed, and determining second coordinate information of each second area to be processed according to the coordinate information of the area to be processed; The coordinates of the second center of gravity of the second area to be processed are calculated based on the second coordinate information of the second area to be processed, and the coordinates of the center of gravity of the area to be processed are determined according to the coordinates of all the second centers of gravity.

7. The method according to claim 1, characterized in that The method further comprises: Determine the floor to which the area to be processed belongs based on the first direction coordinate information of the area to be processed; searching for area information of the floor in the building project data; Determine the area identifier of the area to be processed based on the second direction coordinate information and the third direction coordinate information of the area to be processed; The region description data corresponding to the region identifier is searched in the region information, and the region description data is associated with the region to be processed and stored.

8. A panoramic image generating device, characterized in that: include: An acquisition module, used to acquire building project data and generate a visual building model based on the building project data; A determination module, used to determine the area to be processed in the visual building model according to the building project data, and determine the coordinate information of the area to be processed; A calculation module, used for calculating the coordinates of the center of gravity of the area to be processed based on the coordinate information of the area to be processed; The determination module is further used to identify a physical object in the area to be processed, and determine the target position coordinates according to the coordinates of the physical object and the center of gravity; A generating module, used for generating a point-by-point panoramic image of the area to be processed at the target position coordinates; The step of determining the area to be processed in the visual building model according to the building project data and determining the coordinate information of the area to be processed by the determination module includes: obtaining the spatial contour information in the building project data; taking the bottom surface area in the spatial contour information as the area to be processed; obtaining the initial boundary coordinate point set of the area to be processed in the visual building model, and determining the coordinate information of the area to be processed according to the initial boundary coordinate point set; The type of the entity object in the visualized building model is the basic mesh type; and the step of determining the target position coordinates according to the coordinates of the entity object and the center of gravity by the determination module includes: obtaining a collision box of the entity object; when the coordinates of the center of gravity are outside or above the collision box, using the coordinates of the center of gravity as the target position coordinates; when the coordinates of the center of gravity are within the collision box, using the collision box where the coordinates of the center of gravity are located as the first collision box; adjusting the coordinates of the center of gravity according to the first collision box to obtain the target position coordinates; Among them, the generation module adjusts the coordinates of the center of gravity according to the first collision box to obtain the step of target position coordinates, including: obtaining a second distance threshold, if there is a neighboring collision box whose distance to the first collision box is less than the second distance threshold, determining the second collision body according to the neighboring collision box and the first collision box; taking the area occupied by the second collision body in the area to be processed as the collision area; determining the collision boundary point on the boundary of the collision area that is closest to the center of gravity; and determining the target position coordinates according to the collision boundary point.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for generating a panoramic image according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the panoramic image generation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Self-adaptive dynamic-scheduling method for building information model in scenario of three-dimensional digital city

    CN107895031A

  • Panoramic environment perception method based on two-dimensional image and three-dimensional point cloud data fusion

    CN109544456A