Method for acquiring inclination angle of building based on image recognition

By using image recognition-based methods and camera devices and sensor data to correct building images, the problems of inconvenience and high professional requirements of traditional tools are solved, enabling portable, high-precision tilt angle measurement and digital management.

CN121067802APending Publication Date: 2025-12-05SHANGHAI HOUSING QUALITY INSPECTION STATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510849384.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Traditional methods for measuring building tilt angles rely on physical contact tools, which are inconvenient to carry and require a high level of expertise, making them difficult to popularize.

Method used

An image recognition-based method is used to collect building images using a camera device, and then combine the data with sensor data for data correction and feature point analysis to obtain the building's tilt angle.

Benefits of technology

It enables portable and easily accessible measurement of building tilt angles, improves measurement accuracy, and supports digital and cloud uploads to establish a database of building health status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121067802A_ABST
    Figure CN121067802A_ABST
Patent Text Reader

Abstract

The invention discloses a method for obtaining the inclination angle of a building based on image recognition, and the method comprises the steps: collecting the initial image information of a target building based on a camera device, and recording the parameter information corresponding to the camera device; acquiring corresponding data information during shooting of the camera device according to a preset sensor, performing data correction on the initial image information of the target building based on the parameter information and the data information, confirming corrected image information, and confirming first angle information based on the corrected image information; performing feature point analysis processing on the corrected image information, determining feature line data based on an analysis processing result, fitting the feature line data to obtain a target fitting straight line, and determining second angle information based on the target fitting straight line; and determining inclination angle information corresponding to the target building according to the first angle information and the second angle information. On the basis of ensuring the accuracy of the measurement result, the application is wider, and the method is suitable for large-range general survey.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of measurement analysis, in particular to a method for obtaining a building inclination angle based on image recognition. BACKGROUND

[0002] With the acceleration of urbanization, a large number of existing buildings enter the maintenance stage. The measurement of overall inclination is a main technical index for evaluating the "current health status" of existing buildings, and it is often necessary to measure it regularly in the daily maintenance of buildings.

[0003] In related technologies, traditional inclination angle measurement methods mainly rely on physical contact type measurement tools such as levels, inclination sensors, etc. Although these methods have high accuracy, they are not convenient to carry, especially when working on a large area. In addition, professional instruments have high professional requirements for users and are not conducive to popularization and use, which needs to be improved. SUMMARY

[0004] In order to facilitate use and popularize building inclination measurement, the present application provides a method for obtaining a building inclination angle based on image recognition.

[0005] In a first aspect, the present application provides a method for obtaining a building inclination angle based on image recognition, which adopts the following technical solution:

[0006] The method for obtaining a building inclination angle based on image recognition comprises the following steps:

[0007] Collecting initial image information of a target building based on a camera device and recording corresponding parameter information of the camera device;

[0008] According to the data information corresponding to the shooting of the camera device collected by a preset sensor, the initial image information of the target building is corrected based on the parameter information and the data information, the corrected image information is confirmed, and the first angle information is confirmed based on the corrected image information;

[0009] Performing feature point analysis processing on the corrected image information, confirming feature line data based on the analysis processing result, fitting the feature line data, obtaining a target fitting straight line, and confirming the second angle information based on the target fitting straight line;

[0010] Confirming the inclination angle information corresponding to the target building according to the first angle information and the second angle information.

[0011] Preferably, the preset sensor comprises a direction sensor and a gyroscope sensor.

[0012] The direction sensor is used to collect three-axis angle data corresponding to the shooting of the camera, and the three-axis angle data includes x-axis angle data, y-axis angle data and z-axis angle data corresponding to each unit time during exposure.

[0013] The gyroscope sensor is used to collect three-axis angular acceleration data corresponding to the shooting of the camera, and the three-axis angular acceleration data includes x-axis angular acceleration data, y-axis angular acceleration data and z-axis angular acceleration data corresponding to each unit time during exposure.

[0014] Preferably, the parameter information corresponding to the camera includes shutter speed, shutter time parameter and lens parameter.

[0015] Preferably, the initial image information of the target building is data-corrected based on the parameter information and the data information, and the corrected image information is confirmed, specifically including:

[0016] The shutter time T and the focal length f corresponding to the camera are confirmed through the parameter information corresponding to the camera, and the three-axis angle data and the three-axis angular acceleration data are extracted from the data information corresponding to the shooting of the camera.

[0017] The x-axis pixel offset Δx corresponding to the shooting of the camera is confirmed through the formula Δx = f*tan(θ x +ω x *T 2 ), wherein θ x represents the x-axis angle data corresponding to the shooting of the camera, and ω x represents the x-axis angular acceleration data corresponding to the shooting of the camera.

[0018] Similarly, the y-axis pixel offset Δy corresponding to the shooting of the camera is confirmed through the formula Δy = f*tan(θ y +ω y *T 2 ), wherein θ y represents the y-axis angle data corresponding to the shooting of the camera, and ω y represents the y-axis angular acceleration data corresponding to the shooting of the camera.

[0019] The initial image is inversely transformed through the x-axis pixel offset Δx corresponding to the shooting of the camera and the y-axis pixel offset Δy corresponding to the shooting of the camera, and then the corrected image information is confirmed.

[0020] Preferably, the first angle information is confirmed based on the corrected image information, specifically including:

[0021] The rotation matrix R corresponding to the moment the camera was capturing images was determined by using the three-axis angle data. The initial vertical direction vector V was then obtained based on the initial image information. p And then through formula V w =R·V p The vertical direction vector V of the correction was confirmed. w ;

[0022] Through formula The first angle information θ1 is confirmed, where G represents the direction vector of gravity.

[0023] Preferably, feature point analysis is performed on the corrected image information, and feature line data is confirmed based on the analysis results, specifically including:

[0024] The corrected image information is preprocessed, and feature points in the preprocessed corrected image are identified by feature detection algorithms. The feature points are then described to confirm the feature description information.

[0025] Edge information in an image is extracted based on feature description information and edge detection algorithms, and then feature line data is confirmed based on the edge information.

[0026] Preferably, the second angle information is set as the angle between the target fitted line and the vertical direction of the corrected image.

[0027] Preferably, the tilt angle information corresponding to the target building is determined based on the first angle information and the second angle information, specifically including:

[0028] The tilt angle information θ corresponding to the target building is determined by the formula θ=θ1*a1+θ2*a2, where θ2 represents the second angle information, and a1 and a2 represent the correction coefficients corresponding to the preset first angle information and second angle information, respectively.

[0029] Secondly, this application provides a system for obtaining the tilt angle of a building based on image recognition, which adopts the following technical solution:

[0030] A system for obtaining the tilt angle of a building based on image recognition includes:

[0031] The information acquisition module is used to acquire initial image information of the target building based on the camera device and record the parameter information corresponding to the camera device;

[0032] The first angle acquisition module is used to collect data information corresponding to the shooting time of the camera device according to the preset sensor, and then perform data correction on the initial image information of the target building based on the parameter information and the data information, confirm the corrected image information, and confirm the first angle information based on the corrected image information.

[0033] The second angle obtaining module is configured to perform feature point analysis processing on the corrected image information, confirm feature line data based on a result of the analysis processing, perform fitting on the feature line data, obtain a target fitting straight line, and confirm second angle information based on the target fitting straight line.

[0034] The inclination angle obtaining module is configured to confirm inclination angle information corresponding to the target building based on the first angle information and the second angle information.

[0035] In a third aspect, the present application provides a computer readable storage medium storing instructions, which, when executed on a computer, cause the computer to perform the method for obtaining an inclination angle of a building based on image recognition.

[0036] In summary, the present application includes at least one of the following beneficial technical effects:

[0037] 1. The present application provides a method for obtaining an inclination angle of a building based on image recognition, which comprises the following steps: collecting initial image information of a target building by a camera device, recording parameter information corresponding to the camera device, further collecting data information corresponding to the camera device when the camera device is shooting, performing data correction on the initial image information of the target building based on the parameter information and the data information, confirming corrected image information, confirming first angle information based on the corrected image information, confirming second angle information by performing feature point analysis processing on the corrected image information, and confirming inclination angle information corresponding to the target building based on the first angle information and the second angle information, thereby realizing digital measurement of building inclination, and further uploading measurement results to the cloud to facilitate the establishment of a housing health database.

[0038] 2. By performing data correction on the initial image information of the target building based on the parameter information and the data information, and then confirming the corrected image information, the occurrence of pixel point deviation caused by camera shaking during shooting is effectively reduced. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0040] Figure 1 is a method flowchart for obtaining an inclination angle of a building based on image recognition according to an embodiment of the present application.

[0041] Figure 2is a system schematic diagram for acquiring a building inclination angle based on image recognition according to an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be described in detail with reference to the accompanying drawings. Figures 1-2 The present application is further described in detail.

[0043] Embodiment 1

[0044] The present application discloses a method for acquiring a building inclination angle based on image recognition.

[0045] Reference Figure 1 The method for acquiring a building inclination angle based on image recognition comprises the following steps:

[0046] S1. acquiring initial image information of a target building based on a camera device, and recording parameter information corresponding to the camera device;

[0047] S2. acquiring data information corresponding to the camera device when shooting based on a preset sensor, and then correcting the initial image information of the target building based on the parameter information and the data information, confirming corrected image information, and confirming first angle information based on the corrected image information;

[0048] S3. performing feature point analysis processing on the corrected image information, confirming feature line data based on the analysis processing result, and then fitting the feature line data to obtain a target fitting straight line, and confirming second angle information based on the target fitting straight line;

[0049] S4. confirming inclination angle information corresponding to the target building according to the first angle information and the second angle information.

[0050] Through the above technical solution, the initial image information of the target building is collected by the camera device, and the parameter information corresponding to the camera device is recorded. Further, the data information corresponding to the camera device when shooting is collected, and then the initial image information of the target building is corrected based on the parameter information and the data information. Then, the corrected image information is confirmed, and the first angle information is confirmed based on the corrected image information. Then, the second angle information is confirmed by performing feature point analysis processing on the corrected image information. Then, the inclination angle information corresponding to the target building is confirmed based on the first angle information and the second angle information, thereby effectively improving the accuracy of the measurement result.

[0051] Further, the preset sensor comprises a direction sensor and a gyroscope sensor;

[0052] The direction sensor is used to collect three-axis angle data corresponding to the camera device when shooting, and the three-axis angle data comprises x-axis angle data, y-axis angle data and z-axis angle data corresponding to each unit time when shooting.

[0053] The gyroscope sensor is configured to collect three-axis angular acceleration data corresponding to the photographing of the camera, and the three-axis angular acceleration data includes x-axis angular acceleration data, y-axis angular acceleration data and z-axis angular acceleration data corresponding to each unit time during exposure.

[0054] The parameter information corresponding to the camera includes shutter speed, shutter time parameter and lens parameter.

[0055] Specifically, the lens parameter information includes but is not limited to the focal length corresponding to the camera.

[0056] It should be noted that the initial image information of the target building is corrected based on the parameter information and the data information, and the corrected image information is confirmed, and specifically includes:

[0057] The shutter time T and the focal length f corresponding to the camera are confirmed through the parameter information corresponding to the camera, and the three-axis angle data and the three-axis angular acceleration data are extracted from the data information corresponding to the photographing of the camera.

[0058] The x-axis pixel offset Δx corresponding to the photographing of the camera is confirmed through the formula Δx = f*tan(θ x +ω x *T 2 ), wherein θ x represents the x-axis angle data corresponding to the photographing of the camera, and ω x represents the x-axis angular acceleration data corresponding to the photographing of the camera.

[0059] Similarly, the y-axis pixel offset Δy corresponding to the photographing of the camera is confirmed through the formula Δy = f*tan(θ y +ω y *T 2 ), wherein θ y represents the y-axis angle data corresponding to the photographing of the camera, and ω y represents the y-axis angular acceleration data corresponding to the photographing of the camera.

[0060] The initial image is inversely transformed through the x-axis pixel offset Δx corresponding to the photographing of the camera and the y-axis pixel offset Δy corresponding to the photographing of the camera, and then the corrected image information is confirmed.

[0061] Specifically, the rotation of the x-axis, the y-axis and the z-axis will cause pixel offset, but the rotation of the z-axis only affects the rotation of the image but not the translation, so in the embodiment of the application, only the influence of the rotation of the x-axis and the y-axis on the offset is considered.

[0062] Specifically, by correcting the initial image information of the target building based on the parameter information and the data information, and then confirming the corrected image information, the situation of pixel point deviation caused by camera shaking during shooting is effectively reduced.

[0063] Further, the first angle information is confirmed based on the corrected image information, specifically including:

[0064] The corresponding three-axis angle data during shooting of the camera is confirmed to obtain the rotation matrix R corresponding to the shooting time of the camera, and the initial vertical direction vector V is obtained based on the initial image information p , and then the corrected vertical direction vector V w is confirmed through the formula V p = R·V w ;

[0065] The first angle information θ1 is confirmed through the formula , wherein G represents the gravity direction vector.

[0066] Specifically, the first angle information is set as the included angle between the vertical direction of the corrected image information and the direction of the earth's gravity.

[0067] It should be noted that the feature point analysis processing is performed on the corrected image information, and the feature line data is confirmed based on the analysis processing result, specifically including:

[0068] The corrected image information is preprocessed, the feature points in the preprocessed corrected image are identified through a feature detection algorithm, and the feature points are described, and then the feature description information is confirmed.

[0069] Specifically, the corrected image information is preprocessed to improve the quality and accuracy of feature point detection, and the preprocessing steps include noise reduction, contrast enhancement, and grayscale conversion.

[0070] A feature detection algorithm is used to identify feature points in the image. Common feature point detection algorithms include SIFT (Scale-Invariant Feature Transform), SURF (Speeded-Up Robust Features), ORB (Oriented FAST and Rotated BRIEF), etc.

[0071] After detecting the feature points, the area around each feature point needs to be described in order to facilitate subsequent matching and analysis.

[0072] Based on the feature description information and the edge detection algorithm, the edge information in the image is extracted, and then the feature line data is confirmed based on the edge information.

[0073] Specifically, the feature line data includes, but is not limited to, building outer contour data, building skirting line outer contour data, building facade window outer contour data, building facade beltline outer contour data, building roof eave outer contour data, and building roof parapet outer contour data.

[0074] The target fitting straight line includes, but is not limited to, a corresponding fitting (vertical) straight line obtained by calculating and analyzing a building outer contour pixel point set, a corresponding fitting (horizontal) straight line obtained by calculating and analyzing a window sill and a window eave outer contour pixel point set of each floor window of a building facade, and a corresponding fitting (horizontal) straight line obtained by calculating and analyzing a building facade floor beltline (or roof parapet contour line) pixel point set.

[0075] Further, the second angle information is set as an included angle between the target fitting straight line and a vertical direction of the corrected image.

[0076] It should be noted that the confirmation of the tilt angle information corresponding to the target building according to the first angle information and the second angle information specifically includes:

[0077] The tilt angle information θ corresponding to the target building is confirmed through a formula θ = θ1*a1+θ2*a2, wherein θ2 represents the second angle information, and a1 and a2 represent correction coefficients corresponding to the preset first angle information and the second angle information, respectively.

[0078] Specifically, a1 and a2 represent correction coefficients corresponding to the preset first angle information and the second angle information, respectively, and are obtained by fitting historical data.

[0079] Embodiment 2

[0080] The embodiment of the application further discloses a system for acquiring a building tilt angle based on image recognition.

[0081] Reference Figure 2 The system for acquiring a building tilt angle based on image recognition includes:

[0082] An information acquisition module is configured to acquire initial image information of a target building based on a camera device and record parameter information corresponding to the camera device;

[0083] A first angle acquisition module is configured to acquire data information corresponding to the camera device when the camera device is shooting based on a preset sensor, perform data correction on the initial image information of the target building based on the parameter information and the data information, confirm corrected image information, and confirm first angle information based on the corrected image information;

[0084] The second angle obtaining module is configured to perform feature point analysis on the corrected image information, confirm feature line data based on a result of the analysis, perform fitting on the feature line data, obtain a target fitting straight line, and confirm second angle information based on the target fitting straight line.

[0085] The inclination angle obtaining module is configured to confirm inclination angle information corresponding to the target building based on the first angle information and the second angle information.

[0086] The above content is merely an example and description of the concept of the present application. Those skilled in the art can make various modifications or supplements to the described specific embodiments or replace them with similar ways without departing from the concept of the present application or exceeding the scope defined by the claims, and all of them shall fall within the protection scope of the present application.

[0087] In the description of the present application, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0088] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The preferred embodiments do not describe all the details and limit the present application to the specific embodiments. Obviously, many modifications and changes can be made according to the content of the present specification. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for obtaining a building tilt angle based on image recognition, characterized in that, The method comprises the following steps: Collect initial image information of a target building based on a camera, and record corresponding parameter information of the camera; According to the preset sensor, collect data information corresponding to the shooting of the camera, and then correct the initial image information of the target building based on the parameter information and the data information, confirm the corrected image information, and confirm the first angle information based on the corrected image information; Perform feature point analysis processing on the corrected image information, confirm feature line data based on the analysis processing result, and then perform fitting on the feature line data to obtain a target fitting straight line, and confirm the second angle information based on the target fitting straight line; Confirm the inclination angle information corresponding to the target building according to the first angle information and the second angle information. 2.The method of claim 1, wherein, The preset sensor comprises a direction sensor and a gyroscope sensor; The direction sensor is used to collect three-axis angle data corresponding to the shooting of the camera, and the three-axis angle data comprises x-axis angle data, y-axis angle data and z-axis angle data corresponding to each unit time during exposure; The gyroscope sensor is used to collect three-axis angular acceleration data corresponding to the shooting of the camera, and the three-axis angular acceleration data comprises x-axis angular acceleration data, y-axis angular acceleration data and z-axis angular acceleration data corresponding to each unit time during exposure. 3.The method of claim 2, wherein, The parameter information corresponding to the camera comprises shutter speed, shutter time parameters and lens parameters. 4.The method of claim 3, wherein, Correct the initial image information of the target building based on the parameter information and the data information to confirm the corrected image information, specifically including: Confirm the shutter time T and the focal length f of the camera corresponding to the parameter information of the camera, and extract the three-axis angle data and the three-axis angular acceleration data from the data information corresponding to the shooting of the camera; By formula Δx = f * tan (θ x + ω x * T 2 ), the corresponding x-axis pixel offset Δx when the camera shoots is confirmed, wherein θ x represents the corresponding x-axis angle data when the camera shoots, and ω x represents the corresponding x-axis angular acceleration data when the camera shoots; Similarly, the corresponding y-axis pixel offset Δy when the camera is shooting is confirmed by the formula Δy = f * tan(θ y + ω y * T 2 ), wherein θ y represents the corresponding y-axis angle data when the camera is shooting, and ω y represents the corresponding y-axis angular acceleration data when the camera is shooting. Perform reverse transformation on the initial image through the x-axis pixel offset Δx corresponding to the shooting of the camera and the y-axis pixel offset Δy corresponding to the shooting of the camera, and then confirm the corrected image information. 5.The method of claim 4, wherein, Confirm the first angle information based on the corrected image information, specifically including: The corresponding three-axis angle data when the camera is shooting is used to confirm the rotation matrix R corresponding to the time when the camera is shooting, and the initial vertical direction vector V is obtained based on the initial image information p , and further through the formula V w = R · V p , the corrected vertical direction vector V w is confirmed; By the equation The first angle information θ1 is confirmed, where G represents a gravitational direction vector. 6.The method of acquiring a building tilt angle based on image recognition according to claim 1, wherein, Perform feature point analysis processing on the corrected image information, and confirm the feature line data based on the analysis processing result, specifically including: Preprocess the corrected image information, identify the feature points in the preprocessed corrected image through a feature detection algorithm, describe the feature points, and then confirm the feature description information; Extract the edge information in the image based on the feature description information and an edge detection algorithm, and then confirm the feature line data based on the edge information. 7.The method of claim 6, wherein, The second angle information is set as the included angle between the target fitting straight line and the vertical direction of the corrected image. 8.The method of claim 7, wherein, Confirm the inclination angle information corresponding to the target building according to the first angle information and the second angle information, specifically including: Confirm the inclination angle information θ corresponding to the target building through the formula θ = θ1*a1+θ2*a2, wherein θ2 represents the second angle information, and a1 and a2 represent the correction coefficients corresponding to the preset first angle information and the second angle information, respectively.

9. The system for obtaining the inclination angle of a building based on image recognition, applied to the method for obtaining the inclination angle of a building based on image recognition according to claims 1-8, characterized in that, ​ An information collection module is configured to collect initial image information of a target building based on a camera and record corresponding parameter information of the camera; A first angle acquisition module is configured to collect corresponding data information of the camera when the camera is shooting based on a preset sensor, correct the initial image information of the target building based on the parameter information and the data information, confirm corrected image information, and confirm first angle information based on the corrected image information; A second angle acquisition module is configured to analyze and process feature points of the corrected image information, confirm feature line data based on a result of the analysis and processing, fit the feature line data, acquire a target fitting straight line, and confirm second angle information based on the target fitting straight line; An inclination angle acquisition module is configured to confirm inclination angle information corresponding to the target building based on the first angle information and the second angle information.

10. A computer-readable storage medium, characterized in that: The computer is caused to execute the method for acquiring an inclination angle of a building based on image recognition according to any one of claims 1-8 when the instructions are executed on the computer.