Building inclination detection device and method based on machine vision

文档序号:114036 发布日期:2021-10-19 浏览:31次 中文

阅读说明:本技术 基于机器视觉的建筑物倾斜检测装置及方法 (Building inclination detection device and method based on machine vision ) 是由 石彦辉 智小慧 胡登乐 白晓军 韩彦军 马月辉 郭文武 于 2021-04-15 设计创作,主要内容包括:本发明提供了一种基于机器视觉的建筑物倾斜检测装置,包括检测装置,所述检测装置包括嵌入式微处理器芯片、与嵌入式微处理器芯片通信连接的显示屏、与嵌入式微处理器芯片通信连接的双轴倾角传感器以及图像采集模块;所述图像采集模块包括与嵌入式微处理器芯片通信连接的摄像头和与所述摄像头通信连接的图像存储器;所述摄像头的镜头在物理中心位置刻画有直角坐标系,所述直角坐标系具有垂直相交的U轴和V轴,所述U轴与水平面平行,V轴与重力线方向平行。该装置较少地使用人工参与测量且测量操作的流程并不复杂,同时该装置也可用于复杂地形中建筑物的测量,因而其检测的精度相对较高。此外本发明还提供了使用该装置的检测方法。(The invention provides a building inclination detection device based on machine vision, which comprises a detection device, wherein the detection device comprises an embedded microprocessor chip, a display screen in communication connection with the embedded microprocessor chip, a double-shaft inclination angle sensor in communication connection with the embedded microprocessor chip and an image acquisition module; the image acquisition module comprises a camera in communication connection with the embedded microprocessor chip and an image memory in communication connection with the camera; the camera lens of camera has the rectangular coordinate system at physics central point and puts the sculpture, rectangular coordinate system has the crossing U axle and the V axle of perpendicular, the U axle is parallel with the horizontal plane, and the V axle is parallel with the gravity line direction. The device is less involved in measurement by human, the flow of the measurement operation is not complicated, and the device can be used for measuring buildings in complex terrain, so the detection precision is relatively high. In addition, the invention also provides a detection method using the device.)

1. A building slope detection device based on machine vision is characterized in that: the device comprises a detection device (1), wherein the detection device (1) comprises an embedded microprocessor chip, a display screen in communication connection with the embedded microprocessor chip, a double-shaft tilt angle sensor in communication connection with the embedded microprocessor chip and an image acquisition module; the image acquisition module comprises a camera in communication connection with the embedded microprocessor chip and an image memory in communication connection with the camera; a rectangular coordinate system is carved on the physical center position of the lens of the camera, and the rectangular coordinate system is provided with a U axis and a V axis which are vertically intersected.

2. The machine-vision-based building tilt detection apparatus of claim 1, wherein: still include the detection device support, the detection device support includes runner assembly, support frame and stabilizer bar (3), the support frame is tripod (6), runner assembly includes upper bracket (4) and lower carriage (5), lower carriage (5) with tripod (6) fixed connection, upper bracket (4) and lower carriage (5) rotate around longitudinal axis and are connected, are balance formula structure between stabilizer bar (3) and upper bracket (4), detection device (1) still includes detection device casing and battery, embedded microprocessor chip, display screen, biax angular transducer, camera and image memory all install within the detection device casing and with the battery electricity is connected, the horizontal sliding connection of detection device casing on stabilizer bar (3).

3. The machine-vision-based building tilt detection apparatus of claim 2, wherein: the two sides of the middle part of the balancing rod (3) are provided with convex blocks (7), the upper end of the upper bracket (4) is provided with a blocking frame (8), the convex blocks (7) are positioned in the blocking frame (8), and a gap is arranged between the convex blocks (7) and the blocking frame (8).

4. The machine-vision-based building tilt detection apparatus of claim 2, wherein: the horizontal direction angle measured by the double-shaft tilt angle sensor is the angle deviation between the U shaft and the horizontal plane, and the vertical direction angle is the angle deviation between the V shaft and the gravity line.

5. A method of using the machine vision based building tilt detection apparatus of any of claims 2 to 4, comprising the steps of:

step S100: opening the tripod (6) to enable the tripod to stand stably;

step S101: the detection device (1) is arranged on the balancing rod (3), and two straight X-axis and Y-axis transmitted by the double-axis tilt sensor module appear in the center of the display screen; the X axis is in the horizontal direction, and the Y axis is in the vertical direction;

step S102: longitudinally rotating the upper bracket (4) to enable the camera to be generally aligned with the object to be measured;

step S103: transversely moving the detection device (1) on the balancing rod (3) to level, and observing the contact ratio of a U shaft and an X shaft and the contact ratio of a Y shaft and a V shaft on the display screen, so that the included angle between the U shaft and the X shaft of the display screen in the horizontal direction is 0-0.1 degrees, and the included angle between the V shaft and the Y shaft of the display screen in the vertical direction is 0-0.1 degrees;

step S104: observing a camera picture captured by the display screen in real time, and adjusting the position and the focal length of the camera to ensure that the origin of the rectangular coordinate system on the display screen is superposed with the edge of the measured building;

step S105: the embedded microprocessor chip drives the camera to acquire images, and the images acquired by photographing are displayed on the display screen;

step S106: the embedded microprocessor chip carries out image preprocessing on the acquired image, and an U, V axis of a rectangular coordinate system acquired by an image straight line extraction algorithm and an edge straight line of a measured building are displayed on a display screen;

step S107: marking a point A on the extracted edge straight line of the measured building on the display screen, making a straight line parallel to the U axis of the rectangular coordinate system through the point A and intersecting with the V axis at a point B, and respectively obtaining coordinates (Uo, Vo), (Ua, Va), (Ub, Vb) of the three points of the rectangular coordinate system origin O, A, B on the rectangular coordinate system;

step S108: the embedded microprocessor chip calculates, and the included angle alpha between the edge straight line of the measured building and the V axis of the rectangular coordinate system on the camera is displayed and calculated on the display screen,

α=arctan[(Ua-Ub)/(Vb-Vo)]。

Technical Field

The invention relates to the technical field of building measurement, in particular to a building inclination detection device and method based on machine vision.

Background

With the rapid development of cities, various large buildings are emerging continuously. The building may be inclined due to uneven settlement of the foundation or the long-term influence of natural external force. When the inclination reaches a certain degree, the structural quality of the building and the safety of the surrounding environment are affected. Therefore, the inclination of the building needs to be detected, so that hidden dangers can be found in time, and larger accidents can be avoided.

Currently, theodolite, plumb observation methods and the like are generally adopted for measuring the inclination of the building. Plumb bob methods are simple to operate, but are difficult to measure for buildings in complex terrain. The theodolite measurement process is easily influenced by external electromagnetic waves and light, has high requirements on storage conditions and is easily influenced by human factors to generate large errors.

Methods have thus been developed for detecting building tilt using machine vision. However, the technology of detecting the inclination of the building by using the vision technology in China is rare at present, and the Chinese patent 'a house inclination detection method based on the image recognition technology' (patent number: 201711139479.7) proposes that whether the house is inclined or not is judged by using the digital image recognition technology. However, in the method, N waterproof marks need to be pasted on the outer wall of the tested house in advance, and the inclination of the building is judged by acquiring the displacement change of the artificial marks at different moments through the camera mounted on the unmanned aerial vehicle. The method has a long detection period and high operation requirements on the unmanned aerial vehicle.

Disclosure of Invention

The invention aims to solve the technical problem of providing a building inclination detection device and method based on machine vision so as to solve the problems of low detection precision and complicated measurement method of the existing measurement method.

In order to solve the technical problems, the technical scheme of the invention is as follows:

a building inclination detection device based on machine vision comprises a detection device, wherein the detection device comprises an embedded microprocessor chip, a display screen in communication connection with the embedded microprocessor chip, a double-shaft inclination angle sensor in communication connection with the embedded microprocessor chip and an image acquisition module; the image acquisition module comprises a camera in communication connection with the embedded microprocessor chip and an image memory in communication connection with the camera; a rectangular coordinate system is carved on the physical center position of the lens of the camera, and the rectangular coordinate system is provided with a U axis and a V axis which are vertically intersected.

Further: still include the detection device support, the detection device support includes runner assembly, support frame and stabilizer bar, the support frame is the tripod, runner assembly includes upper bracket and lower carriage, the lower carriage with tripod fixed connection, upper bracket and lower carriage are connected around longitudinal axis rotation, are balance formula structure between stabilizer bar and the upper bracket, detection device still includes detection device casing and battery, embedded microprocessor chip, display screen, biax inclination sensor, camera and image memory are all installed within the detection device casing and with the battery electricity is connected, lateral sliding connects on the stabilizer bar of detection device casing.

Further: the two sides of the middle part of the balancing pole are provided with convex blocks, the upper end of the upper bracket is provided with a blocking frame, the convex blocks are positioned in the blocking frame, and a space is arranged between the convex blocks and the blocking frame.

Further: the horizontal direction angle measured by the double-shaft tilt angle sensor is the angle deviation between the U shaft and the horizontal plane, and the vertical direction angle is the angle deviation between the V shaft and the gravity line.

A method of using the aforementioned machine vision-based building tilt detection apparatus, comprising the steps of:

step S100: opening the tripod to enable the tripod to stand stably;

step S101: installing a detection device on a balancing pole, wherein two straight X-axis and two straight Y-axis transmitted by a double-axis tilt angle sensor module appear in the center of a display screen; the X axis is in the horizontal direction, and the Y axis is in the vertical direction;

step S102: longitudinally rotating the upper bracket to enable the camera to be generally aligned with the object to be measured;

step S103: transversely moving the detection device 1 on the balancing rod 3 to level, and observing the contact ratio of a U shaft and an X shaft and the contact ratio of a Y shaft and a V shaft on the display screen, so that the included angle between the U shaft and the X shaft of the display screen in the horizontal direction is 0-0.1 degrees, and the included angle between the V shaft and the Y shaft of the display screen in the vertical direction is 0-0.1 degrees;

step S104: observing a camera picture captured by the display screen in real time, and adjusting the position and the focal length of the camera to ensure that the origin of the rectangular coordinate system on the display screen is superposed with the edge of the measured building;

step S105: the embedded microprocessor chip drives the camera to acquire images, and the images acquired by photographing are displayed on the display screen;

step S106: the embedded microprocessor chip carries out image preprocessing on the acquired image, and an U, V axis of a rectangular coordinate system acquired by an image straight line extraction algorithm and an edge straight line of a measured building are displayed on a display screen;

step S107: marking a point A on the extracted edge straight line of the measured building on the display screen, making a straight line parallel to the U axis of the rectangular coordinate system through the point A and intersecting with the V axis at a point B, and respectively obtaining coordinates (Uo, Vo), (Ua, Va), (Ub, Vb) of the three points of the rectangular coordinate system origin O, A, B on the rectangular coordinate system;

step S108: the embedded microprocessor chip calculates, and the included angle alpha between the edge straight line of the measured building and the V axis of the rectangular coordinate system on the camera is displayed and calculated on the display screen,

α=arctan[(Ua-Ub)/(Vb-Vo)]。

by adopting the technical scheme, the invention has the technical effect of providing the building inclination detection device based on the machine vision and the use method thereof, the device takes less manual participation in measurement, the flow of the measurement operation is not complicated, and meanwhile, the device can also be used for measuring buildings in complicated terrains, so the detection precision is relatively high.

Drawings

FIG. 1 is a schematic structural diagram of a machine vision based building tilt detection apparatus of the present invention;

FIG. 2 is a schematic view showing a connection structure of a stabilizer bar and an upper bracket according to the present invention;

FIG. 3 is a schematic diagram of a building tilt measurement method of the present invention;

FIG. 4 is a block diagram of the components of the machine vision based building tilt detection apparatus of the present invention;

the device comprises a detection device 1, a balance rod 3, an upper support 4, a lower support 5, a tripod 6, a bump 7 and a baffle frame 8.

Detailed Description

It should be noted that, in the following discussion, orientation words such as "up, down, left, right, transverse, longitudinal" and the like indicate orientation or positional relationships based on the coordinate system shown in fig. 1 unless otherwise specified. And fig. 1 not only reflects the basic shape and structure of the device, but also represents the usage state of the device in a general usage scene, for example, "transverse" refers to a direction parallel to the length direction of the device, and corresponds to a direction parallel to the ground in a general usage operation.

As shown in fig. 1 and 4, the invention comprises a detection device and a detection device bracket, wherein the balance bar of the detection device bracket is provided with the detection device for photographing and collecting. The detection device slides transversely on the balancing pole (namely, in the left-right direction of figure 1), and the surface of the detection device contacted with the balancing pole is flat and smooth. The detection device of the embodiment is powered by a 5V battery, and is charged through a USB serial port line; the detection device adopts an STM32F103 main control chip development board (also called an embedded microprocessor chip development board because the detection device is provided with an embedded microprocessor chip with a model STM32F 103), a double-shaft tilt angle sensor module adopts a double-shaft tilt angle sensor with a model SCA60C, and a camera module adopts a camera with a model SUA 630C-T; the double-shaft sensor module and the camera module can be directly connected with an I/O port of an STM32F103 main control chip development board with an FSMC driving TFT display screen. A rectangular coordinate system is carved in the physical center position of a lens of the camera in advance, the rectangular coordinate system is provided with a U shaft and a V shaft which are vertically crossed, the U shaft is parallel to the horizontal plane, and the V shaft is horizontal to the direction of the gravity line.

The embedded microprocessor chip development board, the display screen, the dual-axis tilt sensor, the camera and other components are all fixed on the detection device shell, so that the detection device 1 becomes an independent component which is separable relative to the detection device bracket.

In addition, the embedded microprocessor chip development board can also adopt a 52-chip microcomputer to manufacture a detection device; the camera with the physical-drawing rectangular coordinate system is vertically inserted on an STM32F103 main control chip development board (debugging and vertical installation before leaving factory), the double-shaft tilt sensor is horizontally installed on the STM32F103 main control chip development board with an FSMC drive TFT display screen (the installation surface of the double-shaft tilt sensor is parallel to the surface of the detection device 1 contacted with the balancing rod 3, namely the horizontal direction angle measured by the double-shaft tilt sensor is the angle deviation between the U axis of the detection device camera coordinate and the horizontal plane, and the vertical direction angle is the angle deviation between the V axis of the detection device camera coordinate and the gravity line).

The embodiment also adopts a camera with a FIFO memory.

The process of storing and reading image data by the FIFO memory is as follows:

storage (camera module writes data into FIFO): and waiting for the camera synchronization signal- > FIFO write pointer reset- > FIFO write enable- > waiting for the second synchronization signal- > FIFO write disable, and completing the storage of one frame of image through the above 5 steps.

Read (MCU reads data from FIFO): FIFO read pointer reset- > read the first pixel high byte- > read the FIFO read clock (FIFO RCLK) - > read the first pixel low byte- > read the FIFO read clock (FIFO RCLK) - > read the second pixel high byte- > read the remaining pixels-end cyclically.

In addition, the double-shaft tilt sensor module is provided with cautions, the tilt sensor can be internally provided with zero adjustment, a zero button is used for realizing a zero clearing function before installation and measurement, the angle reading is convenient, and unnecessary errors are reduced. Meanwhile, the device is horizontally installed during installation, the installation surface of the double-shaft sensor module is kept parallel to a measured object (a rectangular coordinate system U shaft depicted by a camera of the detection device 1), and the influence of dynamic and acceleration is reduced.

The mounting surface of the double-shaft tilt angle sensor is parallel to the surface of the detection device 1 contacted with the balancing rod 3; the camera with the rectangular coordinate system of the physical depiction is vertically inserted on the development board of the STM32F103 main control chip (the U shaft on the rectangular coordinate system of the camera depiction is kept horizontal with the whole detection device 1 before leaving factory, the V shaft on the rectangular coordinate system of the camera depiction is kept parallel with the gravity line of the detection device 1, because the surface of the detection device 1 contacted with the balancing pole 3 is smooth and flat, so that the measurement of the double-shaft tilt angle sensor is the relationship between the included angle of the U shaft on the rectangular coordinate system of the camera depiction and the horizontal plane and the relationship between the V shaft on the rectangular coordinate system of the camera depiction and the included angle of the vertical surface of the gravity line of the detection device 1).

The image acquisition module is provided with a microprocessor, integrates an active crystal oscillator, does not need an external clock, supports focusing, image compression and image quality control (color saturation and hue adjustment), can output JPEG image data, and has the advantages of edge enhancement automatic adjustment, high sensitivity, low crosstalk and low noise.

The lens of the invention adopts a physical method to carve a rectangular coordinate system. The physical depicting method is a method that a camera takes a picture and collects an image, and the image is digitized on a display screen imaging display image of the detection device 1 to show a rectangular coordinate, namely, the rectangular coordinate is directly displayed on a physical imaging, and the method is similar to a reticle in a sighting device. Therefore, the manufacturing method can also adopt the existing manufacturing technology of the reticle, and the following only shows an exemplary manufacturing method:

the method comprises the following steps: drawing a drawing file of a computer CAD rectangular coordinate system;

step two: preparing a mother board substrate to align to the geometric center of a template under a microscope system;

step three: opening a laser drawing instrument, inputting a CAD drawing file, setting parameters such as angle and speed, and starting a plate making program to draw a pattern;

step four: manufacturing a photosensitive resist, coating the photosensitive resist on the surface of the glass part, and baking the glass part;

step five: dynamically exposing and processing the optical part of the reticle to ensure that the optical part is precisely compounded with the motherboard and is placed into an exposure machine for exposure;

step six: and (3) putting the optical part into a developing solution, coloring, cleaning, and polishing to manufacture the lens with the rectangular coordinate system.

The rectangular coordinate system manufactured by the method needs to have a U axis and a V axis which are vertically intersected.

The rectangular coordinate system carved by the physical method is beneficial to the adjustment of the equipment when leaving the factory, the rectangular coordinate system which exists physically is convenient for the direct adjustment between the rectangular coordinate system and other devices such as the balance bar 3, and the condition that other digital equipment is required to be added for complex adjustment by a digital generation method is avoided. And a rectangular coordinate system is carved by adopting a physical method, so that the relative detection precision is higher, and the atmospheric refraction deviation between a lens and a CCD imaging element is avoided.

In addition, the support of the detection device comprises a rotating assembly, a support frame and a balance rod, the support frame of the embodiment adopts a tripod 6, the rotating assembly comprises an upper support 4 and a lower support 5, the lower end of the lower support 5 is connected with the tripod 6, and the upper end of the upper support 4 is provided with the balance rod 3; and the upper bracket 4 and the lower bracket 5 are rotatably connected and rotatable about a longitudinal axis (i.e., the vertical axis of fig. 1) so as to adjust the rotation of the detecting device 1 in the left-right direction during operation, so that the detecting device 1 can be more easily aligned with the building to be detected.

The concrete connection structure between the balance bar 3 and the upper bracket 4 is shown in fig. 2: the upper surface and the lower surface of the balancing rod 3 are planes, the upper surface and the lower surface of the balancing rod are parallel to each other, a balance structure is formed between the balancing rod 3 and the upper bracket 4, the balancing rod can be kept horizontal by using a gravity balancing method, and the measurement precision of the equipment is improved. Considering that many factors affecting the weight distribution of the balance bar, such as the change of the shape of the balance bar 3 caused by machining errors and the attachment of dirt during use, may cause the change of the weight distribution of balance bar assemblies of different batches during forming, assembly and use, if the connection positions of the balance bar 3 with the upper bracket 4 and the detection device 1 are fixed, it is difficult to ensure the balance of the balance structure, so the present embodiment slidably connects the camera and the dual-axis tilt sensor in the detection device 1 with the balance bar 3 to realize the final balance. In addition, the detection device 1 can also transmit images to an image display and image processing device such as an external computer in a wired transmission mode, and the influence of the cable on the weight distribution of the balance bar assembly can be eliminated by adjusting the position of the detection device 1 on the balance bar 3 to achieve balance when in use. However, the detection device 1 of the present embodiment preferably integrates an independent component including a display screen and a battery, and therefore, an additional cable is not provided to connect an external display device, after all, the additional cable with an indefinite length and easy swinging may adversely affect the leveling of the balancing pole 3, and the independent and complete detection device 1 is fixed by its own weight, so that it is easy to operate in the leveling process, and can relatively quickly complete the leveling work, thereby improving the work efficiency.

It should be noted that when the balance of the balance bar 3 is adjusted, a slip phenomenon should be noticed, since the balance bar 3 is of a balance type structure, there is a possibility that the balance bar 3 may fall down to the ground to cause damage to the detection device, and in order to prevent the balance bar from falling down to the ground, the present device is provided with the protruding blocks 7 on both sides of the balance bar 3, and the upper portion of the upper bracket 4 is fixedly connected with the blocking frames 8, and the protruding blocks 7 are located in the blocking frames 8. Because a certain space is arranged between the blocking frame 8 and the lug 7, although the balance bar 3 has different weight distribution among manufacturing batches, the center of gravity of the balance bar 3 can not be greatly deviated, the matching between the blocking frame 8 and the lug 7 can meet the left-right horizontal movement adjustment of the balance bar 3, the excessive movement range of the balance bar 3 is limited, the risk of falling to the ground when the balance bar 3 slides down is eliminated, and the safety of the equipment is ensured. In addition, as shown in fig. 2, if the stabilizer bar 3 is tilted once, the maximum tilt angle is until the edge of the upper surface of the upper bracket 4 is contacted, so that the large tilt and overturn of the stabilizer bar 3 are avoided, on one hand, the occurrence of overturning type sliding is prevented, and on the other hand, the situation that the rapidly-overturned end of the stabilizer bar 3 may slap against the operator when the stabilizer bar 3 overturns is prevented.

The device comprises the following use steps:

1): opening the tripod 6 to make it stand stably;

2): fixing the detection device 1 on the balance bar 3, opening a switch button of the detection device 1, and enabling two straight lines, namely an X axis (horizontal direction) and a Y axis (vertical direction), transmitted by the double-axis tilt angle sensor module to appear at the central position on the display screen;

3): longitudinally rotating the upper bracket 4 to enable the camera to be generally aligned with the object to be measured;

4): because the aforesaid straight line X axle is the horizontal direction all the time, the Y axle is the vertical direction all the time, and detection device 1 probably still has the gradient at present, so lateral shifting detection device 1 is with the leveling on balancing pole 3, whether U axle and X axle coincide on observing detection device 1 display screen, whether Y axle and V axle coincide, if the display screen appears the contained angle between horizontal direction U axle and the X axle about 0 ~ 0.1 degree (data have some influence of beating), and the display screen appears the contained angle between vertical direction V axle and the Y axle about 0 ~ 0.1 degree. The U axis drawn by the camera on the detection device 1 can be judged to be kept horizontal with the horizontal plane, and the V axis is kept horizontal with the gravity line direction;

5): observing a camera picture captured by the TFT display screen in real time, and adjusting the position and the focal length of a camera module of the detection device 1 to ensure that the origin (intersection point of a U axis and a V axis) of a rectangular coordinate system of the camera for observing physical description on the display screen of the detection device 1 is superposed with the edge of the building to be detected;

6): pressing a photographing button on the detection device 1, driving a camera module to acquire images by an embedded microprocessor chip development board, and displaying the acquired images on a display screen;

7): the embedded microprocessor chip development board carries out image preprocessing on the acquired image, and U, V axes of a rectangular coordinate system obtained by an image straight line extraction algorithm and edge straight lines of a measured building are displayed on a display screen;

8): as shown in fig. 3, the display screen of the detection device 1 marks a point a on the extracted edge straight line of the building to be detected, a straight line parallel to the U axis of the rectangular coordinate system is made through the point a and intersects the V axis at a point B, and the display screen of the detection device 1 obtains coordinates (Uo, Vo), (Ua, Va), (Ub, Vb) of the three points of the rectangular coordinate system origin O, A, B in the rectangular coordinate system respectively;

9): the display screen of the detection device 1 automatically presents and calculates the included angle alpha between the acquired edge straight line of the detected building and the V axis of the rectangular coordinate system of the camera,

α=arctan[(Ua-Ub)/(Vb-Vo)]。

10): the control key of the detection device 1 is pressed to automatically store the previous picture on the SD card, if the picture needs to be repeatedly taken, the picture taking switch key is pressed.

11): pressing a return menu key on the detection device 1, waiting for the next operation, or pressing other control keys to turn through the picture.

12): the SD card is inserted into a computer through the adapter, and all photos can be acquired for backup after finding the picture folder.

It should be noted that the image straight line extraction algorithm of the above step 7 may adopt a straight line extraction algorithm in the prior art in the field of machine vision, for example, a Hough transform (Hough transform) algorithm which is widely used at present may be adopted.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种工程用全方位倾斜仪

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!