Three-dimensional reconstruction method and device of grid structure, computer device and storage medium
By acquiring the original image of the space frame structure, identifying the boundaries of the members and the center position of the space frame sphere, constructing a two-dimensional mapping, and matching it with the three-dimensional coordinate system and point cloud data, the problem of accuracy loss and high computational complexity in the three-dimensional reconstruction of space frame structures in the prior art is solved, and high-precision and efficient three-dimensional model construction is achieved.
Patent Information
- Application Number
- CN202410603708.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing 3D reconstruction technologies suffer from problems such as accuracy loss, high computational complexity, and lack of targeted optimization when dealing with space frame structures.
By acquiring the original image of the space frame structure, identifying the boundaries of the members and the center position of the space frame sphere, constructing a two-dimensional mapping, and matching it with the three-dimensional coordinate system and point cloud data, a high-precision three-dimensional model is finally constructed.
It improves the accuracy and speed of 3D reconstruction, ensuring the accuracy and applicability of the model, and is suitable for the analysis of space frame structures in fields such as architecture and bridges.
Smart Images

Figure CN118918162B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of architecture, and in particular to a three-dimensional reconstruction method and device for a grid structure, a computer device and a storage medium. BACKGROUND
[0002] With the continuous progress of computer vision and graphics processing technology, three-dimensional reconstruction technology has played an important role in many fields. As a common form of architectural structure, the demand for three-dimensional reconstruction of grid structures is increasing. Traditional three-dimensional reconstruction methods often face problems such as difficulty in data acquisition, low reconstruction accuracy, high computational complexity, and low efficiency when dealing with grid structures. Currently, the data description methods for three-dimensional reconstruction are mainly divided into four types: voxel, point cloud, mesh, and implicit surface.
[0003] However, these methods simplify the original surface to varying degrees, resulting in a loss of accuracy. This loss of accuracy may be acceptable in some scenarios where accuracy is not a high priority, but in the three-dimensional reconstruction of grid structures, this loss of accuracy may affect subsequent structural analysis, safety evaluation, and other key links. Therefore, the current three-dimensional reconstruction technology has problems such as loss of accuracy, high computational complexity, and lack of targeted optimization when dealing with grid structures. SUMMARY
[0004] Therefore, the embodiments of the present application provide a three-dimensional reconstruction method and device for a grid structure, a computer device and a storage medium to solve the problems of loss of accuracy and slow operation of the existing three-dimensional reconstruction technology when dealing with grid structures.
[0005] In a first aspect, the embodiments of the present application provide a three-dimensional reconstruction method for a grid structure, which comprises:
[0006] obtaining an original image of a grid structure, wherein the grid structure comprises a grid ball and a grid rod;
[0007] identifying the rod boundary of the grid rod in the original image and determining the center position of the grid ball;
[0008] determining a two-dimensional mapping of the grid structure based on the rod boundary of the grid rod and the center position of the grid ball;
[0009] matching the original image with the two-dimensional mapping to obtain a three-dimensional model of the grid structure.
[0010] In an optional embodiment of the present application, the identification of the rod boundary of the grid rod in the original image and the determination of the center position of the grid ball comprise:
[0011] removing irrelevant information in the original image to obtain a preprocessed image;
[0012] performing edge detection on the preprocessed image to obtain a rod boundary of the net rack rod and a spherical surface boundary of the net rack sphere;
[0013] determining a center position of the net rack sphere according to the rod boundary and the spherical surface boundary.
[0014] In an optional embodiment of the present application, the determining of the two-dimensional mapping of the net rack structure based on the rod boundary of the net rack rod and the center position of the net rack sphere comprises:
[0015] determining a four-corner node based on the original image of the net rack structure;
[0016] constructing a three-dimensional coordinate system according to the four-corner node, and determining pose information of a collection device by using the three-dimensional coordinate system, wherein the collection device refers to a device for collecting the original image;
[0017] extracting a spatial geometric parameter of the net rack sphere, and constructing point cloud data of the net rack sphere according to the spatial geometric parameter;
[0018] calculating a point cloud inertia principal axis of the net rack sphere according to the point cloud data, and determining the two-dimensional mapping of the net rack structure according to the pose information and the point cloud inertia principal axis.
[0019] In an optional embodiment of the present application, the matching of the original image with the two-dimensional mapping to obtain a three-dimensional model of the net rack structure comprises:
[0020] matching the original image with the two-dimensional mapping to obtain a corresponding relationship;
[0021] adjusting coordinate information of a net rack sphere in the two-dimensional mapping based on the corresponding relationship to obtain an adjusted two-dimensional mapping;
[0022] constructing an original three-dimensional model of the net rack structure according to the adjusted two-dimensional mapping;
[0023] performing correction on the original three-dimensional model to obtain a target three-dimensional model of the net rack structure.
[0024] In an optional embodiment of the present application, the performing of correction on the original three-dimensional model to obtain the target three-dimensional model of the net rack structure comprises:
[0025] obtaining multiple-view images of the net rack rod collected by a collection device in different poses;
[0026] recognizing multiple-view rod boundaries of the net rack rod in the multiple-view images;
[0027] Determine a correction coefficient of the acquisition device in different poses by comparing the bar boundaries of the net rack rod and the multi-view bar boundaries, and adjust the original three-dimensional model of the net rack structure according to the correction coefficient to obtain a plurality of candidate three-dimensional models;
[0028] Determine the target three-dimensional model from the candidate three-dimensional models.
[0029] In an optional embodiment of the present application, the determination of the target three-dimensional model from the candidate three-dimensional models comprises:
[0030] Calculate the reconstruction accuracy of a plurality of candidate three-dimensional models;
[0031] Determine the optimal pose of the acquisition device based on the reconstruction accuracy;
[0032] Adjust the model parameters of the three-dimensional model according to the optimal pose to obtain a target three-dimensional model.
[0033] In an optional embodiment of the present application, after obtaining the target three-dimensional model, the method further comprises:
[0034] Disconnect the coordinate link between the net rack rod and the net rack ball in the target three-dimensional model to obtain first position data of the net rack rod and second position data of the net rack ball;
[0035] Model the net rack rod based on the first position data to obtain a first model, and model the net rack ball based on the second position data to obtain a second model;
[0036] Adjust the rod end coordinates in the target three-dimensional model according to the first model and the second model to obtain an optimized target three-dimensional model.
[0037] In a second aspect, the embodiments of the present application provide a three-dimensional reconstruction device for a net rack structure, which comprises:
[0038] An acquisition module is configured to acquire an original image of a net rack structure, wherein the net rack structure comprises a net rack ball and a net rack rod;
[0039] An identification module is configured to identify the bar boundaries of the net rack rod in the original image and determine the center position of the net rack ball;
[0040] A determination module is configured to determine a two-dimensional mapping of the net rack structure based on the bar boundaries of the net rack rod and the center position of the net rack ball;
[0041] A matching module is configured to match the original image with the two-dimensional mapping to obtain a three-dimensional model of the net rack structure.
[0042] In a third aspect, an embodiment of the present application provides a computer device, comprising: a memory and a processor, which are connected to each other in communication, the memory storing computer instructions, and the processor executing the computer instructions to perform the three-dimensional reconstruction method of the grid structure according to the first aspect or any one of the corresponding embodiments.
[0043] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the three-dimensional reconstruction method of the grid structure according to the first aspect or any one of the corresponding embodiments.
[0044] The method provided by the embodiments of the present application has the following beneficial effects:
[0045] The method provided by the embodiments of the present application obtains the original image of the grid structure, thereby providing key basic data for the subsequent three-dimensional reconstruction process, ensuring the accuracy and flexibility of the reconstruction, and making the method have wide applicability.
[0046] The method provided by the embodiments of the present application eliminates irrelevant information in the original image, performs edge detection on the preprocessed image, can accurately identify the rod boundary of the grid rod and the spherical boundary of the grid ball, and further improves the identification accuracy. Through the identification of the spherical boundary, the center position of the grid ball can be accurately determined. Extracting the accurate rod boundary and the center position of the grid ball provides reliable data support for the subsequent three-dimensional reconstruction step. Through accurate identification and positioning, error accumulation can be reduced, thereby improving the quality and accuracy of the final three-dimensional model.
[0047] The method provided by the embodiments of the present application determines the four-corner node to provide a reliable reference point for two-dimensional mapping, constructs a three-dimensional coordinate system to determine the pose of the acquisition device, ensures the accurate mapping of the three-dimensional structure and the two-dimensional plane, constructs the point cloud data of the grid ball to accurately capture its shape and position, and determines the two-dimensional mapping by comprehensively considering the overall characteristics of the grid, thereby providing a solid foundation for the subsequent three-dimensional reconstruction and improving the operation speed in the three-dimensional reconstruction process.
[0048] The method provided by the embodiment of the application can accurately establish the corresponding relationship between the two dimensions and the three dimensions by matching the original image with the two-dimensional mapping. The matching process ensures that each point in the three-dimensional model corresponds to a position in the two-dimensional mapping, thereby improving the accuracy and operation speed of the three-dimensional reconstruction. By adjusting the coordinate information of the grid ball in the two-dimensional mapping according to the corresponding relationship, a more accurate adjusted two-dimensional mapping is obtained, which can correct the errors that may exist in the initial two-dimensional mapping, and further optimizes the construction basis of the three-dimensional model. The original three-dimensional model of the grid structure is constructed according to the adjusted two-dimensional mapping, which provides a basis for subsequent model correction and optimization. By correcting the original three-dimensional model, it is helpful to obtain a target three-dimensional model that is closer to the actual grid structure.
[0049] The method provided by the embodiment of the application can improve the accuracy of the three-dimensional model by disconnecting the coordinate links of the grid rods and the grid balls and independently analyzing and processing the position data of each component; more detailed models are obtained by modeling the grid rods and the grid balls respectively according to these data; the three-dimensional model is optimized by adjusting the rod end coordinates in the model, so that it is more realistic in structure and vision and the operation speed is faster, thereby providing high-quality data support for subsequent design and analysis. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the specific embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the specific embodiments or the prior art. Obviously, the drawings described below are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0051] Figure 1 is a flowchart of a three-dimensional reconstruction method of a grid structure according to some embodiments of the application;
[0052] Figure 2 is a schematic diagram of edge detection of an original image according to an embodiment of the application;
[0053] Figure 3 is a schematic diagram of a four-corner node in a grid structure according to an embodiment of the application;
[0054] Figure 4 is a schematic diagram of a three-dimensional coordinate system according to an embodiment of the application;
[0055] Figure 5 is a schematic diagram of matching an original image with a two-dimensional mapping according to an embodiment of the application;
[0056] Figure 6 is a schematic diagram of a marked position for identifying errors according to an embodiment of the application;
[0057] Figure 7 is a structural block diagram of a three-dimensional reconstruction device of a space truss structure according to an embodiment of the present application;
[0058] Figure 8 is a hardware structure schematic diagram of a computer device of an embodiment of the present application. DETAILED DESCRIPTION
[0059] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0060] According to the embodiments of the present application, a three-dimensional reconstruction method and device of a space truss structure, a computer device and a storage medium are provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0061] In the present embodiment, a three-dimensional reconstruction method of a space truss structure is provided, Figure 1 is a flowchart of a three-dimensional reconstruction method of a space truss structure according to an embodiment of the present application, as Figure 1 shown, the flow includes the following steps:
[0062] Step S11, obtaining an original image of a space truss structure, wherein the space truss structure includes space truss balls and space truss rods.
[0063] In the embodiments of the present application, the space truss structure is a kind of space grid structure composed of a plurality of space truss balls and space truss rods connected with each other, which has a wide application in the fields of building, bridge, engineering facilities, etc. The space truss ball is a key connection point in the space truss structure, which is usually made of steel, its shape is similar to a sphere, and there are threaded holes on the sphere for connecting the space truss rod. The space truss rod is a rod-shaped component for connecting the space truss ball, which is used to form the basic framework of the space truss. In addition, the original image of the space truss structure needs to be obtained by using an image acquisition device (such as a camera) to shoot the space truss structure. The original image should contain as many details of the space truss structure as possible, especially the shape and position relationship of the space truss ball and the space truss rod.
[0064] The method provided in the embodiments of the present application provides key basic data for the subsequent three-dimensional reconstruction process by obtaining the original image of the space truss structure, ensures the accuracy and flexibility of the reconstruction, and makes the method have wide applicability.
[0065] Step S12, identify the rod boundary of the truss rod in the original image, and determine the center position of the truss ball.
[0066] In the embodiments of the present application, step S12 includes the following steps A1-A3:
[0067] Step A1, remove irrelevant information in the original image to obtain a preprocessed image.
[0068] In the embodiments of the present application, in the obtained original image, in addition to the truss structure (including the truss ball and the truss rod), there are also many irrelevant information such as background, shadow caused by light change, construction equipment, personnel, etc. These information may cause interference for subsequent edge detection, feature extraction and three-dimensional reconstruction processing, therefore it is necessary to remove it in the preprocessing stage. The irrelevant information can be removed by using image processing techniques such as filtering, threshold segmentation, morphological operation, etc. to eliminate noise and background and highlight the features of the truss structure. For example, a convolutional network or other deep learning technology can be used to identify the boundary of the truss ball and rod, and further remove the irrelevant information outside the truss ball.
[0069] Step A2, edge detection is performed on the preprocessed image to obtain the rod boundary of the truss rod and the spherical boundary of the truss ball.
[0070] In the embodiments of the present application, as shown in Figure 2 The edge detection technology is used to identify the contour of an object in an image or the boundary between different objects. This technology can achieve this goal by capturing the areas in the image where the brightness changes significantly, and is used to identify the rod boundary of the truss rod and the spherical boundary of the truss ball. The rod boundary, i.e. the contour or edge of the truss rod in the image, is crucial for subsequent three-dimensional reconstruction work. Similarly, the spherical boundary of the truss ball, i.e. the outer contour of the truss ball in the image, its accurate identification plays a decisive role in determining the center position of the truss ball. In order to accurately extract these key boundaries, algorithms such as Canny edge detection, Sobel edge detection, etc. can be used. These algorithms can accurately identify the edges according to the gray gradient changes in the image.
[0071] Step A3, determine the center position of the truss ball according to the rod boundary and the spherical boundary.
[0072] In the embodiments of the present application, the center position refers to the geometric center point of the truss ball in the image, which is an important parameter for positioning the truss ball in three-dimensional reconstruction. The center position of the truss ball is determined by using the bar boundaries and the spherical surface boundaries identified in the previous steps, which involves image processing techniques such as morphological operation, contour analysis after edge detection, or region-based feature analysis. Among them, morphological operation can enhance the boundary to make the boundary of the truss ball clearer. By performing contour analysis on these boundaries, the center position of the truss ball can be determined. In addition, analyzing the gray level, texture and other characteristics of the image region can also help to locate the center.
[0073] The method provided by the embodiments of the present application can accurately identify the bar boundaries of the truss bars and the spherical surface boundaries of the truss balls by removing irrelevant information in the original image and performing edge detection on the preprocessed image, thereby improving the recognition accuracy. Through the identification of the spherical surface boundaries, the center position of the truss ball can be accurately determined. Extracting accurate bar boundaries and truss ball center positions provides reliable data support for subsequent three-dimensional reconstruction steps. Through accurate identification and positioning, error accumulation can be reduced, thereby improving the quality and accuracy of the final three-dimensional model and improving the operation speed in the three-dimensional reconstruction process.
[0074] In step S13, the two-dimensional mapping of the truss structure is determined based on the bar boundaries of the truss bars and the center positions of the truss balls.
[0075] In the embodiments of the present application, step S13 includes the following steps B1-B4:
[0076] In step B1, the four-corner nodes of the truss structure are determined based on the original image of the truss structure.
[0077] In the embodiments of the present application, as shown in Figure 3 The four-corner nodes refer to specific points at the four corners of the truss structure, which are also support points or significant feature points on the structure. These points are used as reference points for establishing a three-dimensional coordinate system in subsequent steps. The nodes of the four corners of the truss structure are identified and located from the original image. This can be achieved by edge detection, feature point extraction or template matching of image processing techniques. After the nodes are determined, they can be used as control points in the subsequent three-dimensional reconstruction process.
[0078] In step B2, a three-dimensional coordinate system is constructed according to the four-corner nodes, and the pose information of the acquisition device is determined using the three-dimensional coordinate system, wherein the acquisition device refers to the device that acquires the original image.
[0079] In the embodiments of the present application, as shown in Figure 4As shown, based on the determined four-corner nodes, a three-dimensional coordinate system can be constructed, including the principal axes of inertia 1, the principal axes of inertia 2, and the principal axes of inertia 3. In this coordinate system, each node is assigned a three-dimensional coordinate (x, y, z). This process is to accurately convert two-dimensional image information into three-dimensional spatial information later. The pose information includes the position and orientation of the collection device (such as a camera) in space. By comparing the positions of the four-corner nodes in the image with the positions of the four-corner nodes in the actual three-dimensional coordinate system, the position and shooting angle of the camera when taking the photo can be calculated, which can be realized through perspective transformation and camera calibration.
[0080] Step B3, extract the spatial geometric parameters of the grid ball, and construct the point cloud data of the grid ball according to the spatial geometric parameters.
[0081] In the embodiments of the present application, the spatial geometric parameters of the grid ball refer to parameters describing the position, shape and size of the grid ball in three-dimensional space, which can include the center coordinates of the ball, the radius, etc. The point cloud data is a data format representing the shape of the surface of an object in three-dimensional space, which is composed of a large number of points, and each point contains its coordinate information in three-dimensional space. Based on the spatial geometric parameters of the grid ball, point cloud data representing the surface of the grid ball can be generated. Specifically, according to the center coordinates of the grid ball and the radius, a series of points can be generated on the surface of the grid ball through a certain algorithm (such as a spherical surface sampling algorithm), and these points constitute the point cloud data of the grid ball.
[0082] Step B4, calculating the point cloud principal axes of inertia of the grid ball according to the point cloud data, and determining the two-dimensional mapping of the grid structure according to the pose information and the point cloud principal axes of inertia.
[0083] In the embodiments of the present application, the principal axes of inertia of the point cloud are determined by calculating the mass distribution (or point cloud density distribution) of the point cloud, which can reflect the main direction and distribution characteristics of the point cloud shape. In physics, the principal axes of inertia of an object refer to the axes passing through the center of mass of the object and having the maximum and minimum moments of inertia with respect to the mass distribution of the object. When calculating the principal axes of inertia of the point cloud, the mass of each point can be considered as the same, and the axes can be found by calculating the covariance matrix. The two-dimensional mapping refers to the representation of projecting a three-dimensional object or scene onto a two-dimensional plane, and the two-dimensional mapping of the grid structure is generated based on the principal axes of inertia of the grid ball point cloud and the pose information of the camera. This mapping will be used to match the two-dimensional image with the three-dimensional model in the subsequent steps.
[0084] The method provided by the embodiments of the present application provides reliable reference points for two-dimensional mapping by determining the four-corner nodes; ensures accurate mapping of the three-dimensional structure and the two-dimensional plane by constructing a three-dimensional coordinate system to determine the pose of the collection device; accurately captures the shape and position of the grid structure by constructing the point cloud data of the grid structure; and provides a solid foundation for subsequent three-dimensional reconstruction by comprehensively considering the overall characteristics of the grid structure to determine the two-dimensional mapping.
[0085] Step S14, matching the original image with the two-dimensional mapping to obtain a three-dimensional model of the grid structure.
[0086] In the embodiments of the present application, step S14 includes the following steps C1-C4:
[0087] Step C1, matching the original image with the two-dimensional mapping to obtain the corresponding relationship.
[0088] In the embodiments of the present application, the comparison and matching process of the original image and the two-dimensional mapping is as shown in Figure 5 First, the algorithm extracts key features from the original image, such as the shape, size and position of the grid structure balls, and the lines and intersection points of the grid structure rods. Second, these features are compared with the elements in the two-dimensional mapping, which can be achieved by traditional template matching method (comparing a part of the image with a predefined template) or using more advanced object detection technology (such as deep learning-based model). After finding the match, the corresponding relationship between the original image and the two-dimensional mapping is established, which indicates which point in the two-dimensional mapping represents which grid structure ball or grid structure rod in the original image.
[0089] Step C2, adjusting the coordinate information of the grid structure balls in the two-dimensional mapping based on the corresponding relationship to obtain an adjusted two-dimensional mapping.
[0090] In the embodiments of the present application, the original image and the two-dimensional mapping are compared to find the differences between them, which may manifest as position offset, size inconsistency, etc. Based on the above differences, the adjustment amount of the grid structure ball coordinates in the two-dimensional mapping is calculated. According to the calculated adjustment amount, the grid structure ball coordinates in the two-dimensional mapping are fine-tuned. After adjustment, the original image and the adjusted two-dimensional mapping are compared again to ensure a higher matching degree between them.
[0091] Step C3, constructing an original three-dimensional model of the grid structure according to the adjusted two-dimensional mapping.
[0092] In the embodiments of the present application, the coordinates in the two-dimensional mapping are converted into the coordinates in the three-dimensional space by using the determined three-dimensional coordinate system and the pose information of the acquisition device. The three-dimensional structure can be recovered from the two-dimensional image by using the techniques of geometry and computer vision, such as the inverse process of perspective projection. According to the converted three-dimensional coordinates, the model of the grid structure is constructed in the three-dimensional space. The grid balls are placed at the calculated three-dimensional coordinate positions, and the grid rods are reconstructed in the three-dimensional space according to their two-dimensional boundary information. After the preliminary construction of the three-dimensional model, verification and optimization can be performed, that is, the geometric relationship of the model is checked to see whether the connection relationship between the grid balls and the grid rods conforms to the actual structure and whether there is any geometric error or inconsistency.
[0093] Step C4, correcting the original three-dimensional model to obtain a target three-dimensional model of the grid structure.
[0094] In the embodiments of the present application, step C4 specifically includes steps C41-C44:
[0095] Step C41, the acquisition device collects multi-view images of the grid rod at different poses.
[0096] In the embodiments of the present application, it is ensured that the acquisition device (such as a digital camera or a professional 3D scanning device) is ready and its settings are checked to ensure image quality; the position and pose of the acquisition device are adjusted to obtain different views of the grid rod, which can include changing the height, angle and distance of the camera; and the acquisition device is used to take pictures or scan the grid rod at each different pose and save them.
[0097] Step C42, identifying the multi-view rod boundary of the grid rod in the multi-view images.
[0098] In the embodiments of the present application, the collected multi-view images are cleaned to remove blurred, repeated or invalid pictures, and the key features of the grid rod such as edges and corner points are extracted by using image processing techniques; and the extracted features are labeled to facilitate subsequent three-dimensional reconstruction and model correction.
[0099] Step C43, comparing the rod boundary of the grid rod with the multi-view rod boundary to determine the correction coefficient of the acquisition device at different poses, and adjusting the original three-dimensional model of the grid structure according to the correction coefficient to obtain a plurality of candidate three-dimensional models.
[0100] In the embodiments of the present application, the original three-dimensional model is aligned with the extracted features to ensure the accuracy of the model, and the error positions are labeled to obtain the labeled positions, wherein the labeled positions are, for example, Figure 6The original three-dimensional model is preliminarily corrected and adjusted according to the extracted features and the labeled data; and the error between the preliminarily corrected model and the actual grid structure is analyzed to determine a further correction direction.
[0101] Step C44, determining a target three-dimensional model from the candidate three-dimensional models.
[0102] In the embodiments of the present application, the target three-dimensional model is determined from the candidate three-dimensional models, including: calculating the reconstruction accuracy of the plurality of candidate three-dimensional models; determining the optimal pose of the acquisition device based on the reconstruction accuracy; and adjusting the model parameters of the three-dimensional model according to the optimal pose to obtain the target three-dimensional model.
[0103] In the embodiments of the present application, first, the reconstruction accuracy of the plurality of candidate three-dimensional models is calculated, wherein the reconstruction accuracy is a key indicator for measuring the similarity of the three-dimensional model to the actual scene or object. By comparing the candidate three-dimensional model with the actual image or data, the accuracy of each model can be evaluated. Based on the reconstruction accuracy, the optimal pose of the acquisition device can be determined. Secondly, by analyzing the influence of the data collected at different poses on the reconstruction accuracy, a pose that makes the reconstruction accuracy the highest, i.e., the optimal pose, can be determined. After the optimal pose is determined, the model parameters of the three-dimensional model are adjusted according to this pose, which includes adjusting the position, rotation angle, scaling ratio, etc. of the model, so that the three-dimensional model is more consistent with the geometric shape and style type of the actual scene or object. Finally, a target three-dimensional model with high similarity to the scene is obtained.
[0104] The method provided in the embodiments of the present application can accurately establish the correspondence between two dimensions and three dimensions by matching the original image with the two-dimensional mapping. This matching process ensures that each point in the three-dimensional model corresponds to a position in the two-dimensional mapping, thereby improving the accuracy and operation speed of three-dimensional reconstruction. By adjusting the coordinate information of the grid sphere in the two-dimensional mapping through the correspondence, a more accurate adjusted two-dimensional mapping is obtained, which can correct the errors that may exist in the initial two-dimensional mapping, further optimizing the construction basis of the three-dimensional model. According to the adjusted two-dimensional mapping, the original three-dimensional model of the grid structure is constructed, providing a basis for subsequent model correction and optimization. By correcting the original three-dimensional model, it is helpful to obtain a target three-dimensional model that is closer to the actual grid structure.
[0105] In the embodiments of the present application, after the target three-dimensional model is obtained, the method further includes the following steps D1-D3:
[0106] Step D1, disconnecting the coordinate link between the grid rods and the grid spheres in the target three-dimensional model to obtain first position data of the grid rods and second position data of the grid spheres.
[0107] In the embodiments of the present application, in the traditional three-dimensional model, the end point of the grid rod is usually directly connected with the center coordinate of the grid ball, indicating that the rod end coordinate is the ball coordinate. However, in the actual installation process, due to construction errors, material deformation and other factors, the rod end coordinate may not completely coincide with the ball coordinate. Therefore, breaking the coordinate link can allow more accurate positioning of the actual position of each component. In the three-dimensional model, the coordinate link between the grid rod and the grid ball is broken, so that they become independent entities. The first position data (i.e. the rod end coordinate) of the grid rod after breaking the link and the second position data (i.e. the ball center coordinate) of the grid ball are recorded respectively.
[0108] Step D2, modeling the grid rod based on the first position data to obtain a first model, and modeling the grid ball based on the second position data to obtain a second model.
[0109] In the embodiments of the present application, based on the first position data (rod end coordinate), modeling techniques (such as line segments, cylinders, etc.) are used to represent the grid rod. The parameters of the model can include the length, diameter, position, etc. of the rod. Based on the second position data (ball center coordinate), a sphere is used to represent the grid ball. The parameters of the model include the three-dimensional coordinates of the ball center and the radius of the ball.
[0110] Step D3, adjusting the rod end coordinate in the target three-dimensional model according to the first model and the second model to obtain an optimized target three-dimensional model.
[0111] In the embodiments of the present application, according to the positional relationship of the first model (grid rod model) and the second model (grid ball model), the rod end coordinate of the grid rod in the target three-dimensional model is adjusted to ensure that it matches the position of the grid ball. After adjusting the rod end coordinate, further optimization is performed on the entire three-dimensional model, such as adjusting the details of the model, improving lighting and material, etc., to improve the visualization effect of the model, and finally an optimized target three-dimensional model is obtained.
[0112] The method provided by the embodiments of the present application breaks the coordinate link between the grid rod and the grid ball, independently analyzes and processes the position data of each component, improves the accuracy of the three-dimensional model, models the grid rod and the grid ball based on these data respectively, obtains a more detailed model, adjusts the rod end coordinate in the model to optimize the three-dimensional model, makes it more realistic in structure and vision, and more rapid in operation, and provides high-quality data support for subsequent design and analysis.
[0113] A three-dimensional reconstruction device of a space truss structure is also provided in the embodiments, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.
[0114] The embodiments provide a three-dimensional reconstruction device of a space truss structure, as shown in the accompanying drawings, comprising: Figure 7
[0115] The acquisition module 71 is configured to acquire an original image of the space truss structure, wherein the space truss structure comprises space truss balls and space truss rods.
[0116] The identification module 72 is configured to identify rod boundaries of the space truss rods in the original image and determine center positions of the space truss balls.
[0117] The determination module 73 is configured to determine a two-dimensional mapping of the space truss structure based on the rod boundaries of the space truss rods and the center positions of the space truss balls.
[0118] The matching module 74 is configured to match the original image with the two-dimensional mapping to obtain a three-dimensional model of the space truss structure.
[0119] In an optional embodiment of the present application, the identification module 72 is configured to remove irrelevant information in the original image to obtain a preprocessed image, perform edge detection on the preprocessed image to obtain rod boundaries of the space truss rods and spherical boundaries of the space truss balls, and determine the center positions of the space truss balls according to the rod boundaries and the spherical boundaries.
[0120] In an optional embodiment of the present application, the determination module 73 is configured to determine four-corner nodes based on the original image of the space truss structure, construct a three-dimensional coordinate system according to the four-corner nodes and determine pose information of a collection device using the three-dimensional coordinate system, wherein the collection device refers to a device that collects the original image, extract spatial geometric parameters of the space truss balls, construct point cloud data of the space truss balls according to the spatial geometric parameters, calculate a point cloud inertia principal axis of the space truss balls according to the point cloud data, and determine the two-dimensional mapping of the space truss structure according to the pose information and the point cloud inertia principal axis.
[0121] In an optional embodiment of the present application, the matching module 74 is configured to match the original image with the two-dimensional mapping to obtain a corresponding relationship, adjust coordinate information of the space truss balls in the two-dimensional mapping based on the corresponding relationship to obtain an adjusted two-dimensional mapping, construct an original three-dimensional model of the space truss structure according to the adjusted two-dimensional mapping, and correct the original three-dimensional model to obtain a target three-dimensional model of the space truss structure.
[0122] In an optional embodiment of the present application, the matching module 74 is configured to acquire multi-view images of the truss rod collected by the collection device in different poses; identify multi-view rod boundaries of the truss rod in the multi-view images; compare the rod boundaries of the truss rod and the multi-view rod boundaries to determine correction coefficients of the collection device in different poses, and adjust the original three-dimensional model of the truss structure according to the correction coefficients to obtain a plurality of candidate three-dimensional models; and determine the target three-dimensional model from the candidate three-dimensional models.
[0123] In an optional embodiment of the present application, the matching module 74 is configured to calculate reconstruction accuracies of the plurality of candidate three-dimensional models; determine an optimal pose of the collection device based on the reconstruction accuracies; and adjust model parameters of the three-dimensional model according to the optimal pose to obtain the target three-dimensional model.
[0124] In an optional embodiment of the present application, the device further comprises an optimization module configured to disconnect coordinate links between the truss rod and the truss ball in the target three-dimensional model to obtain first position data of the truss rod and second position data of the truss ball; model the truss rod based on the first position data to obtain a first model, and model the truss ball based on the second position data to obtain a second model; and adjust rod end coordinates in the target three-dimensional model according to the first model and the second model to obtain an optimized target three-dimensional model.
[0125] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of a computer device provided by an optional embodiment of the present application, as shown in Figure 8 , the computer device comprises one or more processors 10, a memory 20, and an interface for connecting various components, including a high-speed interface and a low-speed interface. Various components are communicatively connected with each other by using different buses, and can be installed on a common mainboard or in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or graphics information of the memory to display a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0126] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further comprise a hardware chip. The hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a general array logic, or any combination thereof.
[0127] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated by the above embodiments.
[0128] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and applications required by at least one function. The data storage area can store data created by the use of the computer device according to the presentation of the applet landing page, and the like. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0129] The memory 20 can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk. The memory 20 can also include a combination of the above-mentioned kinds of memories.
[0130] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0131] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network downloading, so that the method described herein can be processed by such software on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state disk, and the like. Further, the storage medium can also include a combination of the above-mentioned kinds of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, which, when accessed and executed by the computer, the processor, or the hardware, implements the method illustrated by the above embodiments.
[0132] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A three-dimensional reconstruction method of a space truss structure, characterized by, The method comprises: acquiring an original image of a space truss structure, wherein the space truss structure comprises space truss rods and space truss balls; identifying rod boundaries of the space truss rods in the original image and determining center positions of the space truss balls; determining a two-dimensional mapping of the space truss structure based on the rod boundaries of the space truss rods and the center positions of the space truss balls; matching the original image with the two-dimensional mapping to obtain a three-dimensional model of the space truss structure; the determining of the two-dimensional mapping of the space truss structure based on the rod boundaries of the space truss rods and the center positions of the space truss balls comprises: determining four-corner nodes based on the original image of the space truss structure; constructing a three-dimensional coordinate system according to the four-corner nodes and determining pose information of a collection device by using the three-dimensional coordinate system, wherein the collection device refers to a device that collects the original image; extracting spatial geometric parameters of the space truss balls and constructing point cloud data of the space truss balls according to the spatial geometric parameters; calculating a point cloud inertia principal axis of the space truss balls according to the point cloud data, and determining the two-dimensional mapping of the space truss structure according to the pose information and the point cloud inertia principal axis.
2. The method of claim 1, wherein, the identifying of the rod boundaries of the space truss rods in the original image and the determining of the center positions of the space truss balls comprise: removing irrelevant information in the original image to obtain a preprocessed image; performing edge detection on the preprocessed image to obtain rod boundaries of the space truss rods and spherical boundaries of the space truss balls; determining the center positions of the space truss balls according to the rod boundaries and the spherical boundaries.
3. The method of claim 1, wherein, the matching of the original image with the two-dimensional mapping to obtain the three-dimensional model of the space truss structure comprises: matching the original image with the two-dimensional mapping to obtain a corresponding relationship; adjusting coordinate information of space truss balls in the two-dimensional mapping based on the corresponding relationship to obtain an adjusted two-dimensional mapping; constructing an original three-dimensional model of the space truss structure according to the adjusted two-dimensional mapping; correcting the original three-dimensional model to obtain a target three-dimensional model of the space truss structure.
4. The method of claim 3, wherein, the correcting of the original three-dimensional model to obtain the target three-dimensional model of the space truss structure comprises: acquiring multi-view images of the space truss rods collected by the collection device in different poses; identifying multi-view rod boundaries of the space truss rods in the multi-view images; comparing the rod boundaries of the space truss rods with the multi-view rod boundaries to determine correction coefficients of the collection device in different poses, and adjusting the original three-dimensional model of the space truss structure according to the correction coefficients to obtain a plurality of candidate three-dimensional models; determining the target three-dimensional model from the candidate three-dimensional models.
5. The method of claim 4, wherein, the determining of the target three-dimensional model from the candidate three-dimensional models comprises: calculating reconstruction accuracies of the plurality of candidate three-dimensional models; determining an optimal pose of the collection device based on the reconstruction accuracies; adjusting model parameters of the three-dimensional model according to the optimal pose to obtain the target three-dimensional model.
6. The method of claim 5, wherein, after obtaining the target three-dimensional model, the method further comprises: disconnect coordinate links between the truss rods and the truss balls in the target three-dimensional model, to obtain first position data of the truss rods and second position data of the truss balls; model the truss rods based on the first position data to obtain a first model, and model the truss balls based on the second position data to obtain a second model; adjust the rod end coordinates in the target three-dimensional model according to the first model and the second model, to obtain an optimized target three-dimensional model.
7. A three-dimensional reconstruction device for a space frame structure, characterized in that, The device comprises: an acquisition module configured to acquire an original image of a truss structure, wherein the truss structure comprises truss rods and truss balls; an identification module configured to identify rod boundaries of the truss rods in the original image and determine center positions of the truss balls; a determination module configured to determine a two-dimensional mapping of the truss structure based on the rod boundaries of the truss rods and the center positions of the truss balls; a matching module configured to match the original image with the two-dimensional mapping to obtain a three-dimensional model of the truss structure; The determination module is configured to determine a four-corner node based on the original image of the truss structure, construct a three-dimensional coordinate system according to the four-corner node, and determine pose information of a collection device using the three-dimensional coordinate system, wherein the collection device refers to a device that collects the original image; extract spatial geometric parameters of the truss balls, and construct point cloud data of the truss balls according to the spatial geometric parameters; calculate a point cloud inertia principal axis of the truss balls according to the point cloud data, and determine a two-dimensional mapping of the truss structure according to the pose information and the point cloud inertia principal axis.
8. A computer device, comprising: comprise: a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Camera three-dimensional truss calibrating target for automotive visual detection system
CN104101299A
Installation structure of plant roof grid structure project and construction method thereof
CN108590033A