Angle measurement device and method for building bridge construction

By correcting the light impact of the bridge image and identifying marker characteristics, the problem that traditional measurement methods cannot accurately measure the construction angle of building bridges is solved, and accurate angle measurement under the influence of light is achieved.

CN119379797BActive Publication Date: 2025-03-04DALIAN MUZE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411942745.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-04
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Traditional measurement methods cannot accurately measure the angle of building bridge construction, and the specific location of the marker cannot be identified due to light.

Method used

By correcting the bridge image, the light direction is obtained and the degree of influence of the pixel points being illuminated is evaluated, the grayscale value of the pixel points is corrected, and the corrected bridge image is obtained. Then, the image is divided into windows to identify the marker characteristics in the window, and accurately identify the marker.

Benefits of technology

It realizes accurate identification of markers in bridge images under the influence of light, thereby accurately measuring the angle of building bridge construction, solving the accuracy problem of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379797B_ABST
    Figure CN119379797B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and specifically to an angle measurement device and method for building bridge construction, including: collecting bridge images; dividing the bridge images into several areas; correcting each pixel according to the grayscale performance of the pixel points in each area, and obtaining the corrected grayscale value of each pixel point; dividing the bridge image into several windows and dividing the window into several sub-areas according to the edges in the window; obtaining the marker features of the window according to the edges in the window and the differences between adjacent sub-areas in the window; and identifying the markers in the bridge image according to the marker features of the window. The present invention corrects and enhances the bridge image by analyzing the influence of light in the process of collecting the bridge image, and further combines the morphological characteristics of the markers to accurately identify the markers in the bridge image and accurately measure the angle of the building bridge construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an angle measuring device and method for building bridge construction. Background Art

[0002] The stability and bearing capacity of the bridge structure are closely related to the angle of the bridge. If the angle measured during the construction of the bridge is inaccurate, it will cause uneven force on the bridge itself, which will lead to safety hazards. Therefore, it is necessary to accurately measure the angle during the construction of the bridge. However, the traditional measurement of the angle of the bridge construction will be affected by light, resulting in the traditional measurement method being unable to accurately identify the specific position of the marker, and thus unable to accurately measure the angle of the bridge construction. Summary of the invention

[0003] The invention provides an angle measuring device and method for building bridge construction, so as to solve the existing problem that the traditional measuring method cannot measure the angle of building bridge construction.

[0004] The angle measuring device and method for building bridge construction of the present invention adopts the following technical scheme:

[0005] An embodiment of the present invention provides a method for measuring angles in bridge construction, the method comprising the following steps:

[0006] Collect bridge images;

[0007] The bridge image is divided into several areas; according to the grayscale performance of the pixel points in each area, the reference area is obtained, and the light direction is obtained in combination with the grayscale changes of each area in the bridge image in each direction; according to the position of each pixel point in the bridge image and the light direction, the degree of influence of each pixel point on the light is obtained; according to the degree of influence of each pixel point on the light, each pixel point is corrected, and the grayscale value of each pixel point after correction is obtained to obtain the corrected bridge image;

[0008] The corrected bridge image is divided into several windows, and the windows are divided into several sub-regions according to the edges in the windows; the edges of the sub-regions are divided into several edge segments, and the smoothness of the edge segments is obtained; according to the smoothness of the edge segments in the windows and the differences between adjacent sub-regions in the windows, the landmark features of the windows are obtained;

[0009] According to the landmark features possessed by the window, the landmarks in the corrected bridge image are identified.

[0010] Preferably, the obtaining of the light direction includes the following specific methods:

[0011] Preset a number of rays ; Take the horizontal right direction as 0°, The direction is taken as the first ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the first ray; The direction is taken as the second ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the second ray;

[0012] And so on, until Direction as the first The ray direction is based on the center of the reference area as the ray center, and a ray is recorded as the first ray;

[0013] All regions passed by any ray are sorted according to the extension direction of the ray to obtain a region sequence passed by the ray, recorded as the region sequence of the ray, and the possibility that the ray direction of the ray is the light direction is obtained according to the grayscale mean of each region in the region sequence of the ray;

[0014] The ray direction with the greatest possibility is taken as the propagation direction of the illumination; and the region sequence of the ray corresponding to the propagation direction of the illumination is recorded as the illumination propagation region sequence.

[0015] Preferably, the possibility of obtaining the ray direction of the ray as the light direction includes a specific calculation formula as follows:

[0016]

[0017] In the formula, represents the possibility that the ray direction of the ray is the light direction; The number of regions in the region sequence representing the ray; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; Represents the sign function.

[0018] Preferably, the obtaining of the degree to which each pixel is affected by light includes the following specific methods:

[0019] The mean grayscale value of all pixels in any area in the illumination propagation area sequence is taken as the overall grayscale of the area; for any pixel in the bridge image, the illumination offset direction of the pixel is obtained from the pixel to the center point of the reference area, and the angle between the illumination offset direction of the pixel and the illumination propagation direction is obtained. The degree of influence of the illumination on the pixel is obtained by combining the distance between the pixel and the reference area and the overall grayscale of each area in the illumination propagation area sequence. The specific calculation formula is:

[0020]

[0021] In the formula, Indicates the degree to which the pixel is affected by light; Represents the angle between the illumination offset direction of the pixel and the illumination propagation direction; represents the distance between the pixel point and the reference area; Indicates the first The overall grayscale of a region; Indicates the number of regions in the sequence of light propagation regions; Represents the sigmoid function.

[0022] Preferably, the obtaining of the corrected grayscale value of each pixel includes the following specific methods:

[0023] For any pixel, the gray value of the pixel is corrected according to the degree to which the pixel is affected by light. The specific calculation formula is:

[0024]

[0025] In the formula, represents the gray value of the pixel after correction; Represents the gray value of the pixel; Indicates the degree to which the pixel is affected by light.

[0026] Preferably, the method of dividing the corrected bridge image into a plurality of windows and dividing the window into a plurality of sub-regions according to the edges in the window includes:

[0027] Obtain the specifications of the landmark in the image, construct a sliding window with the same specifications as the landmark in the image, and use the sliding window to traverse the corrected bridge image to obtain a number of windows;

[0028] For any window, an edge detection algorithm is used to obtain the edge in the window; and the window is divided into a plurality of sub-areas according to the edge in the window.

[0029] Preferably, the step of dividing the edge of the sub-region into a plurality of edge segments and obtaining the flatness of the edge segments comprises the following specific methods:

[0030] For any sub-region, corner point detection is performed on the sub-region to obtain a number of corner points of the sub-region; the number of corner points of the sub-region are used as segmentation points of the edge of the sub-region to obtain a number of edge segments of the sub-region;

[0031] For any edge segment, use the least square method to perform straight line fitting on the edge segment to obtain a fitting result of the edge segment, and obtain a root mean square error between the edge segment and the fitting result of the edge segment;

[0032] Taking the horizontal right direction as the 0° direction and the 45° direction as the maximum deviation direction, obtaining the angle between the fitting result of the edge segment and the maximum deviation direction;

[0033] The ratio of the angle between the fitting result of the edge segment and the maximum deviation direction to the root mean square error between the edge segment and the fitting result of the edge segment is normalized, and the normalized result is used as the flatness of the edge segment.

[0034] Preferably, the marker characteristics possessed by the acquisition window include the following specific methods:

[0035] Preset a flatness threshold For any edge segment in the window, if the flatness of the edge segment is greater than , then the edge segment is a flat edge segment; obtain all the flat edge segments in the window; for any sub-region in any window, record the sub-region in the window that has a common edge with the sub-region as an adjacent sub-region of the sub-region;

[0036] Obtain the flat edge segment in the window, and according to the proportion of the flat edge segment in the window to the edge in the window, combined with the grayscale difference between each sub-region and the adjacent sub-region of each sub-region in the window, obtain the marker feature of the window, and the specific calculation formula is:

[0037]

[0038] In the formula, Indicates the landmark features possessed by the window; Indicates the number of pixels on the flat edge segment in the window; Represents the number of pixels on the edge of the window; represents the number of sub-regions in the window; Indicates the first The grayscale mean of each sub-region; Indicates the first The sub-region The grayscale mean of adjacent sub-regions; Indicates the window The number of adjacent sub-regions of a sub-region; Represents the absolute value function.

[0039] Preferably, the identifying of the landmark in the corrected bridge image includes the following specific methods:

[0040] For any window in the corrected bridge image, the grayscale value of each pixel of the marker in the bridge image is obtained, recorded as the grayscale value of each pixel in the marker image, and the possibility of the window being a marker is obtained by combining the grayscale value of each pixel in the window with the marker feature of the window. The specific calculation formula is:

[0041]

[0042] In the formula, Indicates the possibility that the window is a landmark; Indicates the landmark features possessed by the window; Represents the number of pixels in the window; Indicates the first The gray value of each pixel; Indicates the first The gray value of each pixel; It represents the absolute value function; Represents the sigmoid function;

[0043] Get the probability of all windows being landmarks, and select the one with the highest probability of being a landmark A window is used as the location of the landmark in the corrected bridge image. is the preset number of markers.

[0044] The present invention also proposes an angle measurement device for building bridge construction, including an angle measurement device body for building bridge construction, an image acquisition module, an image correction module, a marker recognition module, and an angle measurement module:

[0045] The image acquisition module is used to acquire bridge images;

[0046] The image correction module is used to divide the bridge image into several areas; obtain the reference area according to the grayscale performance of the pixel points in each area, and obtain the light direction in combination with the grayscale changes of each area in the bridge image in each direction; obtain the degree of influence of each pixel point on the light according to the position of each pixel point in the bridge image and the light direction; correct each pixel point according to the degree of influence of each pixel point on the light, obtain the grayscale value of each pixel point after correction, and obtain the corrected bridge image;

[0047] The landmark recognition module is used to divide the corrected bridge image into a number of windows, divide the window into a number of sub-regions according to the edge in the window; divide the edge of the sub-region into a number of edge segments, and obtain the smoothness of the edge segment; according to the smoothness of the edge segment in the window, combined with the difference between adjacent sub-regions in the window, obtain the landmark features of the window;

[0048] The angle measurement module is used to identify the marker in the corrected bridge image according to the marker features possessed by the window.

[0049] The beneficial effects of the technical solution of the present invention are as follows: since the bridge image is affected by the light, the specific position of the marker cannot be accurately identified subsequently, and thus the angle of the construction of the building bridge cannot be accurately measured; therefore, the influence of the light needs to be weakened first, and the present invention divides the bridge image into several areas; obtains the direction of the light according to the grayscale changes of each area in the bridge image in each direction, and since the influence of the light on the bridge is directional, in order to better evaluate the degree to which the pixel points in the bridge image are affected by the light, it is also necessary to obtain the direction of the light; obtains the degree to which each pixel point is affected by the light according to the position of each pixel point in the bridge image and the direction of the light; corrects each pixel point according to the degree to which each pixel point is affected by the light, obtains the corrected grayscale value of each pixel point, and obtains the corrected bridge image; divides the bridge image into several windows and divides the window into several sub-areas according to the edges in the window; obtains the marker features of the window according to the edges in the window and the differences between adjacent sub-areas in the window; accurately identifies the markers in the bridge image according to the marker features of the window, thereby accurately measuring the angle of the construction of the building bridge. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flow chart of the steps of a method for measuring angles in bridge construction according to the present invention;

[0052] Figure 2 Schematic diagram of collecting bridge images. DETAILED DESCRIPTION

[0053] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the angle measurement device and method for building bridge construction proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0054] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0055] The specific scheme of the angle measuring device and method for building bridge construction provided by the present invention is described in detail below with reference to the accompanying drawings.

[0056] See also Figure 1 , which shows a flowchart of a method for measuring angles in bridge construction provided by an embodiment of the present invention, the method comprising the following steps:

[0057] Step S001: Acquire bridge images.

[0058] It should be noted that the traditional process of measuring the angle of construction of a bridge through Digital Image Correlation technology is to stick or spray markers at key positions of the bridge as feature tracking marks, capture the bridge image through a camera, and measure the angle of construction of the bridge based on the markers in the bridge image. However, due to the influence of light when capturing the bridge image, the traditional Digital Image Correlation technology cannot accurately identify the specific position of the marker, and thus cannot accurately measure the angle of construction of the bridge. Therefore, this embodiment proposes a method for measuring the angle of construction of a bridge, by correcting the bridge image and combining the similarity between the pixel points at each position in the bridge image and the marker, so as to accurately identify the marker in the bridge image, thereby achieving the purpose of accurately measuring the angle of construction of the bridge.

[0059] Specifically, paste it at the preset position of the bridge. markers, the is the preset number of markers, The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. At the same time, a camera is placed at a preset camera position to collect bridge images; the preset position of the bridge and the camera position can be set according to the actual situation, and this embodiment does not make a rigid requirement; Figure 2 As shown, Figure 2 Schematic diagram of collecting bridge images.

[0060] It should be noted that the marker is a QR code. Due to the modular design of the QR code, the QR code has a clear black and white contrast feature, which is conducive to identifying the marker. The QR code pattern has richer high-frequency texture, which can provide sufficient matching feature points for the Digital Image Correlation technology, thereby improving the resolution and accuracy of the measurement area.

[0061] At this point, the bridge image is obtained.

[0062] Step S002: Divide the bridge image into several areas; obtain the reference area according to the grayscale performance of the pixels in each area, and obtain the light direction in combination with the grayscale changes of each area in the bridge image in each direction; obtain the degree to which each pixel is affected by the light according to the position of each pixel in the bridge image and the light direction; correct each pixel according to the degree to which each pixel is affected by the light, obtain the corrected grayscale value of each pixel, and obtain the corrected bridge image.

[0063] It should be noted that, since the collected bridge image is affected by the illumination, the specific position of the marker cannot be accurately identified in the future, and thus the angle of the construction of the bridge cannot be accurately measured; therefore, the influence of illumination needs to be weakened first to accurately identify the position of the marker; because in the construction environment of the bridge, the grayscale values ​​of each position are similar, but the position affected by the stronger illumination under the influence of illumination has a higher grayscale value, so the position with the largest grayscale value can be regarded as the position closest to the light source; but since the grayscale value of a pixel can only represent the grayscale value of the pixel, and the influence of illumination is an influence in a large range of the bridge, it is necessary to first divide the bridge image into regions, and the grayscale mean in each region represents the degree of illumination influence of the region; then the region with the strongest illumination influence is obtained, that is, the region closest to the light source. The closer the distance between the pixel in the bridge image and the region closest to the light source, the stronger the influence of illumination on the pixel in the bridge image, and the more the pixel in the bridge image should be corrected.

[0064] Specifically, preset a area, the is the preset area side length, The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. The bridge image is divided into several regions, and several regions are obtained. It is particularly noted that if the region exceeds the image boundary range, the region is filled with pixels through quadratic linear interpolation to obtain the grayscale mean of each region, and the region with the largest grayscale mean is recorded as the reference region.

[0065] It should be further explained that the stronger the light influence on the area, the larger the grayscale mean of the area. Therefore, the reference area is the area most affected by the light. The influence of light on the bridge is directional. In order to better evaluate the degree to which the pixels in the bridge image are affected by light, it is also necessary to obtain the direction of the light.

[0066] Preset a number of rays , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. Describe; take the horizontal right direction as 0° direction, The direction is taken as the first ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the first ray; The direction is taken as the second ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the second ray;

[0067] And so on, until Direction as the first The ray direction is based on the center of the reference area as the ray center, and a ray is recorded as the first ray;

[0068] All the areas passed by any ray are sorted according to the extension direction of the ray to obtain the area sequence passed by the ray, which is recorded as the area sequence of the ray. According to the grayscale mean of each area in the area sequence of the ray, the possibility that the ray direction of the ray is the light direction is obtained. The specific calculation formula is:

[0069]

[0070] In the formula, represents the possibility that the ray direction of the ray is the light direction; The number of regions in the region sequence representing the ray; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; Represents the sign function.

[0071] It should be noted that since the grayscale values ​​of the pixels in the bridge image are affected by the light, they will gradually decrease with the direction of the light. Therefore, the direction of the light can be obtained based on the grayscale change characteristics in each direction. It indicates the consistency of grayscale decrease in the direction of the ray. When the grayscale in this direction continues to decrease, The larger the value of is, the more likely the ray direction is the light direction; It indicates the regularity of grayscale change in this direction; since the grayscale gradually decreases with the direction of light, that is, its change amplitude has a certain regularity, The larger the value of is, the more likely the ray direction is the light direction. The larger the value of , the more likely the ray direction is the light direction.

[0072] Furthermore, the possibility that all ray directions are light directions is obtained, and the ray direction with the greatest possibility is used as the propagation direction of the illumination; and the region sequence corresponding to the ray in the propagation direction of the illumination is recorded as the illumination propagation region sequence.

[0073] It should be noted that the closer the distance between the pixel point in the bridge image and the reference area, the closer the distance between the pixel point and the light source, that is, the more seriously the pixel point is affected by the light. At the same time, the greater the angle between the direction from the light source to the pixel point and the direction of light propagation, the greater the light loss. Therefore, the degree of influence of the pixel point by the light can be obtained.

[0074] Preferably, in a specific embodiment of the present invention, the grayscale value average of all pixels in any area in the illumination propagation area sequence is used as the overall grayscale of the area; for any pixel in the bridge image, the illumination offset direction of the pixel is obtained from the center point of the reference area pointed by the pixel, and the angle between the illumination offset direction of the pixel and the illumination propagation direction is obtained. The distance between the pixel and the reference area and the overall grayscale of each area in the illumination propagation area sequence are combined to obtain the degree of influence of the illumination on the pixel. The specific calculation formula is:

[0075]

[0076] In the formula, Indicates the degree to which the pixel is affected by light; Represents the angle between the illumination offset direction of the pixel and the illumination propagation direction; Represents the distance between the pixel and the reference area (the shortest distance from the pixel to the area); Indicates the first The overall grayscale of a region; Indicates the number of regions in the sequence of light propagation regions; Represents a sigmoid function, which is used for normalization processing in this embodiment.

[0077] It should be noted that the farther the distance between the pixel and the reference area is, and the larger the angle between the direction from the light source to the pixel and the direction of light propagation is, the less the pixel is affected by the light. and The larger the value of is, the less the pixel is affected by light; The larger the value is, the greater the overall light intensity of the bridge is, that is, the greater the degree to which each pixel in the bridge image is affected by the light.

[0078] Furthermore, for any pixel, the grayscale value of the pixel is corrected according to the degree to which the pixel is affected by light, and the specific calculation formula is:

[0079]

[0080] In the formula, represents the gray value of the pixel after correction; Represents the gray value of the pixel; Indicates the degree to which the pixel is affected by light.

[0081] It should be noted that when the pixel is more affected by light, the gray value of the pixel is greater than the original gray value of the pixel, that is, the gray value of the pixel needs to be reduced. The larger the value is, the grayscale value of the pixel should be reduced, and the pixel will restore its original grayscale value.

[0082] Similarly, the gray values ​​of all pixels are corrected to obtain a corrected bridge image.

[0083] Step S003: Divide the corrected bridge image into several windows, and divide the window into several sub-areas according to the edges in the window; divide the edge of the sub-area into several edge segments, and obtain the flatness of the edge segment; according to the flatness of the edge segment in the window and the difference between adjacent sub-areas in the window, obtain the landmark features of the window.

[0084] It should be noted that, as a method for measuring angles in bridge construction, the specific process of this embodiment is to first enhance the bridge image, and then identify the landmarks in the corrected bridge image. After the corrected bridge image is obtained through step S002, it can be identified; that is, it is necessary to identify the landmarks from the corrected bridge image, so the bridge image corrected according to the specifications of the landmarks is divided into several windows; based on the landmark features contained in the window, the possibility of the window being a landmark is calculated.

[0085] Preferably, in a specific embodiment of the present invention, the specifications of the marker in the image are obtained, a sliding window with the same specifications as the marker in the image is constructed, the sliding step size of the sliding window is set to 1, and the corrected bridge image is traversed using the sliding window to obtain several windows.

[0086] For any window, the canny edge detection algorithm is used to obtain the edge in the window. Since canny is a well-known prior art, it will not be described in detail in this embodiment. According to the edge in the window, the window is divided into a plurality of sub-areas;

[0087] For any sub-region, corner point detection is performed on the sub-region to obtain a number of corner points of the sub-region. Since corner point detection is a well-known prior art, it will not be described in detail in this embodiment; the several corner points of the sub-region are used as segmentation points of the edge of the sub-region to obtain a number of edge segments of the sub-region;

[0088] For any edge segment, a linear fitting is performed on the edge segment using the least square method to obtain a fitting result of the edge segment, and a root mean square error between the edge segment and the fitting result of the edge segment is obtained; since the least square method and the root mean square error are well-known prior arts, they will not be described in detail in this embodiment;

[0089] Furthermore, the horizontal right direction is taken as the 0° direction, and the 45° direction is taken as the maximum deviation direction, and the angle (minimum angle) between the fitting result of the edge segment and the maximum deviation direction is obtained; the ratio of the angle between the fitting result of the edge segment and the maximum deviation direction to the root mean square error between the edge segment and the fitting result of the edge segment is normalized, and the normalized result is taken as the flatness of the edge segment. The specific calculation formula is:

[0090]

[0091] In the formula, Indicates the flatness of the edge segment; represents the angle between the fitting result of the edge segment and the direction of maximum deviation; represents a root mean square error between the edge segment and a fitting result of the edge segment; Represents the sigmoid function; in this embodiment, it is used for normalization processing.

[0092] It should be noted that the flatness of the edge segment indicates the straightness of the edge segment along the horizontal or vertical direction. The straighter the edge segment is, the smaller the root mean square error between the edge segment and the fitting result of the edge segment is. The larger the angle between the fitting result of the edge segment and the 45° direction is, the closer the edge is to the horizontal or vertical direction. Therefore, The larger the value of , the more the edge segment has the characteristic of extending straightly in the horizontal or vertical direction. The edge in the marker has the characteristic of extending straightly in the horizontal or vertical direction.

[0093] It needs to be further explained that, since the marker is a QR code, and the edges in the QR code are always flat, that is, the edges are always horizontal and vertical, therefore, when the edges in the window have the characteristics of flatness, the window has more characteristics of a marker. At the same time, the QR code consists of black and white parts, that is, the difference between the two parts is large, therefore, the greater the difference between the two parts in the window, the more the window has the characteristics of a marker, so the marker characteristics in the window are obtained in this way.

[0094] Specifically, a flatness threshold is preset , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. For any edge segment, if the flatness of the edge segment is greater than , then the edge segment is a flat edge segment; if the flatness of the edge segment is less than or equal to , then the edge segment is a tortuous edge segment; obtain all the flat edge segments in the window.

[0095] Further, for any sub-region in any window, a sub-region in the window that has a common edge with the sub-region is recorded as an adjacent sub-region of the sub-region;

[0096] Obtain the flat edge segment in the window, and according to the proportion of the flat edge segment in the window to the edge in the window, combined with the grayscale difference between each sub-region and the adjacent sub-region of each sub-region in the window, obtain the marker feature of the window, and the specific calculation formula is:

[0097]

[0098] In the formula, Indicates the landmark features possessed by the window; Indicates the number of pixels on the flat edge segment in the window; Represents the number of pixels on the edge of the window; represents the number of sub-regions in the window; Indicates the first The grayscale mean of each sub-region; Indicates the first The sub-region The grayscale mean of adjacent sub-regions; Indicates the window The number of adjacent sub-regions of a sub-region; Represents the absolute value function.

[0099] It should be noted that; The larger the value of is, the higher the proportion of the edge segments extending straight in the horizontal or vertical direction in the window is, and the more the window has the landmark feature; It represents the difference between adjacent sub-regions in the window. The greater the difference between adjacent sub-regions, the more landmark features the window has. The larger the value of , the more characteristic the window is of a landmark.

[0100] At this point, the landmark features of the window are obtained.

[0101] Step S004: Identify the landmarks in the corrected bridge image according to the landmark features of the window.

[0102] It should be noted that the marker features of each window in the corrected bridge image are obtained through step S003, and further combined with the similarity between each window in the bridge image and the marker, so as to accurately identify the marker in the bridge image, thereby accurately measuring the construction angle of the building bridge.

[0103] Specifically, for any window in the corrected bridge image, the grayscale value of each pixel of the marker in the bridge image is obtained through the internal and external parameters of the camera, recorded as the grayscale value of each pixel in the marker image, and the possibility of the window being a marker is obtained by combining the grayscale value of each pixel in the window with the marker feature of the window. The specific calculation formula is:

[0104]

[0105] In the formula, Indicates the possibility that the window is a landmark; Indicates the landmark features possessed by the window; Represents the number of pixels in the window; Indicates the first The gray value of each pixel; Indicates the first The gray value of each pixel; It represents the absolute value function; Represents the sigmoid function; in this embodiment, it is used for normalization processing.

[0106] Similarly, the probability of all windows being landmarks is obtained, and the one with the highest probability of being a landmark is selected. A window is used as the location of the landmark in the corrected bridge image. is the preset number of markers.

[0107] It should be noted that after the position of the marker in the bridge image is accurately obtained through step S004, the Digital Image Correlation technology can be used according to the position of the marker to accurately measure the angle of the construction of the bridge. Since the Digital Image Correlation technology is a well-known existing technology, it will not be described in detail in this embodiment.

[0108] The present invention also proposes an angle measurement device for building bridge construction, comprising an angle measurement device body for building bridge construction, an image acquisition module, an image correction module, a marker recognition module, and an angle measurement module;

[0109] The image acquisition module is used to acquire bridge images;

[0110] The image correction module is used to divide the bridge image into several areas; obtain the reference area according to the grayscale performance of the pixel points in each area, and obtain the light direction in combination with the grayscale changes of each area in the bridge image in each direction; obtain the degree of influence of each pixel point on the light according to the position of each pixel point in the bridge image and the light direction; correct each pixel point according to the degree of influence of each pixel point on the light, obtain the grayscale value of each pixel point after correction, and obtain the corrected bridge image;

[0111] The landmark recognition module is used to divide the corrected bridge image into a number of windows, divide the window into a number of sub-regions according to the edge in the window; divide the edge of the sub-region into a number of edge segments, and obtain the smoothness of the edge segment; according to the smoothness of the edge segment in the window, combined with the difference between adjacent sub-regions in the window, obtain the landmark features of the window;

[0112] The angle measurement module is used to identify the marker in the corrected bridge image according to the marker features possessed by the window.

[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring angles in bridge construction, characterized in that: The method comprises the following steps: Collect bridge images; The bridge image is divided into several areas; according to the grayscale performance of the pixel points in each area, the reference area is obtained, and the light direction is obtained in combination with the grayscale changes of each area in the bridge image in each direction; according to the position of each pixel point in the bridge image and the light direction, the degree of influence of each pixel point on the light is obtained; according to the degree of influence of each pixel point on the light, each pixel point is corrected, and the grayscale value of each pixel point after correction is obtained to obtain the corrected bridge image; The corrected bridge image is divided into several windows, and the windows are divided into several sub-regions according to the edges in the windows; the edges of the sub-regions are divided into several edge segments, and the smoothness of the edge segments is obtained; according to the smoothness of the edge segments in the windows and the differences between adjacent sub-regions in the windows, the landmark features of the windows are obtained; According to the landmark features of the window, the landmarks in the corrected bridge image are identified; the angle of the bridge construction is measured through the landmarks; The specific method of acquiring the marker characteristics of the window includes: Preset a flatness threshold For any edge segment in the window, if the flatness of the edge segment is greater than , then the edge segment is a flat edge segment; obtain all the flat edge segments in the window; for any sub-region in any window, record the sub-region in the window that has a common edge with the sub-region as an adjacent sub-region of the sub-region; Obtain the flat edge segment in the window, and according to the proportion of the flat edge segment in the window to the edge in the window, combined with the grayscale difference between each sub-region and the adjacent sub-region of each sub-region in the window, obtain the marker feature of the window, and the specific calculation formula is: In the formula, Indicates the landmark features possessed by the window; Represents the number of pixels on the flat edge segment in the window; Represents the number of pixels on the edge of the window; represents the number of sub-regions in the window; Indicates the first The grayscale mean of each sub-region; Indicates the first The sub-region The grayscale mean of adjacent sub-regions; Indicates the window The number of adjacent sub-regions of a sub-region; It represents the absolute value function; The specific method of identifying the landmark in the corrected bridge image includes: For any window in the corrected bridge image, the grayscale value of each pixel of the marker in the bridge image is obtained, recorded as the grayscale value of each pixel in the marker image, and the possibility of the window being a marker is obtained by combining the grayscale value of each pixel in the window with the marker feature of the window. The specific calculation formula is: In the formula, Indicates the possibility that the window is a landmark; Represents the number of pixels in the window; Indicates the first The gray value of each pixel; Indicates the first The gray value of each pixel; Represents the sigmoid function; Get the probability of all windows being landmarks, and select the one with the highest probability of being a landmark A window is used as the location of the landmark in the corrected bridge image. is the preset number of markers.

2. The angle measurement method for building bridge construction according to claim 1, characterized in that: The specific method of obtaining the light direction includes: Preset a number of rays ; The horizontal right direction is taken as 0° direction, The direction is taken as the first ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the first ray; by The direction is taken as the second ray direction, the center of the reference area is taken as the ray center, and a ray is made and recorded as the second ray; And so on, until Direction as the first The ray direction is based on the center of the reference area as the ray center, and a ray is recorded as the first ray; All regions passed by any ray are sorted according to the extension direction of the ray to obtain a region sequence passed by the ray, recorded as the region sequence of the ray, and the possibility that the ray direction of the ray is the light direction is obtained according to the grayscale mean of each region in the region sequence of the ray; The ray direction with the greatest possibility is taken as the propagation direction of the illumination; and the region sequence of the ray corresponding to the propagation direction of the illumination is recorded as the illumination propagation region sequence.

3. The angle measurement method for building bridge construction according to claim 2, characterized in that: The possibility of obtaining the ray direction of the ray as the light direction includes the specific calculation formula: In the formula, represents the possibility that the ray direction of the ray is the light direction; The number of regions in the region sequence representing the ray; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; The region sequence of the ray The grayscale mean of the region; Represents the sign function.

4. The angle measurement method for building bridge construction according to claim 2, characterized in that: The specific method of obtaining the degree to which each pixel is affected by light is as follows: The mean grayscale value of all pixels in any area in the illumination propagation area sequence is taken as the overall grayscale of the area; for any pixel in the bridge image, the illumination offset direction of the pixel is obtained from the pixel to the center point of the reference area, and the angle between the illumination offset direction of the pixel and the illumination propagation direction is obtained. The degree of influence of the illumination on the pixel is obtained by combining the distance between the pixel and the reference area and the overall grayscale of each area in the illumination propagation area sequence. The specific calculation formula is: In the formula, Indicates the degree to which the pixel is affected by light; Represents the angle between the illumination offset direction of the pixel and the illumination propagation direction; represents the distance between the pixel point and the reference area; Indicates the first The overall grayscale of a region; Indicates the number of regions in the light propagation region sequence.

5. The angle measurement method for building bridge construction according to claim 1, characterized in that: The specific method of obtaining the corrected grayscale value of each pixel is as follows: For any pixel, the gray value of the pixel is corrected according to the degree to which the pixel is affected by light. The specific calculation formula is: In the formula, represents the gray value of the pixel after correction; Represents the gray value of the pixel; Indicates the degree to which the pixel is affected by light.

6. The angle measurement method for building bridge construction according to claim 1, characterized in that: The modified bridge image is divided into a plurality of windows, and the windows are divided into a plurality of sub-regions according to the edges in the windows, including the specific method of: Obtain the specifications of the landmark in the image, construct a sliding window with the same specifications as the landmark in the image, and use the sliding window to traverse the corrected bridge image to obtain a number of windows; For any window, an edge detection algorithm is used to obtain the edge in the window; and the window is divided into a plurality of sub-areas according to the edge in the window.

7. The angle measurement method for building bridge construction according to claim 1, characterized in that: The method of dividing the edge of the sub-region into a plurality of edge segments and obtaining the flatness of the edge segments includes: For any sub-region, corner point detection is performed on the sub-region to obtain a number of corner points of the sub-region; the number of corner points of the sub-region are used as segmentation points of the edge of the sub-region to obtain a number of edge segments of the sub-region; For any edge segment, use the least square method to perform straight line fitting on the edge segment to obtain a fitting result of the edge segment, and obtain a root mean square error between the edge segment and the fitting result of the edge segment; Taking the horizontal right direction as the 0° direction and the 45° direction as the maximum deviation direction, obtaining the angle between the fitting result of the edge segment and the maximum deviation direction; The ratio of the angle between the fitting result of the edge segment and the maximum deviation direction to the root mean square error between the edge segment and the fitting result of the edge segment is normalized, and the normalized result is used as the flatness of the edge segment.

8. An angle measuring device for building bridge construction, comprising a body of the angle measuring device for building bridge construction, characterized in that: It also includes an image acquisition module, an image correction module, a landmark recognition module, and an angle measurement module: The image acquisition module is used to acquire bridge images; The image correction module is used to divide the bridge image into several areas; obtain the reference area according to the grayscale performance of the pixel points in each area, and obtain the light direction in combination with the grayscale changes of each area in the bridge image in each direction; obtain the degree of influence of each pixel point on the light according to the position of each pixel point in the bridge image and the light direction; correct each pixel point according to the degree of influence of each pixel point on the light, obtain the grayscale value of each pixel point after correction, and obtain the corrected bridge image; The landmark recognition module is used to divide the corrected bridge image into a number of windows, divide the window into a number of sub-regions according to the edge in the window; divide the edge of the sub-region into a number of edge segments, and obtain the smoothness of the edge segment; according to the smoothness of the edge segment in the window, combined with the difference between adjacent sub-regions in the window, obtain the landmark features of the window; The angle measurement module is used to identify the markers in the corrected bridge image according to the marker features of the window; and measure the angle of the bridge construction through the markers; The specific method of acquiring the marker characteristics of the window includes: Preset a flatness threshold For any edge segment in the window, if the flatness of the edge segment is greater than , then the edge segment is a flat edge segment; obtain all the flat edge segments in the window; for any sub-region in any window, record the sub-region in the window that has a common edge with the sub-region as an adjacent sub-region of the sub-region; Obtain the flat edge segment in the window, and according to the proportion of the flat edge segment in the window to the edge in the window, combined with the grayscale difference between each sub-region and the adjacent sub-region of each sub-region in the window, obtain the marker feature of the window, and the specific calculation formula is: In the formula, Indicates the landmark features possessed by the window; Represents the number of pixels on the flat edge segment in the window; Represents the number of pixels on the edge of the window; represents the number of sub-regions in the window; Indicates the first The grayscale mean of each sub-region; Indicates the first The sub-region The grayscale mean of adjacent sub-regions; Indicates the window The number of adjacent sub-regions of a sub-region; It represents the absolute value function; The specific method of identifying the landmark in the corrected bridge image includes: For any window in the corrected bridge image, the grayscale value of each pixel of the marker in the bridge image is obtained, recorded as the grayscale value of each pixel in the marker image, and the possibility of the window being a marker is obtained by combining the grayscale value of each pixel in the window with the marker feature of the window. The specific calculation formula is: In the formula, Indicates the possibility that the window is a landmark; Represents the number of pixels in the window; Indicates the first The gray value of each pixel; Indicates the first The gray value of each pixel; Represents the sigmoid function; Get the probability of all windows being landmarks, and select the one with the highest probability of being a landmark A window is used as the location of the landmark in the corrected bridge image. is the preset number of markers.

Citation Information

Patent Citations

  • Automatic detection method and device for roughness light-incision profile curve

    CN104697476A

  • Hob wear image identification and measurement method and system

    CN117808810A