Building crack width calculation method, device and electronic equipment based on augmented reality

Through augmented reality technology, correcting the camera position, determining the measurement plane, collecting crack images and calculating the width, the problem of inefficient measurement of cracks in existing buildings is solved and the safety and accuracy is improved.

CN116091585BActive Publication Date: 2025-08-29BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310009841.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2025-08-29
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

The existing building crack width measurement methods are inefficient, low safety, and cumbersome to store measurement data. They are affected by the accuracy of the measurement instrument and require manual operation.

Method used

Using augmented reality technology, the camera position is corrected through spatial conversion relationships, the measurement plane is determined, the crack image is collected based on the preset distance, and the crack width is calculated by using the correspondence relationship between the camera space and the pixel coordinate system.

Benefits of technology

It realizes contactless precise and efficient measurement of building crack widths, improves the safety and accuracy of measurement, and expands application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091585B_ABST
    Figure CN116091585B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, and electronic device for calculating building crack width based on augmented reality, relating to the technical field of building quality assessment. The method comprises: obtaining a spatial conversion relationship based on augmented reality; the spatial conversion relationship is used to correct the position of a camera of an augmented reality device based on a real building environment; determining a measurement plane of a crack measurement object based on the spatial conversion relationship; determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point; obtaining a pixel coordinate system of the crack image based on a preset quantitative conversion relationship; the preset quantitative conversion relationship is a correspondence between the spatial coordinate system of the camera of the augmented reality device and the pixel coordinate system; and calculating the crack width based on the pixel coordinate system of the crack image. The present invention achieves non-contact and accurate calculation of building cracks, improving the safety and accuracy of building crack calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building quality assessment, and in particular to a method, device and electronic equipment for calculating building crack width based on augmented reality. Background Art

[0002] After an earthquake, the most immediate threat is building damage or collapse, resulting in numerous casualties and significant property losses. Rapid and accurate information on building damage after a strong earthquake is a crucial prerequisite for post-disaster reinforcement and repair. Reliable damage information can provide reference and guidance for sustainable post-earthquake building repair and reconstruction. Cracks, one of the most common forms of earthquake damage, have a significant impact on a building's seismic resilience.

[0003] Currently, the methods for detecting the width of building cracks are mostly visual inspection combined with ruler measurement, or the use of a crack width tester to display the crack image on a display screen for manual reading.

[0004] Existing building crack measurement methods are inefficient and unsafe. Data storage is cumbersome, requires manual operation, and is affected by the accuracy of the measuring instruments. Therefore, improving measurement accuracy, ensuring the safety of surveyors, and achieving precise, contactless measurement of building cracks are critical challenges that the industry urgently needs to address. Summary of the Invention

[0005] The present invention provides a method, device and electronic equipment for calculating the width of building cracks based on augmented reality, which are used to solve the defects of low efficiency and low safety of the existing methods for measuring the width of cracks in earthquake-damaged buildings, and realize non-contact, accurate and efficient measurement of the width of cracks in earthquake-damaged buildings.

[0006] The present invention provides a method for calculating building crack width based on augmented reality, comprising:

[0007] Acquiring a spatial transformation relationship based on augmented reality; the spatial transformation relationship is used to correct the position of a camera of the augmented reality device based on the actual earthquake-damaged building environment;

[0008] Based on the spatial conversion relationship, determining a measurement plane of the crack measurement object;

[0009] determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point;

[0010] Based on a preset quantitative conversion relationship, a pixel coordinate system of the crack image is obtained; the preset quantitative conversion relationship is a correspondence between the camera space coordinate system of the augmented reality device and the pixel coordinate system;

[0011] The width of the crack is calculated based on the pixel coordinate system of the crack image.

[0012] According to a method for calculating building crack width based on augmented reality provided by the present invention, determining a measurement plane of a crack measurement object based on the spatial conversion relationship includes:

[0013] Based on the physical world coordinate system and the virtual world coordinate system corresponding to the real building environment, a first conversion relationship is obtained; the first conversion relationship is a correspondence relationship between the physical world coordinate system and the virtual world coordinate system;

[0014] Based on the first transformation relationship, obtaining a camera space coordinate system;

[0015] Based on the camera space coordinate system, a measurement plane of the crack measurement object is determined.

[0016] According to an augmented reality building crack width calculation method provided by the present invention, determining the image acquisition point based on a preset shooting distance includes:

[0017] Establishing a circular area with the crack measurement object as the center and the preset shooting distance as the radius as the optional area;

[0018] The image acquisition point is selected in the optional area.

[0019] According to the method for calculating building crack width based on augmented reality provided by the present invention, the method of determining the image acquisition point based on the preset shooting distance further includes:

[0020] If no image acquisition point is selected within the optional area, the preset shooting distance is adjusted.

[0021] According to a method for calculating the width of a building crack based on augmented reality provided by the present invention, the preset quantity conversion relationship includes a second preset conversion relationship and a third preset conversion relationship; the second preset conversion relationship is a correspondence relationship between a camera space coordinate system and an image coordinate system; the third preset conversion relationship is a correspondence relationship between an image coordinate system and a pixel coordinate system;

[0022] The step of obtaining a pixel coordinate system of the crack image based on a preset quantitative conversion relationship includes:

[0023] Based on the second preset transformation relationship and the camera space coordinate system, acquiring an image coordinate system of the crack image;

[0024] Based on the image coordinate system of the crack image and the third preset conversion relationship, a pixel coordinate system of the crack image is acquired.

[0025] According to a method for calculating the width of a building crack based on augmented reality provided by the present invention, the method for calculating the width of the crack based on the pixel coordinate system of the crack image includes:

[0026] performing grayscale morphological processing on the crack image, and obtaining pixel grayscales of the crack image based on positions of pixels of the crack image in the pixel coordinate system;

[0027] The width of the crack is calculated according to a preset correspondence between the crack width and the pixel grayscale.

[0028] The present invention also provides a building crack width calculation device based on augmented reality, comprising:

[0029] A correction module, configured to obtain a spatial transformation relationship based on augmented reality; the spatial transformation relationship is used to correct the position of a camera of the augmented reality device based on a real building environment;

[0030] A measurement plane determination module, configured to determine a measurement plane of a crack measurement object based on the spatial conversion relationship;

[0031] An image acquisition module is used to determine an image acquisition point based on a preset shooting distance, and acquire a crack image of the crack measurement object at the image acquisition point;

[0032] A pixel acquisition module, configured to acquire a pixel coordinate system of the crack image based on a preset quantitative conversion relationship; the preset quantitative conversion relationship is a correspondence between a camera space coordinate system of the augmented reality device and a pixel coordinate system;

[0033] The calculation module is used to calculate the width of the crack based on the pixel coordinate system of the crack image.

[0034] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for calculating the width of a building crack based on augmented reality as described above is implemented.

[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for calculating the width of a building crack based on augmented reality as described above is implemented.

[0036] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for calculating building crack width based on augmented reality.

[0037] The method for calculating the width of building cracks based on augmented reality provided by the present invention unifies the real earthquake-damaged building environment and the 3D virtual object in the same coordinate system based on the spatial conversion relationship of augmented reality technology, corrects the position of the camera of the augmented device based on the real earthquake-damaged building environment, determines the measurement plane, determines the image acquisition point based on a preset distance and acquires the crack image, obtains the coordinate system of the crack image based on the correspondence between the camera spatial coordinate system and the pixel coordinate system of the augmented reality device, and calculates the width of the crack, thereby obtaining the crack information of the real earthquake-damaged building contactlessly through augmented reality technology, and accurately calculating the crack width through preset conversion relationships and formulas, thereby realizing contactless and accurate calculation of building cracks, improving the safety and accuracy of building crack calculation, and expanding application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 1 is a flow chart of a method for calculating building crack width based on augmented reality provided by the present invention;

[0040] Figure 2 This is one of the conversion relationship diagrams of the building crack width calculation method based on augmented reality provided by the present invention;

[0041] Figure 3 This is the second conversion relationship diagram of the building crack width calculation method based on augmented reality provided by the present invention;

[0042] Figure 4 This is the third conversion relationship diagram of the building crack width calculation method based on augmented reality provided by the present invention;

[0043] Figure 5 2. It is a structural schematic diagram of a method and device for calculating building crack width based on augmented reality provided by the present invention;

[0044] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0045] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0046] The following describes the building crack width calculation method based on augmented reality of the present invention with reference to the accompanying drawings.

[0047] Figure 1 : is a flow chart of the method for calculating the width of building cracks based on augmented reality provided by the present invention, such as Figure 1 As shown, the method includes:

[0048] S1. Obtaining spatial transformation relationship based on augmented reality;

[0049] In this step, the above-mentioned spatial transformation relationship is used to correct the position of the camera of the augmented reality device based on the real building environment.

[0050] S2. determining a measurement plane of the crack measurement object based on the spatial conversion relationship;

[0051] S3. Determine an image acquisition point based on a preset shooting distance, and acquire a crack image of the crack measurement object at the image acquisition point;

[0052] S4. Acquire a pixel coordinate system of the crack image based on a preset quantitative conversion relationship;

[0053] In this step, the above-mentioned preset quantity conversion relationship is the corresponding relationship between the camera space coordinate system and the pixel coordinate system of the augmented reality device.

[0054] S5. Calculate the width of the crack based on the pixel coordinate system of the crack image.

[0055] This embodiment is based on the spatial conversion relationship of augmented reality technology, unifying the real earthquake-damaged building environment and the 3D virtual object in the same coordinate system, correcting the position of the camera of the augmented device based on the real earthquake-damaged building environment, determining the measurement plane, determining the image acquisition point based on the preset distance and acquiring the crack image, obtaining the coordinate system of the crack image based on the correspondence between the camera spatial coordinate system and the pixel coordinate system of the augmented reality device, and calculating the width of the crack, thereby obtaining the information of the cracks of the real earthquake-damaged building contactlessly through augmented reality technology, and accurately calculating the width of the cracks through preset conversion relationships and formulas, realizing contactless and accurate calculation of building cracks, improving the safety and accuracy of building crack calculations, and expanding application scenarios.

[0056] In an optional embodiment, the determining of the measurement plane of the crack measurement object based on the spatial conversion relationship includes:

[0057] Based on the physical world coordinate system and the virtual world coordinate system corresponding to the real earthquake-damaged building environment, a first conversion relationship is obtained; the first conversion relationship is the correspondence between the physical world coordinate system and the virtual world coordinate system.

[0058] The physical space coordinate system of the real earthquake-damaged building environment is known, and the virtual world coordinate system is determined by the position of the 3D virtual object in the real world. Therefore, the coordinates of the virtual object in the real world are known. The coordinates of the virtual space are a spatial coordinate system established with the 3D virtual object, that is, the virtual earthquake-damaged building, as the coordinate origin. From this, the first conversion relationship can be obtained. The formula for the above-mentioned first conversion relationship is:

[0059]

[0060] Among them, [x,y,z,1] T is the physical space coordinate system of the earthquake-damaged building environment, [x V ,y V ,z V ,1] T is the virtual space coordinate system, U 4×4 It is the transformation relationship between the physical space coordinate system and the virtual space coordinate system, that is, the first transformation relationship mentioned above.

[0061] Figure 2 This is one of the conversion relationship diagrams of the building crack width calculation method based on augmented reality provided by the present invention. Figure 2 The figure shows the conversion between the physical space coordinate system, the virtual world coordinate system, and the camera coordinate system. Based on the first transformation relationship described above, the camera space coordinate system is obtained. The purpose is to align the coordinate system with the augmented reality device camera as the coordinate origin with the physical space coordinate system in the same coordinate system. By obtaining the camera coordinate system that satisfies the first transformation relationship, the position of the augmented reality device camera is corrected to determine the measurement plane of the crack measurement object of the earthquake-damaged building.

[0062] When obtaining the camera coordinate system, since the first transformation relationship is known, the rotation matrix M can be obtained through the attitude sensor, gyroscope sensor and positioning sensor in the camera system of the augmented reality device camera. 3×3 and the translation matrix N 3×1 The conversion formula between the physical space coordinate system and the camera coordinate system is:

[0063]

[0064] Where [x′,y′,z′,1]T is the camera space coordinate system, R is the orthogonal unit matrix, which represents the direction of the camera in the physical space coordinate system, t is a three-dimensional vector, which represents the position of the camera in the physical space coordinate system, V 4×4 It is the transformation relationship between the camera space coordinate system and the physical world space coordinate system. 4×4 is the transformation matrix between the corresponding coordinate systems, so V 4×4 Can be converted into a rotation matrix R 3×3 and the translation matrix T 3×1 The specific matrix conversion combination is:

[0065]

[0066] In an optional embodiment, the above-mentioned determining the image acquisition point based on the preset shooting distance includes:

[0067] A circular area with the crack measurement object as the center and the preset shooting distance as the radius is established as a selectable area, and the image acquisition point is selected within the selectable area. If no image acquisition point is selected within the selectable area, the preset shooting distance is adjusted. In this embodiment, the image acquisition point is the position of the camera mentioned above.

[0068] In practice, the preset shooting distance is 1m. A circle is drawn with the selected crack measurement object as the starting point and the preset shooting distance (1m) as the radius. The area on the circumference of the circle is the endpoint set that meets the image acquisition requirements. Because the implementation scenario is an earthquake-damaged building, the on-site environment is relatively complex. It is necessary to select appropriate image acquisition points from the endpoint set that meet the image acquisition requirements based on the actual scene. If no suitable image acquisition points are selected in the endpoint set, the preset shooting distance can be adjusted.

[0069] In an optional embodiment, the above-mentioned preset quantity conversion relationship includes a second preset conversion relationship and a third preset conversion relationship; the second preset conversion relationship is the correspondence between the camera space coordinate system and the image coordinate system; the third preset conversion relationship is the correspondence between the image coordinate system and the pixel coordinate system.

[0070] Based on the preset quantitative conversion relationship, obtaining the pixel coordinate system of the crack image includes: based on the second preset conversion relationship and the camera space coordinate system, obtaining the image coordinate system of the crack image;

[0071] Based on the image coordinate system of the crack image and the third preset conversion relationship, a pixel coordinate system of the crack image is obtained.

[0072] In a specific implementation, the conversion between the camera space coordinate system and the image coordinate system is established based on the triangle similarity principle and the parameter values ​​of the camera system. Figure 3 This is the second conversion relationship diagram of the building crack width calculation method based on augmented reality provided by the present invention, such as Figure 3 For example, the conversion formula is:

[0073]

[0074] where f x =α x f, f y =α y f,α x Indicates the magnification factor from the image coordinate system to the pixel coordinate system on the X axis, α y Indicates the magnification factor of the image coordinate system to the pixel coordinate system on the Y axis.

[0075] Figure 4 This is the third conversion relationship diagram of the building crack width calculation method based on augmented reality provided by the present invention, see Figure 4 , establish the image coordinate system and the pixel coordinate system, the physical size of the pixel change is expressed by dx and dy, and the conversion relationship between the two can be obtained:

[0076]

[0077] Where x and y are the horizontal and vertical coordinates of the image coordinate system, and u and v are the horizontal and vertical coordinates of the pixel coordinate system.

[0078] In an optional embodiment, calculating the width of the crack based on the pixel coordinate system of the crack image includes:

[0079] performing grayscale morphological processing on the crack image, and obtaining pixel grayscales of the crack image based on positions of pixels of the crack image in the pixel coordinate system;

[0080] The width of the crack is calculated according to a preset correspondence between the crack width and the pixel grayscale.

[0081] In specific implementations, the actual distance represented by each pixel is determined by pre-establishing a correspondence between the shooting distance and image pixels. Grayscale morphological processing, based on geometry, uses the movement of cracks within the image, supplemented by various geometric operations, to ultimately determine the shape characteristics of the cracks within the image. Because crack images are not binary images, grayscale morphological processing is performed using a combination of erosion, dilation, and opening / closing operations. This grayscale morphological processing combines erosion, dilation, and opening / closing operations on the crack image, determining the shape characteristics of the cracks through multiple geometric operations. Erosion and dilation involve superimposing a structuring element with a region of the image with the same shape. The difference between the grayscale value of each image point that coincides with the structuring element and the structuring element itself is calculated, and the minimum or maximum value of the resulting values ​​is used as the grayscale value of that point in the image. This processing is completed after traversing all image regions. The dilation and erosion operations are combined to produce the crack's morphological gradient. The difference between the erosion and dilation results eliminates homogeneous regions and highlights the crack edges, producing a derivative-like effect.

[0082] First, it is necessary to determine the shooting range of the cracks in the earthquake-damaged building. Although different cameras may capture different ranges of photos at the same shooting distance (L), the relationship between the camera's shooting range and shooting distance is certain.

[0083] W=w*L / fH=h*L / f

[0084] Where W and H are the width and height of the shooting range, w and h are the width and height of the camera imaging unit, respectively (determined by the camera parameters), and f is the focal length of the camera, which is related to the camera model (determined by the camera parameters). From the above formula, it can be obtained that the shooting range is jointly determined by the camera parameters. The camera parameters are known, and the shooting distance L is set to the default value of 1m, which is the preset shooting distance.

[0085] After determining the shooting distance of the cracks in the earthquake-damaged building, the width and height of the shooting range can be obtained. The actual size of the crack can be obtained according to the shooting range and the resolution of the imaging photo, that is, the actual width of the cracks in the earthquake-damaged building is determined according to the number of pixels in the cracks in the earthquake-damaged building. The number of pixels occupied by the crack width in the picture is determined according to the grayscale of the crack. After research, it was found that the grayscale of the pixels around the crack is greater than the average grayscale of the surrounding pixels, and the grayscale of the pixels increases from the outside to the inside. In this embodiment, the cracks targeted are mainly cracks that still have repair value and use value (crack width is less than or equal to 1mm). In this case, the average grayscale of the cracks is greater than the average grayscale of the surrounding pixels. is 40%.

[0086] Get the average grayscale of pixels around cracks in earthquake-damaged buildings , if the grayscale of the pixels around the crack is ai , then the number of pixels occupied by the crack is:

[0087]

[0088] The crack width is:

[0089]

[0090] where N w The number of pixels in the width direction of the photo, W is the width of the image shooting range.

[0091] The present invention also provides a building crack width calculation device based on augmented reality, Figure 5 This is a schematic diagram of the structure of the building crack width calculation method based on augmented reality provided by the present invention, see Figure 5 The structure of the building crack width calculation device based on augmented reality provided by the present invention includes:

[0092] A correction module 51 is configured to obtain a spatial conversion relationship based on augmented reality; the spatial conversion relationship is used to correct the position of a camera of the augmented reality device based on a real building environment;

[0093] A measurement plane determining module 52 is configured to determine a measurement plane of a crack measurement object based on the spatial conversion relationship;

[0094] An image acquisition module 53 is configured to determine an image acquisition point based on a preset shooting distance, and acquire a crack image of the crack measurement object at the image acquisition point;

[0095] A pixel acquisition module 54 is configured to acquire a pixel coordinate system of the crack image based on a preset quantitative conversion relationship; the preset quantitative conversion relationship is a correspondence between the camera space coordinate system of the augmented reality device and the pixel coordinate system;

[0096] The calculation module 55 is configured to calculate the width of the crack based on the pixel coordinate system of the crack image.

[0097] This embodiment, through the mutual cooperation between various modules and based on the spatial conversion relationship of augmented reality technology, unifies the real earthquake-damaged building environment and the 3D virtual object in the same coordinate system, calculates the camera coordinate system that meets the measurement plane requirements, and uses the measurement plane determination module to correct the position of the camera of the augmented device to determine the measurement plane. The image acquisition module determines the image acquisition point based on the preset distance and captures the crack image. The coordinate system of the crack image is obtained based on the correspondence between the spatial coordinate system of the camera and the pixel coordinate system of the augmented reality device, and the width of the crack is calculated. Through the contactless acquisition of information on cracks in real earthquake-damaged buildings through augmented reality technology, the width of the crack is accurately calculated through the preset conversion relationship and formula, realizing the contactless and accurate calculation of building cracks, improving the safety and accuracy of building crack calculations, and expanding the application scenarios.

[0098] In a specific implementation, according to a method for calculating building crack width based on augmented reality provided by the present invention, determining the measurement plane of the crack measurement object based on the spatial conversion relationship includes:

[0099] Based on the physical world coordinate system and the virtual world coordinate system corresponding to the real building environment, a first conversion relationship is obtained; the first conversion relationship is a correspondence relationship between the physical world coordinate system and the virtual world coordinate system;

[0100] Based on the first transformation relationship, obtaining a camera space coordinate system;

[0101] Based on the camera space coordinate system, a measurement plane of the crack measurement object is determined.

[0102] According to a method for calculating building crack width based on augmented reality provided by the present invention, the method of determining an image acquisition point based on a preset shooting distance includes:

[0103] Establishing a circular area with the crack measurement object as the center and the preset shooting distance as the radius as the optional area;

[0104] The image acquisition point is selected in the optional area.

[0105] According to the method for calculating building crack width based on augmented reality provided by the present invention, the method of determining the image acquisition point based on the preset shooting distance further includes:

[0106] If no image acquisition point is selected within the optional area, the preset shooting distance is adjusted.

[0107] According to a method for calculating the width of a building crack based on augmented reality provided by the present invention, the preset quantity conversion relationship includes a second preset conversion relationship and a third preset conversion relationship; the second preset conversion relationship is a correspondence relationship between a camera space coordinate system and an image coordinate system; the third preset conversion relationship is a correspondence relationship between an image coordinate system and a pixel coordinate system;

[0108] The step of obtaining a pixel coordinate system of the crack image based on a preset quantitative conversion relationship includes:

[0109] Based on the second preset transformation relationship and the camera space coordinate system, acquiring an image coordinate system of the crack image;

[0110] Based on the image coordinate system of the crack image and the third preset conversion relationship, a pixel coordinate system of the crack image is acquired.

[0111] According to a method for calculating the width of a building crack based on augmented reality provided by the present invention, the method for calculating the width of the crack based on the pixel coordinate system of the crack image includes:

[0112] performing grayscale morphological processing on the crack image, and obtaining pixel grayscales of the crack image based on positions of pixels of the crack image in the pixel coordinate system;

[0113] The width of the crack is calculated according to a preset correspondence between the crack width and the pixel grayscale.

[0114] Figure 6 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the building crack width calculation method based on augmented reality, which includes:

[0115] Acquiring a spatial transformation relationship based on augmented reality; the spatial transformation relationship is used to correct the position of a camera of the augmented reality device based on the actual earthquake-damaged building environment;

[0116] Based on the spatial conversion relationship, determining a measurement plane of the crack measurement object;

[0117] determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point;

[0118] Based on a preset quantitative conversion relationship, a pixel coordinate system of the crack image is obtained; the preset quantitative conversion relationship is a correspondence between the camera space coordinate system of the augmented reality device and the pixel coordinate system;

[0119] The width of the crack is calculated based on the pixel coordinate system of the crack image.

[0120] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0121] In another aspect, the present invention further provides a computer program product, comprising a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the augmented reality-based building crack width calculation method provided by the above methods, the method comprising:

[0122] Acquiring a spatial transformation relationship based on augmented reality; the spatial transformation relationship is used to correct the position of a camera of the augmented reality device based on the actual earthquake-damaged building environment;

[0123] Based on the spatial conversion relationship, determining a measurement plane of the crack measurement object;

[0124] determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point;

[0125] Based on a preset quantitative conversion relationship, a pixel coordinate system of the crack image is obtained; the preset quantitative conversion relationship is a correspondence between the camera space coordinate system of the augmented reality device and the pixel coordinate system;

[0126] The width of the crack is calculated based on the pixel coordinate system of the crack image.

[0127] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for calculating building crack width based on augmented reality provided by the above methods, the method comprising: obtaining a spatial transformation relationship based on augmented reality; using the spatial transformation relationship to correct the position of a camera of an augmented reality device based on a real earthquake-damaged building environment;

[0128] Based on the spatial conversion relationship, determining a measurement plane of the crack measurement object;

[0129] determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point;

[0130] Based on a preset quantitative conversion relationship, a pixel coordinate system of the crack image is obtained; the preset quantitative conversion relationship is a correspondence between the camera space coordinate system of the augmented reality device and the pixel coordinate system;

[0131] The width of the crack is calculated based on the pixel coordinate system of the crack image.

[0132] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0133] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for calculating building crack width based on augmented reality, characterized in that: include: Obtaining spatial transformation relationships based on augmented reality; The spatial transformation relationship is used to correct the position of the camera of the augmented reality device based on the real building environment; Based on the spatial conversion relationship, determining a measurement plane of the crack measurement object; determining an image acquisition point based on a preset shooting distance, and acquiring a crack image of the crack measurement object at the image acquisition point; Based on a preset quantitative conversion relationship, obtaining a pixel coordinate system of the crack image; The preset quantity conversion relationship is the correspondence between the camera space coordinate system and the pixel coordinate system of the augmented reality device; Calculating the width of the crack based on the pixel coordinate system of the crack image; Wherein, determining the measurement plane of the crack measurement object based on the spatial conversion relationship includes: Based on the physical world coordinate system and the virtual world coordinate system corresponding to the real building environment, a first conversion relationship is obtained; the first conversion relationship is a correspondence relationship between the physical world coordinate system and the virtual world coordinate system; Based on the first transformation relationship, obtaining a camera space coordinate system; Determining a measurement plane of the crack measurement object based on the camera space coordinate system; The preset number conversion relationship includes a second preset conversion relationship and a third preset conversion relationship; the second preset conversion relationship is the correspondence relationship between the camera space coordinate system and the image coordinate system; the third preset conversion relationship is the correspondence relationship between the image coordinate system and the pixel coordinate system; The step of obtaining a pixel coordinate system of the crack image based on a preset quantitative conversion relationship includes: Based on the second preset transformation relationship and the camera space coordinate system, acquiring an image coordinate system of the crack image; Based on the image coordinate system of the crack image and the third preset conversion relationship, a pixel coordinate system of the crack image is acquired.

2. The method for calculating building crack width based on augmented reality according to claim 1, characterized in that: The determining of the image acquisition point based on the preset shooting distance includes: Establishing a circular area with the crack measurement object as the center and the preset shooting distance as the radius as the optional area; The image acquisition point is selected in the optional area.

3. The method for calculating building crack width based on augmented reality according to claim 2, characterized in that: The determining of the image acquisition point based on the preset shooting distance further includes: If no image acquisition point is selected within the optional area, the preset shooting distance is adjusted.

4. The method for calculating building crack width based on augmented reality according to claim 1, characterized in that: Calculating the width of the crack based on the pixel coordinate system of the crack image includes: performing grayscale morphological processing on the crack image, and obtaining pixel grayscales of the crack image based on positions of pixels of the crack image in the pixel coordinate system; The width of the crack is calculated according to a preset correspondence between the crack width and the pixel grayscale.

5. A building crack width calculation device based on augmented reality, characterized in that: include: A correction module, used to obtain a spatial transformation relationship based on augmented reality; The spatial transformation relationship is used to correct the position of the camera of the augmented reality device based on the real building environment; A measurement plane determination module, configured to determine a measurement plane of a crack measurement object based on the spatial conversion relationship; An image acquisition module is used to determine an image acquisition point based on a preset shooting distance, and acquire a crack image of the crack measurement object at the image acquisition point; A pixel acquisition module, configured to acquire a pixel coordinate system of the crack image based on a preset quantitative conversion relationship; The preset quantity conversion relationship is the correspondence between the camera space coordinate system and the pixel coordinate system of the augmented reality device; A calculation module, configured to calculate the width of the crack based on a pixel coordinate system of the crack image; The measurement plane determination module is specifically configured to: Based on the physical world coordinate system and the virtual world coordinate system corresponding to the real building environment, a first conversion relationship is obtained; the first conversion relationship is a correspondence relationship between the physical world coordinate system and the virtual world coordinate system; Based on the first transformation relationship, obtaining a camera space coordinate system; Determining a measurement plane of the crack measurement object based on the camera space coordinate system; The preset number conversion relationship includes a second preset conversion relationship and a third preset conversion relationship; the second preset conversion relationship is the correspondence relationship between the camera space coordinate system and the image coordinate system; the third preset conversion relationship is the correspondence relationship between the image coordinate system and the pixel coordinate system; The pixel acquisition module is specifically used for: Based on the second preset transformation relationship and the camera space coordinate system, acquiring an image coordinate system of the crack image; Based on the image coordinate system of the crack image and the third preset conversion relationship, a pixel coordinate system of the crack image is acquired.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for calculating the width of a building crack based on augmented reality as described in any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for calculating the width of a building crack based on augmented reality according to any one of claims 1 to 4 is implemented.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for calculating the width of a building crack based on augmented reality as claimed in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Gap measuring system and measuring method

    CN111486788A

  • Three-dimensional data reconstruction method and device based on multi-view imaging technology

    CN111598993A