A method for automatic matching based on indoor panoramic images and BIM
By establishing reference points indoors and using the barometer and floor height calculation of the panoramic camera, combining feature recognition algorithms and scaling coefficients, the problem of matching the panoramic image with the BIM model is solved, and high-precision positioning and matching are achieved.
Patent Information
- Application Number
- CN202210128786.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-02-11
AI Technical Summary
In indoor environments, it is difficult for the prior art to effectively locate the spatial coordinates of the shooting point of the panoramic image, resulting in difficulty in matching the panoramic image with the BIM model, and the positioning accuracy is not high, which cannot meet the requirements of on-site application.
By establishing multiple reference points in the shooting area, obtaining the plane and spatial coordinates of the reference points, using the panoramic camera's barometer and floor height to calculate the height of the shooting point, and combining feature recognition algorithms and scaling coefficients to match the panoramic picture and BIM model.
It realizes the precise matching of panoramic images and BIM models, improves positioning accuracy, reduces costs, and meets the needs of on-site applications.
Smart Images

Figure CN114463428B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for automatic matching of indoor panoramic images and BIM. Background Art
[0002] In recent years, with the popularity of panoramic cameras in VR house viewing, construction sites have also started to use panoramic cameras to collect images of indoor mechanical and electrical installations and conduct progress evaluations. In addition, with the continuous application of BIM, how to integrate the design of BIM with the construction site, especially the real image information of indoor mechanical and electrical installations, to achieve the control of progress and quality has become a research hotspot. Although various automatic registration and overlay methods have emerged, the methods are relatively complex and cannot meet the requirements of on-site applications.
[0003] When using a panoramic camera to collect indoor images, an important positioning parameter that needs to be known is the spatial coordinates of the shooting point. However, during the collection process, due to the lack of GPS positioning signals indoors and the lack of other unpowered devices on-site, it is impossible to deploy base stations, resulting in the inability to use positioning methods such as Bluetooth and UWB. Inertial navigation and other self-positioning methods have low accuracy, and SLAM positioning based on panoramic images requires high hardware computing speed. Therefore, indoor positioning has become a difficult problem. Summary of the Invention
[0004] The present invention provides a method for automatic matching of indoor panoramic images and BIM, which can overcome certain or some defects of the prior art.
[0005] According to a method for automatic matching of indoor panoramic images and BIM of the present invention, it includes the following steps:
[0006] Step SA: Obtain a panoramic image of the shooting area;
[0007] Step SB: Obtain the planar coordinates (x0, y0) of the shooting point of the panoramic image;
[0008] Step SC: Obtain the spatial coordinates (x0, y0, z0) of the shooting point of the panoramic image;
[0009] Step SD: Obtain the horizontal scaling factor K1 and the vertical scaling factor K2 of the panoramic image and the BIM model;
[0010] Step SE: Match the panoramic image and the BIM model based on the spatial coordinates (x0, y0, z0) of the shooting point, the initial shooting angle of the panoramic image, the horizontal scaling factor K1, and the vertical scaling factor K2.
[0011] Through the above, the matching of the panoramic image and the BIM model can be preferably achieved.
[0012] Preferably, steps SA and SB specifically include the following steps:
[0013] Step S1: Establish multiple reference points within the shooting area and obtain the planar coordinates of each reference point.
[0014] In this step, the reference point h i has coordinates (x i , y i ), where i = 1, 2,..., n; n is the total number of the multiple reference points, and the reference point h i is the i-th reference point.
[0015] Step S2: Obtain a panoramic image of the shooting area based on the panoramic camera and obtain the pixel coordinates of each reference point in the panoramic image; for the reference point h i , its pixel coordinates in the panoramic image are (u i , v i ).
[0016] In this step, the multiple reference points are arrayed in the length direction of the panoramic image.
[0017] Step S3: Obtain the viewing angle θ i of each reference point h i in the panoramic image, where u is the pixel size of the panoramic image in the length direction.
[0018] Step S4: Based on the planar coordinates of each reference point and the viewing angle in the panoramic image, obtain the planar coordinates (x0, y0) of the shooting point.
[0019] Through the above steps S1 - S4, it is possible to preferably use the fixed reference objects at the shooting site as reference points to obtain the planar coordinates of the shooting point, and thus it is possible to preferably achieve the positioning of the panoramic image.
[0020] Preferably, step S4 specifically includes the following steps:
[0021] Step S41: Select 2 different reference points from the multiple reference points for combination, and obtain the preliminary set P of planar coordinates of the shooting point according to all different combinations.
[0022] P = {(x j , y j )|j = 1, 2,..., m};
[0023] where m = n(n - 1) / 2;
[0024] where, for the combination of the reference point h α and the reference point h β ,
[0025]
[0026]
[0027] Among them, α∈i, β∈i, α≠β;
[0028] Step S42: Obtain the plane coordinates (x0, y0) of the shooting point according to the following formula:
[0029]
[0030]
[0031] Through the above steps S41-S42, the coordinates of the shooting point can be preferably calculated based on the known coordinates of the reference point, so the plane coordinates of the shooting point can be preferably acquired.
[0032] Preferably, step SC specifically comprises the following steps:
[0033] Step S5, obtaining the height z0 of the shooting point;
[0034] Step S6: Obtain the spatial coordinates (x0, y0, z0) of the shooting point.
[0035] Therefore, the spatial coordinates of the shooting point can be better obtained.
[0036] Preferably, in step S5, z0 is read by a barometer, so that the altitude data of the shooting point can be preferably obtained by the barometer provided in the panoramic camera.
[0037] Preferably, in step S5, z0 is obtained by calculating the floor height, so that the height data of the shooting point can be preferably calculated according to the floor position of the shooting location. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a schematic diagram of the panoramic image in polar coordinates in Example 1;
[0039] Figure 2 It is a schematic diagram of the plane coordinates of the panoramic picture in Example 1. DETAILED DESCRIPTION
[0040] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0041] Example 1
[0042] Combination Figure 1As shown in the figure, this embodiment provides a method for indoor autonomous positioning of a panoramic camera for a construction site, which includes the following steps:
[0043] Step S1: Establish multiple reference points within the shooting area and obtain the planar coordinates of each reference point;
[0044] In this step, the reference point h i has coordinates (x i , y i ), where i = 1, 2,..., n; n is the total number of the multiple reference points, and the reference point h i is the i-th reference point;
[0045] Step S2: Obtain a panoramic image of the shooting area based on the panoramic camera, and obtain the pixel coordinates of each reference point in the panoramic image; for the reference point h i , its pixel coordinates in the panoramic image are (u i , v i );
[0046] In this step, the multiple reference points are arrayed in the length direction of the panoramic image;
[0047] Step S3: Obtain the viewing angle θ i of each reference point h i in the panoramic image, where u is the pixel size of the panoramic image in the length direction;
[0048] Step S4: Based on the planar coordinates of each reference point and the viewing angle in the panoramic image, obtain the planar coordinates (x0, y0) of the shooting point.
[0049] Through the above steps S1 - S4, it is possible to preferably obtain the planar coordinates of the shooting point by using the fixed reference objects at the shooting site as reference points, and thus it is possible to preferably achieve the positioning of the panoramic image.
[0050] Combined with Figure 2 shown in the figure, step S4 of this embodiment specifically includes the following steps,
[0051] Step S41: Select 2 different reference points from the multiple reference points for combination, and obtain the preliminary planar coordinate set P of the shooting point according to all different combinations,
[0052] P = {(x j , y j )|j = 1, 2,..., m};
[0053] where m = n(n - 1) / 2;
[0054] where, for the reference point h α and the reference point hβ Combination,
[0055]
[0056]
[0057] where α ∈ i, β ∈ i, and α ≠ β;
[0058] Step S42: Obtain the planar coordinates (x0, y0) of the shooting point according to the following formula,
[0059]
[0060]
[0061] Through the above steps S41 - S42, the coordinates of the shooting point can be preferably calculated based on the known coordinates of the reference points, so that the acquisition of the planar coordinates of the shooting point can be preferably realized.
[0062] In step S2 of this embodiment, the pixel coordinates of each reference point in the panoramic image are obtained based on the feature recognition algorithm. Therefore, the automatic recognition of the reference points in the panoramic image can be preferably realized.
[0063] In this embodiment, the recognition of the reference points can be realized based on the picture fingerprint. When selecting the reference points in this embodiment, fixed objects such as the wall corner and the column inherent in the shooting area can be selected. Because such reference points have immobility, their picture fingerprints have better invariability. In specific operations, the RGB image of the reference point can be first obtained, and then the RGB image of the reference point can be converted into an HSI image, and then the invariant moment of the hue value (H) of the reference point can be used as the picture fingerprint; therefore, when recognizing the reference points in the panoramic image, the panoramic image can be first converted into an HSI image, and then the picture fingerprints of the reference points can be matched, and the automatic recognition of the reference points can be preferably realized.
[0064] In step S2 of this embodiment, the panoramic image is an RGB image. Therefore, relevant features can be preferably retained.
[0065] In step S2 of this embodiment, in step S1, the heights of the established multiple reference points are the same. Therefore, it is convenient for subsequent correction of the panoramic image.
[0066] It can be understood that during the shooting process of the panoramic camera, if there is no deviation angle, the pixel coordinates v of all reference points i will remain consistent; however, due to the inevitable existence of the deviation angle, the pixel coordinates v of different reference points i will show deviations. Therefore, after obtaining the panoramic image, the panoramic image can be corrected first according to the following steps:
[0067] Step (1) Calculate the angle C between the line connecting any two reference points and the length direction of the panoramic image.
[0068]
[0069] Among them, p∈i, q∈i, p≠q;
[0070] Step (2) Calculate the mean value C' of all angles C;
[0071] Step (3) calculates the vertical coordinate v of each pixel in the panoramic image. l Compensation is performed, and the vertical coordinate after compensation is v l (1+tan C'), the horizontal coordinate remains unchanged.
[0072] The method of this embodiment also includes the following steps:
[0073] Step S5, obtaining the height z0 of the shooting point;
[0074] Step S6: Obtain the spatial coordinates (x0, y0, z0) of the shooting point.
[0075] In step S5 of this embodiment, z0 can be read by, for example, a barometer. Therefore, the altitude data of the shooting point can be preferably obtained by the barometer provided in the panoramic camera.
[0076] In addition, z0 in step S5 can also be obtained by calculating the floor height. Therefore, the height data of the shooting point can be preferably calculated according to the floor position of the shooting location. At this time, z0=(L n -1)H+h0,L n is the number of floors, H is the floor height, and h0 is the height of the shooting axis of the panoramic camera from the ground.
[0077] Through the method in this embodiment, it is possible to better achieve the positioning of the panoramic picture when taking a panoramic photo of the interior of a building, and it has the advantages of high accuracy and low cost.
[0078] Example 2
[0079] Based on the method in Example 1, this embodiment provides a method for automatic matching of indoor panoramic images with BIM, which includes the following steps:
[0080] Step SA, obtaining a panoramic picture of the shooting area;
[0081] Step SB, obtaining the plane coordinates (x0, y0) of the shooting point of the panoramic picture;
[0082] Step SC, spatial coordinates (x0, y0, z0) of the shooting point of the panoramic picture;
[0083] Step SD: Obtain the horizontal scaling factor K1 and the vertical scaling factor K2 of the panoramic image and the BIM model;
[0084] Step SE: Match the panoramic image and the BIM model based on the spatial coordinates (x0, y0, z0) of the shooting point, the initial shooting angle of the panoramic image, the horizontal scaling factor K1, and the vertical scaling factor K2.
[0085] Through the above, the matching of the panoramic image and the BIM model can be better achieved.
[0086] In this embodiment, the horizontal scaling factor K1 and the vertical scaling factor K2 can be obtained based on the reference point. Specifically:
[0087] I. Obtain the actual length dimension l a and the actual height dimension l b ;
[0088] II. Obtain the pixel length l v and the pixel width l u of the reference point in the panoramic image;
[0089] III. Calculate the horizontal scaling factor K1, K1 = l b / l u ;
[0090] IV. Calculate the vertical scaling factor K2, K2 = l a / l v 。
[0091] In step SE, the panoramic image can be processed based on the following steps:
[0092] I. Realize the correction of the panoramic image based on steps (1)-(3) in Embodiment 1;
[0093] II. Multiply the abscissa of each pixel point in the corrected panoramic image by (K * K1), and multiply the ordinate of each pixel point in the panoramic image by (K * K2), so as to obtain the scaled panoramic image, where K is the ratio of the BIM model to the actual size.
[0094] Through the above, the matching of the panoramic image and the BIM model can be better achieved. It can be understood that the initial shooting angle of the panoramic image is the initial orientation of the panoramic camera.
[0095] Steps SA and SB of this embodiment are implemented through steps S1-S4 in Embodiment 1.
[0096] Step SC of this embodiment is implemented through steps S5 and S6 in Embodiment 1.
[0097] Through the method in this embodiment, the matching between the panoramic picture and the BIM model can be preferably achieved.
[0098] The above has schematically described the present invention and its implementation manners. This description is not restrictive. What is shown in the drawings is only one of the implementation manners of the present invention, and the actual structure is not limited thereto. Therefore, if those of ordinary skill in the art are inspired by it and, without departing from the gist of the present invention, creatively design structural manners and embodiments similar to the technical solution, they shall fall within the protection scope of the present invention.
Claims
1. A method for automatic matching based on indoor panoramic images and BIM, which comprises the following steps: Step SA: Obtain panoramic images of the shooting area; Step SB, obtain the planar coordinates of the shooting point of the panoramic image ( ); Step SC, the spatial coordinates of the shooting point of the panoramic image ( ); Step SD: Obtain the horizontal scaling factor K1 and the vertical scaling factor K2 of the panoramic image and the BIM model; Step SE, match the panoramic image with the BIM model based on the spatial coordinates of the shooting point ( ), the initial shooting angle of the panoramic image, the horizontal scaling factor K1, and the vertical scaling factor K2; Steps SA and SB specifically include the following steps: Step S1: Establish multiple reference points in the shooting area and obtain the planar coordinates of each reference point; In this step, the reference point has coordinates ( ), where i = 1, 2,..., n; n is the total number of the multiple reference points, and the reference point is the i-th reference point. Step S2: Obtain a panoramic image of the shooting area based on the panoramic camera, and obtain the pixel coordinates of each reference point in the panoramic image; for the reference point , its pixel coordinates in the panoramic image are ( ); In this step, the multiple reference points are arrayed in the length direction of the panoramic image; Step S3: Obtain each reference point The viewing angle in the panoramic image , , is the pixel size of the panoramic image in the length direction; Step S4. Obtain the planar coordinates of the shooting point based on the planar coordinates of each reference point and the viewing angle in the panoramic image ( ); Step SE specifically includes the following steps: Step (1): Calculate the angle C between the line connecting any two reference points and the length direction of the panoramic image; ; Among them, ; Step (2), calculate the mean value of all included angles C ; Step (3): For the ordinate of each pixel point in the panoramic image perform compensation, and the ordinate after the compensation value is , while the abscissa remains unchanged.
2. The method for automatic matching based on indoor panoramic images and BIM according to claim 1, characterized in that: Step S4 specifically includes the following steps: Step S41: Select 2 different reference points from the multiple reference points for combination, and obtain the preliminary planar coordinate set P of the shooting points according to all different combinations; ; Among them, ; Among them, for the reference points and the reference points in combination ; ; Among them, ; Step S42: Obtain the planar coordinates of the shooting point according to the following formula ( ), , 。 3. A method for automatic matching based on indoor panoramic images and BIM according to claim 2, characterized in that: Step SC specifically includes the following steps: Step S5, obtain the height of the shooting point ; Step S6, obtain the spatial coordinates of the shooting point ( ).
4. A method for automatic matching based on indoor panoramic images and BIM according to claim 3, characterized in that: In step S5, Read by the barometer.
5. A method for automatic matching based on indoor panoramic images and BIM according to claim 3, characterized in that: In step S5, Obtained by calculating the floor height.
Citation Information
Patent Citations
Method for carrying out engineering progress supervision by use of three-dimensional panoramic technology by combining BIM technology
CN105719200A
Indoor positioning navigation method based on image space and panorama assistance
CN109141432A