A method for indoor autonomous positioning of a panoramic camera for construction sites
By establishing a reference point in the building site room and obtaining its plane coordinates and pixel coordinates, and calculating the plane coordinates of the shooting point with viewing angle information, the accuracy problem of autonomous positioning in the panoramic camera room is solved, and high-precision positioning of panoramic images is achieved.
Patent Information
- Application Number
- CN202210128298.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-02-11
AI Technical Summary
When using a panoramic camera to collect electromechanical installation images indoors at a construction site, the lack of accuracy problems of GPS positioning signals and other positioning methods leads to the difficulty of autonomous positioning in the indoor area.
By establishing multiple reference points in the shooting area, the plane coordinates of each reference point and the pixel coordinates in the panoramic picture are obtained, and the plane coordinates of the shooting point are calculated based on the viewing angle information, thereby realizing the positioning of the panoramic image.
This method can obtain the plane coordinates of the shooting point more accurately, solve the accuracy problem of autonomous positioning of indoor panoramic cameras, and is suitable for on-site applications in construction sites.
Smart Images

Figure CN114463427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for indoor autonomous positioning of a panoramic camera used in a construction site. 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 assessments. In addition, with the continuous application of BIM, how to integrate the design of BIM with the real image information of the construction site, especially the indoor mechanical and electrical installations, to achieve the grasp 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, since there is no GPS positioning signal indoors and there is no other unpowered equipment on site, it is impossible to deploy base stations, resulting in the inability to use positioning methods such as Bluetooth and UWB. The accuracy of autonomous positioning methods such as inertial navigation is not high, and the SLAM positioning based on panoramic images requires a very high hardware computing speed. Therefore, indoor positioning has become a difficult problem. Summary of the Invention
[0004] The present invention provides a method for indoor autonomous positioning of a panoramic camera used in a construction site, which can overcome certain or some defects of the prior art.
[0005] According to a method for indoor autonomous positioning of a panoramic camera used in a construction site of the present invention, it includes the following steps:
[0006] Step S1: Establish a plurality of reference points in the shooting area and obtain the planar coordinates of each reference point;
[0007] In this step, the coordinates of the reference point hi i are (x i , y i ), where i = 1, 2,..., n; n is the total number of the plurality of reference points, and the reference point hi i is the i-th reference point;
[0008] 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 hi i , its pixel coordinates in the panoramic image are (u i , v i );
[0009] In this step, the plurality of reference points are arrayed in the length direction of the panoramic image;
[0010] Step S3: Obtain each reference point h i The viewing angle θ in the panoramic image i , u is the pixel size of the panoramic image in the length direction;
[0011] 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.
[0012] 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, so that the positioning of the panoramic image can be preferably realized.
[0013] Preferably, step S4 specifically includes the following steps
[0014] Step S41: Select 2 different reference points from the multiple reference points for combination, and obtain the preliminary set of planar coordinates P of the shooting point according to all different combinations
[0015] P = {(x j , y j )|j = 1, 2,..., m};
[0016] where m = n(n - 1) / 2;
[0017] where, for the combination of reference point h α and reference point h β
[0018]
[0019]
[0020] where α ∈ i, β ∈ i, α ≠ β;
[0021] Step S42: Obtain the planar coordinates (x0, y0) of the shooting point according to the following formula
[0022]
[0023]
[0024] Through the above steps S41 - S42, it is possible to preferably calculate the coordinates of the shooting point based on the known reference point coordinates, so that the planar coordinates of the shooting point can be preferably obtained.
[0025] Preferably, in step S2, 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 point in the panoramic image can be preferably realized.
[0026] Preferably, in step S2, the panoramic image is an RGB image, so that relevant features can be better preserved.
[0027] Preferably, in step S1, the heights of the multiple reference points established are the same, so as to facilitate subsequent correction of the panoramic image.
[0028] As a preference, the method further comprises the following steps:
[0029] Step S5, obtaining the height z0 of the shooting point;
[0030] Step S6: Obtain the spatial coordinates (x0, y0, z0) of the shooting point.
[0031] Therefore, the spatial coordinates of the shooting point can be better obtained.
[0032] 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.
[0033] 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
[0034] Figure 1 This is a schematic diagram of the panoramic image in polar coordinates in Example 1;
[0035] Figure 2 It is a schematic diagram of the plane coordinates of the panoramic picture in Example 1. DETAILED DESCRIPTION
[0036] 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.
[0037] Example 1
[0038] Combination Figure 1 As shown, this embodiment provides a method for indoor autonomous positioning of a panoramic camera for a construction site, which includes the following steps:
[0039] Step S1, establishing multiple reference points in the shooting area and obtaining the plane coordinates of each reference point;
[0040] In this step, the reference point h i The coordinates of (x i ,y i ), i = 1, 2, ..., n; n is the total number of the plurality of reference points, and the reference point h i is the i-th reference point;
[0041] 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 );
[0042] In this step, the multiple reference points are arrayed in the length direction of the panoramic image;
[0043] 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;
[0044] 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.
[0045] 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.
[0046] Combined with Figure 2 as shown, step S4 of this embodiment specifically includes the following steps,
[0047] 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,
[0048] P = {(x j , y j )|j = 1, 2,..., m};
[0049] where m = n(n - 1) / 2;
[0050] where, for the combination of reference point h α and reference point h β ,
[0051]
[0052]
[0053] where α ∈ i, β ∈ i, α ≠ β;
[0054] Step S42: Obtain the planar coordinates (x0, y0) of the shooting point according to the following formula,
[0055]
[0056]
[0057] Through the above steps S41 - S42, it is possible to preferably calculate the coordinates of the shooting point based on the known coordinates of the reference points, and thus it is possible to preferably obtain the planar coordinates of the shooting point.
[0058] 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, it is possible to preferably achieve the automatic recognition of the reference points in the panoramic image.
[0059] In this embodiment, it is possible to identify the reference points based on the image fingerprint. When selecting the reference points in this embodiment, it is possible to select fixed objects such as the wall corner and columns inherent in the shooting area. Because such reference points have immobility, their image fingerprints have better invariability. In specific operations, it is possible to first obtain the RGB image of the reference point, and then convert the RGB image of the reference point into an HSI image, and then use the invariant moment of the hue value (H) of the reference point as the image fingerprint; therefore, when identifying the reference points in the panoramic image, it is possible to first convert the panoramic image into an HSI image, and then match the image fingerprints of the reference points, and it is possible to preferably achieve the automatic recognition of the reference points.
[0060] In step S2 of this embodiment, the panoramic image is an RGB image. Therefore, it is possible to preferably retain the relevant features.
[0061] 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.
[0062] 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, it is possible to first correct the panoramic image according to the following steps:
[0063] Step (1) Calculate the angle C between the connection line of any two reference points and the length direction of the panoramic image,
[0064]
[0065] where p ∈ i, q ∈ i, p ≠ q;
[0066] Step (2) Calculate the mean value C' of all angles C;
[0067] Step (3) For the ordinate v of each pixel point in the panoramic image lCompensation is performed, and the vertical coordinate after compensation is v l (1+tan C'), the horizontal coordinate remains unchanged.
[0068] The method of this embodiment also includes the following steps:
[0069] Step S5, obtaining the height z0 of the shooting point;
[0070] Step S6: Obtain the spatial coordinates (x0, y0, z0) of the shooting point.
[0071] Therefore, the spatial coordinates of the shooting point can be better obtained.
[0072] 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.
[0073] 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.
[0074] Through the method in this embodiment, it is possible to better achieve the positioning of the panoramic picture when taking panoramic photos of the interior of a building, and it has the advantages of high accuracy and low cost.
[0075] Example 2
[0076] 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:
[0077] Step SA, obtaining a panoramic picture of the shooting area;
[0078] Step SB, obtaining the plane coordinates (x0, y0) of the shooting point of the panoramic picture;
[0079] Step SC, spatial coordinates (x0, y0, z0) of the shooting point of the panoramic picture;
[0080] Step SD, obtaining a horizontal scaling factor K1 and a vertical scaling factor K2 of the panoramic image and the BIM model;
[0081] Step SE, matching the panoramic image with 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.
[0082] Through the above, the matching between the panoramic image and the BIM model can be preferably achieved.
[0083] In this embodiment, the horizontal scaling coefficient K1 and the vertical scaling coefficient K2 can be obtained based on the reference points, specifically as follows:
[0084] I. Obtain the actual length dimension l a and the actual height dimension l b ;
[0085] II. Obtain the pixel length l v and the pixel width l u of the reference point in the panoramic image;
[0086] III. Calculate the horizontal scaling coefficient K1, K1 = l b / l u ;
[0087] IV. Calculate the vertical scaling coefficient K2, K2 = l a / l v .
[0088] In step SE, the panoramic image can be processed based on the following steps:
[0089] I. Achieve the correction of the panoramic image based on steps (1)-(3) in Embodiment 1;
[0090] 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 panoramic image after scaling, where K is the ratio of the BIM model to the actual size.
[0091] Through the above, the matching between the panoramic image and the BIM model can be preferably achieved. It can be understood that the initial shooting angle of the panoramic image is the initial orientation of the panoramic camera.
[0092] Steps SA and SB of this embodiment are implemented through steps S1 - S4 in Embodiment 1.
[0093] Step SC of this embodiment is implemented through steps S5 and S6 in Embodiment 1.
[0094] Through the method in this embodiment, the matching between the panoramic image and the BIM model can be preferably achieved.
[0095] The above has schematically described the present invention and its implementation manners. This description is not restrictive, and only one of the implementation manners of the present invention is shown in the drawings. 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, design similar structural manners and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.
Claims
1. A method for indoor autonomous positioning of a panoramic camera used at a construction site, which comprises the following steps: Step S1: Establish multiple reference points within the shooting area and obtain the planar coordinates of each reference point; 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; 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 ); In this step, the multiple reference points are arrayed in the length direction of the panoramic picture; Step S3: Obtain each reference point h i The viewing angle θ in the panoramic image i , where u is the pixel size of the panoramic image in the length direction; Step S4: Based on the planar coordinates of each reference point and the viewing angle in the panoramic picture, obtain the planar coordinates (x0, y0) of the shooting point; It further includes: Step S5: Obtain the height z0 of the shooting point; Step S6: Obtain the spatial coordinates (x0, y0, z0) of the shooting point; Among them, in step S2, after obtaining the panoramic image, it includes correcting the panoramic image: Step (1): Calculate the angle C between the line connecting any two reference points and the length direction of the panoramic image, where p ∈ i, q ∈ i, p ≠ q; Step (2), calculate the mean value C of all included angles C ’ ; Step (3): For the vertical coordinate v of each pixel point in the panoramic image l perform compensation, and the vertical coordinate after compensation is v l (1 + tanC ’ ), and the horizontal coordinate remains unchanged.
2. The method for indoor autonomous positioning of a panoramic camera for construction sites 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 point according to all different combinations, P = (x j , y j ) | j = 1, 2,..., m; where m = n(n - 1) / 2; Among them, for the reference point h α and the reference point h β in combination where α ∈ i, β ∈ i, α ≠ β; Step S42: Obtain the planar coordinates (x0, y0) of the shooting point according to the following formula, 3. A method for indoor autonomous positioning of a panoramic camera used at a construction site according to claim 1, characterized in that: In step S2, obtain the pixel coordinates of each reference point in the panoramic picture based on the feature recognition algorithm.
4. A method for indoor autonomous positioning of a panoramic camera used in a construction site according to claim 1, characterized in that: In step S2, the panoramic picture is an RGB image.
5. A method for indoor autonomous positioning of a panoramic camera for construction sites according to claim 1, characterized in that: In step S1, the multiple reference points established have the same height.
6. A method for indoor autonomous positioning of a panoramic camera used at a construction site, characterized in that: In step S5, z0 is read through a barometer.
7. A method for indoor autonomous positioning of a panoramic camera for construction sites according to claim 1, characterized in that: In step S5, z0 is obtained by calculating the floor height.
Citation Information
Patent Citations
Indoor positioning navigation method based on image space and panorama assistance
CN109141432A